/* Files Gallery 0.15.3 - https://www.files.gallery/ */ !function(){const e=(e,t)=>_c.config&&_c.config[e]?Object.assign(t||{},_c.config[e]):t||{};function t(e=_c.current_dir.path,t=_c.current_dir.basename,i){let a=i?0:(_c.file_names||[]).length;document.title="function"==typeof _c.config.title?_c.config.title(e,t,i,a):(_c.config.title||"").replace("%name%",t||"/").replace("%path%",e).replace("%count%",a)}function i(){const e=Swal.getContainer();if(!e)return;const t=getComputedStyle(e),i=e.firstElementChild,a=getComputedStyle(i);(![t.top,t.bottom,t.left].every((e=>0==e||"0px"==e))||e.offsetWidth/g,">"):""}function o(e,t){return''+e+""}function s(e){return _c.allow_download&&_c.allow_mass_download&&ne?`${_c.script}?action=download_dir_zip&dir=${encodeURIComponent(e.path)}&${e.mtime}`:"#"}_c.config=Object.assign({favicon:"",title:(e,t,i,a)=>(t||"/")+(i?"":` [${a}]`),panorama:{is_pano:(e,t)=>{var i=e.dimensions[0],a=e.dimensions[1],n=t.max_texture_size;if(!(n<2048||i<2048||i/a!=2)){if(!e.panorama_resized)return n>=i&&c(e);var o=[i].concat(e.panorama_resized),s=o.pop(),l=screen.availWidth*t.pixel_ratio*6;if(!(s>n)){var r=o.find((e=>n>=e&&e${U.get_svg_icon("marker")+ie.span("google maps")}`:`${U.get_svg_icon("marker")}`:""},span:function(e,t){return e?'"+U.get_svg_icon("marker")+"":""}};function r(e,t=!1){return`/cdn-cgi/image/${t?"width=480,height=480":"format=jpeg"}${e.cloudflare_convert}`}function c(e,t){let i=!!e.url_path&&encodeURI(e.url_path).replace(/#/g,"%23");return e.is_dir?i||"#":t?_c.allow_download?!i||_c.load_files_proxy_php||["php","htaccess"].includes(e.ext)?`${_c.script}?action=download&file=${encodeURIComponent(e.path)}`:i:"#":e.cloudflare_convert&&!X.browser_images.includes(e.mime1)?r(e):e.is_convert?`${_c.script}?action=file&file=${encodeURIComponent(e.path)}&convert=1`:i&&!_c.load_files_proxy_php?i:`${_c.script}?action=file&file=${encodeURIComponent(e.path)}`}function p(e,t){return e.url?encodeURI(e.url):e.is_dir?d(e.path):c(e,t)}function d(e){return location.pathname+(e?"?"+encodeURIComponent(e).replace(/%2F/g,"/"):"")}function m(e){for(;e.firstChild;)e.firstChild.remove()}function u(e,t,i){L(e,(function(e){var i=e.target.dataset.action;i&&t(i,e)}),"click",!1,i)}function h(e){return Array.isArray(e)?_c.config.map_link.replace("{latitude}",e[0]).replace("{longtitude}",e[1]):"#"}function _(e,t){return e?`${e[0]} x ${e[1]}`:""}function f(e,t){return e.is_dir?e.hasOwnProperty("dirsize")?`${g(e.dirsize)}`:"":`${g(e.filesize)}`}const g=e=>filesize(e,_c.config.filesize);function v(e,t,i){if(!_c.config.context_menu||!e)return"";let a=i?"span":"button";return`<${a} class="button-icon context-button${t?` ${t}`:""}" data-action="context">${U.get_svg_icon_multi("dots","close_thin")}`}function b(e,t,i,a){if(!e||!e.iptc)return"";var n=Object.keys(e.iptc);if(!n.length)return"";var o="",s="",l="";return n.forEach((function(i){var a=e.iptc[i];if(a){if(["city","sub-location","province-state"].includes(i))return s+=''+a+"";if(["creator","credit","copyright"].includes(i))return l+=''+a+"";if("keywords"===i&&Array.isArray(a)){var n=a.filter((e=>e));return o+=n.length?'
'+n.join(", ")+"
":""}return o+='
'+a+"
"}})),(o+=(s?'
'+s+"
":"")+(l?'
'+l+"
":""))?i?'
'+o+"
":o:""}function y(e,t,i){if(!e||!e.exif)return"";var a=E(["Model","ApertureFNumber","FocalLength","ExposureTime","ISOSpeedRatings","gps"],(function(t){var a=e.exif[t];if(!a)return"";if("Model"===t)a=U.get_svg_icon(a.toLowerCase().indexOf("phone")>-1?"cellphone":"camera")+a;else if("FocalLength"===t&&"string"==typeof a){var n=a.split("/");2===n.length&&(a=(n[0]/n[1]).toFixed(1)+"mm")}else if("gps"===t)return l[i||"a"](a,"exif-item exif-gps");return'"+a+""}));return a?'
'+a+"
":""}function x(e,t){return e&&X.is_pointer?' data-lang="'+e+'"'+(t?' data-tooltip="':' title="')+ie.get(e,!t)+'"':""}function A(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);var t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",document.body.appendChild(t);var i=window.getSelection(),a=window.document.createRange();i.removeAllRanges(),a.selectNode(t),i.addRange(a);var n=!1;try{n=window.document.execCommand("copy")}catch(e){console.log("error",e)}return i.removeAllRanges(),window.document.body.removeChild(t),n?Promise.resolve():Promise.reject()}function w(e,t,i,a){e.classList.add(t),i&&(e.disabled=i),Q(a||2e3).then((()=>{e.classList.remove([t]),i&&(e.disabled=!1)}))}function C(e,t,i){if(!i&&e.which<=1&&!["meta","ctrl","shift","alt"].some((t=>e[`${t}Key`])))return e.preventDefault();const a=!!t&&t.getAttribute("href");return a&&"#"!==a?(t.contains(e.target)||t.click(),!0):void 0}function L(e,t,i,a,n){e.addEventListener(i||"click",function(e,t){return t?function(a){i||(e.apply(this,arguments),i=setTimeout((function(){i=null}),t))}:e;var i}(t,n)),a&&t()}function k(e,t){var i;return function(a){i&&clearTimeout(i),i=setTimeout(e,t||1e3,a)}}function H(e,t,i,a){return a&&(i=k(i,a)),e.addEventListener(t,i),{remove:()=>{e.removeEventListener(t,i)}}}_id=document.getElementById.bind(document),_class=function(e,t){return Array.from((t||document).getElementsByClassName(e))},_tag=function(e,t){return Array.from((t||document).getElementsByTagName(e))},_query=function(e,t){return(t||document).querySelector(e)},_querya=function(e,t){return Array.from((t||document).querySelectorAll(e))};const M={};function $(e,t,i){M[e]&&clearTimeout(M[e]),M[e]=setTimeout(t,i)}function V(e,t){for(var i=e.length,a=0;a{function e(e){return X.local_storage?localStorage.getItem(e):null}function t(e,t){"boolean"==typeof t&&(t=t.toString());try{localStorage.setItem(e,t)}catch(e){j("failed to write localstorage",e,"warn")}}return{get:t=>{let i=e(t);return"true"===i||"false"!==i&&i},get_json:t=>q(e(t)),set:function(e,i,a,n){return X.local_storage?a&&!i?localStorage.removeItem(e):n?Q(n).then((()=>t(e,i))):void t(e,i):null},remove:function(e){if(X.local_storage)return localStorage.removeItem(e)},set_option:(e,t,i)=>{if(X.local_storage)return t===i?localStorage.removeItem(e):"boolean"==typeof t?localStorage.setItem(e,t?"1":"0"):void localStorage.setItem(e,t)},get_option:(t,i)=>{const a=e(t);return a?"1"===a:!!i},bool:(e,i)=>{if(X.local_storage)return i?t(e,!0):localStorage.removeItem(e)}}})();function O(e){var t=new XMLHttpRequest;return t.onreadystatechange=function(){if(4==t.readyState)if(e.always&&e.always(t),200==t.status){var i=t.responseText,a=e.json_response,n=a?(()=>{try{return JSON.parse(i)}catch(e){return a=!1,i}})():i;if(a&&n.error&&"login"===n.error)return _e.was_logged_out("ajax");e.complete&&e.complete(n,i,a);var o=!e.url&&t.getResponseHeader("files-msg");o&&j("XHR: files-msg: "+o)}else e.fail&&e.fail(t)},t.open(e.method||(e.params?"POST":"GET"),e.url||_c.script),e.params&&t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.json_response&&t.setRequestHeader("Accept","application/json"),t.send(e.params||null),t}function S(e){return _c.server_exif&&e&&e.exif&&e.exif.Orientation&&e.exif.Orientation>4&&e.exif.Orientation<9}function B(e){return atob(e)}function Z(e,t,i){return Math.min(Math.max(i,e),t)}function R(){if(X.scrollbar_width){var e=document.documentElement,t=window.innerWidth-e.clientWidth||(e.scrollHeight>e.clientHeight?X.scrollbar_width:0);t!=G.scrollbar_width&&(t&&(X.scrollbar_width=t),G.scrollbar_width=t,document.documentElement.style.setProperty("--scrollbar-width",t+"px"))}}function D(e){if(!(e.is_dir&&e.is_readable&&_c.folder_preview_image&&_c.load_images&&_c.image_resize_enabled))return"";let t=_c.config.preview_image_cache?`${e.mtime}.${_c.menu_cache_hash||_c.location_hash}`:Date.now();return``}var _h={popup:(e,t,i,a,n)=>{e&&e.preventDefault(),t=Math.floor(Math.min(screen.width,t||1e3)),i=Math.floor(Math.min(screen.height,i||99999));var o=window.open(a,n||null,"toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,titlebar=no,width="+t+",height="+i+",top="+Math.round(screen.height/2-i/2)+",left="+Math.round(screen.width/2-t/2));return window.focus&&o.focus(),o}};function P(e,t){e.className!=t&&(e.className=t)}function N(e){var t={};return e&&e.split("&").forEach((e=>{let[i,a]=e.split("=");t[i]=isNaN(a)?a:+a})),t}function q(e,t){if(e)try{let i=JSON.parse(e);return t?i[t]:i}catch(e){return}}const Q=async e=>new Promise((t=>setTimeout(t,e)));function W(){K.files_container.classList.contains("files-spinner")||(me.clean_dir(_c.current_dir),U.get_files(_c.current_path,"replace",!0))}const F=(()=>{const e={duration:2e3,gravity:"bottom",escapeMarkup:!1};let t=t=>Toastify(Object.assign({},e,t)).showToast();const i=(e,t)=>U.get_svg_icon(e?"check":"cancel_circle")+''+n(t)+"",a={toggle:(a,n,o)=>t(Object.assign({text:i(a,n),className:"toastify-"+(a?"success":"danger"),duration:a?e.duration:3e3},o||{})),loader:(e,i)=>t({text:''+e+""+(i?''+U.get_svg_icon("tray_arrow_down")+'':""),className:"toastify-loading",duration:-1})};return{toast:e=>t(e),license:()=>t({text:i(!1,"License required!"),className:"toastify-danger toastify-link",duration:4e3,destination:B("aHR0cHM6Ly9saWNlbnNlLmZpbGVzLmdhbGxlcnkv"),newWindow:!0}),login:()=>t({text:i(!1,ie.get("you were logged out")),className:"toastify-danger toastify-link",duration:0,onClick:()=>_e.logout_refresh()}),refresh:e=>t({text:i(!1,e+". Please refresh browser!"),className:"toastify-danger toastify-link",duration:-1,destination:location.href}),toggle:a.toggle,demo:()=>a.toggle(!1,"Not allowed in demo mode!"),loader:a.loader,progress:e=>{let t=a.loader(e,!0);return{toast:t,counter:t.toastElement.children[1],progress_bar:t.toastElement.lastElementChild}}}})();_c.debug=z("debug")||0===location.host.indexOf("files.test"),_c.files={},j("_c",_c);const U={},G={},Y={},K={main:_id("main"),topbar:_id("topbar"),topbar_top:_id("topbar-top"),files_container:_id("files-container"),files:_id("files"),topbar_info:_id("topbar-info"),filter_container:_id("search-container"),filter:_id("search")},X={};function J(e,t){if(t.mime1&&t.mime0===e)return X.hasOwnProperty(e)||(X[e]=function(){if("audio"===e&&!window.Audio)return!1;var t="audio"===e?["mpeg","mp3","mp4","x-aiff","ogg","x-m4a","aac","webm","wave","wav","x-wav","x-pn-wav","flac"]:["mp4","webm","ogg","3gp","m4v","x-m4v"];try{var i=document.createElement(e);let a=t.filter((t=>i.canPlayType(`${e}/${t}`).replace(/no/,"")));return i.remove(),!!a.length&&a}catch(e){return!1}}()),!(!X[e]||!X[e].includes(t.mime1))&&t.mime1}(()=>{var e=X,t=document,i=t.documentElement,a=navigator,n=a.userAgent,o=window;e.ua=n,e.explorer=/MSIE /.test(n)||/Trident\//.test(n);var s=!!(o.CSS&&o.CSS.supports||o.supportsCSS);!e.explorer&&s&&CSS.supports("color","var(--fake-var)")||(t.body.innerHTML=``,t.body.classList.remove("body-loading"),fail),e.local_storage=!!o.localStorage&&(()=>{try{var e="_t";return o.localStorage.setItem(e,e),o.localStorage.removeItem(e),!0}catch(e){return!1}})(),e.is_touch="ontouchstart"in o||a.maxTouchPoints>0||a.msMaxTouchPoints>0||o.DocumentTouch&&t instanceof DocumentTouch||o.matchMedia("(any-pointer: coarse)").matches,e.is_pointer=!e.is_touch||o.matchMedia("(pointer:fine)").matches,e.is_dual_input=e.is_touch&&e.is_pointer,e.only_touch=e.is_touch&&!e.is_pointer,e.only_pointer=!e.is_touch&&e.is_pointer,e.PointerEvent=!!o.PointerEvent||a.msPointerEnabled,e.nav_langs=!(!a.languages||!a.languages.length)&&a.languages||!!a.language&&[a.language],e.pointer_events=!!("PointerEvent"in o)||a.msPointerEnabled,e.is_mac=/Mac|iPod|iPhone|iPad/.test(a.platform),e.is_ios=/iPad|iPhone|iPod/i.test(a.userAgent)&&a.maxTouchPoints>1,e.c_key=e.is_mac?"⌘":"ctrl-",e.modKey=e.is_mac?"metaKey":"ctrlKey",e.scrollbar_width=e.is_pointer?(()=>{t.body.insertAdjacentHTML("beforeend",'
');var e=t.body.lastElementChild,a=()=>e.offsetWidth-e.clientWidth;if(!a())return e.remove(),0;i.classList.add("has-scrollbars"),n.toLowerCase().indexOf("firefox")>-1&&(i.style.overflowY="auto",Q(0).then((()=>i.style.removeProperty("overflow-y"))));var o=a();return e.remove(),o})():0,e.pixel_ratio=o.devicePixelRatio||1,e.download="download"in t.createElement("a"),e.clipboard=!(!t.queryCommandSupported||!t.queryCommandSupported("copy")),e.url=!("function"!=typeof URL),e.fullscreen=screenfull.isEnabled,e.image_orientation=CSS.supports("image-orientation","from-image"),e.browser_images=["jpg","jpeg","png","gif","bmp","svg","svg+xml","ico","vnd.microsoft.icon","x-icon"],(()=>{const i=[["webp","UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"],["avif","AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="]];if((a.vendor.match(/apple/i)||"").length>0){let e="AAAAGGZ0eXBoZWljAAAAAG1pZjFoZWljAAAB5G1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAHBpY3QAAAAAAAAAAAAAAAAAAAAADnBpdG0AAAAAAAIAAAAQaWRhdAAAAAAAAQACAAAATGlsb2MBAAAAREAAAwABAAAAAAAAAgQAAQAAAAAAAAA2AAIAAQAAAAAAAAABAAAA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",e],["heif",e])}let n=T.get("files:tests:extended_images"),o=n?n.split(","):[],s=o.length;if(s&&e.browser_images.push(...o),s>=i.length)return;let l=1;const r=t=>{t&&[o,e.browser_images].forEach((e=>e.push(t))),l++===i.length&&o.length>s&&T.set("files:tests:extended_images",o)};let c=t.createElement("canvas");c.width=c.height=1,i.forEach(((e,t)=>{if(o.includes(e[0]))return r();if(0==c.toDataURL(`image/${e[0]}`).indexOf(`data:image/${e[0]}`))return r(e[0]);let i=new Image;i.onload=i.onerror=()=>r(!(!i.height||2!=i.height)&&e[0]),i.src=`data:image/${e[0]};base64,${e[1]}`}))})(),e.history=!(!o.history||!history.pushState),e.history||(_c.config.history=!1),e.prefers_reduced_motion=(o.matchMedia("(prefers-reduced-motion: reduce)")||{}).matches,_c.config.respect_prefers_reduced_motion&&e.prefers_reduced_motion&&(_c.config.transitions=!1),e.URLSearchParams=!!("URLSearchParams"in o),location.search&&e.URLSearchParams&&new URLSearchParams(location.search).forEach(((e,t)=>{e&&t.startsWith("--")&&i.style.setProperty(t,e)})),e.max_texture_size=(()=>{if(o.WebGLRenderingContext){var e=document.createElement("canvas");if(e&&e.getContext)try{var t=e.getContext("webgl")||e.getContext("experimental-webgl");return!!t&&t.getParameter(t.MAX_TEXTURE_SIZE)}catch(e){return}}})()||0,e.supports_inline_pdf=!(void 0!==a.platform&&"MacIntel"===a.platform&&void 0!==a.maxTouchPoints&&a.maxTouchPoints>1)&&!/Mobi|Tablet|Android|iPad|iPhone/.test(n)&&("boolean"==typeof a.pdfViewerEnabled?a.pdfViewerEnabled:void 0!==o.chrome||void 0!==o.safari||void 0!==o.Mozilla||/irefox/.test(n))})(),j("tests",X);class ee{static theme="contrast";static index=0;static config=e("theme",{themes:["contrast","light","dark"],default:"contrast",button:!0,auto:!0});static init(){let e=this.is_theme(z("theme",!0));this.theme=e||this.is_theme(!!this.config.button&&T.get("files:theme"))||this.is_theme(!(!this.config.auto||!matchMedia("(prefers-color-scheme:dark)").matches)&&"dark")||this.config.default,this.index=this.config.themes.indexOf(this.theme),document.documentElement.dataset.theme!==this.theme&&(document.documentElement.dataset.theme=this.theme,e||T.set("files:theme",this.theme))}static is_theme(e){return!(!e||!this.config.themes.includes(e))&&e}static next(){this.index++,this.index>=this.config.themes.length&&(this.index=0),this.theme=this.config.themes[this.index],w(document.body,"no-transition",null,10),document.documentElement.dataset.theme=this.theme,T.set("files:theme",this.theme)}}ee.init(),(()=>{if(X.local_storage){var e=z("clearall",!0),t=!e&&z("clear",!0),i=e||t;if(U.clean_localstorage=function(){if(!i){var e=Object.keys(localStorage);e.length&&V(e,(function(e){if(e.startsWith("files:menu:"))localStorage.removeItem(e);else if(e.startsWith("files:dir:"))if(e.startsWith("files:dir:"+_c.dirs_hash)){if(_c.exists){var t=e.split(":"),i=t[3];if(_c.menu_max_depth&&i.split("/").length>=_c.menu_max_depth)return;var a=parseInt(t[4]);_c.dirs[i]&&_c.dirs[i].mtime==a||localStorage.removeItem(e)}}else localStorage.removeItem(e)}))}},i){var a=0;V(Object.keys(localStorage),(function(t){(e&&t.startsWith("files:")||t.startsWith("files:menu:")||t.startsWith("files:dir:"))&&(localStorage.removeItem(t),a++)})),j(a+" localStorage items cleared")}else _c.menu_exists||U.clean_localstorage()}})();const te=e=>e[0].toUpperCase()+e.slice(1),ie=(()=>{var e=!1,t=!1,i=_c.config&&_c.config.lang||{},a={ar:null,bg:null,cs:null,da:null,de:null,en:null,el:null,es:null,et:null,fi:null,fr:null,hu:null,id:null,it:null,ja:null,ko:null,ms:null,nl:null,no:null,pl:null,pt:null,ro:null,ru:null,sk:null,sl:null,sv:null,th:null,tr:null,uk:null,zh:null},n={ar:"sa",cs:"cz",da:"dk",el:"gr",en:"gb",et:"ee",ja:"jp",ko:"kr",ms:"my",sv:"se",sl:"si",uk:"ua",vi:"vn",zh:"cn"},o="object"==typeof _c.lang_custom?_c.lang_custom:{};"object"==typeof i.langs&&Object.keys(i.langs).forEach((e=>{o[e]=Object.assign(o[e]||{},i.langs[e])})),Object.keys(o).forEach((e=>{o[e].flag&&(n[e]=o[e].flag),a.hasOwnProperty(e)||(a[e]=o[e])}));var s=Object.keys(a).sort();if(X.local_storage){var l=T.get("files:version");l!==_c.version&&T.set("files:version",_c.version),l&&l!==_c.version&&V(s,(function(e){T.remove("files:lang:"+e)}))}var r={},c={get:function(e,t){var i=r[e]||e;return t?te(i):i},set:function(e,t){e.dataset.lang=t,e.textContent=this.get(t)},span:function(e,t){return`${this.get(e,t)}`},dropdown:function(){var a=z("lang_menu",!0)||i.menu;if(a&&"false"!=a&&"0"!=a){var o=Array.isArray(i.menu)?i.menu:s;K.topbar_top.insertAdjacentHTML("beforeend",`