tiro-notes 0.30.412 → 0.30.413

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.
@@ -2,7 +2,7 @@
2
2
  "files": {
3
3
  "static/js/0.96d25570.chunk.js": "/static/js/0.96d25570.chunk.js",
4
4
  "static/js/1.ce6087e5.chunk.js": "/static/js/1.ce6087e5.chunk.js",
5
- "main.js": "/static/js/main.5ad30e0e.chunk.js",
5
+ "main.js": "/static/js/main.52c8d76a.chunk.js",
6
6
  "runtime-main.js": "/static/js/runtime-main.5db0e41b.js",
7
7
  "static/css/4.992ae4ff.chunk.css": "/static/css/4.992ae4ff.chunk.css",
8
8
  "static/js/4.7b260e5a.chunk.js": "/static/js/4.7b260e5a.chunk.js",
@@ -105,6 +105,6 @@
105
105
  "static/js/runtime-main.5db0e41b.js",
106
106
  "static/css/4.992ae4ff.chunk.css",
107
107
  "static/js/4.7b260e5a.chunk.js",
108
- "static/js/main.5ad30e0e.chunk.js"
108
+ "static/js/main.52c8d76a.chunk.js"
109
109
  ]
110
110
  }
package/client/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Tiro</title><link href="/static/css/4.992ae4ff.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,f,a=t[0],u=t[1],d=t[2],b=0,l=[];b<a.length;b++)f=a[b],Object.prototype.hasOwnProperty.call(c,f)&&c[f]&&l.push(c[f][0]),c[f]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(i&&i(t);l.length;)l.shift()();return o.push.apply(o,d||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,a=1;a<r.length;a++){var u=r[a];0!==c[u]&&(n=!1)}n&&(o.splice(t--,1),e=f(f.s=r[0]))}return e}var n={},c={3:0},o=[];function f(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,a=document.createElement("script");a.charset="utf-8",a.timeout=120,f.nc&&a.setAttribute("nonce",f.nc),a.src=function(e){return f.p+"static/js/"+({}[e]||e)+"."+{0:"96d25570",1:"ce6087e5",5:"3c3e81d1",6:"54798d08",7:"eeed7e6b",8:"8613e932",9:"75ff48d0",10:"3fd8768a",11:"03cc8bb2",12:"947e305d",13:"8f045f39",14:"9c9c9a2e",15:"626b2d1d",16:"bed1900e",17:"007401b8",18:"b12a80a1",19:"178eb433",20:"b5337f76",21:"c62b3dd9",22:"0912db96",23:"a4fc71f7",24:"ef9a161f",25:"505cc9d5",26:"2f7b6c02",27:"006b8e5c",28:"1def83f7",29:"fab41293",30:"1df91a9d",31:"0e5eea50",32:"3cf7833d",33:"818fe5d8",34:"9471fce6",35:"4f562dd8",36:"4078c53d",37:"79f940c9",38:"77c71754",39:"0cc4bff7",40:"140c139e",41:"3cdccd20",42:"1ec92659",43:"8bac53fb",44:"dc17a09f",45:"2b54450c",46:"63f78695",47:"ee55c041",48:"01af3340",49:"78b9c639",50:"abe623b0",51:"f55ad8cb",52:"85267a87",53:"824270e8",54:"f4cd5a86",55:"aaeb7a76",56:"7e6af4bd",57:"f706d878",58:"1060b6a5",59:"5903fcf0",60:"fcc24c05",61:"7a00deca",62:"bba721e7",63:"ff329579",64:"3c92104a",65:"9bc487bf",66:"9f0a78e1",67:"032ffb1b",68:"2c41878d",69:"9b3afc04",70:"1cd8212e",71:"74ec8486",72:"58df345d",73:"2d9be138",74:"a06eb860",75:"7141a5e5",76:"0c6f0052",77:"3fc05af0"}[e]+".chunk.js"}(e);var u=new Error;o=function(t){a.onerror=a.onload=null,clearTimeout(d);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",u.name="ChunkLoadError",u.type=n,u.request=o,r[1](u)}c[e]=void 0}};var d=setTimeout((function(){o({type:"timeout",target:a})}),12e4);a.onerror=a.onload=o,document.head.appendChild(a)}return Promise.all(t)},f.m=e,f.c=n,f.d=function(e,t,r){f.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,t){if(1&t&&(e=f(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(f.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)f.d(r,n,function(t){return e[t]}.bind(null,n));return r},f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,"a",t),t},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.p="/",f.oe=function(e){throw console.error(e),e};var a=this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var d=0;d<a.length;d++)t(a[d]);var i=u;r()}([])</script><script src="/static/js/4.7b260e5a.chunk.js"></script><script src="/static/js/main.5ad30e0e.chunk.js"></script></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Tiro</title><link href="/static/css/4.992ae4ff.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,f,a=t[0],u=t[1],d=t[2],b=0,l=[];b<a.length;b++)f=a[b],Object.prototype.hasOwnProperty.call(c,f)&&c[f]&&l.push(c[f][0]),c[f]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(i&&i(t);l.length;)l.shift()();return o.push.apply(o,d||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,a=1;a<r.length;a++){var u=r[a];0!==c[u]&&(n=!1)}n&&(o.splice(t--,1),e=f(f.s=r[0]))}return e}var n={},c={3:0},o=[];function f(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,a=document.createElement("script");a.charset="utf-8",a.timeout=120,f.nc&&a.setAttribute("nonce",f.nc),a.src=function(e){return f.p+"static/js/"+({}[e]||e)+"."+{0:"96d25570",1:"ce6087e5",5:"3c3e81d1",6:"54798d08",7:"eeed7e6b",8:"8613e932",9:"75ff48d0",10:"3fd8768a",11:"03cc8bb2",12:"947e305d",13:"8f045f39",14:"9c9c9a2e",15:"626b2d1d",16:"bed1900e",17:"007401b8",18:"b12a80a1",19:"178eb433",20:"b5337f76",21:"c62b3dd9",22:"0912db96",23:"a4fc71f7",24:"ef9a161f",25:"505cc9d5",26:"2f7b6c02",27:"006b8e5c",28:"1def83f7",29:"fab41293",30:"1df91a9d",31:"0e5eea50",32:"3cf7833d",33:"818fe5d8",34:"9471fce6",35:"4f562dd8",36:"4078c53d",37:"79f940c9",38:"77c71754",39:"0cc4bff7",40:"140c139e",41:"3cdccd20",42:"1ec92659",43:"8bac53fb",44:"dc17a09f",45:"2b54450c",46:"63f78695",47:"ee55c041",48:"01af3340",49:"78b9c639",50:"abe623b0",51:"f55ad8cb",52:"85267a87",53:"824270e8",54:"f4cd5a86",55:"aaeb7a76",56:"7e6af4bd",57:"f706d878",58:"1060b6a5",59:"5903fcf0",60:"fcc24c05",61:"7a00deca",62:"bba721e7",63:"ff329579",64:"3c92104a",65:"9bc487bf",66:"9f0a78e1",67:"032ffb1b",68:"2c41878d",69:"9b3afc04",70:"1cd8212e",71:"74ec8486",72:"58df345d",73:"2d9be138",74:"a06eb860",75:"7141a5e5",76:"0c6f0052",77:"3fc05af0"}[e]+".chunk.js"}(e);var u=new Error;o=function(t){a.onerror=a.onload=null,clearTimeout(d);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",u.name="ChunkLoadError",u.type=n,u.request=o,r[1](u)}c[e]=void 0}};var d=setTimeout((function(){o({type:"timeout",target:a})}),12e4);a.onerror=a.onload=o,document.head.appendChild(a)}return Promise.all(t)},f.m=e,f.c=n,f.d=function(e,t,r){f.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,t){if(1&t&&(e=f(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(f.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)f.d(r,n,function(t){return e[t]}.bind(null,n));return r},f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,"a",t),t},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.p="/",f.oe=function(e){throw console.error(e),e};var a=this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var d=0;d<a.length;d++)t(a[d]);var i=u;r()}([])</script><script src="/static/js/4.7b260e5a.chunk.js"></script><script src="/static/js/main.52c8d76a.chunk.js"></script></body></html>
@@ -0,0 +1 @@
1
+ (this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[]).push([[2],{418:function(t,n){},504:function(t,n){},506:function(t,n){},516:function(t,n){},518:function(t,n){},543:function(t,n){},545:function(t,n){},546:function(t,n){},551:function(t,n){},553:function(t,n){},559:function(t,n){},561:function(t,n){},580:function(t,n){},592:function(t,n){},595:function(t,n){},611:function(t,n,e){"use strict";e.r(n);var o=e(16),c=e.n(o),i=e(253),a=e.n(i),r=e(14),l=e(13),s=function(t){return u()===t};function p(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var u=function(){var t=window.innerWidth,n="desktop";return d()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},d=function(){return!f()},f=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},b=e(63),g=e(23),h=e(32),m=e.n(h),v=e(379);function w(t,n){var e=Object(o.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),c=Object(r.a)(e,2),i=c[0],a=c[1];return[i,function(n){try{var e=n instanceof Function?n(i):n;a(e),window.localStorage.setItem(t,JSON.stringify(e))}catch(o){console.log(o)}}]}var x=96,O={staticResources:"static",defaultDataFolder:"markdown-notes",configFolder:".tiro",backendStateFolder:".states",historyFolder:".history",archiveFolder:".history_archive",uploadFolder:".resources",relativeUploadFolderName:".resources"},j={headerStart:"=== HEADER ===",headerEnd:"=== END HEADER ==="},k={log:{socket:!0,eventManager:!0,upload:!1},version:"0.30.4",params:{previewArea:{scrollSpeed:1.3}}},y={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) : ",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:"Port",portExpl:"Port used by backend (ex: 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"}},C=e(0),T=e(1),S=e(4),E=e(5),N=(e(421),e(422),e(423),e(424),e.p+"static/media/deco-bg-map.7ca9103b.png"),I=e.p+"static/media/file-solid.6415173e.svg",F=e.p+"static/media/compact-disc-solid.55b6e50c.svg",A=e.p+"static/media/file-pdf-solid.0a9d75fe.svg",D=e.p+"static/media/file-word-solid.9228e1ff.svg",R=e.p+"static/media/book-solid.87f5b737.svg",L=e.p+"static/media/file-excel-solid.217d73db.svg",P=e.p+"static/media/file-video-solid.312288cf.svg",z=e.p+"static/media/file-audio-solid.a76f99f0.svg",M=e.p+"static/media/file-zipper-solid.7db57917.svg",B=e.p+"static/media/file-powerpoint-solid.4d969453.svg",U=e.p+"static/media/link-solid.7b689dbd.svg",_=e.p+"static/media/globe-africa-solid.0ad34146.svg",H=e.p+"static/media/search-solid.cc51b702.svg",W={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"}},V={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(W.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:W,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:N,linkIcon:U,worldIcon:_,fileIcon:I,diskIcon:F,pdfIcon:A,presIcon:B,audioIcon:z,videoIcon:P,excelIcon:L,wordIcon:D,bookIcon:R,archiveIcon:M,searchIcon:H}},Y=function(t){Object(S.a)(e,t);var n=Object(E.a)(e);function e(){var t;Object(C.a)(this,e);for(var o=arguments.length,c=new Array(o),i=0;i<o;i++)c[i]=arguments[i];return(t=n.call.apply(n,[this].concat(c))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(T.a)(e,[{key:"render",value:function(){var t=this;return Object(l.c)("div",{className:"popup-wrapper-component"},Object(l.c)("div",{className:"overlay-click-popup",onClick:function(n){t.canBgClose&&t.props.onClose()}}),Object(l.c)("div",{className:"popup-wrapper ".concat(p()?"ipad":"")},Object(l.c)("div",{className:"popupTitle"}," ",this.props.title),Object(l.c)("div",{className:"popupContent"},this.props.children)))}}]),e}(c.a.Component),q=function(t){var n,e=Object(b.a)({},t).value,c=Object(o.useRef)(),i=function(){t.shouldFocus&&c.current.focus()};return Object(o.useEffect)((function(){i()}),[t.shouldFocus]),Object(o.useEffect)((function(){i()}),[]),Object(l.c)("div",{className:"input-component ".concat(t.id?t.id:""," ").concat(t.type)},t.label&&Object(l.c)("span",null,t.label," :"),Object(l.c)("div",{className:"input-wrapper"},"select"!==t.type&&Object(l.c)("input",{ref:c,type:t.type?t.type:"text",value:t.value,readOnly:t.readonly,onFocus:function(){t.onFocus&&t.onFocus()},onClick:function(){!t.shouldNotSelectOnClick&&c.current.select()},onKeyPress:function(n){"Enter"==(n.code||n.key)&&t.onEnterPressed&&t.onEnterPressed()},onChange:function(n){t.onChange&&t.onChange(n.target.value)}}),"select"===t.type&&Object(l.c)("select",{value:t.value,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(l.c)("option",{value:t.key,selected:e===t.key},t.label," ")}))),t.explanation&&Object(l.c)("div",{className:"explanation"}," ",t.explanation," ")))},G=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)}))},J=function(t){return t=(t=(t=t.split("//").join("/")).split("\\").join("/")).split("//").join("/")},K=function(t,n){return J(t+"/")===J(n+"/")},$=["Az","Crea","Modif"],X=["alphabetical","created","modified"],Z=function(t,n){var e;switch(X[n]){case"alphabetical":e=Object(h.sortBy)(t,[function(t){return t.realname.toLocaleLowerCase()}]);break;case"created":e=Object(h.sortBy)(t,["created"]).reverse();break;case"modified":e=Object(h.sortBy)(t,["modified"]).reverse();break;default:e=Object(h.sortBy)(t,[function(t){return t.realname.toLocaleLowerCase()}])}return e},Q=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||""},tt=function(t){!function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var c="expires="+o.toUTCString();document.cookie=t+"="+n+";"+c+";path=/"}("tiro-login-token",t,x)},nt={title:"",key:"",path:""},et=function t(n,e){for(var o,c=0;c<e.length;c++)if(K(e[c].path,n)){o=Object(h.cloneDeep)(e[c]);var i=e[c].children;if(Object(h.isArray)(i))for(var a=0;a<i.length;a++){var r=t(i[a].path,e);r&&(o.children[a]=r)}}return o},ot=function(t,n){for(var e="add",o=0;o<n.length;o++)K(t.path,n[o].path)&&(n[o]=t,e="update");return"add"===e&&n.push(t),n},ct={title:".trash",key:"/.tiro/.trash",path:"/.tiro/.trash"},it=e(98),at=e.n(it),rt={img:at()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:at()().anythingBut("[]|").maybe("|").beginCapture().anythingBut("[]|").endCapture().maybe("|").beginCapture().anythingBut("[]|").endCapture(),customTag:/\[\[[a-zA-Z0-9-\ _\/]*\]\]/},lt={metas:at()().find(j.headerStart).beginCapture().anythingBut("").endCapture().then(j.headerEnd),baliseHtml:at()().find("<").anythingBut("<>").then(">"),ressource:at()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:at()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:at()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(rt.img).anythingBut("()").endCapture().then(")"),image:at()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(rt.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:at()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(rt.img).anythingBut("()").endCapture().then(")"),imageAndConfig:at()().find("![").then(rt.imgMdConfig).then("](").beginCapture().anythingBut("()").then(rt.img).anythingBut("()").endCapture().then(")"),searchlink:at()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink:at()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:at()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:at()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:at()().find(rt.customTag).beginCapture().anythingBut("").endCapture().then(rt.customTag),userCustomTag3:at()().beginCapture().then(rt.customTag).endCapture(),userCustomTagManual:rt.customTag,url2transform:at()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:at()().find(" /").anything().endOfLine(),searchFolderNoSpace:at()().find("/").anything().endOfLine(),firstPartImg:at()().find("![").anythingBut("[]").then("]("),hashtag:at()().find("#").beginCapture().anythingBut(" ").endCapture()},st=!1,pt=function(t){if(!t)return null;if(t.startsWith(j.headerStart)&&(st=!0),t.startsWith(j.headerEnd)&&(st=!1),""===t)return null;if(!st)return null;var n=t.split(": ");if(2!==n.length)return null;var e=n.shift();if(!e)return null;var o,c=n.join(":").trim();if("created"===e||"modified"===e){o=c,c=parseInt(o).toString()===o?function(t){var n="".concat(t).substr(0,10);return parseInt(n)}(c):c;var i=new Date(c).getTime();isNaN(i)||(c=i)}return{name:e,value:c}},ut=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},dt=function(t){var n="[FILE API] 005363 ";Object(o.useEffect)((function(){_t.on("getFileContent",(function(n){if(n.error)t.eventBus.notify(n.idReq,{error:n.error});else{var e=function(t){var n=t.match(lt.metas),e={};if(n&&n[0])for(var o=n[0].split("\n"),c=0;c<o.length;c++){var i=pt(o[c]);i&&(e[i.name]=i.value)}return{metas:e,content:ut(t,[[lt.metas,""]])}}(n.fileContent);t.eventBus.notify(n.idReq,{content:e.content})}}))}),[]);var e=Object(o.useRef)("");return{getContent:function(e,cb,o){console.log("".concat(n," get file content ").concat(e));var c=ft(e),i=Pt("get-file-content");t.eventBus.subscribe(i,(function(t){t.error?t.error&&o&&o.onError&&o.onError(t.error):cb(t.content)})),_t.emit("askForFileContent",{filePath:c,token:Q(),idReq:i})},saveContent:function(o,c,i){var a=!(!i||!i.history)&&i.history;!i||!i.withMetas||i.withMetas;console.log("".concat(n," save file content ").concat(o));var r=ft(o);_t.emit("saveFileContent",{filePath:r,newFileContent:c,token:Q()}),a&&(o!==e.current&&Dt().then((function(t){var n=t.ui.browser.folders.current.get;n===function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return J(e)}(o)&&t.ui.browser.goTo(n)})),t.historyApi.intervalSave(o,c),e.current=o)},delete:function(e,cb){var o=Pt("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),_t.emit("onFileDelete",{filepath:e.path,idReq:o,token:Q()})},move:function(t){return{file:function(n,e,cb){var o=Pt("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),_t.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Q()})}}}({eventBus:t.eventBus}).file,create:function(e,cb){var o=Pt("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),_t.emit("createNote",{folderPath:e,idReq:o,token:Q()})}}},ft=function(t){return t.replace(lt.linklink,"$2/$1")},bt=function(t){var n="[SEARCH API] 00563 ",e=Object(o.useState)(""),c=Object(r.a)(e,2),i=c[0],a=c[1];Object(o.useEffect)((function(){_t.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var l=function(e,cb){!function(e,cb,o){var c=Pt("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(c,(function(n){t.statusApi.searching.set(!1),cb(n)})),_t.emit("searchFor",{term:e,token:Q(),type:o,idReq:c})}(e,cb,"text")};return{files:{search:l},word:function(e,o,cb){var c=Pt("search-word-");console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(c,(function(t){cb(t)})),_t.emit("searchWord",{word:e,folder:o,token:Q(),idReq:c})},ui:{search:function(t){Dt().then((function(n){n.ui.browser.files.set([]),a(t),l(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:a,get:i}}}},gt=e(428),ht=function(t){var n=Object(b.a)({},t).eventBus;Object(o.useEffect)((function(){_t.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]);return{uploadFile:function(t){var e=Pt("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess(n)})),function(t){var n=Object(b.a)({},t),e=n.file,o=n.path,c=n.idReq,i=n.onProgress,a=new gt(Ut);a.addEventListener("start",(function(t){t.file.meta.idReq=c,t.file.meta.path=o})),a.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);i(n)})),a.submitFiles([e])}({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}}},mt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,vt=/([^\s,]+)/g,wt=e(429),xt=function(t){return wt(t)},Ot=function(t,n,e){var o=t,c=o.match(n)||"";return Object(h.each)(c,(function(t){o=o.replace(t,e(t))})),o},jt=function(t,n,e){var o=t,c=n.replace("[[","").replace("]]",""),i="(?:\\[\\[".concat(c,"\\]\\])((?:[^]*))(?:\\[\\[").concat(c,"\\]\\])"),a=new RegExp(i,"gm"),r=o.match(a)||"";if(r[0]){for(var l=r[0].split(n),s=[],p=0;p<l.length;p++){var u=l[p];""!==u&&s.push(u)}for(var d=0;d<s.length;d++){s[d];if(d%2===0)try{s[d]=e(s[d])}catch(b){console.warn("[REPLACE CUSTOM MD TAGS] error: ".concat(b),s[d])}}var f=s.join("");o=o.replace(a,f)}return o},kt=function(t){var n=t.replace("".concat(qt(),"/").concat(O.staticResources,"/"),""),e="".concat(qt(),"/").concat(O.staticResources,"/").concat(n);return t.startsWith("http")?t:e},yt=function(){return"?token=".concat(Q())},Ct=function(t,n){var e=0,o=function(t,n){var e=t.match(lt.image),o=[];return Object(h.each)(e,(function(t){var e=t.match(lt.firstPartImg),c=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",i=t.replace(lt.firstPartImg,"").replace(")",""),a={url:kt(n.folder)+"/"+i,title:c,file:n};o.push(a)})),o}(n,t);if(0===o.length)return n;var c=encodeURIComponent(JSON.stringify(o));return Ot(n,lt.image,(function(n){var o=n.split("](")[1].slice(0,-1),i='<div class="content-image" data-images='.concat(c,' data-index="').concat(e,'"><img class="content-image-img" style="').concat("\n width: $1px;\n max-width: 100%;\n // min-height: $1px;\n transform: rotate($2deg);\n ",'" src="').concat(kt(t.folder),"/").concat(o).concat(yt(),'" /></div>');return e++,i}))},Tt=function(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},St=function(t){var n,e,o=Object(b.a)({},t),c=o.raw,i=o.file,a=o.windowId;return xt((n=i.folder,e=Ct(i,function(t){var n=t.replace(lt.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return ut(n,[[">[__id_",">["],[">[__tags_",">["],[">[__tag_",">["],[" ]</a>","]</a>"]])}(function(t,n){var e='<a class="title-search-link preview-link" data-file="$1" data-folder="$2" data-windowid="'.concat(t,'">$1</a>');return n.replace(lt.linklink,e)}(a,function(t){var n='<a class="external-link preview-link" href="#" '.concat("onclick=\"window.open('$1','$1','width=600,height=600');\"",">$2</a>");return t.replace(lt.url2transform,n)}(c)))),Ot(e,lt.ressource,(function(t){var e=t.split("](")[1].slice(0,-1),o=t.split("](")[0].replace("![",""),c=e.split("."),i=c[c.length-1];"7z"===i&&(i="d7z");var a="".concat(kt(n),"/").concat(e).concat(yt());return o.includes("|open")?'\n<div class="iframe-ressource-wrapper">\n\t<iframe src="'.concat(a,'" style="width: 100%; height:500px; border: none;"></iframe>\n</div>\n'):'<div class="resource-link-wrapper">\n\t<div class="resource-link-icon '.concat(i,'"></div>\n\t<a class="resource-link preview-link"\n\t\thref="').concat(a,'"\n\t\tdownload="wppp-').concat(o,".").concat(i,'"\n\t>\n\t\t').concat(o," (").concat(i,")\n\t</a>\n</div>")}))))},Et=function(t,cb){for(var n=document.getElementsByClassName(t),e=function(t){var e=n[t];e.onclick=function(){cb(e)}},o=0;o<n.length;o++)e(o)},Nt=function(t){var n=t.split(lt.userCustomTagManual),e=[],o=[],c=lt.userCustomTag3,i=t.match(c)||"",a=[];Object(h.each)(i,(function(t){a.push(t)}));var r=null,l=-1,s=[],p=[],u={};if(Object(h.each)(a,(function(t){u[t]?u[t]=u[t]+1:u[t]=1})),Object(h.each)(u,(function(t,n){t>=2&&p.push(n)})),Object(h.each)(a,(function(t,e){if(p.includes(t))if(r){if(r===t){var c=[l+1,e+1];s.push.apply(s,c);for(var i=n.slice(c[0],c[1]),u=a.slice(l+1,e+1),d="",f=0;f<i.length;f++){var b=f===i.length-1?"":u[f];d+="".concat(i[f]).concat(b)}o.push({type:"tag",tagName:r.replace("[[","").replace("]]",""),content:d,start:l,end:e}),l=-1,r=null}}else r=t,l=e})),0===s.length)e.push({type:"text",content:t,start:0,end:1});else{s.unshift(0);for(var d=0;d<s.length;d+=2){var f=s[d];n[f]&&e.push({type:"text",content:n[f],start:f,end:f+1})}}for(var b=0===t.indexOf(a[0]),g=[],m=o.length>e.length?o.length:e.length,v=0;v<m;v++)b?(o[v]&&g.push(o[v]),e[v]&&g.push(e[v])):(e[v]&&g.push(e[v]),o[v]&&g.push(o[v]));return g},It=function(t){var n="";return Object(h.each)(t,(function(t){"text"===t.type?n+=t.content:"tag"===t.type&&(n+="[[".concat(t.tagName,"]]").concat(t.content,"[[").concat(t.tagName,"]]"))})),n},Ft={render:function(t){var n=Object(b.a)({},t),e=n.raw,o=n.file,c=n.windowId,i=Nt(e);return Object(h.each)(i,(function(t){"text"===t.type&&(t.content=St({raw:t.content,file:o,windowId:c})),"tag"===t.type&&(t.content=t.content.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"))})),It(i)},injectLogic:function(t){Et("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;Dt().then((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))})),Et("content-image",(function(t){Dt().then((function(n){var e=parseInt(t.dataset.index);try{var o=JSON.parse(decodeURIComponent(t.dataset.images));Object(h.isNumber)(e)||(e=0),n.ui.lightbox.open(e,o)}catch(c){console.error(c)}}))}))},chunks:{chunk:Nt,merge:It}},At=null,Dt=function(){return new Promise((function(t,n){if(At)return t(At);var e=setInterval((function(){if(At)return clearInterval(e),t(At)}),200)}))},Rt=c.a.createContext(null),Lt=function(t){var n=Object(o.useRef)({}),e=function(t){delete n.current[t]},c={subscribe:function(t,cb){n.current[t]=cb},unsubscribe:e,notify:function(t,o){Object(h.each)(n.current,(function(n,c){if(c===t){try{n(o)}catch(i){console.log("[CLIENT API] error with function",i)}e(t)}}))}};Object(o.useEffect)((function(){console.log("INIT CLIENT API")}),[]);var i=bt({eventBus:c,statusApi:t.statusApi}),a=dt({eventBus:c,historyApi:t.historyApi}),l=function(t){return Object(o.useEffect)((function(){_t.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),_t.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){console.log("[CLIENT API] 002104 get files ".concat(n));var e=Pt("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(n){t.statusApi.searching.set(!1),cb(n)})),_t.emit("askForFiles",{folderPath:n,token:Q(),idReq:e})},getPreviews:function(n,cb){console.log("[CLIENT API] 002104 get files previews for ".concat(n.length," files"));var e=Pt("get-files-");t.eventBus.subscribe(e,cb),_t.emit("askFilesPreview",{filesPath:n,idReq:e,token:Q()})},search:t.searchApi.files.search}}({eventBus:c,searchApi:i,statusApi:t.statusApi}),s=ht({eventBus:c}),p=function(t){return Object(o.useEffect)((function(){_t.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})}))}),[]),{get:function(n,cb){console.log("[FOLDERS API] 002104 get folders ".concat(n));var e=Pt("get-folders-");t.eventBus.subscribe(e,cb),_t.emit("askFoldersScan",{foldersPaths:n,token:Q(),idReq:e})}}}({eventBus:c}),u=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(-1),l=Object(r.a)(a,2),s=l[0],p=l[1],u=w("selected-folder",""),d=Object(r.a)(u,2),f=d[0],b=d[1];Object(o.useEffect)((function(){m(f)}),[f]);var m=function(n,e,o){var c="text";if(""!==n){n=J("".concat(n,"/"));var a="[BROWSER GO TO] 00722 ";console.log("".concat(a," ").concat(n," ").concat(e," ").concat(c,", ").concat(JSON.stringify(o))),t.searchUiApi.term.set(""),t.statusApi.searching.set(!0),b(n),t.filesApi.get(n,(function(n){t.statusApi.searching.set(!1);var c=t.userSettingsApi.get("ui_filesList_sortMode"),r=Z(n,c),l=-1;if(e&&(Object(h.each)(r,(function(t,n){t.name===e&&(l=n)})),console.log("".concat(a,' file search "').concat(e,'" on id : ').concat(l))),p(l),i(r),o&&o.openIn){var s=r[l];"active"===o.openIn||"activeWindow"===o.openIn?t.tabsApi.active.get()?t.windowApi.active.setContent(s):t.tabsApi.openInNewTab(s):t.windowApi.updateWindows([o.openIn],s)}}))}},v=Object(o.useState)(nt),x=Object(r.a)(v,2),O=x[0],j=x[1],k=w("foldersFlat",[]),y=Object(r.a)(k,2),C=y[0],T=y[1],S=Object(o.useState)(""),E=Object(r.a)(S,2),N=E[0],I=E[1],F=w("openFolders",["/"]),A=Object(r.a)(F,2),D=A[0],R=A[1];return{goTo:m,files:{active:{get:c[s],getIndex:s,set:p},set:i,get:c},folders:{base:N,get:O,clean:function(){j(nt)},scan:function(n){t.foldersApi.get(n,(function(t){for(var n=C,e=0;e<t.folders.length;e++)t.folders[e]&&(n=ot(t.folders[e],n));T(n);var o=et("/",n);o&&j(o),I(t.pathBase)}))},open:{get:D,add:function(t){R([].concat(Object(g.a)(D),[t]))},remove:function(t){var n=D,e=n.indexOf(t);e>-1&&n.splice(e,1),R(n)}},current:{get:f,set:b}}}}({searchUiApi:i.ui,statusApi:t.statusApi,filesApi:l,foldersApi:p,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:t.userSettingsApi}),d=function(t){var n=Object(o.useState)(),e=Object(r.a)(n,2),c=e[0],i=e[1];return Object(b.a)(Object(b.a)({},Ft),{},{ui:{lineJump:{jump:i,get:c}}})}(),f={file:a,files:l,popup:t.popupApi,upload:s,tabs:t.tabsApi,folders:p,userSettings:t.userSettingsApi,history:t.historyApi,status:t.statusApi,note:d,search:i,ui:{browser:u,windows:t.windowsApi,lightbox:t.lightboxApi,search:i.ui,note:d.ui}};return At=f,f},Pt=function(t){return"client-api-".concat(t,"-req-").concat(G())},zt=function(t){var n=function(t){var n=t.toString().replace(mt,""),e=n.slice(n.indexOf("(")+1,n.indexOf(")")).match(vt);return null===e&&(e=[]),e}(t);console.log(12344,n,t);var e=n.indexOf("cb");return e&&-1!==e?e:null},Mt=function t(n,e){var o="";for(var c in e)if("object"===typeof e[c]&&e[c].constructor!==Array){if(c.length>1&&"get"!==c){var i=""!==n?"".concat(n,"."):"";o+=t("".concat(i).concat(c),e[c])}}else o="".concat(o).concat(n,".").concat(c,"\n");var a=o.split("\n"),r=[];return Dt().then((function(t){Object(h.each)(a,(function(n){var e=n.split("."),o=t;Object(h.each)(e,(function(t,n){o[t]&&(o=o[t])}));var c="var",i="";Object(h.isFunction)(o)&&(c="Function",i=o.toString()),r.push({name:n,type:c,description:i})}))})),o};function Bt(t,n){var e=Object(o.useState)(n),c=Object(r.a)(e,2),i=c[0],a=c[1],l="/".concat(O.configFolder,"/").concat(O.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(o.useEffect)((function(){s()}),[]);var s=function(){Dt().then((function(t){t.file.getContent(l,(function(t){var n=JSON.parse(t);a(n)}))}))};return[i,function(t){a(t),Dt().then((function(n){n.file.saveContent(l,JSON.stringify(t))}))},s]}var Ut,_t,Ht,Wt=Object(b.a)(Object(b.a)({},k),{},{global:{protocol:"//",url:"".concat(window.location.hostname),port:"80"===window.location.port?"":":".concat(window.location.port)}}),Vt=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return ut(n,[['"',""]])},Yt=function(t){var n=w("settings-backend-port",-1),e=Object(r.a)(n,2),c=e[0],i=e[1],a=w("settings-backend-protocol","same"),s=Object(r.a)(a,2),p=(s[0],s[1],Object(o.useContext)(Rt)),u=y.settingsPopup,d=[];if(p){var f=p.userSettings,b="".concat(window.location.protocol,"//"),g="".concat(b).concat(p.status.ipsServer.getLocal()).concat(Wt.global.port),m="https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(g);d=[{title:"Devices",fields:[{type:"text",var:g,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(m,'"/>\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(){p.ui.lightbox.open(0,[m])}}]},{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:f.get("ui_layout_colors_main"),modifier:function(t){f.set("ui_layout_colors_main",t)}}]},{title:"Advanced",fields:[{type:"text",var:c,title:u.backend.port,expl:u.backend.portExpl,modifier:i}]}]}var v=Bt("config-panels-opened",[]),x=Object(r.a)(v,3),O=x[0],j=x[1];x[2];return Object(l.c)("div",{className:"settings-popup-wrapper"},Object(l.c)(Y,{title:"".concat(u.title),onClose:function(){t.onClose()}},d.map((function(t,n){return Object(l.c)("div",{className:"settings-panel"},Object(l.c)("h3",{onClick:function(){!function(t){var n=Object(h.cloneDeep)(O);n[t]=!n[t],j(n)}(n)}},Object(l.c)("div",{className:"arrow"},O[n]?"\u25bc":"\u25ba"),t.title),Object(l.c)("div",{className:"fields-wrapper ".concat(O[n]?"active":"")},t.fields.map((function(t){return Object(l.c)("div",{className:"field-wrapper"},Object(l.c)("div",{className:"input-and-html-wrapper"},Object(l.c)(q,{value:t.var,label:t.title,type:t.type,readonly:t.readOnly,onChange:function(n){console.log("[SETTINGS] frontend setting ".concat(t.title," changed for ").concat(n)),t.modifier(n)}}),t.customHtml&&Object(l.c)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(l.c)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||""}}))}))))}))))},qt=function(){var t=Vt("backend-protocol")?"".concat(Vt("backend-protocol"),"://"):Wt.global.protocol,n=Vt("backend-port")?":".concat(Vt("backend-port")):"".concat(Wt.global.port);return"".concat(t).concat(Wt.global.url).concat(n)},Gt=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},Jt=function(t){var n={};return{on:function(e,o){var c=function(t,n){return function(e){var o;(o=console).log.apply(o,Object(g.a)(Gt("<== ON ".concat(t," "),Object(b.a)({},e)))),n(e)}}(e,o),i=Object(h.random)(1,1e8);return n[i]={endpoint:e,apiFn:c},t.on(e,c),i},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;(o=console).log.apply(o,Object(g.a)(Gt("==> EMIT ".concat(n," "),Object(b.a)({},e)))),t.emit(n,e)}}},Kt=e(265),$t=e(388),Xt=e(380),Zt=function(t){Object(S.a)(e,t);var n=Object(E.a)(e);function e(t){var o;return Object(C.a)(this,e),(o=n.call(this,t)).reactComp=void 0,o.vimStatusBar=void 0,o.editor=void 0,o.monaco=void 0,o.updatePosY=function(){var t=o.editor.getScrollTop();o.props.onUpdateY(t)},o.editorDidMount=function(t,n){o.props.vimMode&&(console.log("[MONACO EDITOR] vim mode started",o.vimStatusBar.current),Object(Xt.initVimMode)(t,o.vimStatusBar.current)),o.editor=t,o.monaco=n,Ht=t,t.onDidChangeCursorPosition((function(t){o.updatePosY()})),window.editor=t,window.monaco=n,n.editor.defineTheme("customLightTheme",{base:"vs",inherit:!0,rules:[{foreground:V.colors.fontEditor}],colors:{"editor.background":V.colors.bgEditor}}),n.editor.setTheme("customLightTheme"),setTimeout((function(){}),100)},o.resetMonacoSelection=function(){var t=o.editor.getSelection();if(t){var n={endColumn:t.startColumn,endLineNumber:t.startLineNumber,startColumn:t.startColumn,startLineNumber:t.startLineNumber};o.editor.setSelection(n)}},o.getCurrentLineInfos=function(){var t=o.editor.getPosition(),n=o.editor.getValue(t).split("\n"),e=n.slice(0,t.lineNumber-1).join("\n").length+t.column-1;return{monacoPosition:o.editor.getPosition(),lines:n,currentPosition:e,activeLine:n[t.lineNumber-1],lineIndex:t.lineNumber-1}},o.jumpToLine=function(t){console.log("[MONACO] jumping to line :"+t),o.editor.revealLineInCenter(t),setTimeout((function(){var n=o.editor.getScrollTop();o.props.onUpdateY(n),o.editor.revealLineInCenter(t)}),10)},o.reactComp=c.a.createRef(),o.vimStatusBar=c.a.createRef(),o}return Object(T.a)(e,[{key:"shouldComponentUpdate",value:function(t,n,e){var o=this;if(this.props.posY===t.posY&&this.props.value===t.value||this.editor.setScrollPosition({scrollTop:this.props.posY}),0===this.props.value.length&&this.props.value.length!==t.value.length){setTimeout((function(){o.resetMonacoSelection()}),1);var c=this.reactComp.current;if(c&&c.containerElement){var i=this.reactComp.current.containerElement.querySelectorAll(".view-lines")[0];setTimeout((function(){if(o.props.onMaxYUpdate){var t=i.clientHeight;o.props.onMaxYUpdate(t)}}),1e3)}}return this.props.jumpToLine!==t.jumpToLine&&-1!==t.jumpToLine&&this.jumpToLine(t.jumpToLine),!0}},{key:"render",value:function(){var t=this;return Object(l.c)("div",{className:"monaco-editor-wrapper"},Object(l.c)("div",{className:"vim-status-bar ".concat(this.props.vimMode?"active":""),ref:this.vimStatusBar}),Object(l.c)($t.a,{ref:this.reactComp,width:"100%",height:"100%",language:"markdown",theme:"vs",value:this.props.value,options:{fontFamily:V.font.editor,readOnly:this.props.readOnly,quickSuggestions:!1,automaticLayout:!0,selectOnLineNumbers:!0,minimap:{enabled:!1},wordWrap:"on",fontSize:11,mouseWheelScrollSensitivity:.5,lineNumbers:"off",renderIndentGuides:!1,folding:!1,scrollbar:{handleMouseWheel:!0,verticalScrollbarSize:0,horizontal:"hidden"}},editorDidMount:this.editorDidMount,onChange:function(n){t.props.onChange(n)}}))}}]),e}(c.a.Component);function Qt(cb,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e={leading:!1,trailing:!0};n&&(e.leading=n);var c=Object(o.useRef)(cb),i=tn();return Object(o.useEffect)((function(){c.current={cb:cb,delay:t}})),Object(o.useCallback)(m.a.debounce((function(){var n;c.current.delay===t&&i()&&(n=c.current).cb.apply(n,arguments)}),t,e),[t,m.a.debounce])}function tn(){var t=Object(o.useRef)(!0);return Object(o.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}var nn=e(381),en=e(382),on=function(t){Object(S.a)(e,t);var n=Object(E.a)(e);function e(){var t;Object(C.a)(this,e);for(var o=arguments.length,c=new Array(o),i=0;i<o;i++)c[i]=arguments[i];return(t=n.call.apply(n,[this].concat(c))).size=t.props.size?t.props.size:1,t.isLocal=!t.props.name.startsWith("fa"),t}return Object(T.a)(e,[{key:"render",value:function(){return Object(l.c)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block"}},!this.isLocal&&Object(l.c)(nn.a,{icon:en[this.props.name],color:this.props.color||"black",size:"1x"}),this.isLocal&&Object(l.c)("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}(c.a.Component),cn=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(!1),s=Object(r.a)(a,2),p=s[0],d=s[1];Object(o.useEffect)((function(){i(t.title)}),[t.title]);var f=Qt((function(n){0!==n.length&&"mobile"===u()&&(d(!1),t.onEdited(t.title,c))}),1e3);return Object(l.c)("div",{className:"title-input-wrapper"},Object(l.c)("input",{className:"big-title",type:"text",value:c,onChange:function(t){var n=function(t){return t.replace(/[^\w\s\_\-]/gi,"")}(t.target.value);i(n),d(!0),f(n)},onKeyDown:function(n){if("Enter"===n.key){if(c.length<3)return;t.onEdited(t.title,c),d(!1)}}}),p&&Object(l.c)("div",{className:"press-to-save"},Object(l.c)(on,{name:"faCircle",color:V.colors.main,size:.7})))},an=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},rn=function(t){var n=Object(o.useRef)(0),e=t.editorRef,c=t.editorRef,i=function(){var o,i;"desktop"===t.editorType?(o=null===(i=e.current)||void 0===i?void 0:i.getCurrentLineInfos(),n.current=o&&o.monacoPosition?o.monacoPosition:0):(o=c.current?function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,c=0;o<e+1;)o+=n[c].length+1,c++;return{currentPosition:e,lines:n,activeLine:n[--c],lineIndex:c}}(c.current):null,n.current=o&&o.currentPosition?o.currentPosition:0);return o},a=function(t){var o=n.current+t;if(console.log("resetCursorPosition to ",o),s("desktop")){var i;null===(i=e.current)||void 0===i||i.editor.setPosition(o)}else{var a=c.current;if(!a)return;a.focus(),setTimeout((function(){a&&(a.selectionStart=o,a.selectionEnd=o)}))}};return{getLineTextInfos:i,resetCursorPosition:a,applyTextModifAction:function(t,n){var e=i();return e?function(t,n,cb,e){var o=n.lines;if("^"===t){var c=o[n.lineIndex-1],i=o[n.lineIndex];o[n.lineIndex]=c,o[n.lineIndex-1]=i,cb(-c.length-1)}if("v"===t){var a=o[n.lineIndex+1],r=o[n.lineIndex];o[n.lineIndex]=a,o[n.lineIndex+1]=r,cb(+a.length+1)}if("X"===t){var l=o[n.lineIndex].length;o.splice(n.lineIndex,1),cb(-l-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 s=n.activeLine.trim();if("[x]"===t&&(s.startsWith("- [ ]")||s.startsWith("- [x]")?s.startsWith("- [ ]")?(o[n.lineIndex]=o[n.lineIndex].replace("[ ]","[x]"),cb(0)):s.startsWith("- [x]")?(o[n.lineIndex]=o[n.lineIndex].replace("[x]","[ ]"),cb(0)):cb(0):(o[n.lineIndex]=o[n.lineIndex].replace(s,"- [ ] "+s.replace("-","")),cb(6))),"insertAt"===t&&e&&e.textToInsert&&(Object(h.isNumber)(e.insertPosition)||Object(h.isString)(e.insertPosition))){var p="currentPos"===e.insertPosition?n.currentPosition+1:e.insertPosition,u=o.join("\n");o=[u.slice(0,p),e.textToInsert,u.slice(p)].join("").split("\n")}return o.join("\n")}(t,e,(function(t){console.log("applyTextModifAction cb charDecal:",t),a(t)}),n):null}}},ln=function(t,n){var e=rn({editorType:"mobile",editorRef:n.mobileTextarea}),c=e.getLineTextInfos,i=e.resetCursorPosition,a=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),c=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",c),t.current.scrollTop=c)}}}(n.mobileTextarea),l=a.saveYTextarea,s=a.resetYTextarea,p=Object(o.useState)(!1),u=Object(r.a)(p,2),d=u[0],f=u[1];Object(h.debounce)((function(){f(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var o=e.target.value,a=o[e.target.selectionStart-1]&&o[e.target.selectionStart-1].charCodeAt(0);if(o.length>t.length){var r=c();if(!r)return;o=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),c=e.indexOf("-"),i="";-1!==o&&"- [ ] "!==e?(i=e.substr(0,o+3)+" ] ",an(i)&&(t.lines[t.lineIndex]=i+t.activeLine,cb(i.length))):-1!==c&&"- "!==e&&"- [ ] "!==e&&(i=e.substr(0,c+1)+" ",an(i)&&(t.lines[t.lineIndex]=i+t.activeLine,cb(i.length)))}return t.lines.join("\n")}(r,a,(function(t){setTimeout((function(){i(t),s()}))}))}n.onMobileNoteEdition(o)},onTextareaScroll:function(t){if(!d){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},sn="",pn=e(178),un=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],i=e[1],a=function(){t.onSubmit(c)};return Object(l.c)(dn,null,Object(l.c)(Y,{title:y.passwordForm.explanation,onClose:function(){t.onClose()}},Object(l.c)("div",null,Object(l.c)(q,{value:c,label:y.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){i(t)},onEnterPressed:function(){a()}}),Object(l.c)("button",{className:"submit-button",onClick:function(t){a()}},y.passwordForm.submit))))},dn=Object(pn.a)("div",{target:"eozyeru0"})(".submit-button{margin-top:10px;",V.els().redButton,";padding:10px 20px;}"),fn=e(218),bn=e.n(fn),gn=function(t,n){var e=bn.a.generateRSAKey(n,1024),o=bn.a.publicKeyString(e);return bn.a.encrypt(t,o)},hn=function(t,n){var e=n.replace(t,"").length,o=n.length;return Math.round(e/o*100)/100},mn=function(t){return t>0&&t<=.9},vn=function(t){var n=!1,e={nb:hn(/[^0-9]/g,t),up:hn(/[^A-Z]/g,t),low:hn(/[^a-z]/g,t),spe:hn(/[^\/\=\?\+]/g,t)},o=mn(e.nb)&&mn(e.up)&&mn(e.low)&&e.spe>0,c=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),i=t.length>100;return c&&o&&i&&(n=!0),n},wn=function(t){var n=Object(o.useState)(null),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(!1),s=Object(r.a)(a,2),p=s[0],u=s[1],d=Object(o.useState)(!1),f=Object(r.a)(d,2),b=f[0],g=f[1],h=Object(o.useState)(null),m=Object(r.a)(h,2),v=m[0],w=m[1],x=function(n){var e=t.fileContent,o=gn(e,n);if("failure"===o.status)w(null);else{console.log("encryption done",o),u(!1);var c=o.cipher;t.onTextEncrypted(c)}},O=function(n){var e=function(t,n){var e=bn.a.generateRSAKey(n,1024);return bn.a.decrypt(t,e)}(t.fileContent,n);if("failure"===e.status)w(null),alert("wrong password");else{g(!0),u(!0),console.log("decryption done",e);var o=e.plaintext;t.onTextDecrypted(o)}};return{APasswordPopup:Object(l.c)(un,{onClose:function(){i(null)},onSubmit:function(t){var n=c;i(null),w(t),"toEncrypt"===n&&x(t),"toDecrypt"===n&&O(t)}}),askForPassword:c,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){v?O(v):i("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){v?x(v):i("toEncrypt")}},ifEncryptOnLeave:function(cb){if(p&&v){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=gn(t.fileContent,v);n.cipher&&cb(n.cipher)}w(null),g(!1)},noHistoryBackupWhenDecrypted:b}},xn=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,o="";if(n<=3600)o="".concat(Math.ceil(n/60)," ").concat(y.minsAgo);else if(n>3600&&n<=86400)o="".concat(Math.ceil(n/3600)," ").concat(y.hoursAgo);else if(n>86400&&n<=e)o="".concat(Math.ceil(n/86400)," ").concat(y.daysAgo);else if(n>e){var c=("0"+t.getDate()).slice(-2),i=y.months[t.getMonth()],a=t.getFullYear().toString();o="".concat(c," ").concat(i," ").concat(a)}return o},On=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),c=e[0],i=e[1];Object(o.useEffect)((function(){_t.emit("askFileHistory",{filepath:t.file.path,token:Q()});var n=_t.on("getFileHistory",(function(t){var n=Object(h.orderBy)(t.files,["created"],["desc"]);i(n)}));return function(){_t.off(n)}}),[]);var a=Object(o.useContext)(Rt);return Object(l.c)(jn,null,Object(l.c)(Y,{title:"".concat(y.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(l.c)("div",{className:"table-wrapper"},Object(l.c)("table",null,Object(l.c)("thead",null,Object(l.c)("tr",null,Object(l.c)("th",null,y.historyPopup.thead.name),Object(l.c)("th",null,y.historyPopup.thead.date))),Object(l.c)("tbody",null,c.map((function(t){return Object(l.c)("tr",{onClick:function(){!function(t){a&&a.tabs.openInNewTab(t)}(t)}},Object(l.c)("td",null," ",t.realname," "),Object(l.c)("td",null," ",xn(new Date(t.created||0))," "))})))))))},jn=Object(pn.a)("div",{target:"ew7e5uv0"})(".popup-wrapper .popupContent{padding:0px;}.table-wrapper{max-height:50vh;overflow-y:auto;padding:0px 20px 20px 20px;table{border-spacing:0px;thead{tr{th{padding:8px;}}}tbody{text-align:left;tr{cursor:pointer;background:#f1f0f0;&:nth-child(2n){background:none;}&:hover{background:r",V.colors.main,";}td{padding:8px;}}}}}"),kn=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])},yn=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){console.log(n);var o=n.lang?" (".concat(n.lang,")"):"",c="".concat(n.name).concat(o);t.push({key:e,label:c,obj:n})})),t},Cn=function t(n){var e=this;Object(C.a)(this,t),this.rawText=void 0,this.voice=void 0,this.text2read=void 0,this.chunkedText=void 0,this.chunkLength=160,this.currChunkId=0,this.currSpeechObj=void 0,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=[],c=0;c<n.length;c++){var i=n[c];if(i.length>e.chunkLength)for(var a=i.split(" "),r="",l=0;l<a.length;l++)((r+=a[l]+" ").length>e.chunkLength||l===a.length-1)&&(o.push(r),r="");else o.push(i)}return console.log(o),o},this.loadVoice=function(t){console.log("[TTS] LOAD VOICE",t),e.voice=t},this.play=function(){if(e.isLoaded)console.log("[TTS] RESUME play chunk ".concat(e.currChunkId)),window.speechSynthesis.resume();else{if(e.currChunkId>e.chunkedText.length-1)return console.log("[TTS] finished played");e.isLoaded=!0,console.log("[TTS] START play chunk ".concat(e.currChunkId),{txt:e.chunkedText[e.currChunkId]}),e.currSpeechObj=new SpeechSynthesisUtterance,e.currSpeechObj.text=e.chunkedText[e.currChunkId],e.voice&&(e.currSpeechObj.voice=e.voice),console.log(e.currSpeechObj),setTimeout((function(){window.speechSynthesis.speak(e.currSpeechObj)}),0),e.currSpeechObj.addEventListener("end",(function(){e.isLoaded=!1,console.log("[TTS] END play chunk ".concat(e.currChunkId)),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(){console.log("[TTS] pause"),window.speechSynthesis.pause()},this.stop=function(){console.log("[TTS] stop"),e.shouldStop=!0,e.isLoaded=!1,window.speechSynthesis.cancel()},this.goToChunk=function(t){console.log("[TTS] goToChunk",t),t<=0||t>e.chunkedText.length-1||(e.stop(),e.currChunkId=t,e.play())},this.goBack=function(){console.log("[TTS] goBack",e.currChunkId),e.goToChunk(e.currChunkId-1)},this.goForward=function(){console.log("[TTS] goForward",e.currChunkId),e.goToChunk(e.currChunkId+1)},this.rawText=n.text,this.text2read=function(t){var n=t;return n=(n=n.replace(lt.ressource,"")).replace(lt.ref,""),n=xt(n),console.log("222",n),n=n.replace(lt.baliseHtml,""),console.log("cleanText2Speech",n),n}(n.text),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})};var Tn=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],i=e[1],a=w("tts-selected-voice",0),s=Object(r.a)(a,2),p=s[0],u=s[1],d=Object(o.useState)(0),f=Object(r.a)(d,2),b=f[0],g=f[1],h=Object(o.useState)(0),m=Object(r.a)(h,2),v=m[0],x=m[1],O=Object(o.useRef)();return Object(o.useEffect)((function(){setTimeout((function(){yn()[p]&&(console.log("2voice loaded",p),O.current.loadVoice(yn()[p].obj))})),O.current=new Cn({text:t.fileContent})}),[]),Object(o.useEffect)((function(){yn()[p]&&(console.log("voice loaded",p),O.current.loadVoice(yn()[p].obj))}),[p]),kn((function(){i(O.current.isPlaying()),g(O.current.currChunkId),x(O.current.chunkedText.length)}),500),Object(l.c)(Sn,null,Object(l.c)(Y,{title:"".concat(y.ttsPopup.title),onClose:function(){O.current.stop(),t.onClose()}},Object(l.c)(q,{value:p,type:"select",list:yn(),label:y.ttsPopup.voice,onSelectChange:function(t){u(parseInt(t))}}),b," / ",v,Object(l.c)("br",null),Object(l.c)("input",{type:"range",defaultValue:b,min:"0",max:v,onChange:function(t){console.log(t.target.value),O.current.goToChunk(parseInt(t.target.value))}}),Object(l.c)("input",{type:"number",defaultValue:b,min:"0",max:v,onChange:function(t){console.log(t.target.value),O.current.goToChunk(parseInt(t.target.value))}}),Object(l.c)("br",null),Object(l.c)("div",{className:"buttons"},Object(l.c)("button",{onClick:function(t){O.current.goBack()}},Object(l.c)(on,{name:"faFastBackward",color:"black"})),Object(l.c)("button",{onClick:function(t){c?O.current.pause():O.current.play()}},Object(l.c)(on,{name:c?"faPause":"faPlay",color:"black"})),Object(l.c)("button",{onClick:function(t){O.current.goForward()}},Object(l.c)(on,{name:"faFastForward",color:"black"})))))},Sn=Object(pn.a)("div",{target:"ez98axn0"})({name:"rvko2c",styles:".popup-wrapper .popupContent{padding:20px;}.buttons{display:flex;padding:20px 0px 0px 0px;button{width:30%;padding:10px;}}"}),En=function(t){var n=Object(b.a)({},t),e=n.design,o=n.colors,c=n.size;e||(e="horizontal");var i=!("popup"in t)||t.popup,a=Object(Kt.a)("button.toolbar-button{position:relative;&.active{svg{color:",o?o[1]:V.colors.main,";}}svg{transform:scale(",c||1.3,");color:",o?o[0]:V.colors.editor.interfaceGrey,";&:hover{color:",o?o[1]:V.colors.main,";}}}","");return Object(l.c)("div",{className:a},Object(l.c)("ul",{className:"buttons-toolbar-component ".concat(t.class," ").concat(e," ").concat(i?"with-popup":"no-popup")},t.buttons.map((function(t,n){return t.action&&Object(l.c)("li",{className:t.class,title:t.title,key:n},Object(l.c)(Nn,t))}))))},Nn=function(t){var n=Object(l.c)(c.a.Fragment,null);t.title&&(n=Object(l.c)(c.a.Fragment,null,t.title)),t.icon&&(n=Object(l.c)(on,{name:t.icon})),t.customHtml&&(n=t.customHtml);var e="toolbar-button ".concat(t.class&&t.class," ").concat(t.active&&"active");return Object(l.c)("button",{className:e,onClick:function(n){t.action&&t.action(n)}},Object(l.c)("div",{className:"inside-html-wrapper"},n),Object(l.c)("div",{className:"button-hover-popup "},t.title))},In="\n ul.buttons-toolbar-component {\n list-style: none;\n padding: 0px;\n margin: 0px;\n button.toolbar-button {\n ".concat(V.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(V.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(V.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(V.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"),Fn=function(t){return Object(l.c)("div",null,Object(l.c)(En,{class:"mobile-text-manip-toolbar",colors:[V.colors.editor.mobileToolbar.font,V.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")}}]}))},An=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=(e[0],e[1],t.dir?t.dir:"left"),i=t.maxHeight?t.maxHeight:50;return Object(l.c)("div",{className:"dropdown-wrapper ".concat(c," ").concat(t.hover?"hover-active":"")},Object(l.c)("span",{onMouseEnter:function(){},onClick:function(){},className:"context-menu-wrapper"},Object(l.c)("div",{className:"dropdown-icon"},Object(l.c)(on,{name:"faEllipsisH",color:V.colors.l1.font})),Object(l.c)("div",{className:"context-menu",style:{maxHeight:i}},t.children)))},Dn=function(t){var n=Object(o.useContext)(Rt);return Object(l.c)("div",{className:"upload-button-component"},Object(l.c)("input",{className:"input-file-hidden",id:"file",multiple:!0,name:"file",type:"file",onChange:function(e){var o=e.target.files;0!==o.length&&Object(h.each)(o,(function(e){n&&n.upload.uploadFile({file:e,folderPath:t.file.folder,onProgress:t.onProgress,onSuccess:t.onSuccess})}))}}),Object(l.c)("label",{htmlFor:"file"},Object(l.c)(on,{name:"faPaperclip"}),Object(l.c)("span",{className:"label-text"},"Upload files ")))},Rn=function(){return"\n\t\t\t\t.upload-button-wrapper {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t.label-text { color :".concat(V.colors.main,"; }\n\t\t\t\t\t\t}\n\t\t\t\t\t.upload-button-component {\n\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t.input-file-hidden {\n\t\t\t\t\t\t\twidth: 0.1px;\n\t\t\t\t\t\t\theight: 0.1px;\n\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.label-text {\n\t\t\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t")},Ln=function(t){var n=t.progress,e=n>=0&&n<100;return Object(l.c)(c.a.Fragment,null,e&&Object(l.c)("div",{className:"upload-progress-bar-wrapper"},Object(l.c)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(l.c)("div",{className:"label"},n,"% uploaded... ")))},Pn=e(383),zn=function(t){return t||(t=0),Object(Pn.isNumber)(t)?t+1:0},Mn=e(384),Bn=e.n(Mn),Un=(e(608),e(609),e(385)),_n=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var c in e){var i=e[c],a=!1;if(c.endsWith("-once")&&(c=c.replace("-once",""),a=!0),c===t.subId)try{i(t.data),a&&o("".concat(c,"-once"))}catch(r){n&&console.log("".concat(n," error with function"),r)}}},subscribe:function(t,cb){e[t]=cb},subscribeOnce:function(t,cb){var n="".concat(t,"-once");e[n]=cb},unsubscribe:o}},Hn="[IFRAME PARENT] 00563",Wn=_n({headerLog:Hn}),Vn=Wn.notify,Yn=Wn.subscribe,qn=Wn.unsubscribe;console.log(Hn,"INIT IFRAME LISTENING"),window.addEventListener("message",(function(t){t.data.subId&&(console.log(Hn,"parent <== iframe",t.data.data),Vn(t.data))}));var Gn={subscribe:Yn,unsubscribe:qn,send:function(t,n){t&&t.contentWindow&&(console.log(Hn,"parent ==> iframe",n),t.contentWindow.postMessage(n,"*"))}},Jn=function(t){return'\n<html>\n\t\t<div id="content-wrapper">\n\t\t\t\t'.concat(t,'\n\t\t</div>\n\t\t<div id="external-scripts-wrapper"></div>\n\t\t<script>\n\t\t\t\tconst IMPORTED_replaceCustomMdTags = ').concat(jt.toString(),"\n\t\t\t\tconst IMPORTED_unescapeHtml = ").concat(Tt.toString(),"\n\t\t\t\tconst IMPORTED_createEventBus = ").concat(_n.toString(),"\n\t\t\t\tconst IMPORTED_generateUUID = ").concat(G.toString(),"\n\t\t\t\tconst IMPORTED_bindToElClass = ").concat(Et.toString(),"\n\t\t\t\tconst main = ").concat(Kn.toString(),";\n\t\t\t\tmain({\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\tbindToElClass: IMPORTED_bindToElClass\n\t\t\t\t})\n\t\t<\/script>\n</html>\n")},Kn=function(t){var n="[IFRAME child] 00564";console.log(n,"INIT INNER IFRAME");var e,o={file:null,frameId:"",innerTag:"",tagName:"",tagContent:""},c=function(t){if(""===o.frameId)return console.warn(n,"NO FRAME ID, CANNOT SEND TO PARENT");var e={subId:o.frameId,data:t};window.parent.postMessage(e,"*")},i=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};c({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}c({action:"resize",data:{height:t}})},r=t.createEventBus({headerLog:"[FRAME API] 00567"}),l=r.subscribeOnce,s=r.notify,p={version:1.1,call:function(n,e,cb){if(!e||!n||e.constructor!==Array||"string"!==typeof n)return i("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()," ");l(o,(function(t){cb&&cb(t)})),c({action:"apiCall",data:{reqId:o,apiName:n,apiArguments:e}})},utils:{getInfos:function(){return o},loadScripts:function(t,cb){console.log(n,"loadScripts",t);for(var e=0,o=0;o<t.length;o++){var c=t[o],i=document.createElement("script");i.src=c,i.onload=function(){if(e++,console.log(n,"loadScripts: ".concat(e,"/").concat(t.length)),e===t.length){console.log("loadScripts all scripts loaded, cb()!");try{cb&&cb()}catch(o){console.log(n,"ERROR LoadScript Callback : ".concat(o))}}};var a=document.getElementById("external-scripts-wrapper");a&&a.appendChild(i)}},resizeIframe:a,loadCustomTag:function(t,e,o){var c=p.utils.createDiv(),i=c.div,a=c.updateContent;return o||(o={}),o.base_url=t.split("/").slice(0,-1).join("/"),p.utils.loadScripts([t],(function(){console.log(n,"CUSTOM TAG LOADED ".concat(t));var c=window.initCustomTag("".concat(e),o);a(c)})),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=p,e={init:function(e){o.frameId=e.frameId,o.innerTag=e.innerTag,o.tagContent=e.tagContent,o.tagName=e.tagName,o.file=e.file,console.log(n,"1/2 RECEIVED INIT EVENT",o.frameId);var c,r=document.getElementById("content-wrapper");if(r){var l=t.unescapeHtml(r.innerHTML),s=(c=l,t.replaceCustomMdTags(c,"[[script]]",(function(t){var e="".concat(t);try{return new Function(e)()}catch(o){console.warn(n,"[SCRIPT] error: ".concat(o),e),i("".concat(o,' in Code "').concat(e,'"'))}})));console.log(n,"2/2 transformMarkdownScript",{old:r.innerHTML,new:s}),r.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;p.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},apiAnswer:function(t){var n={subId:t.reqId,data:t.data};s(n)}},window.onmessage=function(t){var n=t.data;if(n)for(var o in e)e&&e[o]&&o===n.action&&e[o](t.data.data)},p},$n="[IFRAME COMPONENT] 00562",Xn=function(t){var n="tag"===t.block.type,e=Object(o.useState)(null),c=Object(r.a)(e,2),i=c[0],a=c[1],s=Object(o.useState)(null),p=Object(r.a)(s,2),u=p[0],d=p[1];return Object(o.useEffect)((function(){n&&("script"===t.block.tagName?(a("\n[[script]]".concat(t.block.content,"[[script]]")),t.block.content=""):Dt().then((function(n){n.file.getContent("/.tiro/tags/".concat(t.block.tagName,".md"),(function(t){a(t)}),{onError:function(){a(null)}})})))}),[t.windowId,t.file,t.block.content]),Object(o.useEffect)((function(){if(!n){var e=Ft.render({raw:t.block.content,file:t.file,windowId:t.windowId});d(e)}}),[t.windowId,t.file,t.block]),Object(l.c)("div",{className:"content-block ".concat(n?"block-tag":"block-text")},n&&i&&Object(l.c)(Zn,Object(Un.a)({},t,{noteTagContent:i})),!n&&u&&Object(l.c)("div",{className:"content-block-text",dangerouslySetInnerHTML:{__html:u}}))},Zn=function(t){var n=Object(b.a)({},t).noteTagContent,e=Object(o.useState)(""),c=Object(r.a)(e,2),i=c[0],a=c[1],s=Object(o.useRef)(null),p=Object(o.useState)(""),u=Object(r.a)(p,2),d=u[0],f=u[1],m=Object(o.useState)(!1),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useState)(0),j=Object(r.a)(O,2),k=j[0],y=j[1],C=Object(o.useState)(null),T=Object(r.a)(C,2),S=T[0],E=T[1],N=Qt((function(e){f(e),E(null),Gn.subscribe(e,(function(n){if("resize"===n.action){var e=n.data.height;if(Object(h.isString)(e)&&e.endsWith("%")){var o=parseInt(e.replace("%",""))/100;e=(t.windowHeight||200)*o}console.log($n,"resizing to",e),y(e),x(!0)}"apiCall"===n.action&&function(t,cb){Dt().then((function(n){var e=t.apiName.split("."),o=n;if(Object(h.each)(e,(function(t){o=o[t]?o[t]:null})),!o)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(Mt("",n))});try{var c=zt(o);if(console.log(2223,{pos:c,p:t,cb:cb}),!c)return o.apply(void 0,Object(g.a)(t.apiArguments)),cb("ok");var i=Object(h.cloneDeep)(t.apiArguments);i.splice(c,0,(function(t){cb("ok",t)})),o.apply(void 0,Object(g.a)(i))}catch(a){return cb("nok",{error:'error "'.concat(JSON.stringify(a),'" when executing "').concat(t.apiName,'" with props ').concat(t.apiArguments)})}}))}(n.data,(function(t,e){if(console.log($n,"getting aswer from api call => ",JSON.stringify({status:t,data:e}).substring(0,150)+'"'),"nok"===t)return E(e.error);var o={reqId:n.data.reqId,data:e};Gn.send(s.current,{action:"apiAnswer",data:o})}));if("iframeError"===n.action){var c=n.data.error;E(c)}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,frameId:e,tagContent:n,tagName:t.block.tagName||""};Gn.send(s.current,{action:"init",data:o})}),100)}),500);return Object(o.useEffect)((function(){x(!1),function(){var e=Ft.render({raw:n,windowId:t.windowId,file:t.file}),o=Jn(e),c='\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(te(),"\n\t\t\t\t</style>\n\t\t\t\t");c=ut(c,[["{{innerTag}}",t.block.content.trim()]]),a(c)}();var e="iframe-".concat(G());return N(e),function(){Gn.unsubscribe(e)}}),[t.windowId,t.block.content]),Object(l.c)("div",{className:"iframe-view-wrapper ".concat(w?"can-show":"hide"," iframe-tag-").concat(t.block.tagName)},Object(l.c)("iframe",{ref:s,id:d,"data-testid":"iframe",title:d,srcDoc:i,className:"tag-iframe",style:{height:k},sandbox:"allow-scripts allow-same-origin allow-popups"}),S&&Object(l.c)("div",{className:"iframe-error"},Object(l.c)("code",null,Object(l.c)("pre",null,S))))},Qn=function(t){Object(o.useContext)(Rt);var n={wrapper:Object(o.useRef)(null),main:Object(o.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(o.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(c())}),1e3)}),[t.fileContent]);var c=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},i=Object(o.useState)([]),a=Object(r.a)(i,2),s=a[0],p=a[1];return Object(o.useEffect)((function(){var n=Ft.chunks.chunk(t.fileContent);p(n),setTimeout((function(){Ft.injectLogic({fileContent:t.fileContent,file:t.file})}),100)}),[t.fileContent]),Object(l.c)("div",{className:"preview-area-wrapper"},Object(l.c)("div",{className:"preview-area",ref:n.wrapper,style:{bottom:function(){var n=c();return Object(h.clamp)(t.posY,0,n)}()}},Object(l.c)("div",{className:"infos-preview-wrapper"},Object(l.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(l.c)("h1",{className:"title big-title"},t.file.name.replace(".md",""))),Object(l.c)("div",{className:"content-blocks-wrapper"},Object(l.c)("div",{className:"simple-css-wrapper"},s.map((function(e,o){var c;return Object(l.c)(Xn,{key:o,block:e,windowId:t.windowId,file:t.file,windowHeight:null===(c=n.wrapper.current)||void 0===c?void 0:c.clientHeight})}))))))},te=function(){var t=".simple-css-wrapper",n=".preview-link",e=".resource-link-icon";return"\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," {\n\t\t\t\tcolor: ").concat(V.colors.editor.font,";\n\t\t\t\tline-height: 19px;\n\t\t\t\tfont-size: 11px;\n\t\t\t\tfont-family:").concat(V.font.main,";\n\t\t}\n\n\t\tbutton,\n\t\tinput {\n\t\t\t\tfont-family:").concat(V.font.main,";\n\t\t\t\tfont-weight: 700;\n\t\t\t\tcolor: ").concat(V.colors.l2.title,";\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t// COUNTER TITLES\n\n*********************************************************\n\n\t\t").concat(t,' {\n\t\t\t\tcounter-reset: sh1;\n\t\t\t\toverflow-wrap: break-word;\n\t\t}\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\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\th3 {\n\t\t\t\tcounter-reset: sh3;\n\t\t}\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\n\n\n\t\t/**********************************************************\n\n\t\t// BASIC STYLE\n\n**********************************************************/\n\n\t\t.main-color {\n\t\t\t\t\t\tcolor: ').concat(V.colors.main,";\n\t\t}\n\t\t.title {\n\t\t\t\tmargin: 0px 0px;\n\t\t}\n\n\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\tcolor: ").concat(V.colors.main,";\n\t\t\t\tmargin-top: 0px;\n\t\t}\n\t\th1 {\n\t\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\th2, h3, h4, h5, h6 {\n\t\t\t\tmargin-bottom: 15px;\n\t\t}\n\n img,\n .content-image {\n ").concat(V.els().images,'\n\t\t\t\tcursor: pointer;\n }\n\n p {\n margin-top: 0px;\n margin-bottom: 1em;\n }\n\n\n\t\t/**********************************************************\n\n\t\t// LIST\n\n**********************************************************/\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\tbackground-image: url(./custom_icons/line.svg);\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: -3px 4px;\n\t\t\t\tbackground-size: 11px;\n\t\t\t\tpadding-left: 12px;\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\t\t\t\tbackground-image: url(./custom_icons/check.svg);\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: -2px -1px;\n\t\t\t\tbackground-size: contain;\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\tbackground-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\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t PREVIEW LINK\n\n**********************************************************/\n\n\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(n,".external-link {\n\t\t\t\tbackground-image: url(").concat(V.assets.worldIcon,");\n\t\t}\n\t\t").concat(n,".search-link {\n\t\t\t\tcolor: ").concat(V.colors.main,";\n\t\t\t\tbackground-image: url(").concat(V.assets.searchIcon,");\n\t\t}\n\t\t").concat(n,".title-search-link {\n\t\t\t\tcolor: ").concat(V.colors.main,";\n\t\t\t\tbackground-image: url(").concat(V.assets.linkIcon,");\n\t\t\t\tcursor: pointer;\n\t\t}\n\t\t").concat(n,".resource-link {\n\t\t\t\tcolor: ").concat(V.colors.main,";\n\t\t} \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\n\t\t.resource-link-wrapper {\n\t\t\t\tbackground: #f7f6f6;\n\t\t\t\tpadding: 20px;\n\t\t\t\tborder-radius: 10px;\n\t\t\t\tposition: relative;\n\t\t\t\tmargin: 5px 0px;\n\t\t}\n\n\t\t.resource-link-icon {\n\t\t\t\ttop: 14px;\n\t\t\t\tleft: 19px;\n\t\t\t\twidth: 21px;\n\t\t\t\theight: 27px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tbackground-image: url(/static/media/file-solid.6415173e.svg);\n\t\t\t\topacity: 0.08;\n\t\t\t\tposition: absolute;\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\ttransform: scale(1.5);\n\t\t\t\tbackground-image: url(").concat(V.assets.fileIcon,");\n\t\t}\n\n\t\t").concat(e,".epub, ").concat(e,".cbr, ").concat(e,".cbz,").concat(e,".mobi, ").concat(e,".azw, ").concat(e,".azw3, ").concat(e,".iba { background-image: url(").concat(V.assets.bookIcon,"); }\n\t\t").concat(e,".pdf\n\t\t{ background-image: url(").concat(V.assets.pdfIcon,"); }\n\n\t\t").concat(e,".xls, ").concat(e,".xlsm, ").concat(e,".xlsx, ").concat(e,".ods\n\t\t{ background-image: url(").concat(V.assets.excelIcon,"); }\n\n\t\t").concat(e,".avi, ").concat(e,".flv, ").concat(e,".h264, ").concat(e,".m4v, ").concat(e,".mov, ").concat(e,".mp4, ").concat(e,".mpg, ").concat(e,".mpeg, ").concat(e,".rm, ").concat(e,".swf, ").concat(e,".vob, ").concat(e,".wmv, ").concat(e,".mkv\n\t\t{ background-image: url(").concat(V.assets.videoIcon,"); }\n\n\t\t").concat(e,".d7z, ").concat(e,".arj, ").concat(e,".deb, ").concat(e,".rar, ").concat(e,".gz, ").concat(e,".zip, ").concat(e,".rpm, ").concat(e,".pkg\n\t\t{ background-image: url(").concat(V.assets.archiveIcon,");}\n\n\t\t").concat(e,".aif, ").concat(e,".mp3, ").concat(e,".cda, ").concat(e,".mid, ").concat(e,".mpa, ").concat(e,".ogg, ").concat(e,".wav, ").concat(e,".wpl, ").concat(e,".wma, ").concat(e,".midi\n\t\t{ background-image: url(").concat(V.assets.audioIcon,"); }\n\n\t\t").concat(e,".doc, ").concat(e,".docx, ").concat(e,".odt\n\t\t{ background-image: url(").concat(V.assets.wordIcon,"); }\n\n\t\t").concat(e,".bin, ").concat(e,".dmg, ").concat(e,".iso, ").concat(e,".toast, ").concat(e,".vcd\n\t\t{\n\t\t\t\ttop: 19px;\n\t\t\t\ttransform: scale(1.8);\n\t\t\t\tbackground-image: url(").concat(V.assets.diskIcon,");\n\t\t}\n\n\t\t").concat(e,".ppt, ").concat(e,".pptx, ").concat(e,".odp, ").concat(e,".key, ").concat(e,".pps\n\t\t{ background-image: url(").concat(V.assets.presIcon,"); }\n\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")},ne=e(226),ee=e.n(ne),oe=function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],c=n[1],i=Object(o.useState)(0),a=Object(r.a)(i,2),l=a[0],s=a[1],p=Object(o.useRef)(0);return Object(o.useEffect)((function(){var t=Object(h.debounce)((function(){p.current=p.current+1,s(l+1),c(!0),setTimeout((function(){c(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:p,responsiveRefreshCounter:l,setResponsiveRefresh:s}},ce=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),c=e[0],i=e[1],a=oe(),s=(a.frr,a.forceResponsiveRender),p=Object(o.useRef)(null),u=Object(o.useRef)(null);Object(o.useEffect)((function(){f(d().percent)}),[s]),Object(o.useEffect)((function(){f(t.percent)}),[t.percent]);var d=function(){var t={maxY:0,y:0,percent:0},n=u.current?u.current:null,e=p.current?p.current:null;if(!e||!n)return t;var o=e.getBoundingClientRect().height,c=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-c,t.percent=Math.round(t.y/t.maxY*100),t},f=function(t){var n=Object(h.clamp)(t,0,100),e=(n/=100)*d().maxY;i(e)};return Object(l.c)("div",{className:"scrolling-bar-wrapper",ref:u},Object(l.c)(ee.a,{onDrag:function(n){f(d().percent),t.onUpdated(d().percent)},position:{x:0,y:c},axis:"y",bounds:"parent"},Object(l.c)("div",{ref:p,className:"scrolling-bar"})))},ie=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(0),s=Object(r.a)(a,2),p=s[0],d=s[1],f=Object(o.useRef)(0),b=function(t){t>f.current&&(f.current=t),d(f.current)};Object(o.useEffect)((function(){d(0)}),[t.fileContent]);var g=Object(o.useState)(0),m=Object(r.a)(g,2),v=m[0],w=m[1],x=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useRef)(0),l=function(){return a.current},s=function(t){a.current=t,i(c+1)};return{getSyncY:l,setSyncY:s,yCnt:c,updateSyncYWithDelta:function(n){var e=(n>0?1:-1)*Math.min(Math.abs(n),40),o=l()+e;o>-200&&o<t&&s(o)}}}(p),O=x.getSyncY,j=x.setSyncY,k=x.yCnt,y=x.updateSyncYWithDelta;Object(o.useEffect)((function(){w(C(O()))}),[k,p]);var C=function(t){return Object(h.clamp)(Math.round(t/p*100),0,100)};Object(o.useEffect)((function(){i(t.fileContent)}),[t.fileContent]),Object(o.useEffect)((function(){j(1)}),[t.file.path]);var T=Object(o.useContext)(Rt),S=null===T||void 0===T?void 0:T.ui.note.lineJump.get,E=Object(o.useState)(-1),N=Object(r.a)(E,2),I=N[0],F=N[1];Object(o.useEffect)((function(){if(S){var n;if("active"===S.windowId)S.windowId=(null===T||void 0===T||null===(n=T.ui.windows.active.get())||void 0===n?void 0:n.content.i)||"";S.windowId===t.windowId&&F(S.line)}}),[S]);var A=!("editor"===t.viewType&&"mobile"!==u());return Object(l.c)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(u()),onWheelCapture:function(t){y(t.deltaY)}},Object(l.c)(je,{file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,jumpToLine:I,posY:O(),onScroll:function(t){},onUpdateY:function(t){j(t)},onMaxYUpdate:b,onFileEdited:function(n,e){t.onFileEdited(n,e),i(e)},onViewToggle:function(n){t.onViewChange&&t.onViewChange(n)}}),A&&Object(l.c)(Qn,{windowId:t.windowId,file:t.file,posY:O(),fileContent:c,onMaxYUpdate:b}),Object(l.c)(ce,{percent:v,onUpdated:function(t){j(t/100*p)}}))},ae=function(t){var n=Object(b.a)({},t.content),e=n.file,i=n.view,a=n.active,s=n.i,p=Object(o.useState)(""),u=Object(r.a)(p,2),d=u[0],f=u[1],g=Object(o.useContext)(Rt);Object(o.useEffect)((function(){f("loading..."),x(!1),e&&g&&g.file.getContent(e.path,(function(t){f(t),x(!0)}))}),[null===e||void 0===e?void 0:e.path]);var m=Object(o.useState)(!1),v=Object(r.a)(m,2),w=v[0],x=v[1],O=function(t,n){g&&g.file.saveContent(t,n,{history:!0})};Object(h.debounce)(O,1e3),Object(h.debounce)((function(){console.log("0046 refresh list after file edit"),g&&g.ui.browser.goTo(g.ui.browser.folders.current.get)}),5e3);return Object(l.c)(c.a.Fragment,null,e&&Object(l.c)("div",{className:"window-editor-wrapper"},Object(l.c)(ie,{windowId:s,file:e,fileContent:d,isActive:a,canEdit:w,viewType:i,onViewChange:t.onViewChange,onFileEdited:function(t,n){O(t,n)}})))},re={rows:2,cols:4},le={m:10,rows:re.rows,cols:re.cols,decalBottom:10},se=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),i=e[0],a=e[1],s=Object(o.useState)([]),p=Object(r.a)(s,2),d=p[0],f=p[1],b=Object(o.useRef)();Object(o.useEffect)((function(){t.grid&&t.grid.layout&&(f(t.grid.layout),a(t.grid.content))}),[t.refresh]),Object(o.useEffect)((function(){E(),j()}),[d]);var g=function(n,e){t.onGridUpdate({layout:n,content:e})},m=function(){var t=i[0].file;if(t){var n=function(t){for(var n=[],e=re,o=function(o){for(var c=[],i=function(n){var e=0;Object(h.each)(t,(function(t){for(var c=0;c<t.w;c++)for(var i=0;i<t.h;i++){var a=t.x+c,r=t.y+i;a===n&&r===o&&(e=1)}})),c.push(e)},a=0;a<e.cols;a++)i(a);n.push(c)},c=0;c<e.rows;c++)o(c);for(var i=[-1,-1],a=[-1,-1],r=0;r<e.rows;r++)for(var l=0;l<e.cols;l++)0===n[r][l]&&-1===i[0]&&-1===i[1]&&(i[0]=l,i[1]=r),0===n[r][l]&&(a[0]=l,a[1]=r);var s=a[0]-i[0]+1,p=a[1]-i[1]+1;return{x:i[0],y:i[1],w:s,h:p}}(d),e=pe({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(h.cloneDeep)(d);o.push(e.layout),A(o)&&(f(o),setTimeout((function(){var t=Object(h.cloneDeep)(i);t.push(e.content);var n=N(e.content.i,t);a(n),g(o,n)})),g(o,i))}},v=Object(o.useState)(!1),w=Object(r.a)(v,2),x=w[0],O=w[1],j=function(){O(d.length>1)},k=function(t){var n=Object(h.filter)(Object(h.cloneDeep)(d),(function(n){return n.i!==t})),e=function(t){var n=re;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);f(e),setTimeout((function(){var e=Object(h.filter)(Object(h.cloneDeep)(i),(function(n){return n.i!==t}));a(e),g(n,e)})),g(n,i)},y=Object(o.useState)(!1),C=Object(r.a)(y,2),T=C[0],S=C[1],E=function(){var t=0,n=le.cols*le.rows;Object(h.each)(d,(function(n){t+=n.w*n.h})),S(t!==n)},N=function(t,n){var e=Object(h.cloneDeep)(n);return Object(h.each)(e,(function(n){n.active=n.i===t})),e},I=function(t,n){var e=N(t,i);a(e),g(d,e),n&&(null===P||void 0===P||P.ui.browser.goTo(n.folder,n.name))},F=function(t){b.current=Object(h.cloneDeep)(t)},A=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};!function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],c=n[1],i=Object(o.useRef)(0);Object(o.useEffect)((function(){var t=Object(h.debounce)((function(){i.current=i.current+1,c(!0),setTimeout((function(){c(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[])}(),Object(o.useEffect)((function(){var t=D.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var D=Object(o.useRef)(null),R={width:300,height:300};D.current&&(R.width=D.current.clientWidth,R.height=D.current.clientHeight-le.decalBottom);var L=function(t,n){var e=Object(h.cloneDeep)(i);e[n].view=t,a(e),g(d,e)},P=Object(o.useContext)(Rt),z=Object(o.useState)(null),M=Object(r.a)(z,2),B=M[0],U=M[1];Object(o.useEffect)((function(){if("mobile"===u()){var t=null===P||void 0===P?void 0:P.ui.windows.active.get();if(t)U(t);else{var n={layout:d[0],content:i[0]};n.layout&&n.content&&n.layout.i===n.content.i&&(U(n),I(n.content.i))}}}),[t.refresh]);return Object(l.c)("div",{className:"draggable-grid-wrapper"},Object(l.c)("div",{className:"draggable-grid-wrapper-in",ref:D},"mobile"!==u()&&Object(l.c)(Bn.a,{className:"draggable-grid",autoSize:!1,layout:d,onLayoutChange:function(t){var n=Object(h.cloneDeep)(t);if(A(n)){var e=function(t){var n=t,e=re;return 2===n.length&&console.log("0234 1",n[0].w,n[1].w,e.cols/2,e.cols),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)&&(console.log("0234 2"),n[0].w=e.cols/2,n[1].w=e.cols/2),n}(n);F(e),f(e),g(e,i)}else{if(!b.current)return;var o=function(t){var n=t,e=re,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(h.cloneDeep)(t),Object(h.each)(o,(function(t,n){t.w=e.cols/2,t.y=0,1===n&&(t.x=e.cols/2)})));return o}(t);o&&F(o);var c=o||b.current,a=Object(h.cloneDeep)(c);Object(h.each)(a,(function(t){t.refresh=zn(t.refresh)})),f(a),g(a,i)}},cols:le.cols,compactType:"horizontal",useCSSTransforms:!0,rowHeight:R.height/le.rows-le.m*(le.rows+1),draggableHandle:".drag-handle",width:R.width,margin:[le.m,le.m]},d.map((function(n,e){return Object(l.c)("div",{key:n.i,className:"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t".concat(i[e]&&i[e].active?"active":"","\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow-wrapper\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),onClick:function(){i[e]&&!i[e].active&&I(i[e].i,i[e].file)}},function(t,n){return Object(l.c)(c.a.Fragment,null,Object(l.c)("div",{className:"note-active-ribbon"}),Object(l.c)("div",{className:"window-buttons-bar ".concat(T?"can-add":""," ").concat(x?"can-remove":"")},Object(l.c)(En,{design:"horizontal",popup:!1,buttons:[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",action:function(){}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){m()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){k(t.i)}}],colors:["#d4d1d1","#615f5f"],size:.8})))}(n),Object(l.c)("div",{className:"note-wrapper"},Object(l.c)(ae,{content:t.grid.content[e]&&t.grid.content[e],onViewChange:function(t){L(t,e)}})))}))),"mobile"===u()&&Object(l.c)("div",{className:"mobile-grid-view"},Object(l.c)("div",{className:" window-wrapper"},Object(l.c)("div",{className:"note-wrapper"},B&&Object(l.c)(ae,{content:B.content,onViewChange:function(t){L(t,0)}}))))))},pe=function(t){var n=Object(b.a)({},t),e=n.w,o=n.h,c=n.x,i=n.y,a=n.file;o||(o=re.rows),e||(e=re.cols),c||(c=0),i||(i=0);var r=G();return{layout:{i:r,x:c,y:i,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:r,active:!1,file:a,view:"both"}}},ue=function(t){var n=Object(h.cloneDeep)(t);return Object(h.each)(n,(function(t){t.refresh=zn(t.refresh)})),n},de=function(t){return t.length>15?"".concat(t.substring(0,13),".."):t},fe=function(t){var n=void 0;return Object(h.each)(t,(function(t,e){t.active&&(n=e)})),n},be=function(t,n){var e=Object(h.cloneDeep)(n);return Object(h.each)(e,(function(n){n.refresh=Object(h.isNumber)(n.refresh)?n.refresh++:1,n.id===t?n.active=!0:n.active=!1})),e},ge=function(t){if(t.copiedTab){var n=Object(h.cloneDeep)(t.copiedTab);return n.id=G(),n.name=he(t.copiedTab.name),n}if(t.fullWindowFile){var e=pe({file:t.fullWindowFile});return{id:G(),name:de(t.fullWindowFile.name),active:!0,grid:{layout:[e.layout],content:[e.content]}}}},he=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},me=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 c=e[o].getAsFile();"function"==typeof n&&n(c)}};var ve={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},we=c.a.createContext(ve),xe=function(t){var n=Object(b.a)({},t).tab,e=Object(o.useContext)(Rt),c=Object(o.useState)(ve),i=Object(r.a)(c,2),a=i[0],s=i[1],p=function(){var t=Object(o.useContext)(Rt),n=Object(o.useState)({name:"",data:{}}),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useRef)({});return Object(o.useEffect)((function(){if(t){var cb=a.current[c.name];cb&&cb(t,c.data)}}),[c]),{onNextStateTrigger:function(t){i(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),u=p.onNextStateTrigger,d=p.addNextStateAction;d("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get;e===n.folder&&(console.log("0046 refreshFolderList ".concat(e)),t.ui.browser.goTo(e),u({name:"checkIfNoWindows"}))})),d("checkIfNoWindows",(function(t){0===n.grid.content.length&&(console.log('0046 tab "'.concat(n.name,'" has no window, close it')),t.tabs.close(n.id))}));var f=Object(h.cloneDeep)(a);return f.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(y.trashNote),(function(){e.file.delete(t,(function(n){var o=e.ui.windows.getIdsFromFile(t.path);e.ui.windows.close(o),console.log("".concat("[FILE DELETE] 0046"," SUCCESS DELETING FILE, => remove all windows having the same file ").concat(t.path),o),u({name:"refreshFolderList",data:t})}))}))},f.file.onTitleUpdate=function(t,n){var o="[RENAME TITLE] 0046";e&&e.file.move(t,n,(function(c){console.log("".concat(o," SUCCESS IN RENAMING"));var i=null;if(Object(h.each)(c,(function(t){t.path===n&&(i=t)})),i){i=i,console.log("".concat(o," get new file from backend"));var a=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(a,i),u({name:"refreshFolderList",data:i})}}))},f.upload.reinit=function(){var t=Object(h.cloneDeep)(a);delete t.upload.file,s(t)},Object(o.useEffect)((function(){var t=function(t){var o,c=null===(o=function(t){var n=void 0;return Object(h.each)(t.grid.content,(function(t){t.active&&(n=t)})),n||(n=t.grid.content[0]),n}(n))||void 0===o?void 0:o.file;c&&(console.log("003441 dragdrop OR clipboard",t,c.name),e&&e.upload.uploadFile({file:t,folderPath:c.folder,onSuccess:function(t){var n=Object(h.cloneDeep)(a);n.upload.uploadCounter=n.upload.uploadCounter+1,n.upload.file=t,delete n.upload.progress,s(n)},onProgress:function(t){var n=Object(h.cloneDeep)(a);delete n.upload.file,n.upload.progress=t,s(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(h.debounce)((function(){t.onDragEnd()}),100);return Wt.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")}}),c=function(t){var n=function(n){me(n,(function(n){n&&t.onImagePasted(n)}))};return window.addEventListener("paste",n,!1),function(){window.removeEventListener("paste",n,!1)}}({onImagePasted:t});return function(){c(),o()}}),[t.tab]),Object(l.c)(Oe,null,Object(l.c)("div",{className:"window-grid-wrapper"},Object(l.c)(we.Provider,{value:f},Object(l.c)(se,{refresh:n.refresh||0,grid:n.grid,onGridUpdate:t.onGridUpdate}))))},Oe=Object(pn.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"}),je=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=(e[1],Object(o.useState)("")),p=Object(r.a)(a,2),d=p[0],f=p[1],g=Object(o.useRef)(null),h=Object(o.useContext)(Rt),m=!0;!1===t.canEdit&&(m=!1),h&&!1===h.status.isConnected&&(m=!1);var v=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],i=e[1];Object(o.useEffect)((function(){return i(!1),t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(a(),t.onEditorWillUnmount())}}),[t.file.path]),Object(o.useEffect)((function(){a()}),[t.file.path]),Object(o.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var a=function(){""!==sn&&t.onNoteLeaving&&t.onNoteLeaving(c,sn),sn=t.file.path};return{triggerNoteEdition:function(n){if(!t.canEdit)return console.warn("[EVENTS EDITOR] => onEdition CANNOT EDIT AS OFFLINE");c?t.onNoteEdition&&t.onNoteEdition(n,!1):t.onNoteEdition&&t.onNoteEdition(n,!0),i(!0)}}}({file:t.file,fileContent:t.fileContent,canEdit:m,onEditorDidMount:function(){},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){Ut&&f(t.fileContent)},onNoteEdition:function(n,e){f(n),t.onFileEdited(t.file.path,n),e&&h&&h.history.save(t.file.path,t.fileContent,"enter")},onNoteLeaving:function(n,e){s("desktop")&&Ht&&Ht.setSelection({endColumn:0,endLineNumber:0,startColumn:0,startLineNumber:0}),F((function(n){t.onFileEdited(e,n)}))}}).triggerNoteEdition,w=Object(o.useRef)(null),x=ln(d,{mobileTextarea:w,onMobileNoteEdition:v}),O=x.onTextareaChange,j=x.onTextareaScroll,k=rn({editorType:u(),editorRef:"desktop"!==u()?w:g}).applyTextModifAction,C=function(t,n){var e=k("insertAt",{textToInsert:t,insertPosition:n});e&&v(e)},T=wn({fileContent:d,onTextEncrypted:v,onTextDecrypted:v}),S=T.APasswordPopup,E=T.askForPassword,N=T.decryptButtonConfig,I=T.encryptButtonConfig,F=T.ifEncryptOnLeave,A=(T.noHistoryBackupWhenDecrypted,Object(o.useContext)(we)),D=Object(o.useState)(-1),R=Object(r.a)(D,2),L=R[0],P=R[1];Object(o.useEffect)((function(){if(A.upload.progress&&t.isActive&&P(A.upload.progress),A.upload.file&&t.isActive){var n=Object(b.a)({},A.upload.file),e=n.name,o=n.path;A.upload.reinit(),C("\n![".concat(e,"](").concat(o,")\n"),"currentPos")}}),[A.upload]);var z="[link|".concat(t.file.realname," ").concat(t.file.folder,"]\n"),M=[{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(l.c)(Dn,{file:t.file,onProgress:function(t){return P(t)},onSuccess:function(t){C("\n![".concat(t.name,"](").concat(t.path,")\n"),"currentPos")}})},vn(d)?N:I,{title:"Print/download",icon:"faFileDownload",action:function(){window.print()}},{title:y.editorBar.explanation.history,icon:"faHistory",action:function(){H(!_)}},{title:y.editorBar.tts,icon:"faCommentDots",action:function(){q(!Y)}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){A.file.onFileDelete(t.file)}}],B=Object(o.useState)(!1),U=Object(r.a)(B,2),_=U[0],H=U[1],W=Object(o.useState)(!1),V=Object(r.a)(W,2),Y=V[0],q=V[1],G=Object(o.useRef)(null),J=G.current,K=700;J&&(K=J.clientHeight/1.3),"mobile"===u()&&(K=window.innerHeight);var $=Object(o.useRef)(null);return Object(l.c)("div",{className:"editor-area",ref:G},Object(l.c)("div",{className:"infos-editor-wrapper"},Object(l.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(l.c)(cn,{title:t.file.name.replace(".md",""),onEdited:function(n,e){var o="".concat(t.file.folder).concat(n,".md"),c="".concat(t.file.folder).concat(e,".md");A.file.onTitleUpdate(o,c)}}),Object(l.c)("div",{className:"toolbar-and-dates-wrapper"},Object(l.c)("div",{className:"editor-toolbar-dropdown"},Object(l.c)(An,{hover:!0,dir:"right",maxHeight:K},Object(l.c)(c.a.Fragment,null,Object(l.c)("div",{className:"view-toggler-wrapper"},"mobile"!==u()&&Object(l.c)(En,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){t.onViewToggle("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){t.onViewToggle("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){t.onViewToggle("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){t.onViewToggle("preview")}}]})),Object(l.c)("div",{className:"toolbar-wrapper"},Object(l.c)(En,{class:"editor-main-toolbar",design:"vertical",size:.8,buttons:M})),Object(l.c)("div",{className:"separation-bar"}),Object(l.c)("div",{className:"dates-wrapper"},Object(l.c)("div",{className:"date modified"},Object(l.c)("h4",null,"Modified"),xn(new Date(t.file.modified||0))),Object(l.c)("div",{className:"date created"},Object(l.c)("h4",null,"Created"),xn(new Date(t.file.created||0)))),Object(l.c)("div",{className:"path-wrapper"},Object(l.c)("div",{className:"path"},Object(l.c)("h4",null,"Path"),Object(l.c)("span",{className:"path-link",onClick:function(){null===h||void 0===h||h.ui.browser.goTo(t.file.folder,t.file.name),console.log(t.file.folder,t.file.name)}}," ",t.file.folder," "))),Object(l.c)("div",{className:"note-id-wrapper"},Object(l.c)("h4",null,"Node Id"),Object(l.c)("div",{className:"note-id-form"},Object(l.c)("input",{type:"text",ref:$,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:z,readOnly:!0}),Object(l.c)(En,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=$.current;t&&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)}))}(t)}}]})))))))),Object(l.c)(Ln,{progress:L}),Object(l.c)("div",{className:"main-editor-wrapper"},"desktop"===u()&&Object(l.c)(Zt,{value:d,jumpToLine:t.jumpToLine,vimMode:i,readOnly:!m,ref:g,onChange:v,onScroll:t.onScroll,onUpdateY:t.onUpdateY,posY:t.posY,onMaxYUpdate:t.onMaxYUpdate}),"desktop"!==u()&&Object(l.c)("textarea",{className:"textarea-editor",ref:w,readOnly:!m,value:d,onScroll:function(n){t.onScroll(n),j(n)},onChange:O})),"desktop"!==u()&&Object(l.c)(Fn,{onButtonClicked:function(t){var n=k(t);n&&v(n)}}),E&&S,_&&Object(l.c)(On,{file:t.file,onClose:function(){H(!1)}}),Y&&Object(l.c)(Tn,{fileContent:d,onClose:function(){q(!1)}}))},ke=function(){return"\n.file-path-wrapper {\n padding-top: ".concat(s("desktop")?V.sizes.block:V.sizes.block/2,"px;\n font-size: 13px;\n font-weight: 700;\n color: #b6b5b5;\n cursor: pointer;\n text-transform: capitalize;\n}\n.big-title {\n color: ").concat(V.colors.main,";\n font-size: 30px;\n font-weight: 800;\n width: 100%;\n text-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 color: grey;\n\t\t\ttext-align: left;\n }\n\t\t.created {\n\t\t\ttext-align: right;\n\t\t\tposition: absolute;\n\t\t\ttop: 0px;\n\t\t\tright: 0px;\n\t\t\tcolor: ").concat(V.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(V.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\tborder: none;\n\t\t\t\t\tpadding: 5px;\n\t\t\t\t\tbackground: #ebebeb;\n\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\tfont-size: 9px;\n\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")},ye={};window.tiroCli=ye;var Ce=function(t,n){var e,i,a=w("showRenderId",!1),s=Object(r.a)(a,2),p=s[0],u=s[1];e="toggleRenderId",(i={description:"toggle display of renderId for each block",func:function(){console.log("[toggleRenderId]"),u(!p),setTimeout((function(){window.location.reload()}),1e3)}}).f=i.func,ye[e]=i;var d=Object(h.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(l.c)(c.a.Fragment,null,p&&Object(l.c)("p",{style:{position:"absolute",fontSize:"10px",color:"rgba(255,0,0,0.8)"}},d),t));(new Date).getTime();return o}),n)},Te=function(){return"Tiro (".concat(Wt.version,")")},Se=function(t){return Object(l.c)("button",{className:"new-file-button",onClick:function(n){t.onNewFile()}},Object(l.c)(on,{name:"faPlusCircle",color:"white"}),Object(l.c)("span",null,y.newNote))},Ee=e(387),Ne=e(386),Ie=function(t){Object(S.a)(e,t);var n=Object(E.a)(e);function e(t){var o;return Object(C.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=c.a.createRef(),o.scrollerListRef=c.a.createRef(),o.canAutoScroll=!1,o.getVisibleItemsDebounced=Object(h.debounce)((function(){var t=o.scrollerWrapperRef.current;if(t){for(var n=t.getBoundingClientRect().height,e=-1,c=[],i=0;i<o.liRefs.length;i++){var a=o.liRefs[i].current;if(a){var r,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=i),o.props.files[i]&&c.push(null===(r=o.props.files[i])||void 0===r?void 0:r.path)}}o.props.onVisibleItemsChange(c)}}),500),o.onListScroll=function(){o.canAutoScroll=!1,o.getVisibleItemsDebounced()},o.isMultiSelected=function(t){return o.state.selectionEdges[0]<=t&&o.state.selectionEdges[1]>=t},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),console.log("scroll to item: ",o.itemToScroll),o.scrollerListRef.current.scrollToItem(o.itemToScroll)},o.getUrlLoginToken=function(){return"?token=".concat(Q())},o.state={hoverMode:!1,selectionEdges:[-1,-1]},o}return Object(T.a)(e,[{key:"shouldComponentUpdate",value:function(t,n){if(JSON.stringify(t.files)!==JSON.stringify(this.oldFiles)){this.oldFiles=Object(h.cloneDeep)(t.files),this.liRefs=[];for(var e=0;e<t.files.length;e++)this.liRefs.push(c.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=X[this.props.sortMode],e=V.sizes.l2.fileLi.height+2*V.sizes.l2.fileLi.padding+V.sizes.l2.fileLi.margin,o=window.innerHeight-(V.sizes.search.h+V.sizes.search.padding),i=s("desktop")?o:o-V.sizes.mobile.bottomBarHeight;return Object(l.c)(c.a.Fragment,null,Object(l.c)("div",{className:"list-wrapper-scroller",style:{height:i},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(l.c)(Ne.a,null,(function(o){o.height;var a=o.width;return Object(l.c)(Ee.a,{itemData:t.props.files,className:"List",ref:t.scrollerListRef,height:i,itemCount:t.props.files.length,itemSize:e,width:a,onScroll:t.onListScroll},(function(e){var o=e.index,i=e.style,r=t.props.files[o],s=t.props.filesPreview[r.path];return Object(l.c)("div",{style:i},Object(l.c)("li",{ref:t.liRefs[o],style:{width:a-2*De.l2.fileLi.padding-2*De.l2.fileLi.margin-35},className:["file-element-list","element-".concat(o),"".concat(t.isMultiSelected(o)?"multiselected":""),"".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):[r],t.props.onFileDragStart(n)},onDragEnd:function(){t.props.onFileDragEnd()},onClick:function(n){t.props.onFileClicked(o),t.setState({selectionEdges:[-1,-1]})}},Object(l.c)("div",{className:"background-item"}),Object(l.c)("div",{className:"background-item-border"}),Object(l.c)("div",{className:"left"},Object(l.c)("h3",{className:"label",onMouseEnter:function(n){t.props.hoverMode&&t.props.onFileClicked(o)}},r.name),Object(l.c)("div",{className:"content"},s&&s.content&&Object(l.c)(c.a.Fragment,null,s.content)),Object(l.c)("div",{className:"date ".concat(n)},xn(new Date(("modified"===n?r.modified:r.created)||0)))),Object(l.c)("div",{className:"right"},s&&s.picture&&Object(l.c)("div",{className:"picture",style:{backgroundColor:"white",backgroundImage:"url('".concat(s.picture.startsWith("http")?s.picture+t.getUrlLoginToken():"".concat(kt(t.props.files[0].folder),"/").concat(s.picture).concat(t.getUrlLoginToken()),"')")}}))))}))}))))}}]),e}(c.a.Component),Fe=Object(b.a)({},V),Ae=(Fe.els,Fe.colors),De=(Fe.font,Fe.sizes),Re=function(t){var n=Object(o.useContext)(Rt),e=n?n.ui.browser.folders:null;return Object(l.c)("div",{className:"folder-tree-view-component"},Object(l.c)("h3",{className:"subtitle"},y.folders),Object(l.c)(Le,{folder:t.folder,current:t.current,onFolderClicked:t.onFolderClicked,onFolderMenuAction:t.onFolderMenuAction,onFolderOpen:function(n){e&&e.open.add(n),t.onFolderOpen(n)},onFolderClose:function(n){e&&e.open.remove(n),t.onFolderClose(n)},onFolderDragStart:t.onFolderDragStart,onFolderDragEnd:t.onFolderDragEnd,onFolderDrop:t.onFolderDrop}))},Le=function t(n){var e=Object(o.useContext)(Rt),c=w("treeview-".concat("/"===n.folder.key||""===n.folder.key?"root":n.folder.key),!1),i=Object(r.a)(c,2),a=i[0],s=i[1],p=Object(o.useState)(!1),u=Object(r.a)(p,2),d=u[0],f=u[1],b=K(n.current,n.folder.key);return Object(l.c)("li",{className:"folder-wrapper ".concat(b?"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(){d&&f(!1)}},Object(l.c)("div",{className:"folder-title"},Object(l.c)("span",{className:"icon",onClick:function(t){a?n.onFolderClose(n.folder.key):n.onFolderOpen(n.folder.key),s(!a)}},n.folder.hasChildren&&Object(l.c)(on,{name:a?"faCaretDown":"faCaretRight",color:V.colors.main})),Object(l.c)("span",{className:"title",onClick:function(t){n.onFolderClicked(n.folder.key)}},n.folder.title),Object(l.c)("span",{onClick:function(){f(!d)},className:"context-menu-wrapper"},Object(l.c)(on,{name:"faEllipsisH",color:V.colors.l1.font}),d&&Object(l.c)("div",{className:"context-menu"},Object(l.c)("ul",null,Object(l.c)("li",{onClick:function(){if(""===n.folder.path)return f(!1);var t=prompt("".concat(y.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),f(!1)}},y.renameFolder),Object(l.c)("li",{onClick:function(){if(""===n.folder.path)return f(!1);e&&e.popup.prompt({text:"".concat(y.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}}),f(!1)}},y.createFolder),-1===n.folder.path.indexOf(".tiro/.trash")&&Object(l.c)("li",{onClick:function(){if(e){if(""===n.folder.path)return f(!1);f(!1),e.popup.confirm("".concat(y.moveToTrash,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("moveToTrash",n.folder)}))}}},y.moveToTrash),-1!==n.folder.path.indexOf(".tiro/.trash")&&Object(l.c)("li",{onClick:function(){if(e){if(""===n.folder.path)return f(!1);f(!1),e.popup.confirm("".concat(y.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}}},y.deleteFolder))))),a&&Object(l.c)("ul",{className:"folder-children"},n.folder.children&&n.folder.children.map((function(e,o){return Object(l.c)(t,{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})}))))},Pe=function(t){var n=Object(b.a)({},t).files;return Object(l.c)(c.a.Fragment,null,n.length>0&&Object(l.c)("div",{className:"last-notes-component"},Object(l.c)("h3",{className:"subtitle"},y.lastNotes),Object(l.c)("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(l.c)("li",{key:e,title:o,onClick:function(e){t.onClick(n)},className:"note"},Object(l.c)(on,{name:"faFile"}),o)})))))},ze=function(t){var n=Object(o.useContext)(Rt),e=!!n&&n.status.searching.get;return Object(l.c)(c.a.Fragment,null,Object(l.c)("div",{className:"search-bar-component"},Object(l.c)("input",{type:"text",placeholder:y.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 c=n.ui.browser.folders.current.get;""===t.term&&""!==c&&(e=e+" "+c,o&&setTimeout((function(){var t=(o.selectionStart||0)-c.length-1;o.selectionStart=t,o.selectionEnd=t}),10)),n.ui.search.term.set(e)}}(e.target.value,e.target)}}),Object(l.c)("div",{className:"search-status"},e&&y.searchingLabel)))},Me=function(t){var n={title:t.realname,folder:t.folder,mobileview:"editor"},e="".concat(Wt.global.protocol).concat(Wt.global.url).concat(Wt.global.port,"?").concat(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}(n));window.open(e,"popupDetached","width=600,height=600")},Be=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),c=e[0],i=e[1];Object(o.useEffect)((function(){i(t.startingIndex)}),[t.startingIndex]);var a=function(n){var e=c;e=-1===n&&0===c?t.images.length-1:1===n&&c===t.images.length-1?0:c+n,i(e)};return Object(l.c)("div",{className:"lightbox-component"},Object(l.c)("div",{className:"lightbox-bg"}),Object(l.c)("div",{className:"lightbox-content"},t.images.map((function(n,e){return Object(l.c)("div",{key:e,className:"lightbox-image",style:{display:e===c?"flex":"none"}},Object(l.c)("img",{src:kt(n.url)+yt()}),Object(l.c)("div",{className:"image-infos"},Object(l.c)("div",{className:"image-name",onClick:function(t){return Me(n.file)}},n.file.name," - ",n.title),Object(l.c)(En,{popup:!1,buttons:[{class:"left",title:"left",icon:"faChevronLeft",action:function(){a(-1)}},{class:"close",title:"close",icon:"faTimes",action:function(){t.onClose()}},{class:"right",title:"right",icon:"faChevronRight",action:function(){a(1)}}]})))}))))},Ue={onAccept:function(){},onRefuse:function(){}},_e=function(t){var n=Object(o.useContext)(Rt),e=Object(o.useState)(-1),c=Object(r.a)(e,2),i=c[0],a=c[1];return Object(l.c)("div",{className:"tab-list-scroll-wrapper"},Object(l.c)("div",{className:"tab-list-invisible-scroll"},Object(l.c)("div",{className:"tab-list-wrapper"},t.tabs.map((function(e,o){return Object(l.c)(He,{key:o,tab:e,onDrop:function(t){a(t)},onDragEnter:function(t){a(t)},onDragEnd:function(t){n&&n.tabs.reorder(t,i),a(-1)},showDragIndic:i===o,pos:o,onUpdate:t.onUpdate})})),(null===n||void 0===n?void 0:n.ui.browser.files.active.get)&&Object(l.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onUpdate("add")}},"+"))))},He=function(t){var n=Object(b.a)({},t),e=n.tab,o=n.pos,i="Six",a=e.grid.layout.length;return 2===a&&(i="Two"),3===a&&(i="Three"),4===a&&(i="Four"),5===a&&(i="Five"),i="faDice".concat(i),Object(l.c)("div",{className:"tab-and-drag-wrapper"},t.showDragIndic&&Object(l.c)("div",{className:"drag-indic"},"\u25bc"),Object(l.c)("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(l.c)("div",{className:"active-ribbon"}),Object(l.c)("div",{className:"tab-name",onClick:function(){t.onUpdate("activate",e)}},"mobile"!==u()&&Object(l.c)("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"===u()&&Object(l.c)(c.a.Fragment,null,e.name)),e.grid.layout.length>1&&Object(l.c)("div",{className:"tab-nb-windows",onClick:function(){t.onUpdate("activate",e)}},Object(l.c)(on,{name:i,color:"#b2b2b2"})),Object(l.c)("div",{className:"tab-close",onClick:function(){return t.onUpdate("close",e)}},Object(l.c)(on,{name:"faPlus",color:"#b2b2b2"}))))},We=(u(),Object(b.a)({},V)),Ve=We.els,Ye=We.colors,qe=(We.font,We.sizes),Ge=function(t,n){var e,o="//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"===u()?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"===u()?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("\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\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\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\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\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: 2;\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 img {\n max-width: 95vw;\n max-height: 95vh;\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\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(In,"\n\n\t\t.main-wrapper {\n\t\t\t\tdisplay: flex;\n\n\t\t\t\t").concat("\n .image-gallery-component-wrapper {\n margin: 0px 17px;\n overflow-y: scroll;\n // height: calc(100vh - ".concat(V.sizes.search.padding+V.sizes.gallery.topH+("desktop"===u()?0:190),"px);\n height: calc(100vh - ").concat(V.sizes.search.padding+V.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"===u()?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(V.els().imageInfos,"\n }\n img {\n ").concat(V.els().images,"\n }\n margin-bottom: 10px;\n }\n }\n }\n }\n"),"\n\n\t\t\t\t").concat("\n\t\t.dropdown-wrapper {\n\t\t\t\t\n\t\t\t\tposition: relative;\n\t\t\t\t&.hover-active:hover {\n\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\tdisplay: block\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\tcolor: ".concat(V.colors.main,";\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.dropdown-icon {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\ttop: -10px;\n\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\tcolor: #d4d1d1;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.context-menu {\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\ttop: 20px;\n\n\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\tmin-width: 140px;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t}\t\n\n\t\t\t\t&.right {\n\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n"),"\n\n\t\t\t\t").concat("\n.search-bar-component {\n input {\n\t\t\t\tborder-radius: 5px;\n width: calc(100% - ".concat(2*V.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(V.sizes.block,"px ").concat(V.sizes.block,"px ").concat(V.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\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(V.colors.main,";\n li {\n flex: 1 1 auto;\n button {\n ").concat(V.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 40px;\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\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(V.colors.main,";\n }\n .connected {\n display:none;\n position: absolute;\n bottom: 5px;\n right: 5px;\n color: ").concat(V.colors.green,";\n }\n}\n"),"\n\n\t\t\t\t").concat("\n .setup-popup-component {\n .submit-button {\n margin-top: 10px;\n ".concat(V.els().redButton,";\n padding: 10px 20px;\n }\n .error {\n color: ").concat(V.colors.main,";\n }\n .success {\n color: ").concat(V.colors.green,";\n }\n }\n"),"\n\n\t\t\t\t").concat("\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","\n\n\t\t\t\t").concat("\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&.hide iframe {\n\t\t\t\topacity: 0;\n\t\t}\n\t\tiframe {\n\t\t\t\ttransition: 0.3s all;\n\t\t\t\twidth: calc(100% - 6px);\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: 15px;\n\t\tpadding-bottom: 0px;\n}\n.content-block.block-tag {\n\t\tpadding: 10px 0px 0px 0px;\n}\n\n","\n\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\t\t\t\t").concat("\n.popup-wrapper-component {\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(V.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(V.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"),"\n\n\n\t\t\t\t").concat("\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\nsettings-popup-wrapper\n.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\t\th3 {\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(V.colors.bgPopup2,";\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tborder: 1px ").concat(V.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"),"\n\n\t\t\t\t").concat("\n.last-notes-component {\n padding: 0px ".concat(V.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(V.colors.main,";\n margin-right: 10px;\n }\n }\n }\n}\n"),"\n\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: -18px;\n\t\t\t\t\t\t\t\t.context-menu {\n right: 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(V.sizes.block,"px;\n\t\tpadding-right: 0px;\n\t\tmargin: 0px 0px 100px 0px;\n\t\twidth: calc(100% - ").concat(V.sizes.block*(s("desktop")&&!p()?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: 20px;\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: 10;\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(V.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(V.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\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}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\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(V.els().redButton,"\n ").concat(V.font.main,";\n padding: ").concat(s("desktop")?"14px 5px":"13px 7px",";\n margin: 13px 15px 15px 15px;\n\t\t\t\twidth: calc(100% - 30px); \n font-size: ").concat((s("desktop"),11),"px;\n svg {\n margin-right: ").concat(s("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\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: 0s;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tleft: -").concat(qe.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: 100vh;\n\t\t\t\t}\n\n\t\t\t\t.left-wrapper {\n\t\t\t\t\t\tbackground: ").concat(Ye.l2.bg,"; \n\t\t\t\t\t\twidth: ").concat("desktop"===u()?qe.desktop.l:"navigator"!==t?0:100,"vw;\n\n\t\t\t\t\t\tdisplay: ").concat("desktop"===u()?"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(V.assets.decoBgMap,"');\n\t\t\t\t\t\t\t\tbackground-color: ").concat(V.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(V.colors.fontInterface2,";\n\t\t\t\t\t\t\t\twidth: ").concat(qe.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(Ye.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(qe.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(V.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(qe.search.padding,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(qe.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(qe.block,"px ").concat(qe.block,"px ").concat(qe.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(Ye.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(Ye.l2.text,";\n\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Ye.l2.text,";\n\t\t\t\t\t\t\t\t\t\t").concat(Ve().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(qe.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(De.l2.fileLi.padding,"px ").concat(De.block-De.l2.fileLi.margin,"px;\n margin: ").concat(De.l2.fileLi.margin,"px ").concat(De.l2.fileLi.margin+5,"px ").concat(De.l2.fileLi.margin,"px ").concat(De.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(De.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(V.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(V.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(De.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\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\tcolor: ").concat(Ae.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\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-all;\n\t\t\t\t\t\t\t\t\t\t").concat(s("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(Ae.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(De.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(De.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(Ye.l2.bg,"; \n\t\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(qe.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(qe.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(V.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(V.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(V.colors.bgTab,";\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tcolor: ").concat(V.colors.fontTab,";\n\t\t\t\t\t\t\t\tfont-family: ").concat(V.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(V.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(V.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(V.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(V.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(V.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(V.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("\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: 2px;\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\tcursor: se-resize;\n\t\t\t\t\t\topacity: 0.2;\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(V.colors.fontEditor,";\n\t\t\t\t\t\t\t\tbackground: ").concat(V.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(V.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(V.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.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(V.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\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 43px;\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(V.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: 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.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"),"\n\t\t\t\t").concat("\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\t.infos-editor-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\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(V.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% - 266px);\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% - 95px);\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\tpadding: 10px 20px 20px 20px;\n\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\tfont-size: 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-bottom: 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\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"),"\n\n\t\t\t\t").concat("\n .mobile-text-manip-toolbar {\n position: fixed;\n bottom: ".concat(V.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(V.sizes.mobile.editorBar,"px;\n background: ").concat(V.colors.editor.mobileToolbar.bg,";\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n }\n"),"\n\t\t\t\t").concat("\n.view-editor .scrolling-bar-wrapper {\n}\n\n.scrolling-bar-wrapper {\n\t\tposition: absolute;\n\t\ttop: 33px;\n\t\theight: calc(100% - 53px);\n\t\topacity: 0.3;\n\t\tbackground: rgb(195,195,195);\n\t\twidth: 10px;\n\t\tright: 0px;\n\t\tposition: absolute;\n\t\tz-index: 101;\n\n\t\t.scrolling-bar {\n\t\t\t\tcursor: ns-resize;\n\t\t\t\tbackground: grey;\n\t\t\t\theight: 20px;\n\n\t\t}\n}\n","\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"===u()?qe.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\tdisplay: ").concat("desktop"===u()||"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\tdisplay: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\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\ttransform: scale(0.8);\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 {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 56%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 20px;\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\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% - 20px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 500vh;\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\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\tposition: absolute;\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\tdisplay:none;\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"===u()?"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((e=t,"//css\n.editor-area {\n width: ".concat(s("desktop")?"50%":"editor"===e?"100vw":"0vw",";\n display: ").concat(s("desktop")||"editor"===e?"block":"none",";\n position: relative;\n\n .infos-editor-wrapper {\n ").concat(s("desktop")?"":"height: ".concat(V.sizes.mobile.editorTopWrapper,"px;"),"\n ").concat(s("desktop")?"width: calc(200% - ".concat(3*V.sizes.block*2,"px);"):"","\n padding: 0px ").concat(s("desktop")?3*V.sizes.block:2*V.sizes.block,"px;\n position: relative;\n\n\t\t").concat(ke(),"\n\n .title-input-wrapper {\n position:relative;\n margin-top: ").concat(s("desktop")?6:0,"px;\n .press-to-save {\n position: absolute;\n top: 39px;\n font-size: 8px;\n color: ").concat(V.colors.main,";\n right: 0px;\n }\n input {\n padding: 0px;\n border: none;\n background: none;\n }\n }\n\n \n\n .toolbar-and-dates-wrapper {\n display: flex;\n }\n\n .dates-wrapper {\n display: ").concat(s("desktop")?"block":"none",";\n .date {\n }\n }\n \n\t\t").concat(Rn,"\n }\n }\n\n\n\n\n .main-editor-wrapper {\n // 10 = monaco browser gutter\n // padding: 0px ").concat(s("desktop")?3*V.sizes.block-10:2*V.sizes.block,"px;\n ").concat(s("desktop")?"padding: 0px ".concat(3*V.sizes.block/2,"px 0px ").concat(3*V.sizes.block-10,"px;"):"","\n ").concat(s("desktop")?"":"padding: 0px ".concat(2*V.sizes.block,"px 0px ").concat(2*V.sizes.block,"px;"),"\n ").concat(s("desktop")?"":"margin: 0px 0px ".concat(V.sizes.mobile.bottomBarHeight,"px 0px;"),"\n .monaco-editor {\n margin: 0px;\n }\n .textarea-editor {\n border: none;\n width: 100%;\n height: calc(100vh - ").concat(V.sizes.mobile.editorTopWrapper+V.sizes.mobile.editorBar+2*V.sizes.mobile.bottomBarHeight,"px);\n margin: 0px;\n padding: 0px;\n background: rgba(255,255,255,0.7);\n }\n }\n}\n")),"\n\n\t\t\t\t\t\t\t\t\t\t").concat('\n [class^="mtk"]:not(.mtk1) {\n // color: '.concat(V.colors.main,";\n font-weight: 800;\n }\n .mtk6 {color: ").concat(V.colors.main,";}\n .mtk21 {color: ").concat(V.colors.main,";}\n\n .mtk10 {color: ").concat(V.colors.compl[1],";} // () =>\n .mtk8 {color: ").concat(V.colors.compl[0],";} // comments\n .mtk7 {color: ").concat(V.colors.compl[0],";} // = 0o775\n .mtk23 {color: ").concat(V.colors.compl[0],";} // Promise\n\n // .mtk10 {color: ").concat(V.colors.dev[1],";} // () =>\n // .mtk8 {color: ").concat(V.colors.dev[2],";} // comments\n // .mtk7 {color: ").concat(V.colors.dev[2],";} // = 0o775\n // .mtk23 {color: ").concat(V.colors.dev[2],";} // Promise\n\n .mtk1 {}\n .mtk1 {}\n .mtk1 {}\n .mtk1 {}\n .mtk1 {}\n .mtk1 {}\n // .mtk6 {\n // color: ").concat(V.colors.main,";\n // }\n .monaco-editor .scroll-decoration {\n box-shadow: none;\n }\n\n\n\t\t.view-overlays .current-line {\n\t\t\t\tdisplay:none;\n\t\t}\n"),"\n\t\t\t\t\t\t\t\t\t\t").concat("\n.monaco-editor-wrapper {\n height: 100%;\n .scroll-wrapper {\n width: 100%;\n height: 100%;\n }\n .vim-status-bar {\n &.active {\n display: block\n }\n display: none;\n position: fixed;\n bottom: 0px;\n height: 18px;\n padding: 5px 5px 7px 5px;\n width: 80%;\n z-index: 1;\n background: rgba(255,255,255,0.9);\n input {\n background: #eeeeee;\n border: none;\n margin: 0px 5px;\n }\n }\n }\n","\n\n\t\t\t\t\t\t\t\t\t\t").concat("\n.preview-area-wrapper {\n overflow: ".concat(p()||s("mobile")?"scroll":"hidden",";\n height: ").concat((s("desktop"),"100vh"),";\n margin-top: ").concat(s("desktop")?"140":"0","px;\n}\n.preview-area {\n position: relative;\n display: block;\n\n ").concat(ke,"\n\n\t\t").concat(te(),"\n\n\n\n .infos-preview-wrapper {\n display: ").concat(s("desktop")?"none":"block",";\n }\n\n}\n"),"\n\n\t\t\t\t\t\t\t\t\t\t").concat(Rn(),"\n\t\t\t\t\t\t\t\t\t\t").concat("\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",'\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(Kt.a)(o,";","")},Je=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},Ke=function(t,n,e,o,c){var i=function(t,n){console.log("[MOVEFILE] ".concat(t," -> ").concat(n)),_t.emit("moveFile",{initPath:t,endPath:n,idReq:"-",token:Q()})};return{askForMoveFile:i,promptAndBatchMoveFiles:function(n,e){c.confirm&&c.confirm("move ".concat(null===n||void 0===n?void 0:n.length,' files to "').concat(e.key,'"? (example: "').concat(n[0].path,'" to "').concat(e.key,"/").concat(n[0].name,'"'),(function(){for(var o=0;o<n.length;o++){var c=n[o],a="".concat(c.path),r="".concat(e.key,"/").concat(c.name);i(a,r),t()}}))},promptAndMoveFolder:function(i){var a=Object(b.a)({},i),r=a.folder,l=a.folderToDropInto,s=a.folderBasePath,p=a.newTitle,u=a.renameOnly,d=[r.path,"".concat(u?Je(l):l.path,"/").concat(p||r.title)],f="".concat(s,"/").concat(d[0]),g="".concat(s,"/").concat(d[1]);c.confirm&&c.confirm("".concat(y.moveFolderPrompt," ").concat(f," to ").concat(g,"?"),(function(){!function(t,n){console.log("[MOVEFOLDER] ".concat(t," -> ").concat(n)),_t.emit("moveFolder",{initPath:t,endPath:n,token:Q()})}(f,g),t(),n(),e(),function(t){var n="".concat(Wt.global.protocol).concat(Wt.global.url).concat(Wt.global.port,"/?");Object(h.isNumber)(t.file)&&-1!==t.file&&(n+="file=".concat(t.file,"&")),t.title&&(n+="title=".concat(t.title,"&")),t.folder&&""!==t.folder&&!t.search&&(n+="folder=".concat(t.folder,"&")),t.folder||t.search||(n+="folder=/&"),t.search&&""!==t.search&&(n+="search=".concat(t.search,"&")),t.appview&&(n+="appview=".concat(t.appview,"&")),window.history.pushState({},document.title,n),console.log("[URL] UPDATEURL : NEW URL PUSHED => to ".concat(JSON.stringify({newUrl:n,urlParams:t})))}({}),o([Je(r),l.path]),setTimeout((function(){o([Je(r),l.path])}),1e3)}))}}},$e={ctrl:!1,shift:!1,alt:!1,opt:!1},Xe={38:"up",40:"down",17:"ctrl",16:"shift",18:"alt",93:"opt",13:"enter"},Ze=function(t){return t=t||window.event,Xe[t.keyCode]?Xe[t.keyCode]:t.key},Qe={},to={ui_sidebar:!0,ui_filesList_sortMode:2},no="[USER SETTINGS] 0011 :",eo=function(){var t=Bt("user-settings",{}),n=Object(r.a)(t,3),e=n[0],c=n[1],i=n[2],a=Object(o.useState)(0),l=Object(r.a)(a,2),s=l[0],p=l[1],u=Object(o.useRef)([]);Object(o.useEffect)((function(){d()}),[e]);var d=Qt((function(){console.log(no,"UPDATE!",e,s),function(t,n,o){u.current[t]||(u.current[t]=n[o]);var c=e[t];Object(h.isNull)(c)||Object(h.isUndefined)(c)||(""===c&&u.current[t]&&(c=u.current[t]),n[o]=c)}("ui_layout_colors_main",V.colors,"main"),p(s+1)}),1e3);return{userSettingsApi:{set:function(t,n){console.log(no,"updateUserSettings ".concat(t," to ").concat(n));var o=Object(h.cloneDeep)(e);o[t]=n,c(o)},get:function(t){var n=to[t];return t in e&&(n=e[t]),n},list:function(){var t=[];return Object(h.each)(e,(function(n,e){var o=e;t.push({key:o,val:n})})),t},refresh:{css:{get:s}}},refreshUserSettingsFromBackend:i}},oo=function(){return{nature:"file",name:"",realname:"",path:"",folder:""}},co=function(t){var n=Object(o.useContext)(Rt),e=Object(o.useState)({}),c=Object(r.a)(e,2),i=c[0],a=c[1];Object(o.useEffect)((function(){a({})}),[t.files]);var s=Object(o.useReducer)((function(t){return t+1}),0),p=Object(r.a)(s,2)[1],u=n?n.userSettings.get("ui_filesList_sortMode"):2;return Object(l.c)("div",{className:"files-list-component"},Object(l.c)("div",{className:"list-toolbar"},Object(l.c)("button",{type:"button",title:"sort",onClick:function(){if(n){var e=u+1>=X.length?0:u+1;n.userSettings.set("ui_filesList_sortMode",e),t.onSortFiles(Z(t.files,e))}}},Object(l.c)("span",null,t.files.length>0&&Object(l.c)("span",{className:"list-count"},"(",t.files.length,")"),$[u]),Object(l.c)(on,{name:"faSort",color:V.colors.l2.text}))),Object(l.c)("div",{className:"list-wrapper"},Object(l.c)(Ie,{files:t.files,filesPreview:i,hoverMode:!1,activeFileIndex:t.activeFileIndex,sortMode:u,onFileClicked:function(n){t.onFileClicked(n)},onFileDragStart:t.onFileDragStart,onFileDragEnd:t.onFileDragEnd,onVisibleItemsChange:function(t){!function(t){if(n){for(var e=[],o=0;o<t.length;o++){var c=t[o];i[c]||e.push(c)}e.length>1&&n.files.getPreviews(e,(function(t){Object(h.each)(t,(function(t){i[t.path]=t})),a(i),p()}))}}(t)}})))};a.a.render(Object(l.c)((function(){Object(o.useEffect)((function(){return console.log("========= [APP] MOUNTED on a ".concat(u())),new Promise((function(t,n){Ut||(Ut=v(qt()),Wt.log.socket&&console.log("[SOCKET] try connecting to ".concat(qt(),"...")),(_t=Jt(Ut)).on("connectionSuccess",(function(n){Wt.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(Ut.connected),n),n.isRgGood||alert(y.rgNotWorking),t({socket:Ut,ipsServer:n.ipsServer,socketManager:_t})})))})).then((function(t){A(!0),Z&&Z.status.ipsServer.set(t.ipsServer),ot(rt)})),window.onkeydown=function(t){var n=Ze(t);Object(h.isNull)($e[n])||($e[n]=!0);var e="".concat(n,"-down");Qe[e]&&Qe[e]()},window.onkeyup=function(t){var n=Ze(t);Object(h.isNull)($e[n])||($e[n]=!1);var e="".concat(n,"-up");Qe[e]&&Qe[e]()},function(){console.log("app will unmount")}}),[]);var t=function(){nt.active.set(-1)},n=function(){X.ui.browser.files.set([])},e=(Object(h.debounce)((function(){}),100),function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],s=Object(o.useState)(""),p=Object(r.a)(s,2),u=p[0],d=p[1],f=Object(o.useState)(""),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(""),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useState)(),j=Object(r.a)(O,2),k=j[0],C=j[1],T=Object(o.useRef)(0);return Object(o.useEffect)((function(){return console.log("[SETUP CONFIG] init socket listener"),T.current=_t.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(C(["success","".concat(y.setupForm.successReload)]),setTimeout((function(){window.location.reload()}),3e3)):"ASK_SETUP"===n.code?(t.cleanAllApp(),a(!0),n.defaultFolder&&x(n.defaultFolder)):C(["error","".concat(n.code,": ").concat(n.message)])})),function(){console.log("[SETUP CONFIG] clean socket listener"),_t.off(T.current)}}),[]),{displayWelcomePopup:i,SetupPopupComponent:function(t){return Object(l.c)(c.a.Fragment,null,i&&Object(l.c)("div",{className:"setup-popup-component"},Object(l.c)(Y,{title:"Welcome to Tiro",onClose:function(){}},Object(l.c)("p",null,y.setupForm.introText)," ",Object(l.c)("br",null),Object(l.c)("div",null,Object(l.c)(q,{value:u,label:y.setupForm.user,explanation:y.setupForm.userExplanation,onChange:function(t){d(t)},shouldNotSelectOnClick:!0}),Object(l.c)(q,{value:g,label:y.setupForm.password,type:"password",explanation:y.setupForm.passwordExplanation,onChange:function(t){h(t)},shouldNotSelectOnClick:!0}),Object(l.c)(q,{value:w,label:y.setupForm.dataFolder,explanation:y.setupForm.folderExplanation,onChange:function(t){x(t)},shouldNotSelectOnClick:!0}),Object(l.c)("input",{type:"button",value:"submit",className:"submit-button",onClick:function(t){C(void 0),_t.emit("sendSetupInfos",{form:{user:u,password:g,dataFolder:w},token:Q()})}}),k&&Object(l.c)("div",{className:k[0]},k[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),pt(),it(),t(),n()}}).SetupPopupComponent),i=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],s=Object(o.useState)(""),p=Object(r.a)(s,2),u=p[0],d=p[1],f=Object(o.useState)(""),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useRef)(0);Object(o.useEffect)((function(){return O.current=_t.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;tt(n.token),a(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":a(!0),x(["error",y.loginForm.wrongToken]),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":x(["error",y.loginForm.wrongUserPassword]),a(!0)}})),function(){_t.off(O.current)}}),[]);var j=function(){x(void 0),_t.emit("sendLoginInfos",{user:u,password:g,token:Q()})},k=Object(o.useState)(1),C=Object(r.a)(k,2),T=C[0],S=C[1];return{displayLoginPopup:i,LoginPopupComponent:function(t){return Object(l.c)(c.a.Fragment,null,i&&Object(l.c)("div",{className:"setup-popup-component"},Object(l.c)(Y,{title:y.setupForm.title,onClose:function(){}},Object(l.c)("div",null,Object(l.c)(q,{shouldFocus:1===T,value:u,onEnterPressed:function(){S(2)},label:y.setupForm.user,onChange:function(t){d(t)}}),Object(l.c)(q,{shouldFocus:2===T,value:g,label:y.setupForm.password,type:"password",onEnterPressed:function(){j()},onChange:function(t){h(t)}}),Object(l.c)("button",{value:"submit",className:"submit-button",onClick:function(t){j()}},y.setupForm.submit),w&&Object(l.c)("div",{className:w[0]},w[1])))))}}}({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),t(),n()},onLoginSuccess:function(){ot(["/"]),w(),p(),ut()}}).LoginPopupComponent,a=eo(),s=a.userSettingsApi,p=a.refreshUserSettingsFromBackend,d=function(){var t="[TABS] 00542",n=Bt("tabs",[]),e=Object(r.a)(n,3),o=e[0],c=e[1],i=e[2],a=function(t){c(t)},l=function(t){var n=ge({fullWindowFile:t});if(n){var e=[].concat(Object(g.a)(o),[n]),c=be(n.id,e);a(c)}},s=function(n){console.log("".concat(t," closing tab: ").concat(n));var e=[],c=Object(h.cloneDeep)(o);Object(h.each)(c,(function(t,o){t.id!==n&&e.push(t)})),a(e)},p="[WINDOWS] 00543",u=function(t){if(!t){var n=Object(h.cloneDeep)(o),e=fe(n);if(!Object(h.isNumber)(e))return;t=n[e]}if(t.grid.layout[0]){var c,i=t.grid;return Object(h.each)(i.content,(function(t,n){t.active&&(c={layout:i.layout[n],content:i.content[n]})})),c}};return{tabs:o,updateTab:function(t,n,e){if(console.log("[TAB] UPDATE ".concat(t," ").concat(n?"on tab ".concat(n.name):"")),"add"===t)Dt().then((function(t){l(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;s(n.id)}else if("rename"===t){if(!n)return;if(e.length>15)return;var c=Object(h.cloneDeep)(o);Object(h.each)(c,(function(t){t.id===n.id&&(t.name=e,t.manualName=!0)})),a(c)}else if("activate"===t){var i;if(!n)return;var r=be(n.id,o),p=ue(r);a(p);var d=null===(i=u(n))||void 0===i?void 0:i.content.file;if(!d)return;Dt().then((function(t){t.ui.browser.goTo(d.folder,d.name)}))}},refreshTabsFromBackend:i,updateActiveTabGrid:function(t){var n=Object(h.cloneDeep)(o),e=fe(n);Object(h.isNumber)(e)&&(n[e].grid=t,console.log("[TAB LAYOUT] update tab grid n:".concat(e),t),a(n))},refreshWindowGrid:function(){var t=ue(o);a(t)},tabsApi:{get:function(){return o},close:s,openInNewTab:l,reorder:function(n,e){var c=Object(h.cloneDeep)(o);console.log("".concat(t," reordering tab ").concat(n," -> ").concat(e));var i=c[n];c.splice(n,1),c.splice(e,0,i),a(c)},active:{get:function(){var t=null;return Object(h.each)(o,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(h.cloneDeep)(o);Object(h.each)(t,(function(t){Object(h.each)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var c=n.grid.content[o],i=n.grid.layout[o];c.i===t&&n.grid.content.splice(o,1),i.i===t&&n.grid.layout.splice(o,1)}}))})),console.log("".concat(p," closing window"));var e=ue(n);a(e)},active:{get:u,setContent:function(t){if(t){var n=Object(h.cloneDeep)(o),e=fe(n);if(Object(h.isNumber)(e)){var c=n[e],i=c.grid.content;if(!(i.length<1)){var r=0;Object(h.each)(i,(function(t,n){!0===t.active&&(r=n)})),console.log(p,"4455",i[r].i,r),i[r].file=Object(h.cloneDeep)(t),c.manualName||(c.name=de(t.name));var l=ue(n);console.log("".concat(p," active content => ").concat(t.name," ").concat(l[0].refresh),t),a(l)}}}}},updateWindows:function(t,n){var e=Object(h.cloneDeep)(o);Object(h.each)(t,(function(t){Object(h.each)(e,(function(e,o){Object(h.each)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))})),console.log("".concat(p," updating windows with file ").concat(n.name));var c=ue(e);a(c)},getIdsFromFile:function(t){var n=[];return Object(h.each)(o,(function(e){Object(h.each)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),n}}}}(),f=d.tabs,m=d.updateTab,w=d.refreshTabsFromBackend,x=d.updateActiveTabGrid,O=d.refreshWindowGrid,j=d.tabsApi,k=d.windowsApi,C=j.active.get(),T=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],s=Object(o.useState)(""),p=Object(r.a)(s,2),u=p[0],d=p[1],f=Object(o.useState)(null),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(y.promptPopup.defaultTitle),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useState)(!1),j=Object(r.a)(O,2),k=j[0],C=j[1],T=function(t){a(!0),d(t.text),t.title&&x(t.title),t.userInput&&h(" "),t.onAccept&&(Ue.onAccept=t.onAccept),t.onRefuse?(Ue.onRefuse=t.onRefuse,C(!0)):C(!1)},S=function(){a(!1)};return{popupApi:{confirm:function(t,cb,n){T({title:y.promptPopup.confirmTitle,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()}))})},prompt:T},PromptPopupComponent:function(){return Object(l.c)(c.a.Fragment,null,i&&Object(l.c)("div",{className:"prompt-popup-component"},Object(l.c)(Y,{title:w,onClose:S,canBgClose:!1},Object(l.c)("div",null,Object(l.c)("div",{className:"content"},u),Object(l.c)("br",null),null!==g&&Object(l.c)("div",null,Object(l.c)("input",{type:"text",value:g,onChange:function(t){h(t.target.value)}}),Object(l.c)("br",null)),Object(l.c)("button",{value:"submit",className:"accept submit-button",onClick:function(t){Ue.onAccept(g),S()}},y.promptPopup.accept),k&&Object(l.c)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){Ue.onRefuse(g),S()}},y.promptPopup.refuse)))))}}}(),S=T.PromptPopupComponent,E=T.popupApi,N=function(){var t=Object(o.useRef)([]),n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(!1),s=Object(r.a)(a,2),p=s[0],u=s[1],d="(DISCONNECTED)",f=Object(o.useRef)(d);kn((function(){f.current=f.current===d?"(/!\\ DISCONNECTED /!\\)":d;var t=c?"".concat(Te()," (Connected)"):"".concat(Te()," ").concat(f.current);document.title=t}),1e3),Object(o.useEffect)((function(){return t.current[0]=_t.on("disconnect",(function(){b(!1)})),t.current[1]=_t.on("reconnect",(function(){b(!0),u(!0),setTimeout((function(){u(!1)}),1e3)})),t.current[2]=_t.on("connect",(function(){b(!0),u(!0),setTimeout((function(){u(!1)}),1e3)})),function(){t.current.forEach((function(t){_t.off(t)}))}}),[]);var b=function(t){console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),i(t)};return{isConnected:c,connectionStatusComponent:function(){var t=["connected","connected"];return p&&(t=["back-online","back online"]),c||(t=["disconnected","disconnected"]),Object(l.c)("div",{className:"connection-status"},Object(l.c)("div",{className:t[0]},t[1]))},toggleSocketConnection:b}}(),I=N.isConnected,F=N.connectionStatusComponent,A=N.toggleSocketConnection;kn((function(){}),1e3);var D=oe(),R=D.forceResponsiveRender,L=D.responsiveRefreshCounter,P=D.setResponsiveRefresh,z=Object(o.useRef)([]),M=Object(o.useState)(!1),B=Object(r.a)(M,2),U=B[0],_=B[1],H=function(){var t=Object(o.useState)([]),n=Object(r.a)(t,2),e=n[0],c=n[1],i=Object(o.useState)(0),a=Object(r.a)(i,2),l=a[0],s=a[1];return{lightboxApi:{open:function(t,n){console.log("[LIGHTBOX] open ".concat(n.length," images to index ").concat(t),{images:n});var e=[];Object(h.each)(n,(function(t){if(Object(h.isString)(t)){var n={file:oo(),title:"",url:t};e.push(n)}else e.push(t)})),c(e),s(t)},close:function(){console.log("[LIGHTBOX] close"),c([]),s(0)}},lightboxImages:e,lightboxIndex:l}}(),W=H.lightboxApi,G=H.lightboxImages,J=H.lightboxIndex,K=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)([]),l=Object(r.a)(a,2),s=l[0],p=l[1];return{isConnected:t.isConnected,searching:{get:c,set:i},ipsServer:{get:s,set:p,getLocal:function(){var t=s[0];return Object(h.each)(s,(function(n){n.startsWith("192.168")&&(t=n)})),t}},refresh:Object(b.a)(Object(b.a)({},t.refresh),{},{increment:function(){t.refresh.set(t.refresh.get+1)}})}}({isConnected:I,refresh:{get:L,set:P}}),$=function(){var t="[NOTE HISTORY] 0047 ",n=Object(o.useRef)({}),e=function(){return(new Date).getTime()},c=function(n,e,o){console.log("".concat(t," saveNoteHistory ").concat(n)),_t.emit("createHistoryFile",{filePath:n,content:e,historyFileType:o,token:Q()})};return{save:c,intervalSave:function(o,i){var a=n.current[o];(!a||a&&a+6e4<e())&&(console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),c(o,i,"int"),n.current[o]=e())}}}(),X=Lt({popupApi:E,tabsApi:j,userSettingsApi:s,windowsApi:k,statusApi:K,historyApi:$,lightboxApi:W}),Z=X,nt=Z.ui.browser.files,et=Z.ui.browser.folders,ot=et.scan,it=et.clean,at=et.base,rt=et.open.get,lt=function(t){var n=Bt("files-history",[]),e=Object(r.a)(n,3),c=e[0],i=e[1],a=e[2];Object(o.useEffect)((function(){console.log("[HISTORY] activeFile changed!",t),t&&l(t),t&&l(t)}),[t]);var l=Qt((function(t){console.log("[HISTORY] Add to history",t.name);for(var n=!0,e=-1,o=c,a=0;a<c.length;a++)c[a].name===t.name&&(n=!1,e=a);n||o.splice(e,1),(o=o.slice(0,20)).unshift(t),i(o)}),1e3);return{filesHistory:c,cleanLastFilesHistory:function(){i([])},refreshFilesHistoryFromBackend:a}}(nt.active.get),st=lt.filesHistory,pt=lt.cleanLastFilesHistory,ut=lt.refreshFilesHistoryFromBackend,dt=Ke(t,n,it,ot,E),ft=(dt.askForMoveFile,dt.promptAndMoveFolder),bt=dt.promptAndBatchMoveFiles,gt=function(){var t=Object(o.useState)("navigator"),n=Object(r.a)(t,2),e=n[0],i=n[1];return{mobileView:e,setMobileView:i,MobileToolbarComponent:function(t){return Ce(Object(l.c)(c.a.Fragment,null,"desktop"!==u()&&Object(l.c)(En,{class:"mobile-view-toggler",buttons:[{icon:"faStream",class:"".concat("navigator"===e?"active":""),action:function(){i("navigator")}},{icon:"faPenNib",class:"".concat("editor"===e?"active":""),action:function(){i("editor")}},{icon:"faEye",class:"".concat("preview"===e?"active":""),action:function(){i("preview")}}]})),[e,t])}}}(),ht=gt.mobileView,mt=gt.MobileToolbarComponent;return window.api=Z,Object(o.useEffect)((function(){setTimeout((function(){Dt().then((function(t){var n,e=(null===(n=t.ui.windows.active.get())||void 0===n?void 0:n.content.i)||"";t.ui.note.lineJump.jump({windowId:e,line:50})}))}),2e3)}),[]),Object(l.c)("div",{className:Ge(ht,Z.userSettings.refresh.css.get)},Object(l.c)("div",{className:" ".concat("mobile"===u()?"mobile-view-".concat(ht):"")},Object(l.c)(Rt.Provider,{value:X},Object(l.c)(l.a,{styles:Object(l.b)("*{-webkit-print-color-adjust:exact!important;color-adjust:exact!important;}*:focus{outline:none;}body{margin:0;padding:0px;background:",V.colors.bg.light,";font-size:11px;font-family:",V.font.main,";}html,body{height:100vh;overflow:hidden;background:",V.colors.bgInterface,";}button,input{font-family:",V.font.main,";font-weight:700;color:",V.colors.l2.title,";}@media print{","\n\n .preview-title, .date,\n .editor-area, .connected, .left-wrapper, .connection-status, .mobile-view-toggler {\n display:none!important;\n }\n html, body {\n overflow: auto!important;\n height: auto!important;\n background-color: white;\n }\n .main-wrapper .right-wrapper.dual-viewer-view {\n width: 100vw!important;\n }\n .preview-area-wrapper {\n\t\t\t\tdisplay: block!important;\n\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\tdisplay: block!important;\n\t\t\t\t}\n .infos-preview-wrapper {\n .file-path-wrapper {\n display:none!important;\n }\n .title {\n margin-bottom: 40px!important;\n line-height: 40px;\n }\n display:block!important;\n }\n height: auto!important;\n display:block!important;\n overflow: visible!important;\n width: 100vw!important;\n margin-top: 20px!important;\n top: 0;\n font-family: arial, sans-serif!important;\n left: 0;\n margin: 0;\n padding: 15px;\n font-size: 14px;\n line-height: 18px;\n }\n",";}body{position:relative;}","")}),Object(l.c)("div",{role:"dialog",className:"\n\t\t\t\t\t\t\t\tmain-wrapper\n\t\t\t\t\t\t\t\t".concat(Z.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar","\n\t\t\t\t\t\t\t\tdevice-view-").concat(u())},S(),i({}),e({}),F(),mt(R),Object(l.c)("div",{className:"left-sidebar-indicator"},Object(l.c)("div",{className:"left-wrapper"},Object(l.c)("div",{className:"left-wrapper-1"},Object(l.c)("div",{className:"invisible-scrollbars"},Object(l.c)(Se,{onNewFile:function(){var t=X.ui.browser.folders.current.get;X.file.create(t,(function(n){var e=function(t){var n=t[0];return n?(Object(h.each)(t,(function(t){t.created&&n.created&&t.created>n.created&&(n=t)})),console.log(t,n),n):null}(n);e&&X.ui.browser.goTo(t,e.name,{openIn:"activeWindow"})}))}}),Object(l.c)(Pe,{files:st,onClick:function(t){X.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(l.c)(Re,{folder:et.get,current:et.current.get,onFolderClicked:function(t){X.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){var o,c,i;"rename"===t&&e?ft({folder:n,folderToDropInto:n,folderBasePath:at,newTitle:e,renameOnly:!0}):"create"===t&&e?(c=e,i=n,console.log("[askFolderCreate]",c,i),_t.emit("askFolderCreate",{newFolderName:c,parent:i,token:Q()}),ot([n.path])):"moveToTrash"===t?ft({folder:n,folderToDropInto:ct,folderBasePath:at,newTitle:e}):"delete"===t&&(o=n,console.log("[askFolderDelete]",o),_t.emit("askFolderDelete",{folderToDelete:o,token:Q()}),ot([n.path]))},onFolderOpen:function(t){ot([t])},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),z.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),z.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",z.current,t);var n=z.current[0];"file"===n.type&&n.files?bt(n.files,t):"folder"===n.type&&n.folder&&ft({folder:n.folder,folderToDropInto:t,folderBasePath:at})}(t)}})),Object(l.c)("div",{className:"settings-button",onClick:function(){_(!U)}},Object(l.c)(on,{name:"faCog",color:"grey"})),U&&Object(l.c)(Yt,{onClose:function(){_(!1)}})),Object(l.c)("div",{className:"left-wrapper-2"},Object(l.c)("div",{className:"top-files-list-wrapper"},Object(l.c)("div",{className:"subtitle-wrapper"},Object(l.c)("div",{className:"folder-wrapper"},Z&&Z.ui.browser.folders.current.get,!Z.ui.browser.folders.current.get&&"/"),"mobile"!==u()&&Object(l.c)("div",{className:"toggle-sidebar-btn"},Object(l.c)(En,{popup:!1,buttons:[{icon:"faThumbtack",title:"Toggle Sidebar",action:function(t){s.set("ui_sidebar",!s.get("ui_sidebar")),O()},active:!0===X.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(l.c)(ze,{term:X.ui.search.term.get})),Object(l.c)("div",{className:"files-list-wrapper"},Object(l.c)(co,{files:nt.get,activeFileIndex:nt.active.getIndex,onSortFiles:function(t){X.ui.browser.files.set(t)},onFileClicked:function(t){nt.active.set(t);var n=nt.get[t];Z.tabs.active.get()?k.active.setContent(n):Z.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),z.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),z.current=[]}}))))),Object(l.c)("div",{className:"right-wrapper dual-viewer-view"},Object(l.c)(_e,{tabs:f,onUpdate:m}),C&&Object(l.c)(xe,{tab:C,onGridUpdate:x}))))),G.length>0&&Object(l.c)(Be,{images:G,startingIndex:J,onClose:X.ui.lightbox.close}))}),null),document.getElementById("root"))}},[[611,3,4]]]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiro-notes",
3
- "version": "0.30.412",
3
+ "version": "0.30.413",
4
4
  "description": "Tiro Notes CLI to start Tiro Notes from the command line!",
5
5
  "scripts": {
6
6
  "dev": "ISDEV=true node cli.js",
@@ -1 +0,0 @@
1
- (this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[]).push([[2],{418:function(t,n){},504:function(t,n){},506:function(t,n){},516:function(t,n){},518:function(t,n){},543:function(t,n){},545:function(t,n){},546:function(t,n){},551:function(t,n){},553:function(t,n){},559:function(t,n){},561:function(t,n){},580:function(t,n){},592:function(t,n){},595:function(t,n){},611:function(t,n,e){"use strict";e.r(n);var o=e(16),c=e.n(o),i=e(253),a=e.n(i),r=e(14),l=e(13),s=function(t){return u()===t};function p(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var u=function(){var t=window.innerWidth,n="desktop";return d()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},d=function(){return!f()},f=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},b=e(63),g=e(23),h=e(32),m=e.n(h),v=e(379);function w(t,n){var e=Object(o.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),c=Object(r.a)(e,2),i=c[0],a=c[1];return[i,function(n){try{var e=n instanceof Function?n(i):n;a(e),window.localStorage.setItem(t,JSON.stringify(e))}catch(o){console.log(o)}}]}var x=96,O={staticResources:"static",defaultDataFolder:"markdown-notes",configFolder:".tiro",backendStateFolder:".states",historyFolder:".history",archiveFolder:".history_archive",uploadFolder:".resources",relativeUploadFolderName:".resources"},j={headerStart:"=== HEADER ===",headerEnd:"=== END HEADER ==="},k={log:{socket:!0,eventManager:!0,upload:!1},version:"0.30.4",params:{previewArea:{scrollSpeed:1.3}}},y={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) : ",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:"Port",portExpl:"Port used by backend (ex: 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"}},C=e(0),T=e(1),S=e(4),E=e(5),N=(e(421),e(422),e(423),e(424),e.p+"static/media/deco-bg-map.7ca9103b.png"),I=e.p+"static/media/file-solid.6415173e.svg",F=e.p+"static/media/compact-disc-solid.55b6e50c.svg",A=e.p+"static/media/file-pdf-solid.0a9d75fe.svg",D=e.p+"static/media/file-word-solid.9228e1ff.svg",R=e.p+"static/media/book-solid.87f5b737.svg",L=e.p+"static/media/file-excel-solid.217d73db.svg",P=e.p+"static/media/file-video-solid.312288cf.svg",z=e.p+"static/media/file-audio-solid.a76f99f0.svg",M=e.p+"static/media/file-zipper-solid.7db57917.svg",B=e.p+"static/media/file-powerpoint-solid.4d969453.svg",U=e.p+"static/media/link-solid.7b689dbd.svg",_=e.p+"static/media/globe-africa-solid.0ad34146.svg",H=e.p+"static/media/search-solid.cc51b702.svg",W={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"}},V={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(W.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:W,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:N,linkIcon:U,worldIcon:_,fileIcon:I,diskIcon:F,pdfIcon:A,presIcon:B,audioIcon:z,videoIcon:P,excelIcon:L,wordIcon:D,bookIcon:R,archiveIcon:M,searchIcon:H}},Y=function(t){Object(S.a)(e,t);var n=Object(E.a)(e);function e(){var t;Object(C.a)(this,e);for(var o=arguments.length,c=new Array(o),i=0;i<o;i++)c[i]=arguments[i];return(t=n.call.apply(n,[this].concat(c))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(T.a)(e,[{key:"render",value:function(){var t=this;return Object(l.c)("div",{className:"popup-wrapper-component"},Object(l.c)("div",{className:"overlay-click-popup",onClick:function(n){t.canBgClose&&t.props.onClose()}}),Object(l.c)("div",{className:"popup-wrapper ".concat(p()?"ipad":"")},Object(l.c)("div",{className:"popupTitle"}," ",this.props.title),Object(l.c)("div",{className:"popupContent"},this.props.children)))}}]),e}(c.a.Component),q=function(t){var n,e=Object(b.a)({},t).value,c=Object(o.useRef)(),i=function(){t.shouldFocus&&c.current.focus()};return Object(o.useEffect)((function(){i()}),[t.shouldFocus]),Object(o.useEffect)((function(){i()}),[]),Object(l.c)("div",{className:"input-component ".concat(t.id?t.id:""," ").concat(t.type)},t.label&&Object(l.c)("span",null,t.label," :"),Object(l.c)("div",{className:"input-wrapper"},"select"!==t.type&&Object(l.c)("input",{ref:c,type:t.type?t.type:"text",value:t.value,readOnly:t.readonly,onFocus:function(){t.onFocus&&t.onFocus()},onClick:function(){!t.shouldNotSelectOnClick&&c.current.select()},onKeyPress:function(n){"Enter"==(n.code||n.key)&&t.onEnterPressed&&t.onEnterPressed()},onChange:function(n){t.onChange&&t.onChange(n.target.value)}}),"select"===t.type&&Object(l.c)("select",{value:t.value,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(l.c)("option",{value:t.key,selected:e===t.key},t.label," ")}))),t.explanation&&Object(l.c)("div",{className:"explanation"}," ",t.explanation," ")))},G=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)}))},J=function(t){return t=(t=(t=t.split("//").join("/")).split("\\").join("/")).split("//").join("/")},K=function(t,n){return J(t+"/")===J(n+"/")},$=["Az","Crea","Modif"],X=["alphabetical","created","modified"],Z=function(t,n){var e;switch(X[n]){case"alphabetical":e=Object(h.sortBy)(t,[function(t){return t.realname.toLocaleLowerCase()}]);break;case"created":e=Object(h.sortBy)(t,["created"]).reverse();break;case"modified":e=Object(h.sortBy)(t,["modified"]).reverse();break;default:e=Object(h.sortBy)(t,[function(t){return t.realname.toLocaleLowerCase()}])}return e},Q=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||""},tt=function(t){!function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var c="expires="+o.toUTCString();document.cookie=t+"="+n+";"+c+";path=/"}("tiro-login-token",t,x)},nt={title:"",key:"",path:""},et=function t(n,e){for(var o,c=0;c<e.length;c++)if(K(e[c].path,n)){o=Object(h.cloneDeep)(e[c]);var i=e[c].children;if(Object(h.isArray)(i))for(var a=0;a<i.length;a++){var r=t(i[a].path,e);r&&(o.children[a]=r)}}return o},ot=function(t,n){for(var e="add",o=0;o<n.length;o++)K(t.path,n[o].path)&&(n[o]=t,e="update");return"add"===e&&n.push(t),n},ct={title:".trash",key:"/.tiro/.trash",path:"/.tiro/.trash"},it=e(98),at=e.n(it),rt={img:at()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:at()().anythingBut("[]|").maybe("|").beginCapture().anythingBut("[]|").endCapture().maybe("|").beginCapture().anythingBut("[]|").endCapture(),customTag:/\[\[[a-zA-Z0-9-\ _\/]*\]\]/},lt={metas:at()().find(j.headerStart).beginCapture().anythingBut("").endCapture().then(j.headerEnd),baliseHtml:at()().find("<").anythingBut("<>").then(">"),ressource:at()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:at()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:at()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(rt.img).anythingBut("()").endCapture().then(")"),image:at()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(rt.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:at()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(rt.img).anythingBut("()").endCapture().then(")"),imageAndConfig:at()().find("![").then(rt.imgMdConfig).then("](").beginCapture().anythingBut("()").then(rt.img).anythingBut("()").endCapture().then(")"),searchlink:at()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink:at()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:at()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:at()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:at()().find(rt.customTag).beginCapture().anythingBut("").endCapture().then(rt.customTag),userCustomTag3:at()().beginCapture().then(rt.customTag).endCapture(),userCustomTagManual:rt.customTag,url2transform:at()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:at()().find(" /").anything().endOfLine(),searchFolderNoSpace:at()().find("/").anything().endOfLine(),firstPartImg:at()().find("![").anythingBut("[]").then("]("),hashtag:at()().find("#").beginCapture().anythingBut(" ").endCapture()},st=!1,pt=function(t){if(!t)return null;if(t.startsWith(j.headerStart)&&(st=!0),t.startsWith(j.headerEnd)&&(st=!1),""===t)return null;if(!st)return null;var n=t.split(": ");if(2!==n.length)return null;var e=n.shift();if(!e)return null;var o,c=n.join(":").trim();if("created"===e||"modified"===e){o=c,c=parseInt(o).toString()===o?function(t){var n="".concat(t).substr(0,10);return parseInt(n)}(c):c;var i=new Date(c).getTime();isNaN(i)||(c=i)}return{name:e,value:c}},ut=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},dt=function(t){var n="[FILE API] 005363 ";Object(o.useEffect)((function(){_t.on("getFileContent",(function(n){if(n.error)t.eventBus.notify(n.idReq,{error:n.error});else{var e=function(t){var n=t.match(lt.metas),e={};if(n&&n[0])for(var o=n[0].split("\n"),c=0;c<o.length;c++){var i=pt(o[c]);i&&(e[i.name]=i.value)}return{metas:e,content:ut(t,[[lt.metas,""]])}}(n.fileContent);t.eventBus.notify(n.idReq,{content:e.content})}}))}),[]);var e=Object(o.useRef)("");return{getContent:function(e,cb,o){console.log("".concat(n," get file content ").concat(e));var c=ft(e),i=Pt("get-file-content");t.eventBus.subscribe(i,(function(t){t.error?t.error&&o&&o.onError&&o.onError(t.error):cb(t.content)})),_t.emit("askForFileContent",{filePath:c,token:Q(),idReq:i})},saveContent:function(o,c,i){var a=!(!i||!i.history)&&i.history;!i||!i.withMetas||i.withMetas;console.log("".concat(n," save file content ").concat(o));var r=ft(o);_t.emit("saveFileContent",{filePath:r,newFileContent:c,token:Q()}),a&&(o!==e.current&&Dt().then((function(t){var n=t.ui.browser.folders.current.get;n===function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return J(e)}(o)&&t.ui.browser.goTo(n)})),t.historyApi.intervalSave(o,c),e.current=o)},delete:function(e,cb){var o=Pt("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),_t.emit("onFileDelete",{filepath:e.path,idReq:o,token:Q()})},move:function(t){return{file:function(n,e,cb){var o=Pt("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),_t.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Q()})}}}({eventBus:t.eventBus}).file,create:function(e,cb){var o=Pt("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),_t.emit("createNote",{folderPath:e,idReq:o,token:Q()})}}},ft=function(t){return t.replace(lt.linklink,"$2/$1")},bt=function(t){var n="[SEARCH API] 00563 ",e=Object(o.useState)(""),c=Object(r.a)(e,2),i=c[0],a=c[1];Object(o.useEffect)((function(){_t.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var l=function(e,cb){!function(e,cb,o){var c=Pt("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(c,(function(n){t.statusApi.searching.set(!1),cb(n)})),_t.emit("searchFor",{term:e,token:Q(),type:o,idReq:c})}(e,cb,"text")};return{files:{search:l},word:function(e,o,cb){var c=Pt("search-word-");console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(c,(function(t){cb(t)})),_t.emit("searchWord",{word:e,folder:o,token:Q(),idReq:c})},ui:{search:function(t){Dt().then((function(n){n.ui.browser.files.set([]),a(t),l(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:a,get:i}}}},gt=e(428),ht=function(t){var n=Object(b.a)({},t).eventBus;Object(o.useEffect)((function(){_t.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]);return{uploadFile:function(t){var e=Pt("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess(n)})),function(t){var n=Object(b.a)({},t),e=n.file,o=n.path,c=n.idReq,i=n.onProgress,a=new gt(Ut);a.addEventListener("start",(function(t){t.file.meta.idReq=c,t.file.meta.path=o})),a.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);i(n)})),a.submitFiles([e])}({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}}},mt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,vt=/([^\s,]+)/g,wt=e(429),xt=function(t){return wt(t)},Ot=function(t,n,e){var o=t,c=o.match(n)||"";return Object(h.each)(c,(function(t){o=o.replace(t,e(t))})),o},jt=function(t,n,e){var o=t,c=n.replace("[[","").replace("]]",""),i="(?:\\[\\[".concat(c,"\\]\\])((?:[^]*))(?:\\[\\[").concat(c,"\\]\\])"),a=new RegExp(i,"gm"),r=o.match(a)||"";if(r[0]){for(var l=r[0].split(n),s=[],p=0;p<l.length;p++){var u=l[p];""!==u&&s.push(u)}for(var d=0;d<s.length;d++){s[d];if(d%2===0)try{s[d]=e(s[d])}catch(b){console.warn("[REPLACE CUSTOM MD TAGS] error: ".concat(b),s[d])}}var f=s.join("");o=o.replace(a,f)}return o},kt=function(t){var n=t.replace("".concat(qt(),"/").concat(O.staticResources,"/"),""),e="".concat(qt(),"/").concat(O.staticResources,"/").concat(n);return t.startsWith("http")?t:e},yt=function(){return"?token=".concat(Q())},Ct=function(t,n){var e=0,o=function(t,n){var e=t.match(lt.image),o=[];return Object(h.each)(e,(function(t){var e=t.match(lt.firstPartImg),c=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",i=t.replace(lt.firstPartImg,"").replace(")",""),a={url:kt(n.folder)+"/"+i,title:c,file:n};o.push(a)})),o}(n,t);if(0===o.length)return n;var c=encodeURIComponent(JSON.stringify(o));return Ot(n,lt.image,(function(n){var o=n.split("](")[1].slice(0,-1),i='<div class="content-image" data-images='.concat(c,' data-index="').concat(e,'"><img class="content-image-img" style="').concat("\n width: $1px;\n max-width: 100%;\n // min-height: $1px;\n transform: rotate($2deg);\n ",'" src="').concat(kt(t.folder),"/").concat(o).concat(yt(),'" /></div>');return e++,i}))},Tt=function(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},St=function(t){var n,e,o=Object(b.a)({},t),c=o.raw,i=o.file,a=o.windowId;return xt((n=i.folder,e=Ct(i,function(t){var n=t.replace(lt.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return ut(n,[[">[__id_",">["],[">[__tags_",">["],[">[__tag_",">["],[" ]</a>","]</a>"]])}(function(t,n){var e='<a class="title-search-link preview-link" data-file="$1" data-folder="$2" data-windowid="'.concat(t,'">$1</a>');return n.replace(lt.linklink,e)}(a,function(t){var n='<a class="external-link preview-link" href="#" '.concat("onclick=\"window.open('$1','$1','width=600,height=600');\"",">$2</a>");return t.replace(lt.url2transform,n)}(c)))),Ot(e,lt.ressource,(function(t){var e=t.split("](")[1].slice(0,-1),o=t.split("](")[0].replace("![",""),c=e.split("."),i=c[c.length-1];"7z"===i&&(i="d7z");var a="".concat(kt(n),"/").concat(e).concat(yt());return o.includes("|open")?'\n<div class="iframe-ressource-wrapper">\n\t<iframe src="'.concat(a,'" style="width: 100%; height:500px; border: none;"></iframe>\n</div>\n'):'<div class="resource-link-wrapper">\n\t<div class="resource-link-icon '.concat(i,'"></div>\n\t<a class="resource-link preview-link"\n\t\thref="').concat(a,'"\n\t\tdownload="wppp-').concat(o,".").concat(i,'"\n\t>\n\t\t').concat(o," (").concat(i,")\n\t</a>\n</div>")}))))},Et=function(t,cb){for(var n=document.getElementsByClassName(t),e=function(t){var e=n[t];e.onclick=function(){cb(e)}},o=0;o<n.length;o++)e(o)},Nt=function(t){var n=t.split(lt.userCustomTagManual),e=[],o=[],c=lt.userCustomTag3,i=t.match(c)||"",a=[];Object(h.each)(i,(function(t){a.push(t)}));var r=null,l=-1,s=[],p=[],u={};if(Object(h.each)(a,(function(t){u[t]?u[t]=u[t]+1:u[t]=1})),Object(h.each)(u,(function(t,n){t>=2&&p.push(n)})),Object(h.each)(a,(function(t,e){if(p.includes(t))if(r){if(r===t){var c=[l+1,e+1];s.push.apply(s,c);for(var i=n.slice(c[0],c[1]),u=a.slice(l+1,e+1),d="",f=0;f<i.length;f++){var b=f===i.length-1?"":u[f];d+="".concat(i[f]).concat(b)}o.push({type:"tag",tagName:r.replace("[[","").replace("]]",""),content:d,start:l,end:e}),l=-1,r=null}}else r=t,l=e})),0===s.length)e.push({type:"text",content:t,start:0,end:1});else{s.unshift(0);for(var d=0;d<s.length;d+=2){var f=s[d];n[f]&&e.push({type:"text",content:n[f],start:f,end:f+1})}}for(var b=0===t.indexOf(a[0]),g=[],m=o.length>e.length?o.length:e.length,v=0;v<m;v++)b?(o[v]&&g.push(o[v]),e[v]&&g.push(e[v])):(e[v]&&g.push(e[v]),o[v]&&g.push(o[v]));return g},It=function(t){var n="";return Object(h.each)(t,(function(t){"text"===t.type?n+=t.content:"tag"===t.type&&(n+="[[".concat(t.tagName,"]]").concat(t.content,"[[").concat(t.tagName,"]]"))})),n},Ft={render:function(t){var n=Object(b.a)({},t),e=n.raw,o=n.file,c=n.windowId,i=Nt(e);return Object(h.each)(i,(function(t){"text"===t.type&&(t.content=St({raw:t.content,file:o,windowId:c})),"tag"===t.type&&(t.content=t.content.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"))})),It(i)},injectLogic:function(t){Et("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;Dt().then((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))})),Et("content-image",(function(t){Dt().then((function(n){var e=parseInt(t.dataset.index);try{var o=JSON.parse(decodeURIComponent(t.dataset.images));Object(h.isNumber)(e)||(e=0),n.ui.lightbox.open(e,o)}catch(c){console.error(c)}}))}))},chunks:{chunk:Nt,merge:It}},At=null,Dt=function(){return new Promise((function(t,n){if(At)return t(At);var e=setInterval((function(){if(At)return clearInterval(e),t(At)}),200)}))},Rt=c.a.createContext(null),Lt=function(t){var n=Object(o.useRef)({}),e=function(t){delete n.current[t]},c={subscribe:function(t,cb){n.current[t]=cb},unsubscribe:e,notify:function(t,o){Object(h.each)(n.current,(function(n,c){if(c===t){try{n(o)}catch(i){console.log("[CLIENT API] error with function",i)}e(t)}}))}};Object(o.useEffect)((function(){console.log("INIT CLIENT API")}),[]);var i=bt({eventBus:c,statusApi:t.statusApi}),a=dt({eventBus:c,historyApi:t.historyApi}),l=function(t){return Object(o.useEffect)((function(){_t.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),_t.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){console.log("[CLIENT API] 002104 get files ".concat(n));var e=Pt("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(n){t.statusApi.searching.set(!1),cb(n)})),_t.emit("askForFiles",{folderPath:n,token:Q(),idReq:e})},getPreviews:function(n,cb){console.log("[CLIENT API] 002104 get files previews for ".concat(n.length," files"));var e=Pt("get-files-");t.eventBus.subscribe(e,cb),_t.emit("askFilesPreview",{filesPath:n,idReq:e,token:Q()})},search:t.searchApi.files.search}}({eventBus:c,searchApi:i,statusApi:t.statusApi}),s=ht({eventBus:c}),p=function(t){return Object(o.useEffect)((function(){_t.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})}))}),[]),{get:function(n,cb){console.log("[FOLDERS API] 002104 get folders ".concat(n));var e=Pt("get-folders-");t.eventBus.subscribe(e,cb),_t.emit("askFoldersScan",{foldersPaths:n,token:Q(),idReq:e})}}}({eventBus:c}),u=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(-1),l=Object(r.a)(a,2),s=l[0],p=l[1],u=w("selected-folder",""),d=Object(r.a)(u,2),f=d[0],b=d[1];Object(o.useEffect)((function(){m(f)}),[f]);var m=function(n,e,o){var c="text";if(""!==n){n=J("".concat(n,"/"));var a="[BROWSER GO TO] 00722 ";console.log("".concat(a," ").concat(n," ").concat(e," ").concat(c,", ").concat(JSON.stringify(o))),t.searchUiApi.term.set(""),t.statusApi.searching.set(!0),b(n),t.filesApi.get(n,(function(n){t.statusApi.searching.set(!1);var c=t.userSettingsApi.get("ui_filesList_sortMode"),r=Z(n,c),l=-1;if(e&&(Object(h.each)(r,(function(t,n){t.name===e&&(l=n)})),console.log("".concat(a,' file search "').concat(e,'" on id : ').concat(l))),p(l),i(r),o&&o.openIn){var s=r[l];"active"===o.openIn||"activeWindow"===o.openIn?t.tabsApi.active.get()?t.windowApi.active.setContent(s):t.tabsApi.openInNewTab(s):t.windowApi.updateWindows([o.openIn],s)}}))}},v=Object(o.useState)(nt),x=Object(r.a)(v,2),O=x[0],j=x[1],k=w("foldersFlat",[]),y=Object(r.a)(k,2),C=y[0],T=y[1],S=Object(o.useState)(""),E=Object(r.a)(S,2),N=E[0],I=E[1],F=w("openFolders",["/"]),A=Object(r.a)(F,2),D=A[0],R=A[1];return{goTo:m,files:{active:{get:c[s],getIndex:s,set:p},set:i,get:c},folders:{base:N,get:O,clean:function(){j(nt)},scan:function(n){t.foldersApi.get(n,(function(t){for(var n=C,e=0;e<t.folders.length;e++)t.folders[e]&&(n=ot(t.folders[e],n));T(n);var o=et("/",n);o&&j(o),I(t.pathBase)}))},open:{get:D,add:function(t){R([].concat(Object(g.a)(D),[t]))},remove:function(t){var n=D,e=n.indexOf(t);e>-1&&n.splice(e,1),R(n)}},current:{get:f,set:b}}}}({searchUiApi:i.ui,statusApi:t.statusApi,filesApi:l,foldersApi:p,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:t.userSettingsApi}),d=function(t){var n=Object(o.useState)(),e=Object(r.a)(n,2),c=e[0],i=e[1];return Object(b.a)(Object(b.a)({},Ft),{},{ui:{lineJump:{jump:i,get:c}}})}(),f={file:a,files:l,popup:t.popupApi,upload:s,tabs:t.tabsApi,folders:p,userSettings:t.userSettingsApi,history:t.historyApi,status:t.statusApi,note:d,search:i,ui:{browser:u,windows:t.windowsApi,lightbox:t.lightboxApi,search:i.ui,note:d.ui}};return At=f,f},Pt=function(t){return"client-api-".concat(t,"-req-").concat(G())},zt=function(t){var n=function(t){var n=t.toString().replace(mt,""),e=n.slice(n.indexOf("(")+1,n.indexOf(")")).match(vt);return null===e&&(e=[]),e}(t);console.log(12344,n,t);var e=n.indexOf("cb");return e&&-1!==e?e:null},Mt=function t(n,e){var o="";for(var c in e)if("object"===typeof e[c]&&e[c].constructor!==Array){if(c.length>1&&"get"!==c){var i=""!==n?"".concat(n,"."):"";o+=t("".concat(i).concat(c),e[c])}}else o="".concat(o).concat(n,".").concat(c,"\n");var a=o.split("\n"),r=[];return Dt().then((function(t){Object(h.each)(a,(function(n){var e=n.split("."),o=t;Object(h.each)(e,(function(t,n){o[t]&&(o=o[t])}));var c="var",i="";Object(h.isFunction)(o)&&(c="Function",i=o.toString()),r.push({name:n,type:c,description:i})}))})),o};function Bt(t,n){var e=Object(o.useState)(n),c=Object(r.a)(e,2),i=c[0],a=c[1],l="/".concat(O.configFolder,"/").concat(O.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(o.useEffect)((function(){s()}),[]);var s=function(){Dt().then((function(t){t.file.getContent(l,(function(t){var n=JSON.parse(t);a(n)}))}))};return[i,function(t){a(t),Dt().then((function(n){n.file.saveContent(l,JSON.stringify(t))}))},s]}var Ut,_t,Ht,Wt=Object(b.a)(Object(b.a)({},k),{},{global:{protocol:"//",url:"".concat(window.location.hostname),port:"80"===window.location.port?"":":".concat(window.location.port)}}),Vt=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return ut(n,[['"',""]])},Yt=function(t){var n=w("settings-backend-port",-1),e=Object(r.a)(n,2),c=e[0],i=e[1],a=w("settings-backend-protocol","same"),s=Object(r.a)(a,2),p=(s[0],s[1],Object(o.useContext)(Rt)),u=y.settingsPopup,d=[];if(p){var f=p.userSettings,b="".concat(window.location.protocol,"//"),g="".concat(b).concat(p.status.ipsServer.getLocal()).concat(Wt.global.port),m="https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(g);d=[{title:"Devices",fields:[{type:"text",var:g,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(m,'"/>\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(){p.ui.lightbox.open(0,[m])}}]},{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:f.get("ui_layout_colors_main"),modifier:function(t){f.set("ui_layout_colors_main",t)}}]},{title:"Advanced",fields:[{type:"text",var:c,title:u.backend.port,expl:u.backend.portExpl,modifier:i}]}]}var v=Bt("config-panels-opened",[]),x=Object(r.a)(v,3),O=x[0],j=x[1];x[2];return Object(l.c)("div",{className:"settings-popup-wrapper"},Object(l.c)(Y,{title:"".concat(u.title),onClose:function(){t.onClose()}},d.map((function(t,n){return Object(l.c)("div",{className:"settings-panel"},Object(l.c)("h3",{onClick:function(){!function(t){var n=Object(h.cloneDeep)(O);n[t]=!n[t],j(n)}(n)}},Object(l.c)("div",{className:"arrow"},O[n]?"\u25bc":"\u25ba"),t.title),Object(l.c)("div",{className:"fields-wrapper ".concat(O[n]?"active":"")},t.fields.map((function(t){return Object(l.c)("div",{className:"field-wrapper"},Object(l.c)("div",{className:"input-and-html-wrapper"},Object(l.c)(q,{value:t.var,label:t.title,type:t.type,readonly:t.readOnly,onChange:function(n){console.log("[SETTINGS] frontend setting ".concat(t.title," changed for ").concat(n)),t.modifier(n)}}),t.customHtml&&Object(l.c)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(l.c)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||""}}))}))))}))))},qt=function(){var t=Vt("backend-protocol")?"".concat(Vt("backend-protocol"),"://"):Wt.global.protocol,n=Vt("backend-port")?":".concat(Vt("backend-port")):"".concat(Wt.global.port);return"".concat(t).concat(Wt.global.url).concat(n)},Gt=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},Jt=function(t){var n={};return{on:function(e,o){var c=function(t,n){return function(e){var o;(o=console).log.apply(o,Object(g.a)(Gt("<== ON ".concat(t," "),Object(b.a)({},e)))),n(e)}}(e,o),i=Object(h.random)(1,1e8);return n[i]={endpoint:e,apiFn:c},t.on(e,c),i},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;(o=console).log.apply(o,Object(g.a)(Gt("==> EMIT ".concat(n," "),Object(b.a)({},e)))),t.emit(n,e)}}},Kt=e(265),$t=e(388),Xt=e(380),Zt=function(t){Object(S.a)(e,t);var n=Object(E.a)(e);function e(t){var o;return Object(C.a)(this,e),(o=n.call(this,t)).reactComp=void 0,o.vimStatusBar=void 0,o.editor=void 0,o.monaco=void 0,o.updatePosY=function(){var t=o.editor.getScrollTop();o.props.onUpdateY(t)},o.editorDidMount=function(t,n){o.props.vimMode&&(console.log("[MONACO EDITOR] vim mode started",o.vimStatusBar.current),Object(Xt.initVimMode)(t,o.vimStatusBar.current)),o.editor=t,o.monaco=n,Ht=t,t.onDidChangeCursorPosition((function(t){o.updatePosY()})),window.editor=t,window.monaco=n,n.editor.defineTheme("customLightTheme",{base:"vs",inherit:!0,rules:[{foreground:V.colors.fontEditor}],colors:{"editor.background":V.colors.bgEditor}}),n.editor.setTheme("customLightTheme"),setTimeout((function(){}),100)},o.resetMonacoSelection=function(){var t=o.editor.getSelection();if(t){var n={endColumn:t.startColumn,endLineNumber:t.startLineNumber,startColumn:t.startColumn,startLineNumber:t.startLineNumber};o.editor.setSelection(n)}},o.getCurrentLineInfos=function(){var t=o.editor.getPosition(),n=o.editor.getValue(t).split("\n"),e=n.slice(0,t.lineNumber-1).join("\n").length+t.column-1;return{monacoPosition:o.editor.getPosition(),lines:n,currentPosition:e,activeLine:n[t.lineNumber-1],lineIndex:t.lineNumber-1}},o.jumpToLine=function(t){console.log("[MONACO] jumping to line :"+t),o.editor.revealLineInCenter(t),setTimeout((function(){var n=o.editor.getScrollTop();o.props.onUpdateY(n),o.editor.revealLineInCenter(t)}),10)},o.reactComp=c.a.createRef(),o.vimStatusBar=c.a.createRef(),o}return Object(T.a)(e,[{key:"shouldComponentUpdate",value:function(t,n,e){var o=this;if(this.props.posY===t.posY&&this.props.value===t.value||this.editor.setScrollPosition({scrollTop:this.props.posY}),0===this.props.value.length&&this.props.value.length!==t.value.length){setTimeout((function(){o.resetMonacoSelection()}),1);var c=this.reactComp.current;if(c&&c.containerElement){var i=this.reactComp.current.containerElement.querySelectorAll(".view-lines")[0];setTimeout((function(){if(o.props.onMaxYUpdate){var t=i.clientHeight;o.props.onMaxYUpdate(t)}}),1e3)}}return this.props.jumpToLine!==t.jumpToLine&&-1!==t.jumpToLine&&this.jumpToLine(t.jumpToLine),!0}},{key:"render",value:function(){var t=this;return Object(l.c)("div",{className:"monaco-editor-wrapper"},Object(l.c)("div",{className:"vim-status-bar ".concat(this.props.vimMode?"active":""),ref:this.vimStatusBar}),Object(l.c)($t.a,{ref:this.reactComp,width:"100%",height:"100%",language:"markdown",theme:"vs",value:this.props.value,options:{fontFamily:V.font.editor,readOnly:this.props.readOnly,quickSuggestions:!1,automaticLayout:!0,selectOnLineNumbers:!0,minimap:{enabled:!1},wordWrap:"on",fontSize:11,mouseWheelScrollSensitivity:.5,lineNumbers:"off",renderIndentGuides:!1,folding:!1,scrollbar:{handleMouseWheel:!0,verticalScrollbarSize:0,horizontal:"hidden"}},editorDidMount:this.editorDidMount,onChange:function(n){t.props.onChange(n)}}))}}]),e}(c.a.Component);function Qt(cb,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e={leading:!1,trailing:!0};n&&(e.leading=n);var c=Object(o.useRef)(cb),i=tn();return Object(o.useEffect)((function(){c.current={cb:cb,delay:t}})),Object(o.useCallback)(m.a.debounce((function(){var n;c.current.delay===t&&i()&&(n=c.current).cb.apply(n,arguments)}),t,e),[t,m.a.debounce])}function tn(){var t=Object(o.useRef)(!0);return Object(o.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}var nn=e(381),en=e(382),on=function(t){Object(S.a)(e,t);var n=Object(E.a)(e);function e(){var t;Object(C.a)(this,e);for(var o=arguments.length,c=new Array(o),i=0;i<o;i++)c[i]=arguments[i];return(t=n.call.apply(n,[this].concat(c))).size=t.props.size?t.props.size:1,t.isLocal=!t.props.name.startsWith("fa"),t}return Object(T.a)(e,[{key:"render",value:function(){return Object(l.c)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block"}},!this.isLocal&&Object(l.c)(nn.a,{icon:en[this.props.name],color:this.props.color||"black",size:"1x"}),this.isLocal&&Object(l.c)("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}(c.a.Component),cn=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(!1),s=Object(r.a)(a,2),p=s[0],d=s[1];Object(o.useEffect)((function(){i(t.title)}),[t.title]);var f=Qt((function(n){0!==n.length&&"mobile"===u()&&(d(!1),t.onEdited(t.title,c))}),1e3);return Object(l.c)("div",{className:"title-input-wrapper"},Object(l.c)("input",{className:"big-title",type:"text",value:c,onChange:function(t){var n=function(t){return t.replace(/[^\w\s\_\-]/gi,"")}(t.target.value);i(n),d(!0),f(n)},onKeyDown:function(n){if("Enter"===n.key){if(c.length<3)return;t.onEdited(t.title,c),d(!1)}}}),p&&Object(l.c)("div",{className:"press-to-save"},Object(l.c)(on,{name:"faCircle",color:V.colors.main,size:.7})))},an=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},rn=function(t){var n=Object(o.useRef)(0),e=t.editorRef,c=t.editorRef,i=function(){var o,i;"desktop"===t.editorType?(o=null===(i=e.current)||void 0===i?void 0:i.getCurrentLineInfos(),n.current=o&&o.monacoPosition?o.monacoPosition:0):(o=c.current?function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,c=0;o<e+1;)o+=n[c].length+1,c++;return{currentPosition:e,lines:n,activeLine:n[--c],lineIndex:c}}(c.current):null,n.current=o&&o.currentPosition?o.currentPosition:0);return o},a=function(t){var o=n.current+t;if(console.log("resetCursorPosition to ",o),s("desktop")){var i;null===(i=e.current)||void 0===i||i.editor.setPosition(o)}else{var a=c.current;if(!a)return;a.focus(),setTimeout((function(){a&&(a.selectionStart=o,a.selectionEnd=o)}))}};return{getLineTextInfos:i,resetCursorPosition:a,applyTextModifAction:function(t,n){var e=i();return e?function(t,n,cb,e){var o=n.lines;if("^"===t){var c=o[n.lineIndex-1],i=o[n.lineIndex];o[n.lineIndex]=c,o[n.lineIndex-1]=i,cb(-c.length-1)}if("v"===t){var a=o[n.lineIndex+1],r=o[n.lineIndex];o[n.lineIndex]=a,o[n.lineIndex+1]=r,cb(+a.length+1)}if("X"===t){var l=o[n.lineIndex].length;o.splice(n.lineIndex,1),cb(-l-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 s=n.activeLine.trim();if("[x]"===t&&(s.startsWith("- [ ]")||s.startsWith("- [x]")?s.startsWith("- [ ]")?(o[n.lineIndex]=o[n.lineIndex].replace("[ ]","[x]"),cb(0)):s.startsWith("- [x]")?(o[n.lineIndex]=o[n.lineIndex].replace("[x]","[ ]"),cb(0)):cb(0):(o[n.lineIndex]=o[n.lineIndex].replace(s,"- [ ] "+s.replace("-","")),cb(6))),"insertAt"===t&&e&&e.textToInsert&&(Object(h.isNumber)(e.insertPosition)||Object(h.isString)(e.insertPosition))){var p="currentPos"===e.insertPosition?n.currentPosition+1:e.insertPosition,u=o.join("\n");o=[u.slice(0,p),e.textToInsert,u.slice(p)].join("").split("\n")}return o.join("\n")}(t,e,(function(t){console.log("applyTextModifAction cb charDecal:",t),a(t)}),n):null}}},ln=function(t,n){var e=rn({editorType:"mobile",editorRef:n.mobileTextarea}),c=e.getLineTextInfos,i=e.resetCursorPosition,a=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),c=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",c),t.current.scrollTop=c)}}}(n.mobileTextarea),l=a.saveYTextarea,s=a.resetYTextarea,p=Object(o.useState)(!1),u=Object(r.a)(p,2),d=u[0],f=u[1];Object(h.debounce)((function(){f(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var o=e.target.value,a=o[e.target.selectionStart-1]&&o[e.target.selectionStart-1].charCodeAt(0);if(o.length>t.length){var r=c();if(!r)return;o=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),c=e.indexOf("-"),i="";-1!==o&&"- [ ] "!==e?(i=e.substr(0,o+3)+" ] ",an(i)&&(t.lines[t.lineIndex]=i+t.activeLine,cb(i.length))):-1!==c&&"- "!==e&&"- [ ] "!==e&&(i=e.substr(0,c+1)+" ",an(i)&&(t.lines[t.lineIndex]=i+t.activeLine,cb(i.length)))}return t.lines.join("\n")}(r,a,(function(t){setTimeout((function(){i(t),s()}))}))}n.onMobileNoteEdition(o)},onTextareaScroll:function(t){if(!d){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},sn="",pn=e(178),un=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],i=e[1],a=function(){t.onSubmit(c)};return Object(l.c)(dn,null,Object(l.c)(Y,{title:y.passwordForm.explanation,onClose:function(){t.onClose()}},Object(l.c)("div",null,Object(l.c)(q,{value:c,label:y.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){i(t)},onEnterPressed:function(){a()}}),Object(l.c)("button",{className:"submit-button",onClick:function(t){a()}},y.passwordForm.submit))))},dn=Object(pn.a)("div",{target:"eozyeru0"})(".submit-button{margin-top:10px;",V.els().redButton,";padding:10px 20px;}"),fn=e(218),bn=e.n(fn),gn=function(t,n){var e=bn.a.generateRSAKey(n,1024),o=bn.a.publicKeyString(e);return bn.a.encrypt(t,o)},hn=function(t,n){var e=n.replace(t,"").length,o=n.length;return Math.round(e/o*100)/100},mn=function(t){return t>0&&t<=.9},vn=function(t){var n=!1,e={nb:hn(/[^0-9]/g,t),up:hn(/[^A-Z]/g,t),low:hn(/[^a-z]/g,t),spe:hn(/[^\/\=\?\+]/g,t)},o=mn(e.nb)&&mn(e.up)&&mn(e.low)&&e.spe>0,c=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),i=t.length>100;return c&&o&&i&&(n=!0),n},wn=function(t){var n=Object(o.useState)(null),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(!1),s=Object(r.a)(a,2),p=s[0],u=s[1],d=Object(o.useState)(!1),f=Object(r.a)(d,2),b=f[0],g=f[1],h=Object(o.useState)(null),m=Object(r.a)(h,2),v=m[0],w=m[1],x=function(n){var e=t.fileContent,o=gn(e,n);if("failure"===o.status)w(null);else{console.log("encryption done",o),u(!1);var c=o.cipher;t.onTextEncrypted(c)}},O=function(n){var e=function(t,n){var e=bn.a.generateRSAKey(n,1024);return bn.a.decrypt(t,e)}(t.fileContent,n);if("failure"===e.status)w(null),alert("wrong password");else{g(!0),u(!0),console.log("decryption done",e);var o=e.plaintext;t.onTextDecrypted(o)}};return{APasswordPopup:Object(l.c)(un,{onClose:function(){i(null)},onSubmit:function(t){var n=c;i(null),w(t),"toEncrypt"===n&&x(t),"toDecrypt"===n&&O(t)}}),askForPassword:c,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){v?O(v):i("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){v?x(v):i("toEncrypt")}},ifEncryptOnLeave:function(cb){if(p&&v){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=gn(t.fileContent,v);n.cipher&&cb(n.cipher)}w(null),g(!1)},noHistoryBackupWhenDecrypted:b}},xn=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,o="";if(n<=3600)o="".concat(Math.ceil(n/60)," ").concat(y.minsAgo);else if(n>3600&&n<=86400)o="".concat(Math.ceil(n/3600)," ").concat(y.hoursAgo);else if(n>86400&&n<=e)o="".concat(Math.ceil(n/86400)," ").concat(y.daysAgo);else if(n>e){var c=("0"+t.getDate()).slice(-2),i=y.months[t.getMonth()],a=t.getFullYear().toString();o="".concat(c," ").concat(i," ").concat(a)}return o},On=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),c=e[0],i=e[1];Object(o.useEffect)((function(){_t.emit("askFileHistory",{filepath:t.file.path,token:Q()});var n=_t.on("getFileHistory",(function(t){var n=Object(h.orderBy)(t.files,["created"],["desc"]);i(n)}));return function(){_t.off(n)}}),[]);var a=Object(o.useContext)(Rt);return Object(l.c)(jn,null,Object(l.c)(Y,{title:"".concat(y.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(l.c)("div",{className:"table-wrapper"},Object(l.c)("table",null,Object(l.c)("thead",null,Object(l.c)("tr",null,Object(l.c)("th",null,y.historyPopup.thead.name),Object(l.c)("th",null,y.historyPopup.thead.date))),Object(l.c)("tbody",null,c.map((function(t){return Object(l.c)("tr",{onClick:function(){!function(t){a&&a.tabs.openInNewTab(t)}(t)}},Object(l.c)("td",null," ",t.realname," "),Object(l.c)("td",null," ",xn(new Date(t.created||0))," "))})))))))},jn=Object(pn.a)("div",{target:"ew7e5uv0"})(".popup-wrapper .popupContent{padding:0px;}.table-wrapper{max-height:50vh;overflow-y:auto;padding:0px 20px 20px 20px;table{border-spacing:0px;thead{tr{th{padding:8px;}}}tbody{text-align:left;tr{cursor:pointer;background:#f1f0f0;&:nth-child(2n){background:none;}&:hover{background:r",V.colors.main,";}td{padding:8px;}}}}}"),kn=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])},yn=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){console.log(n);var o=n.lang?" (".concat(n.lang,")"):"",c="".concat(n.name).concat(o);t.push({key:e,label:c,obj:n})})),t},Cn=function t(n){var e=this;Object(C.a)(this,t),this.rawText=void 0,this.voice=void 0,this.text2read=void 0,this.chunkedText=void 0,this.chunkLength=160,this.currChunkId=0,this.currSpeechObj=void 0,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=[],c=0;c<n.length;c++){var i=n[c];if(i.length>e.chunkLength)for(var a=i.split(" "),r="",l=0;l<a.length;l++)((r+=a[l]+" ").length>e.chunkLength||l===a.length-1)&&(o.push(r),r="");else o.push(i)}return console.log(o),o},this.loadVoice=function(t){console.log("[TTS] LOAD VOICE",t),e.voice=t},this.play=function(){if(e.isLoaded)console.log("[TTS] RESUME play chunk ".concat(e.currChunkId)),window.speechSynthesis.resume();else{if(e.currChunkId>e.chunkedText.length-1)return console.log("[TTS] finished played");e.isLoaded=!0,console.log("[TTS] START play chunk ".concat(e.currChunkId),{txt:e.chunkedText[e.currChunkId]}),e.currSpeechObj=new SpeechSynthesisUtterance,e.currSpeechObj.text=e.chunkedText[e.currChunkId],e.voice&&(e.currSpeechObj.voice=e.voice),console.log(e.currSpeechObj),setTimeout((function(){window.speechSynthesis.speak(e.currSpeechObj)}),0),e.currSpeechObj.addEventListener("end",(function(){e.isLoaded=!1,console.log("[TTS] END play chunk ".concat(e.currChunkId)),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(){console.log("[TTS] pause"),window.speechSynthesis.pause()},this.stop=function(){console.log("[TTS] stop"),e.shouldStop=!0,e.isLoaded=!1,window.speechSynthesis.cancel()},this.goToChunk=function(t){console.log("[TTS] goToChunk",t),t<=0||t>e.chunkedText.length-1||(e.stop(),e.currChunkId=t,e.play())},this.goBack=function(){console.log("[TTS] goBack",e.currChunkId),e.goToChunk(e.currChunkId-1)},this.goForward=function(){console.log("[TTS] goForward",e.currChunkId),e.goToChunk(e.currChunkId+1)},this.rawText=n.text,this.text2read=function(t){var n=t;return n=(n=n.replace(lt.ressource,"")).replace(lt.ref,""),n=xt(n),console.log("222",n),n=n.replace(lt.baliseHtml,""),console.log("cleanText2Speech",n),n}(n.text),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})};var Tn=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],i=e[1],a=w("tts-selected-voice",0),s=Object(r.a)(a,2),p=s[0],u=s[1],d=Object(o.useState)(0),f=Object(r.a)(d,2),b=f[0],g=f[1],h=Object(o.useState)(0),m=Object(r.a)(h,2),v=m[0],x=m[1],O=Object(o.useRef)();return Object(o.useEffect)((function(){setTimeout((function(){yn()[p]&&(console.log("2voice loaded",p),O.current.loadVoice(yn()[p].obj))})),O.current=new Cn({text:t.fileContent})}),[]),Object(o.useEffect)((function(){yn()[p]&&(console.log("voice loaded",p),O.current.loadVoice(yn()[p].obj))}),[p]),kn((function(){i(O.current.isPlaying()),g(O.current.currChunkId),x(O.current.chunkedText.length)}),500),Object(l.c)(Sn,null,Object(l.c)(Y,{title:"".concat(y.ttsPopup.title),onClose:function(){O.current.stop(),t.onClose()}},Object(l.c)(q,{value:p,type:"select",list:yn(),label:y.ttsPopup.voice,onSelectChange:function(t){u(parseInt(t))}}),b," / ",v,Object(l.c)("br",null),Object(l.c)("input",{type:"range",defaultValue:b,min:"0",max:v,onChange:function(t){console.log(t.target.value),O.current.goToChunk(parseInt(t.target.value))}}),Object(l.c)("input",{type:"number",defaultValue:b,min:"0",max:v,onChange:function(t){console.log(t.target.value),O.current.goToChunk(parseInt(t.target.value))}}),Object(l.c)("br",null),Object(l.c)("div",{className:"buttons"},Object(l.c)("button",{onClick:function(t){O.current.goBack()}},Object(l.c)(on,{name:"faFastBackward",color:"black"})),Object(l.c)("button",{onClick:function(t){c?O.current.pause():O.current.play()}},Object(l.c)(on,{name:c?"faPause":"faPlay",color:"black"})),Object(l.c)("button",{onClick:function(t){O.current.goForward()}},Object(l.c)(on,{name:"faFastForward",color:"black"})))))},Sn=Object(pn.a)("div",{target:"ez98axn0"})({name:"rvko2c",styles:".popup-wrapper .popupContent{padding:20px;}.buttons{display:flex;padding:20px 0px 0px 0px;button{width:30%;padding:10px;}}"}),En=function(t){var n=Object(b.a)({},t),e=n.design,o=n.colors,c=n.size;e||(e="horizontal");var i=!("popup"in t)||t.popup,a=Object(Kt.a)("button.toolbar-button{position:relative;&.active{svg{color:",o?o[1]:V.colors.main,";}}svg{transform:scale(",c||1.3,");color:",o?o[0]:V.colors.editor.interfaceGrey,";&:hover{color:",o?o[1]:V.colors.main,";}}}","");return Object(l.c)("div",{className:a},Object(l.c)("ul",{className:"buttons-toolbar-component ".concat(t.class," ").concat(e," ").concat(i?"with-popup":"no-popup")},t.buttons.map((function(t,n){return t.action&&Object(l.c)("li",{className:t.class,title:t.title,key:n},Object(l.c)(Nn,t))}))))},Nn=function(t){var n=Object(l.c)(c.a.Fragment,null);t.title&&(n=Object(l.c)(c.a.Fragment,null,t.title)),t.icon&&(n=Object(l.c)(on,{name:t.icon})),t.customHtml&&(n=t.customHtml);var e="toolbar-button ".concat(t.class&&t.class," ").concat(t.active&&"active");return Object(l.c)("button",{className:e,onClick:function(n){t.action&&t.action(n)}},Object(l.c)("div",{className:"inside-html-wrapper"},n),Object(l.c)("div",{className:"button-hover-popup "},t.title))},In="\n ul.buttons-toolbar-component {\n list-style: none;\n padding: 0px;\n margin: 0px;\n button.toolbar-button {\n ".concat(V.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(V.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(V.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(V.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"),Fn=function(t){return Object(l.c)("div",null,Object(l.c)(En,{class:"mobile-text-manip-toolbar",colors:[V.colors.editor.mobileToolbar.font,V.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")}}]}))},An=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=(e[0],e[1],t.dir?t.dir:"left"),i=t.maxHeight?t.maxHeight:50;return Object(l.c)("div",{className:"dropdown-wrapper ".concat(c," ").concat(t.hover?"hover-active":"")},Object(l.c)("span",{onMouseEnter:function(){},onClick:function(){},className:"context-menu-wrapper"},Object(l.c)("div",{className:"dropdown-icon"},Object(l.c)(on,{name:"faEllipsisH",color:V.colors.l1.font})),Object(l.c)("div",{className:"context-menu",style:{maxHeight:i}},t.children)))},Dn=function(t){var n=Object(o.useContext)(Rt);return Object(l.c)("div",{className:"upload-button-component"},Object(l.c)("input",{className:"input-file-hidden",id:"file",multiple:!0,name:"file",type:"file",onChange:function(e){var o=e.target.files;0!==o.length&&Object(h.each)(o,(function(e){n&&n.upload.uploadFile({file:e,folderPath:t.file.folder,onProgress:t.onProgress,onSuccess:t.onSuccess})}))}}),Object(l.c)("label",{htmlFor:"file"},Object(l.c)(on,{name:"faPaperclip"}),Object(l.c)("span",{className:"label-text"},"Upload files ")))},Rn=function(){return"\n\t\t\t\t.upload-button-wrapper {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t.label-text { color :".concat(V.colors.main,"; }\n\t\t\t\t\t\t}\n\t\t\t\t\t.upload-button-component {\n\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t.input-file-hidden {\n\t\t\t\t\t\t\twidth: 0.1px;\n\t\t\t\t\t\t\theight: 0.1px;\n\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.label-text {\n\t\t\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t")},Ln=function(t){var n=t.progress,e=n>=0&&n<100;return Object(l.c)(c.a.Fragment,null,e&&Object(l.c)("div",{className:"upload-progress-bar-wrapper"},Object(l.c)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(l.c)("div",{className:"label"},n,"% uploaded... ")))},Pn=e(383),zn=function(t){return t||(t=0),Object(Pn.isNumber)(t)?t+1:0},Mn=e(384),Bn=e.n(Mn),Un=(e(608),e(609),e(385)),_n=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var c in e){var i=e[c],a=!1;if(c.endsWith("-once")&&(c=c.replace("-once",""),a=!0),c===t.subId)try{i(t.data),a&&o("".concat(c,"-once"))}catch(r){n&&console.log("".concat(n," error with function"),r)}}},subscribe:function(t,cb){e[t]=cb},subscribeOnce:function(t,cb){var n="".concat(t,"-once");e[n]=cb},unsubscribe:o}},Hn="[IFRAME PARENT] 00563",Wn=_n({headerLog:Hn}),Vn=Wn.notify,Yn=Wn.subscribe,qn=Wn.unsubscribe;console.log(Hn,"INIT IFRAME LISTENING"),window.addEventListener("message",(function(t){t.data.subId&&(console.log(Hn,"parent <== iframe",t.data.data),Vn(t.data))}));var Gn={subscribe:Yn,unsubscribe:qn,send:function(t,n){t&&t.contentWindow&&(console.log(Hn,"parent ==> iframe",n),t.contentWindow.postMessage(n,"*"))}},Jn=function(t){return'\n<html>\n\t\t<div id="content-wrapper">\n\t\t\t\t'.concat(t,'\n\t\t</div>\n\t\t<div id="external-scripts-wrapper"></div>\n\t\t<script>\n\t\t\t\tconst IMPORTED_replaceCustomMdTags = ').concat(jt.toString(),"\n\t\t\t\tconst IMPORTED_unescapeHtml = ").concat(Tt.toString(),"\n\t\t\t\tconst IMPORTED_createEventBus = ").concat(_n.toString(),"\n\t\t\t\tconst IMPORTED_generateUUID = ").concat(G.toString(),"\n\t\t\t\tconst IMPORTED_bindToElClass = ").concat(Et.toString(),"\n\t\t\t\tconst main = ").concat(Kn.toString(),";\n\t\t\t\tmain({\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\tbindToElClass: IMPORTED_bindToElClass\n\t\t\t\t})\n\t\t<\/script>\n</html>\n")},Kn=function(t){var n="[IFRAME child] 00564";console.log(n,"INIT INNER IFRAME");var e,o={file:null,frameId:"",innerTag:"",tagName:"",tagContent:""},c=function(t){if(""===o.frameId)return console.warn(n,"NO FRAME ID, CANNOT SEND TO PARENT");var e={subId:o.frameId,data:t};window.parent.postMessage(e,"*")},i=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};c({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}c({action:"resize",data:{height:t}})},r=t.createEventBus({headerLog:"[FRAME API] 00567"}),l=r.subscribeOnce,s=r.notify,p={version:1.1,call:function(n,e,cb){if(!e||!n||e.constructor!==Array||"string"!==typeof n)return i("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()," ");l(o,(function(t){cb&&cb(t)})),c({action:"apiCall",data:{reqId:o,apiName:n,apiArguments:e}})},utils:{getInfos:function(){return o},loadScripts:function(t,cb){console.log(n,"loadScripts",t);for(var e=0,o=0;o<t.length;o++){var c=t[o],i=document.createElement("script");i.src=c,i.onload=function(){if(e++,console.log(n,"loadScripts: ".concat(e,"/").concat(t.length)),e===t.length){console.log("loadScripts all scripts loaded, cb()!");try{cb&&cb()}catch(o){console.log(n,"ERROR LoadScript Callback : ".concat(o))}}};var a=document.getElementById("external-scripts-wrapper");a&&a.appendChild(i)}},resizeIframe:a,loadCustomTag:function(t,e,o){var c=p.utils.createDiv(),i=c.div,a=c.updateContent;return o||(o={}),o.base_url=t.split("/").slice(0,-1).join("/"),p.utils.loadScripts([t],(function(){console.log(n,"CUSTOM TAG LOADED ".concat(t));var c=window.initCustomTag("".concat(e),o);a(c)})),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=p,e={init:function(e){o.frameId=e.frameId,o.innerTag=e.innerTag,o.tagContent=e.tagContent,o.tagName=e.tagName,o.file=e.file,console.log(n,"1/2 RECEIVED INIT EVENT",o.frameId);var c,r=document.getElementById("content-wrapper");if(r){var l=t.unescapeHtml(r.innerHTML),s=(c=l,t.replaceCustomMdTags(c,"[[script]]",(function(t){var e="".concat(t);try{return new Function(e)()}catch(o){console.warn(n,"[SCRIPT] error: ".concat(o),e),i("".concat(o,' in Code "').concat(e,'"'))}})));console.log(n,"2/2 transformMarkdownScript",{old:r.innerHTML,new:s}),r.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;p.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},apiAnswer:function(t){var n={subId:t.reqId,data:t.data};s(n)}},window.onmessage=function(t){var n=t.data;if(n)for(var o in e)e&&e[o]&&o===n.action&&e[o](t.data.data)},p},$n="[IFRAME COMPONENT] 00562",Xn=function(t){var n="tag"===t.block.type,e=Object(o.useState)(null),c=Object(r.a)(e,2),i=c[0],a=c[1],s=Object(o.useState)(null),p=Object(r.a)(s,2),u=p[0],d=p[1];return Object(o.useEffect)((function(){n&&("script"===t.block.tagName?(a("\n[[script]]".concat(t.block.content,"[[script]]")),t.block.content=""):Dt().then((function(n){n.file.getContent("/.tiro/tags/".concat(t.block.tagName,".md"),(function(t){a(t)}),{onError:function(){a(null)}})})))}),[t.windowId,t.file,t.block.content]),Object(o.useEffect)((function(){if(!n){var e=Ft.render({raw:t.block.content,file:t.file,windowId:t.windowId});d(e)}}),[t.windowId,t.file,t.block]),Object(l.c)("div",{className:"content-block"},n&&i&&Object(l.c)(Zn,Object(Un.a)({},t,{noteTagContent:i})),!n&&u&&Object(l.c)("div",{className:"content-block-text",dangerouslySetInnerHTML:{__html:u}}))},Zn=function(t){var n=Object(b.a)({},t).noteTagContent,e=Object(o.useState)(""),c=Object(r.a)(e,2),i=c[0],a=c[1],s=Object(o.useRef)(null),p=Object(o.useState)(""),u=Object(r.a)(p,2),d=u[0],f=u[1],m=Object(o.useState)(!1),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useState)(0),j=Object(r.a)(O,2),k=j[0],y=j[1],C=Object(o.useState)(null),T=Object(r.a)(C,2),S=T[0],E=T[1],N=Qt((function(e){f(e),E(null),Gn.subscribe(e,(function(n){if("resize"===n.action){var e=n.data.height;if(Object(h.isString)(e)&&e.endsWith("%")){var o=parseInt(e.replace("%",""))/100;e=(t.windowHeight||200)*o}console.log($n,"resizing to",e),y(e),x(!0)}"apiCall"===n.action&&function(t,cb){Dt().then((function(n){var e=t.apiName.split("."),o=n;if(Object(h.each)(e,(function(t){o=o[t]?o[t]:null})),!o)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(Mt("",n))});try{var c=zt(o);if(console.log(2223,{pos:c,p:t,cb:cb}),!c)return o.apply(void 0,Object(g.a)(t.apiArguments)),cb("ok");var i=Object(h.cloneDeep)(t.apiArguments);i.splice(c,0,(function(t){cb("ok",t)})),o.apply(void 0,Object(g.a)(i))}catch(a){return cb("nok",{error:'error "'.concat(JSON.stringify(a),'" when executing "').concat(t.apiName,'" with props ').concat(t.apiArguments)})}}))}(n.data,(function(t,e){if(console.log($n,"getting aswer from api call => ",JSON.stringify({status:t,data:e}).substring(0,150)+'"'),"nok"===t)return E(e.error);var o={reqId:n.data.reqId,data:e};Gn.send(s.current,{action:"apiAnswer",data:o})}));if("iframeError"===n.action){var c=n.data.error;E(c)}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,frameId:e,tagContent:n,tagName:t.block.tagName||""};Gn.send(s.current,{action:"init",data:o})}),100)}),500);return Object(o.useEffect)((function(){x(!1),function(){var e=Ft.render({raw:n,windowId:t.windowId,file:t.file}),o=Jn(e),c='\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(te(),"\n\t\t\t\t</style>\n\t\t\t\t");c=ut(c,[["{{innerTag}}",t.block.content.trim()]]),a(c)}();var e="iframe-".concat(G());return N(e),console.log("=============================================="),function(){Gn.unsubscribe(e)}}),[t.windowId,t.block.content]),Object(l.c)("div",{className:"iframe-view-wrapper ".concat(w?"can-show":"hide"," iframe-tag-").concat(t.block.tagName)},Object(l.c)("iframe",{ref:s,id:d,"data-testid":"iframe",title:d,srcDoc:i,className:"tag-iframe",style:{height:k},sandbox:"allow-scripts allow-same-origin allow-popups"}),S&&Object(l.c)("div",{className:"iframe-error"},Object(l.c)("code",null,Object(l.c)("pre",null,S))))},Qn=function(t){Object(o.useContext)(Rt);var n={wrapper:Object(o.useRef)(null),main:Object(o.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(o.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(c())}),1e3)}),[t.fileContent]);var c=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},i=Object(o.useState)([]),a=Object(r.a)(i,2),s=a[0],p=a[1];return Object(o.useEffect)((function(){var n=Ft.chunks.chunk(t.fileContent);p(n),setTimeout((function(){Ft.injectLogic({fileContent:t.fileContent,file:t.file})}),100)}),[t.fileContent]),Object(l.c)("div",{className:"preview-area-wrapper"},Object(l.c)("div",{className:"preview-area",ref:n.wrapper,style:{bottom:function(){var n=c();return Object(h.clamp)(t.posY,0,n)}()}},Object(l.c)("div",{className:"infos-preview-wrapper"},Object(l.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(l.c)("h1",{className:"title big-title"},t.file.name.replace(".md",""))),Object(l.c)("div",{className:"content-blocks-wrapper"},Object(l.c)("div",{className:"simple-css-wrapper"},s.map((function(e,o){var c;return Object(l.c)("div",{key:o},Object(l.c)(Xn,{key:o,block:e,windowId:t.windowId,file:t.file,windowHeight:null===(c=n.wrapper.current)||void 0===c?void 0:c.clientHeight}))}))))))},te=function(){var t=".simple-css-wrapper",n=".preview-link",e=".resource-link-icon";return"\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," {\n\t\t\t\tcolor: ").concat(V.colors.editor.font,";\n\t\t\t\tline-height: 19px;\n\t\t\t\tfont-size: 11px;\n\t\t\t\tfont-family:").concat(V.font.main,";\n\t\t}\n\n\t\tbutton,\n\t\tinput {\n\t\t\t\tfont-family:").concat(V.font.main,";\n\t\t\t\tfont-weight: 700;\n\t\t\t\tcolor: ").concat(V.colors.l2.title,";\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t// COUNTER TITLES\n\n*********************************************************\n\n\t\t").concat(t,' {\n\t\t\t\tcounter-reset: sh1;\n\t\t\t\toverflow-wrap: break-word;\n\t\t}\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\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\th3 {\n\t\t\t\tcounter-reset: sh3;\n\t\t}\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\n\n\n\t\t/**********************************************************\n\n\t\t// BASIC STYLE\n\n**********************************************************/\n\n\t\t.main-color {\n\t\t\t\t\t\tcolor: ').concat(V.colors.main,";\n\t\t}\n\t\t.title {\n\t\t\t\tmargin: 0px 0px;\n\t\t}\n\n\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\tcolor: ").concat(V.colors.main,";\n\t\t\t\tmargin-top: 0px;\n\t\t}\n\t\th1 {\n\t\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\th2, h3, h4, h5, h6 {\n\t\t\t\tmargin-bottom: 15px;\n\t\t}\n\n img,\n .content-image {\n ").concat(V.els().images,'\n\t\t\t\tcursor: pointer;\n }\n\n p {\n margin-top: 0px;\n margin-bottom: 1em;\n }\n\n\n\t\t/**********************************************************\n\n\t\t// LIST\n\n**********************************************************/\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\tbackground-image: url(./custom_icons/line.svg);\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: -3px 4px;\n\t\t\t\tbackground-size: 11px;\n\t\t\t\tpadding-left: 12px;\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\t\t\t\tbackground-image: url(./custom_icons/check.svg);\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: -2px -1px;\n\t\t\t\tbackground-size: contain;\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\tbackground-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\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t PREVIEW LINK\n\n**********************************************************/\n\n\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(n,".external-link {\n\t\t\t\tbackground-image: url(").concat(V.assets.worldIcon,");\n\t\t}\n\t\t").concat(n,".search-link {\n\t\t\t\tcolor: ").concat(V.colors.main,";\n\t\t\t\tbackground-image: url(").concat(V.assets.searchIcon,");\n\t\t}\n\t\t").concat(n,".title-search-link {\n\t\t\t\tcolor: ").concat(V.colors.main,";\n\t\t\t\tbackground-image: url(").concat(V.assets.linkIcon,");\n\t\t\t\tcursor: pointer;\n\t\t}\n\t\t").concat(n,".resource-link {\n\t\t\t\tcolor: ").concat(V.colors.main,";\n\t\t} \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\n\t\t.resource-link-wrapper {\n\t\t\t\tbackground: #f7f6f6;\n\t\t\t\tpadding: 20px;\n\t\t\t\tborder-radius: 10px;\n\t\t\t\tposition: relative;\n\t\t\t\tmargin: 5px 0px;\n\t\t}\n\n\t\t.resource-link-icon {\n\t\t\t\ttop: 14px;\n\t\t\t\tleft: 19px;\n\t\t\t\twidth: 21px;\n\t\t\t\theight: 27px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tbackground-image: url(/static/media/file-solid.6415173e.svg);\n\t\t\t\topacity: 0.08;\n\t\t\t\tposition: absolute;\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\ttransform: scale(1.5);\n\t\t\t\tbackground-image: url(").concat(V.assets.fileIcon,");\n\t\t}\n\n\t\t").concat(e,".epub, ").concat(e,".cbr, ").concat(e,".cbz,").concat(e,".mobi, ").concat(e,".azw, ").concat(e,".azw3, ").concat(e,".iba { background-image: url(").concat(V.assets.bookIcon,"); }\n\t\t").concat(e,".pdf\n\t\t{ background-image: url(").concat(V.assets.pdfIcon,"); }\n\n\t\t").concat(e,".xls, ").concat(e,".xlsm, ").concat(e,".xlsx, ").concat(e,".ods\n\t\t{ background-image: url(").concat(V.assets.excelIcon,"); }\n\n\t\t").concat(e,".avi, ").concat(e,".flv, ").concat(e,".h264, ").concat(e,".m4v, ").concat(e,".mov, ").concat(e,".mp4, ").concat(e,".mpg, ").concat(e,".mpeg, ").concat(e,".rm, ").concat(e,".swf, ").concat(e,".vob, ").concat(e,".wmv, ").concat(e,".mkv\n\t\t{ background-image: url(").concat(V.assets.videoIcon,"); }\n\n\t\t").concat(e,".d7z, ").concat(e,".arj, ").concat(e,".deb, ").concat(e,".rar, ").concat(e,".gz, ").concat(e,".zip, ").concat(e,".rpm, ").concat(e,".pkg\n\t\t{ background-image: url(").concat(V.assets.archiveIcon,");}\n\n\t\t").concat(e,".aif, ").concat(e,".mp3, ").concat(e,".cda, ").concat(e,".mid, ").concat(e,".mpa, ").concat(e,".ogg, ").concat(e,".wav, ").concat(e,".wpl, ").concat(e,".wma, ").concat(e,".midi\n\t\t{ background-image: url(").concat(V.assets.audioIcon,"); }\n\n\t\t").concat(e,".doc, ").concat(e,".docx, ").concat(e,".odt\n\t\t{ background-image: url(").concat(V.assets.wordIcon,"); }\n\n\t\t").concat(e,".bin, ").concat(e,".dmg, ").concat(e,".iso, ").concat(e,".toast, ").concat(e,".vcd\n\t\t{\n\t\t\t\ttop: 19px;\n\t\t\t\ttransform: scale(1.8);\n\t\t\t\tbackground-image: url(").concat(V.assets.diskIcon,");\n\t\t}\n\n\t\t").concat(e,".ppt, ").concat(e,".pptx, ").concat(e,".odp, ").concat(e,".key, ").concat(e,".pps\n\t\t{ background-image: url(").concat(V.assets.presIcon,"); }\n\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")},ne=e(226),ee=e.n(ne),oe=function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],c=n[1],i=Object(o.useState)(0),a=Object(r.a)(i,2),l=a[0],s=a[1],p=Object(o.useRef)(0);return Object(o.useEffect)((function(){var t=Object(h.debounce)((function(){p.current=p.current+1,s(l+1),c(!0),setTimeout((function(){c(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:p,responsiveRefreshCounter:l,setResponsiveRefresh:s}},ce=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),c=e[0],i=e[1],a=oe(),s=(a.frr,a.forceResponsiveRender),p=Object(o.useRef)(null),u=Object(o.useRef)(null);Object(o.useEffect)((function(){f(d().percent)}),[s]),Object(o.useEffect)((function(){f(t.percent)}),[t.percent]);var d=function(){var t={maxY:0,y:0,percent:0},n=u.current?u.current:null,e=p.current?p.current:null;if(!e||!n)return t;var o=e.getBoundingClientRect().height,c=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-c,t.percent=Math.round(t.y/t.maxY*100),t},f=function(t){var n=Object(h.clamp)(t,0,100),e=(n/=100)*d().maxY;i(e)};return Object(l.c)("div",{className:"scrolling-bar-wrapper",ref:u},Object(l.c)(ee.a,{onDrag:function(n){f(d().percent),t.onUpdated(d().percent)},position:{x:0,y:c},axis:"y",bounds:"parent"},Object(l.c)("div",{ref:p,className:"scrolling-bar"})))},ie=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(0),s=Object(r.a)(a,2),p=s[0],d=s[1],f=Object(o.useRef)(0),b=function(t){t>f.current&&(f.current=t),d(f.current)};Object(o.useEffect)((function(){d(0)}),[t.fileContent]);var g=Object(o.useState)(0),m=Object(r.a)(g,2),v=m[0],w=m[1],x=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useRef)(0),l=function(){return a.current},s=function(t){a.current=t,i(c+1)};return{getSyncY:l,setSyncY:s,yCnt:c,updateSyncYWithDelta:function(n){var e=(n>0?1:-1)*Math.min(Math.abs(n),40),o=l()+e;o>-200&&o<t&&s(o)}}}(p),O=x.getSyncY,j=x.setSyncY,k=x.yCnt,y=x.updateSyncYWithDelta;Object(o.useEffect)((function(){w(C(O()))}),[k,p]);var C=function(t){return Object(h.clamp)(Math.round(t/p*100),0,100)};Object(o.useEffect)((function(){i(t.fileContent)}),[t.fileContent]),Object(o.useEffect)((function(){j(1)}),[t.file.path]);var T=Object(o.useContext)(Rt),S=null===T||void 0===T?void 0:T.ui.note.lineJump.get,E=Object(o.useState)(-1),N=Object(r.a)(E,2),I=N[0],F=N[1];Object(o.useEffect)((function(){if(S){var n;if("active"===S.windowId)S.windowId=(null===T||void 0===T||null===(n=T.ui.windows.active.get())||void 0===n?void 0:n.content.i)||"";S.windowId===t.windowId&&F(S.line)}}),[S]);var A=!("editor"===t.viewType&&"mobile"!==u());return Object(l.c)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(u()),onWheelCapture:function(t){y(t.deltaY)}},Object(l.c)(je,{file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,jumpToLine:I,posY:O(),onScroll:function(t){},onUpdateY:function(t){j(t)},onMaxYUpdate:b,onFileEdited:function(n,e){t.onFileEdited(n,e),i(e)},onViewToggle:function(n){t.onViewChange&&t.onViewChange(n)}}),A&&Object(l.c)(Qn,{windowId:t.windowId,file:t.file,posY:O(),fileContent:c,onMaxYUpdate:b}),Object(l.c)(ce,{percent:v,onUpdated:function(t){j(t/100*p)}}))},ae=function(t){var n=Object(b.a)({},t.content),e=n.file,i=n.view,a=n.active,s=n.i,p=Object(o.useState)(""),u=Object(r.a)(p,2),d=u[0],f=u[1],g=Object(o.useContext)(Rt);Object(o.useEffect)((function(){f("loading..."),x(!1),e&&g&&g.file.getContent(e.path,(function(t){f(t),x(!0)}))}),[null===e||void 0===e?void 0:e.path]);var m=Object(o.useState)(!1),v=Object(r.a)(m,2),w=v[0],x=v[1],O=function(t,n){g&&g.file.saveContent(t,n,{history:!0})};Object(h.debounce)(O,1e3),Object(h.debounce)((function(){console.log("0046 refresh list after file edit"),g&&g.ui.browser.goTo(g.ui.browser.folders.current.get)}),5e3);return Object(l.c)(c.a.Fragment,null,e&&Object(l.c)("div",{className:"window-editor-wrapper"},Object(l.c)(ie,{windowId:s,file:e,fileContent:d,isActive:a,canEdit:w,viewType:i,onViewChange:t.onViewChange,onFileEdited:function(t,n){O(t,n)}})))},re={rows:2,cols:4},le={m:10,rows:re.rows,cols:re.cols,decalBottom:10},se=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),i=e[0],a=e[1],s=Object(o.useState)([]),p=Object(r.a)(s,2),d=p[0],f=p[1],b=Object(o.useRef)();Object(o.useEffect)((function(){t.grid&&t.grid.layout&&(f(t.grid.layout),a(t.grid.content))}),[t.refresh]),Object(o.useEffect)((function(){E(),j()}),[d]);var g=function(n,e){t.onGridUpdate({layout:n,content:e})},m=function(){var t=i[0].file;if(t){var n=function(t){for(var n=[],e=re,o=function(o){for(var c=[],i=function(n){var e=0;Object(h.each)(t,(function(t){for(var c=0;c<t.w;c++)for(var i=0;i<t.h;i++){var a=t.x+c,r=t.y+i;a===n&&r===o&&(e=1)}})),c.push(e)},a=0;a<e.cols;a++)i(a);n.push(c)},c=0;c<e.rows;c++)o(c);for(var i=[-1,-1],a=[-1,-1],r=0;r<e.rows;r++)for(var l=0;l<e.cols;l++)0===n[r][l]&&-1===i[0]&&-1===i[1]&&(i[0]=l,i[1]=r),0===n[r][l]&&(a[0]=l,a[1]=r);var s=a[0]-i[0]+1,p=a[1]-i[1]+1;return{x:i[0],y:i[1],w:s,h:p}}(d),e=pe({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(h.cloneDeep)(d);o.push(e.layout),A(o)&&(f(o),setTimeout((function(){var t=Object(h.cloneDeep)(i);t.push(e.content);var n=N(e.content.i,t);a(n),g(o,n)})),g(o,i))}},v=Object(o.useState)(!1),w=Object(r.a)(v,2),x=w[0],O=w[1],j=function(){O(d.length>1)},k=function(t){var n=Object(h.filter)(Object(h.cloneDeep)(d),(function(n){return n.i!==t})),e=function(t){var n=re;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);f(e),setTimeout((function(){var e=Object(h.filter)(Object(h.cloneDeep)(i),(function(n){return n.i!==t}));a(e),g(n,e)})),g(n,i)},y=Object(o.useState)(!1),C=Object(r.a)(y,2),T=C[0],S=C[1],E=function(){var t=0,n=le.cols*le.rows;Object(h.each)(d,(function(n){t+=n.w*n.h})),S(t!==n)},N=function(t,n){var e=Object(h.cloneDeep)(n);return Object(h.each)(e,(function(n){n.active=n.i===t})),e},I=function(t,n){var e=N(t,i);a(e),g(d,e),n&&(null===P||void 0===P||P.ui.browser.goTo(n.folder,n.name))},F=function(t){b.current=Object(h.cloneDeep)(t)},A=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};!function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],c=n[1],i=Object(o.useRef)(0);Object(o.useEffect)((function(){var t=Object(h.debounce)((function(){i.current=i.current+1,c(!0),setTimeout((function(){c(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[])}(),Object(o.useEffect)((function(){var t=D.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var D=Object(o.useRef)(null),R={width:300,height:300};D.current&&(R.width=D.current.clientWidth,R.height=D.current.clientHeight-le.decalBottom);var L=function(t,n){var e=Object(h.cloneDeep)(i);e[n].view=t,a(e),g(d,e)},P=Object(o.useContext)(Rt),z=Object(o.useState)(null),M=Object(r.a)(z,2),B=M[0],U=M[1];Object(o.useEffect)((function(){if("mobile"===u()){var t=null===P||void 0===P?void 0:P.ui.windows.active.get();if(t)U(t);else{var n={layout:d[0],content:i[0]};n.layout&&n.content&&n.layout.i===n.content.i&&(U(n),I(n.content.i))}}}),[t.refresh]);return Object(l.c)("div",{className:"draggable-grid-wrapper"},Object(l.c)("div",{className:"draggable-grid-wrapper-in",ref:D},"mobile"!==u()&&Object(l.c)(Bn.a,{className:"draggable-grid",autoSize:!1,layout:d,onLayoutChange:function(t){var n=Object(h.cloneDeep)(t);if(A(n)){var e=function(t){var n=t,e=re;return 2===n.length&&console.log("0234 1",n[0].w,n[1].w,e.cols/2,e.cols),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)&&(console.log("0234 2"),n[0].w=e.cols/2,n[1].w=e.cols/2),n}(n);F(e),f(e),g(e,i)}else{if(!b.current)return;var o=function(t){var n=t,e=re,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(h.cloneDeep)(t),Object(h.each)(o,(function(t,n){t.w=e.cols/2,t.y=0,1===n&&(t.x=e.cols/2)})));return o}(t);o&&F(o);var c=o||b.current,a=Object(h.cloneDeep)(c);Object(h.each)(a,(function(t){t.refresh=zn(t.refresh)})),f(a),g(a,i)}},cols:le.cols,compactType:"horizontal",useCSSTransforms:!0,rowHeight:R.height/le.rows-le.m*(le.rows+1),draggableHandle:".drag-handle",width:R.width,margin:[le.m,le.m]},d.map((function(n,e){return Object(l.c)("div",{key:n.i,className:"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t".concat(i[e]&&i[e].active?"active":"","\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow-wrapper\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"),onClick:function(){i[e]&&!i[e].active&&I(i[e].i,i[e].file)}},function(t,n){return Object(l.c)(c.a.Fragment,null,Object(l.c)("div",{className:"note-active-ribbon"}),Object(l.c)("div",{className:"window-buttons-bar ".concat(T?"can-add":""," ").concat(x?"can-remove":"")},Object(l.c)(En,{design:"horizontal",popup:!1,buttons:[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",action:function(){}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){m()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){k(t.i)}}],colors:["#d4d1d1","#615f5f"],size:.8})))}(n),Object(l.c)("div",{className:"note-wrapper"},Object(l.c)(ae,{content:t.grid.content[e]&&t.grid.content[e],onViewChange:function(t){L(t,e)}})))}))),"mobile"===u()&&Object(l.c)("div",{className:"mobile-grid-view"},Object(l.c)("div",{className:" window-wrapper"},Object(l.c)("div",{className:"note-wrapper"},B&&Object(l.c)(ae,{content:B.content,onViewChange:function(t){L(t,0)}}))))))},pe=function(t){var n=Object(b.a)({},t),e=n.w,o=n.h,c=n.x,i=n.y,a=n.file;o||(o=re.rows),e||(e=re.cols),c||(c=0),i||(i=0);var r=G();return{layout:{i:r,x:c,y:i,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:r,active:!1,file:a,view:"both"}}},ue=function(t){var n=Object(h.cloneDeep)(t);return Object(h.each)(n,(function(t){t.refresh=zn(t.refresh)})),n},de=function(t){return t.length>15?"".concat(t.substring(0,13),".."):t},fe=function(t){var n=void 0;return Object(h.each)(t,(function(t,e){t.active&&(n=e)})),n},be=function(t,n){var e=Object(h.cloneDeep)(n);return Object(h.each)(e,(function(n){n.refresh=Object(h.isNumber)(n.refresh)?n.refresh++:1,n.id===t?n.active=!0:n.active=!1})),e},ge=function(t){if(t.copiedTab){var n=Object(h.cloneDeep)(t.copiedTab);return n.id=G(),n.name=he(t.copiedTab.name),n}if(t.fullWindowFile){var e=pe({file:t.fullWindowFile});return{id:G(),name:de(t.fullWindowFile.name),active:!0,grid:{layout:[e.layout],content:[e.content]}}}},he=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},me=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 c=e[o].getAsFile();"function"==typeof n&&n(c)}};var ve={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},we=c.a.createContext(ve),xe=function(t){var n=Object(b.a)({},t).tab,e=Object(o.useContext)(Rt),c=Object(o.useState)(ve),i=Object(r.a)(c,2),a=i[0],s=i[1],p=function(){var t=Object(o.useContext)(Rt),n=Object(o.useState)({name:"",data:{}}),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useRef)({});return Object(o.useEffect)((function(){if(t){var cb=a.current[c.name];cb&&cb(t,c.data)}}),[c]),{onNextStateTrigger:function(t){i(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),u=p.onNextStateTrigger,d=p.addNextStateAction;d("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get;e===n.folder&&(console.log("0046 refreshFolderList ".concat(e)),t.ui.browser.goTo(e),u({name:"checkIfNoWindows"}))})),d("checkIfNoWindows",(function(t){0===n.grid.content.length&&(console.log('0046 tab "'.concat(n.name,'" has no window, close it')),t.tabs.close(n.id))}));var f=Object(h.cloneDeep)(a);return f.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(y.trashNote),(function(){e.file.delete(t,(function(n){var o=e.ui.windows.getIdsFromFile(t.path);e.ui.windows.close(o),console.log("".concat("[FILE DELETE] 0046"," SUCCESS DELETING FILE, => remove all windows having the same file ").concat(t.path),o),u({name:"refreshFolderList",data:t})}))}))},f.file.onTitleUpdate=function(t,n){var o="[RENAME TITLE] 0046";e&&e.file.move(t,n,(function(c){console.log("".concat(o," SUCCESS IN RENAMING"));var i=null;if(Object(h.each)(c,(function(t){t.path===n&&(i=t)})),i){i=i,console.log("".concat(o," get new file from backend"));var a=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(a,i),u({name:"refreshFolderList",data:i})}}))},f.upload.reinit=function(){var t=Object(h.cloneDeep)(a);delete t.upload.file,s(t)},Object(o.useEffect)((function(){var t=function(t){var o,c=null===(o=function(t){var n=void 0;return Object(h.each)(t.grid.content,(function(t){t.active&&(n=t)})),n||(n=t.grid.content[0]),n}(n))||void 0===o?void 0:o.file;c&&(console.log("003441 dragdrop OR clipboard",t,c.name),e&&e.upload.uploadFile({file:t,folderPath:c.folder,onSuccess:function(t){var n=Object(h.cloneDeep)(a);n.upload.uploadCounter=n.upload.uploadCounter+1,n.upload.file=t,delete n.upload.progress,s(n)},onProgress:function(t){var n=Object(h.cloneDeep)(a);delete n.upload.file,n.upload.progress=t,s(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(h.debounce)((function(){t.onDragEnd()}),100);return Wt.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")}}),c=function(t){var n=function(n){me(n,(function(n){n&&t.onImagePasted(n)}))};return window.addEventListener("paste",n,!1),function(){window.removeEventListener("paste",n,!1)}}({onImagePasted:t});return function(){c(),o()}}),[t.tab]),Object(l.c)(Oe,null,Object(l.c)("div",{className:"window-grid-wrapper"},Object(l.c)(we.Provider,{value:f},Object(l.c)(se,{refresh:n.refresh||0,grid:n.grid,onGridUpdate:t.onGridUpdate}))))},Oe=Object(pn.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"}),je=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=(e[1],Object(o.useState)("")),p=Object(r.a)(a,2),d=p[0],f=p[1],g=Object(o.useRef)(null),h=Object(o.useContext)(Rt),m=!0;!1===t.canEdit&&(m=!1),h&&!1===h.status.isConnected&&(m=!1);var v=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],i=e[1];Object(o.useEffect)((function(){return i(!1),t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(a(),t.onEditorWillUnmount())}}),[t.file.path]),Object(o.useEffect)((function(){a()}),[t.file.path]),Object(o.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var a=function(){""!==sn&&t.onNoteLeaving&&t.onNoteLeaving(c,sn),sn=t.file.path};return{triggerNoteEdition:function(n){if(!t.canEdit)return console.warn("[EVENTS EDITOR] => onEdition CANNOT EDIT AS OFFLINE");c?t.onNoteEdition&&t.onNoteEdition(n,!1):t.onNoteEdition&&t.onNoteEdition(n,!0),i(!0)}}}({file:t.file,fileContent:t.fileContent,canEdit:m,onEditorDidMount:function(){},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){Ut&&f(t.fileContent)},onNoteEdition:function(n,e){f(n),t.onFileEdited(t.file.path,n),e&&h&&h.history.save(t.file.path,t.fileContent,"enter")},onNoteLeaving:function(n,e){s("desktop")&&Ht&&Ht.setSelection({endColumn:0,endLineNumber:0,startColumn:0,startLineNumber:0}),F((function(n){t.onFileEdited(e,n)}))}}).triggerNoteEdition,w=Object(o.useRef)(null),x=ln(d,{mobileTextarea:w,onMobileNoteEdition:v}),O=x.onTextareaChange,j=x.onTextareaScroll,k=rn({editorType:u(),editorRef:"desktop"!==u()?w:g}).applyTextModifAction,C=function(t,n){var e=k("insertAt",{textToInsert:t,insertPosition:n});e&&v(e)},T=wn({fileContent:d,onTextEncrypted:v,onTextDecrypted:v}),S=T.APasswordPopup,E=T.askForPassword,N=T.decryptButtonConfig,I=T.encryptButtonConfig,F=T.ifEncryptOnLeave,A=(T.noHistoryBackupWhenDecrypted,Object(o.useContext)(we)),D=Object(o.useState)(-1),R=Object(r.a)(D,2),L=R[0],P=R[1];Object(o.useEffect)((function(){if(A.upload.progress&&t.isActive&&P(A.upload.progress),A.upload.file&&t.isActive){var n=Object(b.a)({},A.upload.file),e=n.name,o=n.path;A.upload.reinit(),C("\n![".concat(e,"](").concat(o,")\n"),"currentPos")}}),[A.upload]);var z="[link|".concat(t.file.realname," ").concat(t.file.folder,"]\n"),M=[{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(l.c)(Dn,{file:t.file,onProgress:function(t){return P(t)},onSuccess:function(t){C("\n![".concat(t.name,"](").concat(t.path,")\n"),"currentPos")}})},vn(d)?N:I,{title:"Print/download",icon:"faFileDownload",action:function(){window.print()}},{title:y.editorBar.explanation.history,icon:"faHistory",action:function(){H(!_)}},{title:y.editorBar.tts,icon:"faCommentDots",action:function(){q(!Y)}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){A.file.onFileDelete(t.file)}}],B=Object(o.useState)(!1),U=Object(r.a)(B,2),_=U[0],H=U[1],W=Object(o.useState)(!1),V=Object(r.a)(W,2),Y=V[0],q=V[1],G=Object(o.useRef)(null),J=G.current,K=700;J&&(K=J.clientHeight/1.3),"mobile"===u()&&(K=window.innerHeight);var $=Object(o.useRef)(null);return Object(l.c)("div",{className:"editor-area",ref:G},Object(l.c)("div",{className:"infos-editor-wrapper"},Object(l.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(l.c)(cn,{title:t.file.name.replace(".md",""),onEdited:function(n,e){var o="".concat(t.file.folder).concat(n,".md"),c="".concat(t.file.folder).concat(e,".md");A.file.onTitleUpdate(o,c)}}),Object(l.c)("div",{className:"toolbar-and-dates-wrapper"},Object(l.c)("div",{className:"editor-toolbar-dropdown"},Object(l.c)(An,{hover:!0,dir:"right",maxHeight:K},Object(l.c)(c.a.Fragment,null,Object(l.c)("div",{className:"view-toggler-wrapper"},"mobile"!==u()&&Object(l.c)(En,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){t.onViewToggle("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){t.onViewToggle("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){t.onViewToggle("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){t.onViewToggle("preview")}}]})),Object(l.c)("div",{className:"toolbar-wrapper"},Object(l.c)(En,{class:"editor-main-toolbar",design:"vertical",size:.8,buttons:M})),Object(l.c)("div",{className:"separation-bar"}),Object(l.c)("div",{className:"dates-wrapper"},Object(l.c)("div",{className:"date modified"},Object(l.c)("h4",null,"Modified"),xn(new Date(t.file.modified||0))),Object(l.c)("div",{className:"date created"},Object(l.c)("h4",null,"Created"),xn(new Date(t.file.created||0)))),Object(l.c)("div",{className:"path-wrapper"},Object(l.c)("div",{className:"path"},Object(l.c)("h4",null,"Path"),Object(l.c)("span",{className:"path-link",onClick:function(){null===h||void 0===h||h.ui.browser.goTo(t.file.folder,t.file.name),console.log(t.file.folder,t.file.name)}}," ",t.file.folder," "))),Object(l.c)("div",{className:"note-id-wrapper"},Object(l.c)("h4",null,"Node Id"),Object(l.c)("div",{className:"note-id-form"},Object(l.c)("input",{type:"text",ref:$,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:z,readOnly:!0}),Object(l.c)(En,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=$.current;t&&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)}))}(t)}}]})))))))),Object(l.c)(Ln,{progress:L}),Object(l.c)("div",{className:"main-editor-wrapper"},"desktop"===u()&&Object(l.c)(Zt,{value:d,jumpToLine:t.jumpToLine,vimMode:i,readOnly:!m,ref:g,onChange:v,onScroll:t.onScroll,onUpdateY:t.onUpdateY,posY:t.posY,onMaxYUpdate:t.onMaxYUpdate}),"desktop"!==u()&&Object(l.c)("textarea",{className:"textarea-editor",ref:w,readOnly:!m,value:d,onScroll:function(n){t.onScroll(n),j(n)},onChange:O})),"desktop"!==u()&&Object(l.c)(Fn,{onButtonClicked:function(t){var n=k(t);n&&v(n)}}),E&&S,_&&Object(l.c)(On,{file:t.file,onClose:function(){H(!1)}}),Y&&Object(l.c)(Tn,{fileContent:d,onClose:function(){q(!1)}}))},ke=function(){return"\n.file-path-wrapper {\n padding-top: ".concat(s("desktop")?V.sizes.block:V.sizes.block/2,"px;\n font-size: 13px;\n font-weight: 700;\n color: #b6b5b5;\n cursor: pointer;\n text-transform: capitalize;\n}\n.big-title {\n color: ").concat(V.colors.main,";\n font-size: 30px;\n font-weight: 800;\n width: 100%;\n text-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 color: grey;\n\t\t\ttext-align: left;\n }\n\t\t.created {\n\t\t\ttext-align: right;\n\t\t\tposition: absolute;\n\t\t\ttop: 0px;\n\t\t\tright: 0px;\n\t\t\tcolor: ").concat(V.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(V.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\tborder: none;\n\t\t\t\t\tpadding: 5px;\n\t\t\t\t\tbackground: #ebebeb;\n\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\tfont-size: 9px;\n\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")},ye={};window.tiroCli=ye;var Ce=function(t,n){var e,i,a=w("showRenderId",!1),s=Object(r.a)(a,2),p=s[0],u=s[1];e="toggleRenderId",(i={description:"toggle display of renderId for each block",func:function(){console.log("[toggleRenderId]"),u(!p),setTimeout((function(){window.location.reload()}),1e3)}}).f=i.func,ye[e]=i;var d=Object(h.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(l.c)(c.a.Fragment,null,p&&Object(l.c)("p",{style:{position:"absolute",fontSize:"10px",color:"rgba(255,0,0,0.8)"}},d),t));(new Date).getTime();return o}),n)},Te=function(){return"Tiro (".concat(Wt.version,")")},Se=function(t){return Object(l.c)("button",{className:"new-file-button",onClick:function(n){t.onNewFile()}},Object(l.c)(on,{name:"faPlusCircle",color:"white"}),Object(l.c)("span",null,y.newNote))},Ee=e(387),Ne=e(386),Ie=function(t){Object(S.a)(e,t);var n=Object(E.a)(e);function e(t){var o;return Object(C.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=c.a.createRef(),o.scrollerListRef=c.a.createRef(),o.canAutoScroll=!1,o.getVisibleItemsDebounced=Object(h.debounce)((function(){var t=o.scrollerWrapperRef.current;if(t){for(var n=t.getBoundingClientRect().height,e=-1,c=[],i=0;i<o.liRefs.length;i++){var a=o.liRefs[i].current;if(a){var r,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=i),o.props.files[i]&&c.push(null===(r=o.props.files[i])||void 0===r?void 0:r.path)}}o.props.onVisibleItemsChange(c)}}),500),o.onListScroll=function(){o.canAutoScroll=!1,o.getVisibleItemsDebounced()},o.isMultiSelected=function(t){return o.state.selectionEdges[0]<=t&&o.state.selectionEdges[1]>=t},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),console.log("scroll to item: ",o.itemToScroll),o.scrollerListRef.current.scrollToItem(o.itemToScroll)},o.getUrlLoginToken=function(){return"?token=".concat(Q())},o.state={hoverMode:!1,selectionEdges:[-1,-1]},o}return Object(T.a)(e,[{key:"shouldComponentUpdate",value:function(t,n){if(JSON.stringify(t.files)!==JSON.stringify(this.oldFiles)){this.oldFiles=Object(h.cloneDeep)(t.files),this.liRefs=[];for(var e=0;e<t.files.length;e++)this.liRefs.push(c.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=X[this.props.sortMode],e=V.sizes.l2.fileLi.height+2*V.sizes.l2.fileLi.padding+V.sizes.l2.fileLi.margin,o=window.innerHeight-(V.sizes.search.h+V.sizes.search.padding),i=s("desktop")?o:o-V.sizes.mobile.bottomBarHeight;return Object(l.c)(c.a.Fragment,null,Object(l.c)("div",{className:"list-wrapper-scroller",style:{height:i},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(l.c)(Ne.a,null,(function(o){o.height;var a=o.width;return Object(l.c)(Ee.a,{itemData:t.props.files,className:"List",ref:t.scrollerListRef,height:i,itemCount:t.props.files.length,itemSize:e,width:a,onScroll:t.onListScroll},(function(e){var o=e.index,i=e.style,r=t.props.files[o],s=t.props.filesPreview[r.path];return Object(l.c)("div",{style:i},Object(l.c)("li",{ref:t.liRefs[o],style:{width:a-2*De.l2.fileLi.padding-2*De.l2.fileLi.margin-35},className:["file-element-list","element-".concat(o),"".concat(t.isMultiSelected(o)?"multiselected":""),"".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):[r],t.props.onFileDragStart(n)},onDragEnd:function(){t.props.onFileDragEnd()},onClick:function(n){t.props.onFileClicked(o),t.setState({selectionEdges:[-1,-1]})}},Object(l.c)("div",{className:"background-item"}),Object(l.c)("div",{className:"background-item-border"}),Object(l.c)("div",{className:"left"},Object(l.c)("h3",{className:"label",onMouseEnter:function(n){t.props.hoverMode&&t.props.onFileClicked(o)}},r.name),Object(l.c)("div",{className:"content"},s&&s.content&&Object(l.c)(c.a.Fragment,null,s.content)),Object(l.c)("div",{className:"date ".concat(n)},xn(new Date(("modified"===n?r.modified:r.created)||0)))),Object(l.c)("div",{className:"right"},s&&s.picture&&Object(l.c)("div",{className:"picture",style:{backgroundColor:"white",backgroundImage:"url('".concat(s.picture.startsWith("http")?s.picture+t.getUrlLoginToken():"".concat(kt(t.props.files[0].folder),"/").concat(s.picture).concat(t.getUrlLoginToken()),"')")}}))))}))}))))}}]),e}(c.a.Component),Fe=Object(b.a)({},V),Ae=(Fe.els,Fe.colors),De=(Fe.font,Fe.sizes),Re=function(t){var n=Object(o.useContext)(Rt),e=n?n.ui.browser.folders:null;return Object(l.c)("div",{className:"folder-tree-view-component"},Object(l.c)("h3",{className:"subtitle"},y.folders),Object(l.c)(Le,{folder:t.folder,current:t.current,onFolderClicked:t.onFolderClicked,onFolderMenuAction:t.onFolderMenuAction,onFolderOpen:function(n){e&&e.open.add(n),t.onFolderOpen(n)},onFolderClose:function(n){e&&e.open.remove(n),t.onFolderClose(n)},onFolderDragStart:t.onFolderDragStart,onFolderDragEnd:t.onFolderDragEnd,onFolderDrop:t.onFolderDrop}))},Le=function t(n){var e=Object(o.useContext)(Rt),c=w("treeview-".concat("/"===n.folder.key||""===n.folder.key?"root":n.folder.key),!1),i=Object(r.a)(c,2),a=i[0],s=i[1],p=Object(o.useState)(!1),u=Object(r.a)(p,2),d=u[0],f=u[1],b=K(n.current,n.folder.key);return Object(l.c)("li",{className:"folder-wrapper ".concat(b?"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(){d&&f(!1)}},Object(l.c)("div",{className:"folder-title"},Object(l.c)("span",{className:"icon",onClick:function(t){a?n.onFolderClose(n.folder.key):n.onFolderOpen(n.folder.key),s(!a)}},n.folder.hasChildren&&Object(l.c)(on,{name:a?"faCaretDown":"faCaretRight",color:V.colors.main})),Object(l.c)("span",{className:"title",onClick:function(t){n.onFolderClicked(n.folder.key)}},n.folder.title),Object(l.c)("span",{onClick:function(){f(!d)},className:"context-menu-wrapper"},Object(l.c)(on,{name:"faEllipsisH",color:V.colors.l1.font}),d&&Object(l.c)("div",{className:"context-menu"},Object(l.c)("ul",null,Object(l.c)("li",{onClick:function(){if(""===n.folder.path)return f(!1);var t=prompt("".concat(y.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),f(!1)}},y.renameFolder),Object(l.c)("li",{onClick:function(){if(""===n.folder.path)return f(!1);e&&e.popup.prompt({text:"".concat(y.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}}),f(!1)}},y.createFolder),-1===n.folder.path.indexOf(".tiro/.trash")&&Object(l.c)("li",{onClick:function(){if(e){if(""===n.folder.path)return f(!1);f(!1),e.popup.confirm("".concat(y.moveToTrash,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("moveToTrash",n.folder)}))}}},y.moveToTrash),-1!==n.folder.path.indexOf(".tiro/.trash")&&Object(l.c)("li",{onClick:function(){if(e){if(""===n.folder.path)return f(!1);f(!1),e.popup.confirm("".concat(y.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}}},y.deleteFolder))))),a&&Object(l.c)("ul",{className:"folder-children"},n.folder.children&&n.folder.children.map((function(e,o){return Object(l.c)(t,{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})}))))},Pe=function(t){var n=Object(b.a)({},t).files;return Object(l.c)(c.a.Fragment,null,n.length>0&&Object(l.c)("div",{className:"last-notes-component"},Object(l.c)("h3",{className:"subtitle"},y.lastNotes),Object(l.c)("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(l.c)("li",{key:e,title:o,onClick:function(e){t.onClick(n)},className:"note"},Object(l.c)(on,{name:"faFile"}),o)})))))},ze=function(t){var n=Object(o.useContext)(Rt),e=!!n&&n.status.searching.get;return Object(l.c)(c.a.Fragment,null,Object(l.c)("div",{className:"search-bar-component"},Object(l.c)("input",{type:"text",placeholder:y.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 c=n.ui.browser.folders.current.get;""===t.term&&""!==c&&(e=e+" "+c,o&&setTimeout((function(){var t=(o.selectionStart||0)-c.length-1;o.selectionStart=t,o.selectionEnd=t}),10)),n.ui.search.term.set(e)}}(e.target.value,e.target)}}),Object(l.c)("div",{className:"search-status"},e&&y.searchingLabel)))},Me=function(t){var n={title:t.realname,folder:t.folder,mobileview:"editor"},e="".concat(Wt.global.protocol).concat(Wt.global.url).concat(Wt.global.port,"?").concat(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}(n));window.open(e,"popupDetached","width=600,height=600")},Be=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),c=e[0],i=e[1];Object(o.useEffect)((function(){i(t.startingIndex)}),[t.startingIndex]);var a=function(n){var e=c;e=-1===n&&0===c?t.images.length-1:1===n&&c===t.images.length-1?0:c+n,i(e)};return Object(l.c)("div",{className:"lightbox-component"},Object(l.c)("div",{className:"lightbox-bg"}),Object(l.c)("div",{className:"lightbox-content"},t.images.map((function(n,e){return Object(l.c)("div",{key:e,className:"lightbox-image",style:{display:e===c?"flex":"none"}},Object(l.c)("img",{src:kt(n.url)+yt()}),Object(l.c)("div",{className:"image-infos"},Object(l.c)("div",{className:"image-name",onClick:function(t){return Me(n.file)}},n.file.name," - ",n.title),Object(l.c)(En,{popup:!1,buttons:[{class:"left",title:"left",icon:"faChevronLeft",action:function(){a(-1)}},{class:"close",title:"close",icon:"faTimes",action:function(){t.onClose()}},{class:"right",title:"right",icon:"faChevronRight",action:function(){a(1)}}]})))}))))},Ue={onAccept:function(){},onRefuse:function(){}},_e=function(t){var n=Object(o.useContext)(Rt),e=Object(o.useState)(-1),c=Object(r.a)(e,2),i=c[0],a=c[1];return Object(l.c)("div",{className:"tab-list-scroll-wrapper"},Object(l.c)("div",{className:"tab-list-invisible-scroll"},Object(l.c)("div",{className:"tab-list-wrapper"},t.tabs.map((function(e,o){return Object(l.c)(He,{key:o,tab:e,onDrop:function(t){a(t)},onDragEnter:function(t){a(t)},onDragEnd:function(t){n&&n.tabs.reorder(t,i),a(-1)},showDragIndic:i===o,pos:o,onUpdate:t.onUpdate})})),(null===n||void 0===n?void 0:n.ui.browser.files.active.get)&&Object(l.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onUpdate("add")}},"+"))))},He=function(t){var n=Object(b.a)({},t),e=n.tab,o=n.pos,i="Six",a=e.grid.layout.length;return 2===a&&(i="Two"),3===a&&(i="Three"),4===a&&(i="Four"),5===a&&(i="Five"),i="faDice".concat(i),Object(l.c)("div",{className:"tab-and-drag-wrapper"},t.showDragIndic&&Object(l.c)("div",{className:"drag-indic"},"\u25bc"),Object(l.c)("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(l.c)("div",{className:"active-ribbon"}),Object(l.c)("div",{className:"tab-name",onClick:function(){t.onUpdate("activate",e)}},"mobile"!==u()&&Object(l.c)("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"===u()&&Object(l.c)(c.a.Fragment,null,e.name)),e.grid.layout.length>1&&Object(l.c)("div",{className:"tab-nb-windows",onClick:function(){t.onUpdate("activate",e)}},Object(l.c)(on,{name:i,color:"#b2b2b2"})),Object(l.c)("div",{className:"tab-close",onClick:function(){return t.onUpdate("close",e)}},Object(l.c)(on,{name:"faPlus",color:"#b2b2b2"}))))},We=(u(),Object(b.a)({},V)),Ve=We.els,Ye=We.colors,qe=(We.font,We.sizes),Ge=function(t,n){var e,o="//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"===u()?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"===u()?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("\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\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\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\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\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: 2;\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 img {\n max-width: 95vw;\n max-height: 95vh;\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\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(In,"\n\n\t\t.main-wrapper {\n\t\t\t\tdisplay: flex;\n\n\t\t\t\t").concat("\n .image-gallery-component-wrapper {\n margin: 0px 17px;\n overflow-y: scroll;\n // height: calc(100vh - ".concat(V.sizes.search.padding+V.sizes.gallery.topH+("desktop"===u()?0:190),"px);\n height: calc(100vh - ").concat(V.sizes.search.padding+V.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"===u()?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(V.els().imageInfos,"\n }\n img {\n ").concat(V.els().images,"\n }\n margin-bottom: 10px;\n }\n }\n }\n }\n"),"\n\n\t\t\t\t").concat("\n\t\t.dropdown-wrapper {\n\t\t\t\t\n\t\t\t\tposition: relative;\n\t\t\t\t&.hover-active:hover {\n\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\tdisplay: block\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\tcolor: ".concat(V.colors.main,";\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.dropdown-icon {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\ttop: -10px;\n\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\tcolor: #d4d1d1;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.context-menu {\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\ttop: 20px;\n\n\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\tmin-width: 140px;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t}\t\n\n\t\t\t\t&.right {\n\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n"),"\n\n\t\t\t\t").concat("\n.search-bar-component {\n input {\n\t\t\t\tborder-radius: 5px;\n width: calc(100% - ".concat(2*V.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(V.sizes.block,"px ").concat(V.sizes.block,"px ").concat(V.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\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(V.colors.main,";\n li {\n flex: 1 1 auto;\n button {\n ").concat(V.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 40px;\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\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(V.colors.main,";\n }\n .connected {\n display:none;\n position: absolute;\n bottom: 5px;\n right: 5px;\n color: ").concat(V.colors.green,";\n }\n}\n"),"\n\n\t\t\t\t").concat("\n .setup-popup-component {\n .submit-button {\n margin-top: 10px;\n ".concat(V.els().redButton,";\n padding: 10px 20px;\n }\n .error {\n color: ").concat(V.colors.main,";\n }\n .success {\n color: ").concat(V.colors.green,";\n }\n }\n"),"\n\n\t\t\t\t").concat("\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","\n\n\t\t\t\t").concat("\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&.hide iframe {\n\t\t\t\topacity: 0;\n\t\t}\n\t\tiframe {\n\t\t\t\ttransition: 0.3s all;\n\t\t\t\twidth: calc(100% - 6px);\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\n","\n\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\t\t\t\t").concat("\n.popup-wrapper-component {\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(V.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(V.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"),"\n\n\n\t\t\t\t").concat("\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\nsettings-popup-wrapper\n.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\t\th3 {\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(V.colors.bgPopup2,";\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tborder: 1px ").concat(V.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"),"\n\n\t\t\t\t").concat("\n.last-notes-component {\n padding: 0px ".concat(V.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(V.colors.main,";\n margin-right: 10px;\n }\n }\n }\n}\n"),"\n\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: -18px;\n\t\t\t\t\t\t\t\t.context-menu {\n right: 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(V.sizes.block,"px;\n\t\tpadding-right: 0px;\n\t\tmargin: 0px 0px 100px 0px;\n\t\twidth: calc(100% - ").concat(V.sizes.block*(s("desktop")&&!p()?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: 20px;\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: 10;\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(V.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(V.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\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}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\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(V.els().redButton,"\n ").concat(V.font.main,";\n padding: ").concat(s("desktop")?"14px 5px":"13px 7px",";\n margin: 13px 15px 15px 15px;\n\t\t\t\twidth: calc(100% - 30px); \n font-size: ").concat((s("desktop"),11),"px;\n svg {\n margin-right: ").concat(s("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\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: 0s;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tleft: -").concat(qe.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: 100vh;\n\t\t\t\t}\n\n\t\t\t\t.left-wrapper {\n\t\t\t\t\t\tbackground: ").concat(Ye.l2.bg,"; \n\t\t\t\t\t\twidth: ").concat("desktop"===u()?qe.desktop.l:"navigator"!==t?0:100,"vw;\n\n\t\t\t\t\t\tdisplay: ").concat("desktop"===u()?"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(V.assets.decoBgMap,"');\n\t\t\t\t\t\t\t\tbackground-color: ").concat(V.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(V.colors.fontInterface2,";\n\t\t\t\t\t\t\t\twidth: ").concat(qe.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(Ye.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(qe.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(V.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(qe.search.padding,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(qe.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(qe.block,"px ").concat(qe.block,"px ").concat(qe.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(Ye.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(Ye.l2.text,";\n\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Ye.l2.text,";\n\t\t\t\t\t\t\t\t\t\t").concat(Ve().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(qe.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(De.l2.fileLi.padding,"px ").concat(De.block-De.l2.fileLi.margin,"px;\n margin: ").concat(De.l2.fileLi.margin,"px ").concat(De.l2.fileLi.margin+5,"px ").concat(De.l2.fileLi.margin,"px ").concat(De.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(De.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(V.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(V.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(De.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\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\tcolor: ").concat(Ae.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\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-all;\n\t\t\t\t\t\t\t\t\t\t").concat(s("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(Ae.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(De.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(De.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(Ye.l2.bg,"; \n\t\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(qe.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(qe.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(V.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(V.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(V.colors.bgTab,";\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tcolor: ").concat(V.colors.fontTab,";\n\t\t\t\t\t\t\t\tfont-family: ").concat(V.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(V.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(V.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(V.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(V.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(V.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(V.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("\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: 2px;\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\tcursor: se-resize;\n\t\t\t\t\t\topacity: 0.2;\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(V.colors.fontEditor,";\n\t\t\t\t\t\t\t\tbackground: ").concat(V.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(V.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(V.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.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(V.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\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 43px;\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\tpadding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(V.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\tpadding: 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: 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.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"),"\n\t\t\t\t").concat("\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\t.infos-editor-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\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(V.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% - 266px);\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% - 95px);\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\tpadding: 10px 20px 20px 20px;\n\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\tfont-size: 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-bottom: 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\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"),"\n\n\t\t\t\t").concat("\n .mobile-text-manip-toolbar {\n position: fixed;\n bottom: ".concat(V.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(V.sizes.mobile.editorBar,"px;\n background: ").concat(V.colors.editor.mobileToolbar.bg,";\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n }\n"),"\n\t\t\t\t").concat("\n.view-editor .scrolling-bar-wrapper {\n}\n\n.scrolling-bar-wrapper {\n\t\tposition: absolute;\n\t\ttop: 33px;\n\t\theight: calc(100% - 53px);\n\t\topacity: 0.3;\n\t\tbackground: rgb(195,195,195);\n\t\twidth: 10px;\n\t\tright: 0px;\n\t\tposition: absolute;\n\t\tz-index: 101;\n\n\t\t.scrolling-bar {\n\t\t\t\tcursor: ns-resize;\n\t\t\t\tbackground: grey;\n\t\t\t\theight: 20px;\n\n\t\t}\n}\n","\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"===u()?qe.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\tdisplay: ").concat("desktop"===u()||"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\tdisplay: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\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\ttransform: scale(0.8);\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 {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 56%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 20px;\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\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% - 20px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 500vh;\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\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\tposition: absolute;\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\tdisplay:none;\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"===u()?"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((e=t,"//css\n.editor-area {\n width: ".concat(s("desktop")?"50%":"editor"===e?"100vw":"0vw",";\n display: ").concat(s("desktop")||"editor"===e?"block":"none",";\n position: relative;\n\n .infos-editor-wrapper {\n ").concat(s("desktop")?"":"height: ".concat(V.sizes.mobile.editorTopWrapper,"px;"),"\n ").concat(s("desktop")?"width: calc(200% - ".concat(3*V.sizes.block*2,"px);"):"","\n padding: 0px ").concat(s("desktop")?3*V.sizes.block:2*V.sizes.block,"px;\n position: relative;\n\n\t\t").concat(ke(),"\n\n .title-input-wrapper {\n position:relative;\n margin-top: ").concat(s("desktop")?6:0,"px;\n .press-to-save {\n position: absolute;\n top: 39px;\n font-size: 8px;\n color: ").concat(V.colors.main,";\n right: 0px;\n }\n input {\n padding: 0px;\n border: none;\n background: none;\n }\n }\n\n \n\n .toolbar-and-dates-wrapper {\n display: flex;\n }\n\n .dates-wrapper {\n display: ").concat(s("desktop")?"block":"none",";\n .date {\n }\n }\n \n\t\t").concat(Rn,"\n }\n }\n\n\n\n\n .main-editor-wrapper {\n // 10 = monaco browser gutter\n // padding: 0px ").concat(s("desktop")?3*V.sizes.block-10:2*V.sizes.block,"px;\n ").concat(s("desktop")?"padding: 0px ".concat(3*V.sizes.block/2,"px 0px ").concat(3*V.sizes.block-10,"px;"):"","\n ").concat(s("desktop")?"":"padding: 0px ".concat(2*V.sizes.block,"px 0px ").concat(2*V.sizes.block,"px;"),"\n ").concat(s("desktop")?"":"margin: 0px 0px ".concat(V.sizes.mobile.bottomBarHeight,"px 0px;"),"\n .monaco-editor {\n margin: 0px;\n }\n .textarea-editor {\n border: none;\n width: 100%;\n height: calc(100vh - ").concat(V.sizes.mobile.editorTopWrapper+V.sizes.mobile.editorBar+2*V.sizes.mobile.bottomBarHeight,"px);\n margin: 0px;\n padding: 0px;\n background: rgba(255,255,255,0.7);\n }\n }\n}\n")),"\n\n\t\t\t\t\t\t\t\t\t\t").concat('\n [class^="mtk"]:not(.mtk1) {\n // color: '.concat(V.colors.main,";\n font-weight: 800;\n }\n .mtk6 {color: ").concat(V.colors.main,";}\n .mtk21 {color: ").concat(V.colors.main,";}\n\n .mtk10 {color: ").concat(V.colors.compl[1],";} // () =>\n .mtk8 {color: ").concat(V.colors.compl[0],";} // comments\n .mtk7 {color: ").concat(V.colors.compl[0],";} // = 0o775\n .mtk23 {color: ").concat(V.colors.compl[0],";} // Promise\n\n // .mtk10 {color: ").concat(V.colors.dev[1],";} // () =>\n // .mtk8 {color: ").concat(V.colors.dev[2],";} // comments\n // .mtk7 {color: ").concat(V.colors.dev[2],";} // = 0o775\n // .mtk23 {color: ").concat(V.colors.dev[2],";} // Promise\n\n .mtk1 {}\n .mtk1 {}\n .mtk1 {}\n .mtk1 {}\n .mtk1 {}\n .mtk1 {}\n // .mtk6 {\n // color: ").concat(V.colors.main,";\n // }\n .monaco-editor .scroll-decoration {\n box-shadow: none;\n }\n\n\n\t\t.view-overlays .current-line {\n\t\t\t\tdisplay:none;\n\t\t}\n"),"\n\t\t\t\t\t\t\t\t\t\t").concat("\n.monaco-editor-wrapper {\n height: 100%;\n .scroll-wrapper {\n width: 100%;\n height: 100%;\n }\n .vim-status-bar {\n &.active {\n display: block\n }\n display: none;\n position: fixed;\n bottom: 0px;\n height: 18px;\n padding: 5px 5px 7px 5px;\n width: 80%;\n z-index: 1;\n background: rgba(255,255,255,0.9);\n input {\n background: #eeeeee;\n border: none;\n margin: 0px 5px;\n }\n }\n }\n","\n\n\t\t\t\t\t\t\t\t\t\t").concat("\n.preview-area-wrapper {\n overflow: ".concat(p()||s("mobile")?"scroll":"hidden",";\n height: ").concat((s("desktop"),"100vh"),";\n margin-top: ").concat(s("desktop")?"140":"0","px;\n}\n.preview-area {\n position: relative;\n display: block;\n\n ").concat(ke,"\n\n\t\t").concat(te(),"\n\n\n\n .infos-preview-wrapper {\n display: ").concat(s("desktop")?"none":"block",";\n }\n\n}\n"),"\n\n\t\t\t\t\t\t\t\t\t\t").concat(Rn(),"\n\t\t\t\t\t\t\t\t\t\t").concat("\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",'\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(Kt.a)(o,";","")},Je=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},Ke=function(t,n,e,o,c){var i=function(t,n){console.log("[MOVEFILE] ".concat(t," -> ").concat(n)),_t.emit("moveFile",{initPath:t,endPath:n,idReq:"-",token:Q()})};return{askForMoveFile:i,promptAndBatchMoveFiles:function(n,e){c.confirm&&c.confirm("move ".concat(null===n||void 0===n?void 0:n.length,' files to "').concat(e.key,'"? (example: "').concat(n[0].path,'" to "').concat(e.key,"/").concat(n[0].name,'"'),(function(){for(var o=0;o<n.length;o++){var c=n[o],a="".concat(c.path),r="".concat(e.key,"/").concat(c.name);i(a,r),t()}}))},promptAndMoveFolder:function(i){var a=Object(b.a)({},i),r=a.folder,l=a.folderToDropInto,s=a.folderBasePath,p=a.newTitle,u=a.renameOnly,d=[r.path,"".concat(u?Je(l):l.path,"/").concat(p||r.title)],f="".concat(s,"/").concat(d[0]),g="".concat(s,"/").concat(d[1]);c.confirm&&c.confirm("".concat(y.moveFolderPrompt," ").concat(f," to ").concat(g,"?"),(function(){!function(t,n){console.log("[MOVEFOLDER] ".concat(t," -> ").concat(n)),_t.emit("moveFolder",{initPath:t,endPath:n,token:Q()})}(f,g),t(),n(),e(),function(t){var n="".concat(Wt.global.protocol).concat(Wt.global.url).concat(Wt.global.port,"/?");Object(h.isNumber)(t.file)&&-1!==t.file&&(n+="file=".concat(t.file,"&")),t.title&&(n+="title=".concat(t.title,"&")),t.folder&&""!==t.folder&&!t.search&&(n+="folder=".concat(t.folder,"&")),t.folder||t.search||(n+="folder=/&"),t.search&&""!==t.search&&(n+="search=".concat(t.search,"&")),t.appview&&(n+="appview=".concat(t.appview,"&")),window.history.pushState({},document.title,n),console.log("[URL] UPDATEURL : NEW URL PUSHED => to ".concat(JSON.stringify({newUrl:n,urlParams:t})))}({}),o([Je(r),l.path]),setTimeout((function(){o([Je(r),l.path])}),1e3)}))}}},$e={ctrl:!1,shift:!1,alt:!1,opt:!1},Xe={38:"up",40:"down",17:"ctrl",16:"shift",18:"alt",93:"opt",13:"enter"},Ze=function(t){return t=t||window.event,Xe[t.keyCode]?Xe[t.keyCode]:t.key},Qe={},to={ui_sidebar:!0,ui_filesList_sortMode:2},no="[USER SETTINGS] 0011 :",eo=function(){var t=Bt("user-settings",{}),n=Object(r.a)(t,3),e=n[0],c=n[1],i=n[2],a=Object(o.useState)(0),l=Object(r.a)(a,2),s=l[0],p=l[1],u=Object(o.useRef)([]);Object(o.useEffect)((function(){d()}),[e]);var d=Qt((function(){console.log(no,"UPDATE!",e,s),function(t,n,o){u.current[t]||(u.current[t]=n[o]);var c=e[t];Object(h.isNull)(c)||Object(h.isUndefined)(c)||(""===c&&u.current[t]&&(c=u.current[t]),n[o]=c)}("ui_layout_colors_main",V.colors,"main"),p(s+1)}),1e3);return{userSettingsApi:{set:function(t,n){console.log(no,"updateUserSettings ".concat(t," to ").concat(n));var o=Object(h.cloneDeep)(e);o[t]=n,c(o)},get:function(t){var n=to[t];return t in e&&(n=e[t]),n},list:function(){var t=[];return Object(h.each)(e,(function(n,e){var o=e;t.push({key:o,val:n})})),t},refresh:{css:{get:s}}},refreshUserSettingsFromBackend:i}},oo=function(){return{nature:"file",name:"",realname:"",path:"",folder:""}},co=function(t){var n=Object(o.useContext)(Rt),e=Object(o.useState)({}),c=Object(r.a)(e,2),i=c[0],a=c[1];Object(o.useEffect)((function(){a({})}),[t.files]);var s=Object(o.useReducer)((function(t){return t+1}),0),p=Object(r.a)(s,2)[1],u=n?n.userSettings.get("ui_filesList_sortMode"):2;return Object(l.c)("div",{className:"files-list-component"},Object(l.c)("div",{className:"list-toolbar"},Object(l.c)("button",{type:"button",title:"sort",onClick:function(){if(n){var e=u+1>=X.length?0:u+1;n.userSettings.set("ui_filesList_sortMode",e),t.onSortFiles(Z(t.files,e))}}},Object(l.c)("span",null,t.files.length>0&&Object(l.c)("span",{className:"list-count"},"(",t.files.length,")"),$[u]),Object(l.c)(on,{name:"faSort",color:V.colors.l2.text}))),Object(l.c)("div",{className:"list-wrapper"},Object(l.c)(Ie,{files:t.files,filesPreview:i,hoverMode:!1,activeFileIndex:t.activeFileIndex,sortMode:u,onFileClicked:function(n){t.onFileClicked(n)},onFileDragStart:t.onFileDragStart,onFileDragEnd:t.onFileDragEnd,onVisibleItemsChange:function(t){!function(t){if(n){for(var e=[],o=0;o<t.length;o++){var c=t[o];i[c]||e.push(c)}e.length>1&&n.files.getPreviews(e,(function(t){Object(h.each)(t,(function(t){i[t.path]=t})),a(i),p()}))}}(t)}})))};a.a.render(Object(l.c)((function(){Object(o.useEffect)((function(){return console.log("========= [APP] MOUNTED on a ".concat(u())),new Promise((function(t,n){Ut||(Ut=v(qt()),Wt.log.socket&&console.log("[SOCKET] try connecting to ".concat(qt(),"...")),(_t=Jt(Ut)).on("connectionSuccess",(function(n){Wt.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(Ut.connected),n),n.isRgGood||alert(y.rgNotWorking),t({socket:Ut,ipsServer:n.ipsServer,socketManager:_t})})))})).then((function(t){A(!0),Z&&Z.status.ipsServer.set(t.ipsServer),ot(rt)})),window.onkeydown=function(t){var n=Ze(t);Object(h.isNull)($e[n])||($e[n]=!0);var e="".concat(n,"-down");Qe[e]&&Qe[e]()},window.onkeyup=function(t){var n=Ze(t);Object(h.isNull)($e[n])||($e[n]=!1);var e="".concat(n,"-up");Qe[e]&&Qe[e]()},function(){console.log("app will unmount")}}),[]);var t=function(){nt.active.set(-1)},n=function(){X.ui.browser.files.set([])},e=(Object(h.debounce)((function(){}),100),function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],s=Object(o.useState)(""),p=Object(r.a)(s,2),u=p[0],d=p[1],f=Object(o.useState)(""),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(""),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useState)(),j=Object(r.a)(O,2),k=j[0],C=j[1],T=Object(o.useRef)(0);return Object(o.useEffect)((function(){return console.log("[SETUP CONFIG] init socket listener"),T.current=_t.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(C(["success","".concat(y.setupForm.successReload)]),setTimeout((function(){window.location.reload()}),3e3)):"ASK_SETUP"===n.code?(t.cleanAllApp(),a(!0),n.defaultFolder&&x(n.defaultFolder)):C(["error","".concat(n.code,": ").concat(n.message)])})),function(){console.log("[SETUP CONFIG] clean socket listener"),_t.off(T.current)}}),[]),{displayWelcomePopup:i,SetupPopupComponent:function(t){return Object(l.c)(c.a.Fragment,null,i&&Object(l.c)("div",{className:"setup-popup-component"},Object(l.c)(Y,{title:"Welcome to Tiro",onClose:function(){}},Object(l.c)("p",null,y.setupForm.introText)," ",Object(l.c)("br",null),Object(l.c)("div",null,Object(l.c)(q,{value:u,label:y.setupForm.user,explanation:y.setupForm.userExplanation,onChange:function(t){d(t)},shouldNotSelectOnClick:!0}),Object(l.c)(q,{value:g,label:y.setupForm.password,type:"password",explanation:y.setupForm.passwordExplanation,onChange:function(t){h(t)},shouldNotSelectOnClick:!0}),Object(l.c)(q,{value:w,label:y.setupForm.dataFolder,explanation:y.setupForm.folderExplanation,onChange:function(t){x(t)},shouldNotSelectOnClick:!0}),Object(l.c)("input",{type:"button",value:"submit",className:"submit-button",onClick:function(t){C(void 0),_t.emit("sendSetupInfos",{form:{user:u,password:g,dataFolder:w},token:Q()})}}),k&&Object(l.c)("div",{className:k[0]},k[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),pt(),it(),t(),n()}}).SetupPopupComponent),i=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],s=Object(o.useState)(""),p=Object(r.a)(s,2),u=p[0],d=p[1],f=Object(o.useState)(""),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useRef)(0);Object(o.useEffect)((function(){return O.current=_t.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;tt(n.token),a(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":a(!0),x(["error",y.loginForm.wrongToken]),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":x(["error",y.loginForm.wrongUserPassword]),a(!0)}})),function(){_t.off(O.current)}}),[]);var j=function(){x(void 0),_t.emit("sendLoginInfos",{user:u,password:g,token:Q()})},k=Object(o.useState)(1),C=Object(r.a)(k,2),T=C[0],S=C[1];return{displayLoginPopup:i,LoginPopupComponent:function(t){return Object(l.c)(c.a.Fragment,null,i&&Object(l.c)("div",{className:"setup-popup-component"},Object(l.c)(Y,{title:y.setupForm.title,onClose:function(){}},Object(l.c)("div",null,Object(l.c)(q,{shouldFocus:1===T,value:u,onEnterPressed:function(){S(2)},label:y.setupForm.user,onChange:function(t){d(t)}}),Object(l.c)(q,{shouldFocus:2===T,value:g,label:y.setupForm.password,type:"password",onEnterPressed:function(){j()},onChange:function(t){h(t)}}),Object(l.c)("button",{value:"submit",className:"submit-button",onClick:function(t){j()}},y.setupForm.submit),w&&Object(l.c)("div",{className:w[0]},w[1])))))}}}({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),t(),n()},onLoginSuccess:function(){ot(["/"]),w(),p(),ut()}}).LoginPopupComponent,a=eo(),s=a.userSettingsApi,p=a.refreshUserSettingsFromBackend,d=function(){var t="[TABS] 00542",n=Bt("tabs",[]),e=Object(r.a)(n,3),o=e[0],c=e[1],i=e[2],a=function(t){c(t)},l=function(t){var n=ge({fullWindowFile:t});if(n){var e=[].concat(Object(g.a)(o),[n]),c=be(n.id,e);a(c)}},s=function(n){console.log("".concat(t," closing tab: ").concat(n));var e=[],c=Object(h.cloneDeep)(o);Object(h.each)(c,(function(t,o){t.id!==n&&e.push(t)})),a(e)},p="[WINDOWS] 00543",u=function(t){if(!t){var n=Object(h.cloneDeep)(o),e=fe(n);if(!Object(h.isNumber)(e))return;t=n[e]}if(t.grid.layout[0]){var c,i=t.grid;return Object(h.each)(i.content,(function(t,n){t.active&&(c={layout:i.layout[n],content:i.content[n]})})),c}};return{tabs:o,updateTab:function(t,n,e){if(console.log("[TAB] UPDATE ".concat(t," ").concat(n?"on tab ".concat(n.name):"")),"add"===t)Dt().then((function(t){l(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;s(n.id)}else if("rename"===t){if(!n)return;if(e.length>15)return;var c=Object(h.cloneDeep)(o);Object(h.each)(c,(function(t){t.id===n.id&&(t.name=e,t.manualName=!0)})),a(c)}else if("activate"===t){var i;if(!n)return;var r=be(n.id,o),p=ue(r);a(p);var d=null===(i=u(n))||void 0===i?void 0:i.content.file;if(!d)return;Dt().then((function(t){t.ui.browser.goTo(d.folder,d.name)}))}},refreshTabsFromBackend:i,updateActiveTabGrid:function(t){var n=Object(h.cloneDeep)(o),e=fe(n);Object(h.isNumber)(e)&&(n[e].grid=t,console.log("[TAB LAYOUT] update tab grid n:".concat(e),t),a(n))},refreshWindowGrid:function(){var t=ue(o);a(t)},tabsApi:{get:function(){return o},close:s,openInNewTab:l,reorder:function(n,e){var c=Object(h.cloneDeep)(o);console.log("".concat(t," reordering tab ").concat(n," -> ").concat(e));var i=c[n];c.splice(n,1),c.splice(e,0,i),a(c)},active:{get:function(){var t=null;return Object(h.each)(o,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(h.cloneDeep)(o);Object(h.each)(t,(function(t){Object(h.each)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var c=n.grid.content[o],i=n.grid.layout[o];c.i===t&&n.grid.content.splice(o,1),i.i===t&&n.grid.layout.splice(o,1)}}))})),console.log("".concat(p," closing window"));var e=ue(n);a(e)},active:{get:u,setContent:function(t){if(t){var n=Object(h.cloneDeep)(o),e=fe(n);if(Object(h.isNumber)(e)){var c=n[e],i=c.grid.content;if(!(i.length<1)){var r=0;Object(h.each)(i,(function(t,n){!0===t.active&&(r=n)})),console.log(p,"4455",i[r].i,r),i[r].file=Object(h.cloneDeep)(t),c.manualName||(c.name=de(t.name));var l=ue(n);console.log("".concat(p," active content => ").concat(t.name," ").concat(l[0].refresh),t),a(l)}}}}},updateWindows:function(t,n){var e=Object(h.cloneDeep)(o);Object(h.each)(t,(function(t){Object(h.each)(e,(function(e,o){Object(h.each)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))})),console.log("".concat(p," updating windows with file ").concat(n.name));var c=ue(e);a(c)},getIdsFromFile:function(t){var n=[];return Object(h.each)(o,(function(e){Object(h.each)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),n}}}}(),f=d.tabs,m=d.updateTab,w=d.refreshTabsFromBackend,x=d.updateActiveTabGrid,O=d.refreshWindowGrid,j=d.tabsApi,k=d.windowsApi,C=j.active.get(),T=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],s=Object(o.useState)(""),p=Object(r.a)(s,2),u=p[0],d=p[1],f=Object(o.useState)(null),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(y.promptPopup.defaultTitle),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useState)(!1),j=Object(r.a)(O,2),k=j[0],C=j[1],T=function(t){a(!0),d(t.text),t.title&&x(t.title),t.userInput&&h(" "),t.onAccept&&(Ue.onAccept=t.onAccept),t.onRefuse?(Ue.onRefuse=t.onRefuse,C(!0)):C(!1)},S=function(){a(!1)};return{popupApi:{confirm:function(t,cb,n){T({title:y.promptPopup.confirmTitle,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()}))})},prompt:T},PromptPopupComponent:function(){return Object(l.c)(c.a.Fragment,null,i&&Object(l.c)("div",{className:"prompt-popup-component"},Object(l.c)(Y,{title:w,onClose:S,canBgClose:!1},Object(l.c)("div",null,Object(l.c)("div",{className:"content"},u),Object(l.c)("br",null),null!==g&&Object(l.c)("div",null,Object(l.c)("input",{type:"text",value:g,onChange:function(t){h(t.target.value)}}),Object(l.c)("br",null)),Object(l.c)("button",{value:"submit",className:"accept submit-button",onClick:function(t){Ue.onAccept(g),S()}},y.promptPopup.accept),k&&Object(l.c)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){Ue.onRefuse(g),S()}},y.promptPopup.refuse)))))}}}(),S=T.PromptPopupComponent,E=T.popupApi,N=function(){var t=Object(o.useRef)([]),n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)(!1),s=Object(r.a)(a,2),p=s[0],u=s[1],d="(DISCONNECTED)",f=Object(o.useRef)(d);kn((function(){f.current=f.current===d?"(/!\\ DISCONNECTED /!\\)":d;var t=c?"".concat(Te()," (Connected)"):"".concat(Te()," ").concat(f.current);document.title=t}),1e3),Object(o.useEffect)((function(){return t.current[0]=_t.on("disconnect",(function(){b(!1)})),t.current[1]=_t.on("reconnect",(function(){b(!0),u(!0),setTimeout((function(){u(!1)}),1e3)})),t.current[2]=_t.on("connect",(function(){b(!0),u(!0),setTimeout((function(){u(!1)}),1e3)})),function(){t.current.forEach((function(t){_t.off(t)}))}}),[]);var b=function(t){console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),i(t)};return{isConnected:c,connectionStatusComponent:function(){var t=["connected","connected"];return p&&(t=["back-online","back online"]),c||(t=["disconnected","disconnected"]),Object(l.c)("div",{className:"connection-status"},Object(l.c)("div",{className:t[0]},t[1]))},toggleSocketConnection:b}}(),I=N.isConnected,F=N.connectionStatusComponent,A=N.toggleSocketConnection;kn((function(){}),1e3);var D=oe(),R=D.forceResponsiveRender,L=D.responsiveRefreshCounter,P=D.setResponsiveRefresh,z=Object(o.useRef)([]),M=Object(o.useState)(!1),B=Object(r.a)(M,2),U=B[0],_=B[1],H=function(){var t=Object(o.useState)([]),n=Object(r.a)(t,2),e=n[0],c=n[1],i=Object(o.useState)(0),a=Object(r.a)(i,2),l=a[0],s=a[1];return{lightboxApi:{open:function(t,n){console.log("[LIGHTBOX] open ".concat(n.length," images to index ").concat(t),{images:n});var e=[];Object(h.each)(n,(function(t){if(Object(h.isString)(t)){var n={file:oo(),title:"",url:t};e.push(n)}else e.push(t)})),c(e),s(t)},close:function(){console.log("[LIGHTBOX] close"),c([]),s(0)}},lightboxImages:e,lightboxIndex:l}}(),W=H.lightboxApi,G=H.lightboxImages,J=H.lightboxIndex,K=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],i=e[1],a=Object(o.useState)([]),l=Object(r.a)(a,2),s=l[0],p=l[1];return{isConnected:t.isConnected,searching:{get:c,set:i},ipsServer:{get:s,set:p,getLocal:function(){var t=s[0];return Object(h.each)(s,(function(n){n.startsWith("192.168")&&(t=n)})),t}},refresh:Object(b.a)(Object(b.a)({},t.refresh),{},{increment:function(){t.refresh.set(t.refresh.get+1)}})}}({isConnected:I,refresh:{get:L,set:P}}),$=function(){var t="[NOTE HISTORY] 0047 ",n=Object(o.useRef)({}),e=function(){return(new Date).getTime()},c=function(n,e,o){console.log("".concat(t," saveNoteHistory ").concat(n)),_t.emit("createHistoryFile",{filePath:n,content:e,historyFileType:o,token:Q()})};return{save:c,intervalSave:function(o,i){var a=n.current[o];(!a||a&&a+6e4<e())&&(console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),c(o,i,"int"),n.current[o]=e())}}}(),X=Lt({popupApi:E,tabsApi:j,userSettingsApi:s,windowsApi:k,statusApi:K,historyApi:$,lightboxApi:W}),Z=X,nt=Z.ui.browser.files,et=Z.ui.browser.folders,ot=et.scan,it=et.clean,at=et.base,rt=et.open.get,lt=function(t){var n=Bt("files-history",[]),e=Object(r.a)(n,3),c=e[0],i=e[1],a=e[2];Object(o.useEffect)((function(){console.log("[HISTORY] activeFile changed!",t),t&&l(t),t&&l(t)}),[t]);var l=Qt((function(t){console.log("[HISTORY] Add to history",t.name);for(var n=!0,e=-1,o=c,a=0;a<c.length;a++)c[a].name===t.name&&(n=!1,e=a);n||o.splice(e,1),(o=o.slice(0,20)).unshift(t),i(o)}),1e3);return{filesHistory:c,cleanLastFilesHistory:function(){i([])},refreshFilesHistoryFromBackend:a}}(nt.active.get),st=lt.filesHistory,pt=lt.cleanLastFilesHistory,ut=lt.refreshFilesHistoryFromBackend,dt=Ke(t,n,it,ot,E),ft=(dt.askForMoveFile,dt.promptAndMoveFolder),bt=dt.promptAndBatchMoveFiles,gt=function(){var t=Object(o.useState)("navigator"),n=Object(r.a)(t,2),e=n[0],i=n[1];return{mobileView:e,setMobileView:i,MobileToolbarComponent:function(t){return Ce(Object(l.c)(c.a.Fragment,null,"desktop"!==u()&&Object(l.c)(En,{class:"mobile-view-toggler",buttons:[{icon:"faStream",class:"".concat("navigator"===e?"active":""),action:function(){i("navigator")}},{icon:"faPenNib",class:"".concat("editor"===e?"active":""),action:function(){i("editor")}},{icon:"faEye",class:"".concat("preview"===e?"active":""),action:function(){i("preview")}}]})),[e,t])}}}(),ht=gt.mobileView,mt=gt.MobileToolbarComponent;return window.api=Z,Object(o.useEffect)((function(){setTimeout((function(){Dt().then((function(t){var n,e=(null===(n=t.ui.windows.active.get())||void 0===n?void 0:n.content.i)||"";t.ui.note.lineJump.jump({windowId:e,line:50})}))}),2e3)}),[]),Object(l.c)("div",{className:Ge(ht,Z.userSettings.refresh.css.get)},Object(l.c)("div",{className:" ".concat("mobile"===u()?"mobile-view-".concat(ht):"")},Object(l.c)(Rt.Provider,{value:X},Object(l.c)(l.a,{styles:Object(l.b)("*{-webkit-print-color-adjust:exact!important;color-adjust:exact!important;}*:focus{outline:none;}body{margin:0;padding:0px;background:",V.colors.bg.light,";font-size:11px;font-family:",V.font.main,";}html,body{height:100vh;overflow:hidden;background:",V.colors.bgInterface,";}button,input{font-family:",V.font.main,";font-weight:700;color:",V.colors.l2.title,";}@media print{","\n\n .preview-title, .date,\n .editor-area, .connected, .left-wrapper, .connection-status, .mobile-view-toggler {\n display:none!important;\n }\n html, body {\n overflow: auto!important;\n height: auto!important;\n background-color: white;\n }\n .main-wrapper .right-wrapper.dual-viewer-view {\n width: 100vw!important;\n }\n .preview-area-wrapper {\n\t\t\t\tdisplay: block!important;\n\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\tdisplay: block!important;\n\t\t\t\t}\n .infos-preview-wrapper {\n .file-path-wrapper {\n display:none!important;\n }\n .title {\n margin-bottom: 40px!important;\n line-height: 40px;\n }\n display:block!important;\n }\n height: auto!important;\n display:block!important;\n overflow: visible!important;\n width: 100vw!important;\n margin-top: 20px!important;\n top: 0;\n font-family: arial, sans-serif!important;\n left: 0;\n margin: 0;\n padding: 15px;\n font-size: 14px;\n line-height: 18px;\n }\n",";}body{position:relative;}","")}),Object(l.c)("div",{role:"dialog",className:"\n\t\t\t\t\t\t\t\tmain-wrapper\n\t\t\t\t\t\t\t\t".concat(Z.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar","\n\t\t\t\t\t\t\t\tdevice-view-").concat(u())},S(),i({}),e({}),F(),mt(R),Object(l.c)("div",{className:"left-sidebar-indicator"},Object(l.c)("div",{className:"left-wrapper"},Object(l.c)("div",{className:"left-wrapper-1"},Object(l.c)("div",{className:"invisible-scrollbars"},Object(l.c)(Se,{onNewFile:function(){var t=X.ui.browser.folders.current.get;X.file.create(t,(function(n){var e=function(t){var n=t[0];return n?(Object(h.each)(t,(function(t){t.created&&n.created&&t.created>n.created&&(n=t)})),console.log(t,n),n):null}(n);e&&X.ui.browser.goTo(t,e.name,{openIn:"activeWindow"})}))}}),Object(l.c)(Pe,{files:st,onClick:function(t){X.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(l.c)(Re,{folder:et.get,current:et.current.get,onFolderClicked:function(t){X.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){var o,c,i;"rename"===t&&e?ft({folder:n,folderToDropInto:n,folderBasePath:at,newTitle:e,renameOnly:!0}):"create"===t&&e?(c=e,i=n,console.log("[askFolderCreate]",c,i),_t.emit("askFolderCreate",{newFolderName:c,parent:i,token:Q()}),ot([n.path])):"moveToTrash"===t?ft({folder:n,folderToDropInto:ct,folderBasePath:at,newTitle:e}):"delete"===t&&(o=n,console.log("[askFolderDelete]",o),_t.emit("askFolderDelete",{folderToDelete:o,token:Q()}),ot([n.path]))},onFolderOpen:function(t){ot([t])},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),z.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),z.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",z.current,t);var n=z.current[0];"file"===n.type&&n.files?bt(n.files,t):"folder"===n.type&&n.folder&&ft({folder:n.folder,folderToDropInto:t,folderBasePath:at})}(t)}})),Object(l.c)("div",{className:"settings-button",onClick:function(){_(!U)}},Object(l.c)(on,{name:"faCog",color:"grey"})),U&&Object(l.c)(Yt,{onClose:function(){_(!1)}})),Object(l.c)("div",{className:"left-wrapper-2"},Object(l.c)("div",{className:"top-files-list-wrapper"},Object(l.c)("div",{className:"subtitle-wrapper"},Object(l.c)("div",{className:"folder-wrapper"},Z&&Z.ui.browser.folders.current.get,!Z.ui.browser.folders.current.get&&"/"),"mobile"!==u()&&Object(l.c)("div",{className:"toggle-sidebar-btn"},Object(l.c)(En,{popup:!1,buttons:[{icon:"faThumbtack",title:"Toggle Sidebar",action:function(t){s.set("ui_sidebar",!s.get("ui_sidebar")),O()},active:!0===X.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(l.c)(ze,{term:X.ui.search.term.get})),Object(l.c)("div",{className:"files-list-wrapper"},Object(l.c)(co,{files:nt.get,activeFileIndex:nt.active.getIndex,onSortFiles:function(t){X.ui.browser.files.set(t)},onFileClicked:function(t){nt.active.set(t);var n=nt.get[t];Z.tabs.active.get()?k.active.setContent(n):Z.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),z.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),z.current=[]}}))))),Object(l.c)("div",{className:"right-wrapper dual-viewer-view"},Object(l.c)(_e,{tabs:f,onUpdate:m}),C&&Object(l.c)(xe,{tab:C,onGridUpdate:x}))))),G.length>0&&Object(l.c)(Be,{images:G,startingIndex:J,onClose:X.ui.lightbox.close}))}),null),document.getElementById("root"))}},[[611,3,4]]]);