nginxconfig.io/dist/js/app.js

1 line
198 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var e={4535:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const a={en:"English",zhCN:"Chinese (simplified)",zhTW:"Chinese (traditional)",ptBR:"Portuguese (brazilian)",fr:"French",ru:"Russian"}},4938:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const a={en:"Anglais",zhCN:"Chinois (simplifié)",zhTW:"Chinois (traditionnel)",ptBR:"Portugais (brésilien)",fr:"Français",ru:"Russe"}},4663:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const a={en:"Inglês",zhCN:"Chinês (simplificado)",zhTW:"Chinês (tradicional)",ptBR:"Português (brasileiro)",fr:"Francês",ru:"Russa"}},5306:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>W});const a={back:"Назад",next:"Дальше",enable:"включить",php:"PHP",ssl:"SSL",nginx:"NGINX",http:"HTTP",https:"HTTPS",letsEncrypt:"Let's Encrypt",python:"Python",wordPress:"WordPress",drupal:"Drupal",magento:"Magento",joomla:"Joomla",django:"Django",nodejs:"Node.js",logging:"Логирование",reverseProxy:"Обратный прокси",reverseProxyLower:"обратный прокси",restrict:"Ограничить",path:"Путь"};var o=s(2256);const i={title:`Сервис настройки ${a.nginx}`,description:`Заполните форму и сервис подготовит конфигурационные файлы веб-сервера ${a.nginx} для вашего кейса веб-сервер, сервер для ${a.django} или ${a.nodejs}, сервер для CMS ${a.wordPress}, ${a.joomla}, ${a.drupal}. Настройка возможна для одного или нескольких доменов. Готовые файлы конфигурации можно скачать или выполнить одну команду на сервере для автоматического обновления.`,singleColumnMode:"Одноколоночный режим",splitColumnMode:"Режим разделения столбца",perWebsiteConfig:"Конфигурация для каждого сайта",addSite:"Добавить сайт",globalConfig:"Глобальная конфигурация",setup:"Настройка",configFiles:"Файлы конфигурации"},l={downloadConfig:"Скачать конфигурацию",copyBase64:"Копировать Base64",copied:"Скопировано",press_to_copy:"Нажмите Ctrl+C чтобы скопировать"},n={backToTop:"Вернуться в начало",thisToolIs:"Этот инструмент",openSourceOnGitHub:"с открытым исходным кодом на GitHub",underThe:"под",mit:"MIT",license:"лицензией!",weWelcomeFeedbackAndContributions:"Мы приветсвуем обратную связь и поддержку.",originallyCreatedBy:"Начало проекта положил",balintSzekeres:"Bálint Szekeres",maintainedBy:"при поддержке",digitalOcean:"DigitalOcean"},r={enableEncryptedSslConnection:`${a.enable} зашифрованные ${a.ssl} соединения`,http2:`${a.http}/2`,enableHttp2Connections:`${a.enable} ${a.http}/2 соединения`,http3:`${a.http}/3`,enableHttp3Connections:`${a.enable} ${a.http}/3 соединения`,portReuse:"Reuseport",enableReuseOfPort:`${a.enable} reuseport to generate a listening socket per worker`,forceHttps:`Использовать только ${a.https}`,hsts:"HSTS",enableStrictTransportSecurity:`${a.enable} Strict Transport Security, требующая HTTPS соединения`,enableIncludeSubDomains:`${a.enable} includeSubDomains директиву, требующая HTTPS соединения для ВСЕХ поддоменов`,enablePreload:`${a.enable} preload директиву, указывающая браузерам всегда устанавливать только HTTPS-соединения`,certificationType:"Тип сертификации",customCertificate:"Другой сертификат",letsEncryptEmail:`${a.letsEncrypt} email`,http3Warning1:"HTTP/3 isn't a standard NGINX module, check the ",http3Warning2:"NGINX QUIC readme ",http3Warning3:" or the ",http3Warning4:"Cloudflare quiche project ",http3Warning5:" for how to build NGINX with HTTP/3!"},c={byDomain:"по домену",enableForThisDomain:`${a.enable} для этого домена`},p={phpIsDisabled:`${a.php} выключен.`,phpCannotBeEnabledWithReverseProxy:`${a.php} не может быть включен, пока включен обратный прокси.`,phpCannotBeEnabledWithPython:`${a.php} не может быть включен, пока включен ${a.python}.`,enablePhp:`${a.enable} ${a.php}`,wordPressRules:`${a.wordPress} правила`,enableWordPressRules:`${a.enable} ${a.wordPress}-специфичные правила`,drupalRules:`${a.drupal} правила`,enableDrupalRules:`${a.enable} ${a.drupal}-специфичные правила`,magentoRules:`${a.magento} правила`,enableMagentoRules:`${a.enable} ${a.magento}-специфичные правила`,joomlaRules:`${a.joomla} правила`,enableJoomlaRules:`${a.enable} ${a.joomla}-специфичные правила`,phpServer:`${a.php} сервер`,phpBackupServer:`${a.php} бекап сервер`,tcp:"TCP",hhvmSocket:"HHVM сокет",php5Socket:"5.x сокет",php70Socket:"7.0 сокет",php71Socket:"7.1 сокет",php72Socket:"7.2 сокет",php73Socket:"7.3 сокет",php74Socket:"7.4 сокет",php80Socket:"8.0 сокет",phpSocket:"PHP сокет",custom:"Другой",disabled:"Выключено"},d={presets:"Пресеты",itLooksLikeYouCustomisedTheConfig:"Похоже, вы уже настроили конфигурацию для этого домена. Выбор нового пресета может привести к сбросу или изменению некоторых настроек, которые Вы настроили ранее.",frontend:"Фронтэнд",nodeJs:"Node.js",singlePageApplication:"Одностраничное приложение"},u={pythonIsDisabled:`${a.python} выключен.`,pythonCannotBeEnabledWithReverseProxy:`${a.python} не может быть включен, пока включен обратный прокси.`,pythonCannotBeEnabledWithPhp:`${a.python} не может быть включен, пока включен ${a.php}.`,enablePython:`${a.enable} ${a.python}`,djangoRules:`${a.django} правила`,enableDjangoRules:`${a.enable} ${a.django}-специфичные правила`},h={reverseProxyIsDisabled:`${a.reverseProxy} выключено.`,reverseProxyCannotBeEnabledWithPhp:`${a.reverseProxy} не может быть включен, пока включен ${a.php}.`,reverseProxyCannotBeEnabledWithPython:`${a.reverseProxy} не может быть включен, пока включен ${a.python}.`,enableReverseProxy:`${a.enable} ${a.reverseProxyLower}`},m={fallbackRouting:"Fallback маршрутизация",fallbackRoutingPhpPath:`Путь к Fallback ${a.php}`,legacyPhpRouting:`Устаревшая маршрутизация ${a.php}`,enableLegacyRouting:`${a.enable} устаревшую маршрутизацию`,routing:"Маршрутизация"},v={domain:"Домен",documentRoot:"Корневая директория",oneOrMoreOtherDomainsAreAlsoNamed:"Один или несколько других доменов также названы",thisWillCauseIssuesWithConfigGeneration:"Это вызовет проблемы с генерацией конфигурации.",wwwSubdomain:"WWW поддомен",cdnSubdomain:"CDN поддомен",redirectSubdomains:"Перенаправлять поддомены",server:"Сервер",listen:"Слушать от адреса"},f={disableForThisDomain:"выключено для этого домена",responseCode:"Код ответа"},g="Onion",b={onion:g,onionLocation:`Расположение ${g}`,provideAnOnionLocationToSetOnionLocationHeader:`Укажите расположение ${g}, чтобы задать заголовок Onion-Location для Вашего сайта.`,letsVisitorsKnownOnionServicesIsAvailable:`Это позволит узнать посетителям, что у Вашего сайта есть ${g}-версия, доступная в браузере Tor.`,learnMoreAboutOnionServices:`Узнайте больше об ${g}`,onionLocationExpectedToEndWithOnion:`Адреса ${g} обычно оканчиваются на \`.onion\`.`},C={https:r,logging:c,php:p,presets:d,python:u,reverseProxy:h,routing:m,server:v,restrict:f,onion:b},$="Mozilla",y="IPv4",_="IPv6",x={sslProfile:`${a.ssl} Профиль`,httpsMustBeEnabledOnOneSite:`${a.https} должен быть включен хотя бы на одном сайте, чтобы сконфигурировать глобальные ${a.https} настройки.`,ocspDnsResolvers:"OCSP DNS Преобразователи",cloudflareResolver:"Cloudflare Преобразователь",googlePublicDns:"Публичные Google DNS",openDns:"OpenDNS",quad9:"Quad9",verisign:"Verisign",letsEncryptWebroot:`Директория ${a.letsEncrypt}`,letsEncryptCertRoot:`Директория сертификата ${a.letsEncrypt}`,mozillaModern:`${$} Modern`,mozillaIntermediate:`${$} Intermediate`,mozillaOld:`${$} Old`,ipv4Only:`только ${y}`,ipv6Only:`только ${_}`,ipv4AndIpv6:`${y} & ${_}`},k={enableFileNotFoundErrorLogging:`${a.enable} логирование ошибок для файлов, которые не были найдены при запросе`,logformat:"log_format",enableCloudflare:"добавить Cloudflare хедеры запроса в дефолтный формат логов",cfRay:"CF-Ray",cfConnectingIp:"CF-Connecting-IP",xForwardedFor:"X-Forwarded-For",xForwardedProto:"X-Forwarded-Proto",trueClientIp:"True-Client-IP",cfIpCountry:"CF-IPCountry",cfVisitor:"CF-Visitor",cdnLoop:"CDN-Loop"},S={nginxConfigDirectory:`Директория конфигурации ${a.nginx}`,mb:"MB"},P={gzipCompression:"Gzip сжатие",enableGzipCompression:`${a.enable} gzip сжатие`,brotliCompression:"Brotli сжатие",enableBrotliCompression:`${a.enable} brotli сжатие`,expirationForAssets:"Истечение срока для ассетов",expirationForMedia:"Истечение срока для медиа файлов",expirationForSvgs:"Истечение срока для SVG файлов",expirationForFonts:"Истечение срока для шрифтов",performance:"Производительность"},E={pythonServer:`${a.python} сервер`,pythonMustBeEnabledOnOneSite:`${a.python} должен быть включен как минимум на одном сайте, чтобы сконфигурировать глобальные настройки ${a.python}.`},w={reverseProxyMustBeEnabledOnOneSite:`${a.reverseProxy} должен быть включен как минимум на одном сайте, чтобы сконфигурировать глобальные настройки ${a.reverseProxyLower}.`,seconds:"секунд"},T={whenUsingWordPressUnsafeEvalIsOftenRequiredToAllowFunctionality:`Во время использования ${a.wordPress}, <code class="slim">'unsafe-eval'</code> часто требуется в Content Security Policy, чтобы панель администратора работала исправно.`,security:"Безопасность"},R={modularizedStructure:"Модульная структура",enableModularizedConfigFiles:`${a.enable} модульную структуру для фйлов конфигурации`,symlinkVhost:"Symlink vhost",enableSymLinksFrom:`${a.enable} symlinks из`,to:"в",shareConfiguration:"Поделиться конфигурацией",resetConfiguration:"Сбросить конфигурацию",resetGlobalConfig:"Сбросить глобальную конфигурацию",resetAllDomains:"Сбросить все домены",removeAllDomains:"Удалить все домены",resetAllDomainsConfig:"Сбросить конфигурации всех доменов",resetDomainConfig:"Сбросить конфигурацию домена",removeDomain:"Удалить домен",yesImSure:"Да, я уверен",noCancel:"Нет, отменить",tools:"Инструменты",resetGlobalConfigBody:"Вы уверены, что хотите сбросить все параметры конфигурации в разделе глобальной конфигурации?",resetAllDomainsConfigBody:"Вы уверены, что хотите сбросить конфигурацию ВСЕХ доменов?",removeAllDomainsBody:"Вы действительно хотите удалить ВСЕ конфигурации домена?",areYouSureYouWantToResetAllConfigurationOptionsForThe:"Вы действительно хотите сбросить все параметры конфигурации для",domain:"домена?",areYouSureYouWantToRemoveThe:"Вы уверены, что желаете удалить ",domainConfiguration:"конфигурацию домена?"},D="Docker",O="Dockerfile",z={docker:D,dockerfile:O,dockerCompose:`${D} Compose`,applyDockerTweaks:`Применить настройки ${D}`,applyDockerTweaksForNginx:`Примените настройки конфигурации для запуска ${a.nginx} с ${D}`,applyDockerTweaksExplainer:`Обновляет пользователя ${a.nginx} на <code class="slim">nginx</code> и pid на <code class="slim">/var/run/nginx.pid</code>`,includeDockerfile:`Добавить ${O}, чтобы запустить ${a.nginx} с ${D}`,includeDockerCompose:`Добавить docker-compose, чтобы запустить ${a.nginx} с docker-compose`},j={https:x,logging:k,nginx:S,performance:P,python:E,reverseProxy:w,security:T,tools:R,docker:z},A="Certbot",L={commentOutSslDirectivesInConfiguration:`Закомментируйте директивы, связанные с ${a.ssl} в конфигурации:`,reloadYourNginxServer:`Перезагрузите свой ${a.nginx} сервер:`,obtainSslCertificatesFromLetsEncrypt:`Получите ${a.ssl} сертификат ${a.letsEncrypt} используя ${A}:`,uncommentSslDirectivesInConfiguration:`Раскомментируйте директивы, связанные с ${a.ssl} в конфигурации:`,configureCertbotToReloadNginxOnCertificateRenewal:`Настройте ${A}, чтобы перезагрузить ${a.nginx}, когда сертификаты успешно обновятся:`,certbotDoesNotNeedToBeSetupForYourConfiguration:`${A} не нужно настраивать для вашей ${a.nginx} конфигурации.`,certbot:A},H={downloadTheGeneratedConfig:"<b>Скачать</b> сгенерированную конфигурацию:",andUploadItToYourServers:"и <b>загрузить</b> её на Ваш сервер",directory:"директория.",or:"или, ",copyBase64StringOfCompressedConfig:"Скопируйте Base64 c сжатой конфигурацией",pasteItInYourServersCommandLineAndExecute:", вставьте это в Вашу командную строку на сервере и запустите.",navigateToYourNginxConfigurationDirectoryOnYourServer:`Перейдите в <b>папку конфигурации</b> ${a.nginx} на Вашем сервере:`,createABackupOfYourCurrentNginxConfiguration:`Сделайте <b>резервную копию</b> Вашей нынешней ${a.nginx} конфигурации:`,extractTheNewCompressedConfigurationArchiveUsingTar:"<b>Извлеките</b> архив с новой конфигурацией с помощью использованием tar:",download:"Скачать"},I={letsGoLive:"Время запуска!",reloadNginxToLoadInYourNewConfiguration:`Перезагрузите ${a.nginx}, чтобы запустить его с новой конфигурацией:`,goLive:"Запустить!"},F={generateDiffieHellmanKeysByRunningThisCommandOnYourServer:"Сгенерируйте <b>ключи Диффи-Хеллмана</b>, запустив следующую команду на своем сервере:",createACommonAcmeChallengeDirectoryForLetsEncrypt:`Создайте директорию хранения <b>ACME-challenge</b> (для <b>${a.letsEncrypt}</b>):`,noAdditionalStepsAreNeededToSetUpSslForNginx:`Больше ничего не требуется, чтобы настроить ${a.ssl} в Вашей ${a.nginx} конфигурации.`,sslInit:`${a.ssl} init`},M={certbot:L,download:H,goLive:I,ssl:F},N={lookingForAPlaceToDeploy:"👋 Ищете место для развертывания новой конфигурации?",tryOutDigitalOceansDroplet:"Попробуйте LEMP Droplet от DigitalOcean с NGINX"},B={wantToContributeChanges:"👋 Хотите запросить новые функции, внести изменения или перевести инструмент на новый язык?",getInvolvedOnGitHub:"Посмотреть на GitHub"},V={droplet:N,contribute:B},G={app:i,setup:l,footer:n,domainSections:C,globalSections:j,setupSections:M,callouts:V},W={common:a,languages:o.default,templates:G}},2256:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const a={en:"Английский",zhCN:"Китайский (упрощённый)",zhTW:"Китайский (традиционный)",ptBR:"Португальский (бразильский)",fr:"Французский",ru:"Русский"}},3866:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const a={en:"英语",zhCN:"简体中文",zhTW:"繁体中文",ptBR:"葡萄牙语 (巴西)",fr:"法语",ru:"俄语"}},8891:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});const a={en:"英語",zhCN:"簡體中文",zhTW:"繁體中文",ptBR:"葡萄牙語(巴西)",fr:"法語",ru:"俄語"}},1925:(e,t,s)=>{var a={"./en/index.js":[763,763],"./fr/index.js":[9859,859],"./pt-br/index.js":[1481,481],"./ru/index.js":[5306],"./zh-cn/index.js":[5136,136],"./zh-tw/index.js":[3002,2]};function o(e){if(!s.o(a,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],o=t[0];return Promise.all(t.slice(1).map(s.e)).then((()=>s(o)))}o.keys=()=>Object.keys(a),o.id=1925,e.exports=o},879:(e,t,s)=>{var a={"./en/languages.js":4535,"./fr/languages.js":4938,"./pt-br/languages.js":4663,"./ru/languages.js":2256,"./zh-cn/languages.js":3866,"./zh-tw/languages.js":8891};function o(e){var t=i(e);return s(t)}function i(e){if(!s.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}o.keys=function(){return Object.keys(a)},o.resolve=i,e.exports=o,o.id=879},8977:(e,t,s)=>{"use strict";var a=s(144),o=s(2152),i=s.n(o),l=s(5660),n=s.n(l);s(3436),s(7874),s(6488),s(5206);const r=()=>{n().plugins.toolbar?n().plugins.toolbar.registerButton("copy-to-clipboard",(e=>{const t=document.createElement("button");t.textContent="Copy";const s=e.element,a=new(i())(t,{text:()=>s.textContent}),o=()=>{setTimeout((()=>{t.textContent="Copy"}),5e3)},l=()=>{t.dispatchEvent(new CustomEvent("copied",{bubbles:!0,detail:{text:s.textContent}}))};return a.on("success",(()=>{t.textContent="Copied!",l(),o()})),a.on("error",(()=>{const e=navigator.platform.includes("Mac");t.textContent=`Press ${e?"Cmd":"Ctrl"}+C to copy`,o()})),t})):console.warn("Copy to Clipboard loaded before Toolbar.")};r();var c=s(7152),p=s(5306);const d="ru",u=(e,t)=>e.match(/^([a-z]+)([A-Z]*)$/).slice(1).map((e=>e.toLowerCase())).filter((e=>!!e)).join(t),h=(e,t)=>e.split(t,2)[0].toLowerCase()+(e.split(t,2)[1]||"").toUpperCase(),m=s(1925),v=Object.freeze(m.keys().map((e=>e.match(/^\.\/([^/]+)\/index\.js$/))).filter((e=>null!==e)).map((e=>h(e[1],"-"))));a.Z.use(c.Z);const f={};f[d]=p.default;const g=[d],b=s(879);for(const Qo of v)Qo!==d&&(f[Qo]={languages:b(`./${u(Qo,"-")}/languages.js`).default});const C=new c.Z({locale:d,fallbackLocale:d,messages:f}),$=e=>{if(C.locale!==e&&!g.includes(e))return m(`./${u(e,"-")}/index.js`).then((t=>f[e]=t.default))},y=async e=>{await $(e),C.locale=e};var _=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"all do-bulma"},[s("Header",{attrs:{title:e.$t("templates.app.title")},scopedSlots:e._u([{key:"header",fn:function(){return[s("p",[e._v(e._s(e.$t("templates.app.description")))])]},proxy:!0}])}),s("div",{staticClass:"main container",style:{display:e.ready?void 0:"none"}},[s("div",{staticClass:"columns is-multiline"},[s("div",{class:"column "+(e.splitColumn?"is-half":"is-full")+" is-full-touch"},[s("h2",[e._v(e._s(e.$t("templates.app.perWebsiteConfig")))]),s("div",{staticClass:"tabs"},[s("ul",[e._l(e.activeDomains,(function(t){return s("li",{key:t[0].server.domain.computed,class:t[1]===e.active?"is-active":void 0},[s("a",{staticClass:"domain",on:{click:function(s){e.active=t[1]}}},[e._v(" "+e._s(t[0].server.domain.computed)+e._s(e.changes(t[1]))+" ")]),s("a",{staticClass:"remove",on:{click:function(s){return e.remove(t[1])}}},[s("i",{staticClass:"fas fa-times"})])])})),s("li",[s("a",{on:{click:e.add}},[s("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("templates.app.addSite")))])])],2)]),e._l(e.activeDomains,(function(t){return[s("Domain",{key:t[1],style:{display:t[1]===e.active?void 0:"none"},attrs:{data:t[0]}})]})),s("h2",[e._v(e._s(e.$t("templates.app.globalConfig")))]),s("Global",{attrs:{data:e.global}}),s("h2",[e._v(e._s(e.$t("templates.app.setup")))]),s("Setup",{attrs:{data:{domains:e.domains.filter((function(e){return null!==e})),global:e.global,confFiles:e.confFiles}}})],2),s("div",{class:"column "+(e.splitColumn?"is-half":"is-full")+" is-full-touch"},[s("h2",[e._v(e._s(e.$t("templates.app.configFiles")))]),s("div",{ref:"files",staticClass:"columns is-multiline files"},[e._l(e.confFilesOutput,(function(t){return[s(e.getPrismComponent(t[0]),{key:t[2],tag:"component",attrs:{name:t[0],conf:t[1],half:Object.keys(e.confFilesOutput).length>1&&!e.splitColumn},on:{copied:function(s){return e.codeCopiedEvent(t[3])}}})]}))],2)])])])],1)},x=[],k=s(6313),S=s.n(k),P=s(8397),E=s.n(P),w=s(5573),T=s.n(w),R=s(9938),D=s.n(R),O=s(1308),z=s(8871);const j=(e,t,s)=>e.enabled&&e.value!==e.default||"php"===t&&"php"===s&&e.computed!==e.default;var A=s(129),L=s.n(A),H=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"panel presets"},[s("Presets",{attrs:{data:e.$props.data.presets}})],1),s("div",{staticClass:"panel"},[s("div",{staticClass:"tabs"},[s("ul",e._l(e.tabs,(function(t){return s("li",{key:t.key,class:e.tabClass(t.key)},[s("a",{on:{click:function(s){return e.showTab(t.key)}}},[e._v(e._s(e.$t(t.display))+e._s(e.changes(t.key)))])])})),0)]),e._l(e.tabs,(function(t){return s(t,{key:t.key,tag:"component",staticClass:"container",style:{display:e.active===t.key?void 0:"none"},attrs:{data:e.$props.data[t.key]}})})),s("div",{staticClass:"navigation-buttons"},[!1!==e.previousTab?s("a",{staticClass:"button is-mini",on:{click:e.showPreviousTab}},[s("i",{staticClass:"fas fa-long-arrow-alt-left"}),e._v(" "),s("span",[e._v(e._s(e.$t("common.back")))])]):e._e(),!1!==e.nextTab?s("a",{staticClass:"button is-primary is-mini",on:{click:e.showNextTab}},[s("span",[e._v(e._s(e.$t("common.next")))]),e._v(" "),s("i",{staticClass:"fas fa-long-arrow-alt-right"})]):e._e()])],2)])},I=[];const F=({category:e,action:t,label:s,value:a,nonInteraction:o})=>{console.info("Analytics event:",{category:e,action:t,label:s,value:a,nonInteraction:o});try{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"nginx_tool",category:e,action:t,label:s,value:a,nonInteraction:o})}catch(i){}try{window.analytics.track("Web Interaction",{category:e,action:t,label:s,value:a,nonInteraction:o})}catch(i){}};var M=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container"},[s("div",{staticClass:"header-group",style:{cursor:e.interacted?"pointer":void 0},on:{click:e.toggleCollapse}},[s("h3",[e._v(e._s(e.$t("templates.domainSections.presets.presets")))]),e.interacted?s("a",{staticClass:"button is-tiny"},[s("i",{class:"fas fa-angle-"+(e.expanded?"up":"down")})]):e._e()]),!e.$parent.$props.data.hasUserInteraction||e.expanded?[e.$parent.$props.data.hasUserInteraction?s("div",{staticClass:"message is-warning"},[s("div",{staticClass:"message-body"},[e._v(" "+e._s(e.$t("templates.domainSections.presets.itLooksLikeYouCustomisedTheConfig"))+" ")])]):e._e(),s("div",{staticClass:"buttons-group"},e._l(e.$props.data,(function(t,a){return s("a",{class:"button"+(t.computed?" is-primary":""),on:{click:function(t){return e.setPreset(a)}}},[e._v(" "+e._s(e.$t(t.display))+" ")])})),0)]:e._e()],2)},N=[];const B=e=>Object.keys(e).reduce(((t,s)=>(t[s]={value:e[s].default,computed:e[s].default,...e[s]},t)),{}),V=(e,t,s=!0)=>Object.keys(e).reduce(((e,a)=>(e[a]={get(){return this.$props.data[a].value},set(e){s&&this.$parent&&"data"in this.$parent.$props&&"hasUserInteraction"in this.$parent.$props.data&&!this.$parent.$props.data.hasUserInteraction&&this.$props.data[a].value!==e&&(this.$parent.$props.data.hasUserInteraction=!0),this.$props.data[a].value=e,this.$props.data[a].computed=e}},e[a+"Default"]={get(){return this.$props.data[a].default}},e[a+"Enabled"]={get(){return this.$props.data[a].enabled}},e[a+"Changed"]={get(){return j(this.$props.data[a],t,a)}},e)),{}),G={frontend:{default:!1,display:"templates.domainSections.presets.frontend",enabled:!0,computedCheck(e){return!e.php.php.computed&&!e.python.python.computed&&!e.reverseProxy.reverseProxy.computed&&"index.html"===e.routing.index.computed&&e.routing.fallbackHtml.computed}},php:{default:!0,display:"common.php",enabled:!0,computedCheck(e){return e.php.php.computed&&"index.php"===e.routing.index.computed&&e.routing.fallbackPhp.computed&&!e.routing.fallbackHtml.computed&&!e.php.wordPressRules.computed&&!e.php.drupalRules.computed&&!e.php.magentoRules.computed&&!e.php.joomlaRules.computed}},django:{default:!1,display:"common.django",enabled:!0,computedCheck(e){return e.python.python.computed&&e.python.djangoRules.computed&&!e.routing.root.computed}},nodejs:{default:!1,display:"templates.domainSections.presets.nodeJs",enabled:!0,computedCheck(e){return e.reverseProxy.reverseProxy.computed&&!e.routing.root.computed}},singlePageApplication:{default:!1,display:"templates.domainSections.presets.singlePageApplication",enabled:!0,computedCheck(e){return e.php.php.computed&&"index.html"===e.routing.index.computed&&e.routing.fallbackHtml.computed}},wordPress:{default:!1,display:"common.wordPress",enabled:!0,computedCheck(e){return"index.php"===e.routing.index.computed&&e.routing.fallbackPhp.computed&&!e.routing.fallbackHtml.computed&&e.php.wordPressRules.computed&&!e.php.drupalRules.computed&&!e.php.magentoRules.computed&&!e.php.joomlaRules.computed}},drupal:{default:!1,display:"common.drupal",enabled:!0,computedCheck(e){return"index.php"===e.routing.index.computed&&e.routing.fallbackPhp.computed&&!e.routing.fallbackHtml.computed&&!e.php.wordPressRules.computed&&e.php.drupalRules.computed&&!e.php.magentoRules.computed&&!e.php.joomlaRules.computed}},magento:{default:!1,display:"common.magento",enabled:!0,computedCheck(e){return"index.php"===e.routing.index.computed&&e.routing.fallbackPhp.computed&&!e.routing.fallbackHtml.computed&&!e.php.wordPressRules.computed&&!e.php.drupalRules.computed&&e.php.magentoRules.computed&&!e.php.joomlaRules.computed}},joomla:{default:!1,display:"common.joomla",enabled:!0,computedCheck(e){return"index.php"===e.routing.index.computed&&e.routing.fallbackPhp.computed&&!e.routing.fallbackHtml.computed&&!e.php.wordPressRules.computed&&!e.php.drupalRules.computed&&!e.php.magentoRules.computed&&e.php.joomlaRules.computed}}},W={name:"DomainPresets",display:"templates.domainSections.presets.presets",key:"presets",delegated:B(G),props:{data:Object},data(){return{expanded:!1}},computed:{...V(G,"presets",!1),interacted(){return this.$parent.$props.data.hasUserInteraction}},watch:{"$parent.$props.data":{handler(e){Object.keys(this.$props.data).forEach((t=>{this.$props.data[t].computed=this.$props.data[t].computedCheck(e)}))},deep:!0}},methods:{setPreset(e){switch(Object.keys(this.$props.data).forEach((t=>this[t]=t===e)),this.presetEvent(e,this.interacted),this.$parent.resetValue("server","domain"),this.$parent.resetValue("php","php"),this.$parent.resetValue("php","wordPressRules"),this.$parent.resetValue("php","drupalRules"),this.$parent.resetValue("php","magentoRules"),this.$parent.resetValue("php","joomlaRules"),this.$parent.resetValue("python","python"),this.$parent.resetValue("python","djangoRules"),this.$parent.resetValue("reverseProxy","reverseProxy"),this.$parent.resetValue("routing","root"),this.$parent.resetValue("routing","index"),this.$parent.resetValue("routing","fallbackHtml"),this.$parent.resetValue("routing","fallbackPhp"),e){case"frontend":this.$parent.setValue("php","php",!1),this.$parent.setValue("routing","index","index.html"),this.$parent.setValue("routing","fallbackHtml",!0);break;case"php":break;case"django":this.$parent.setValue("php","php",!1),this.$parent.setValue("python","python",!0),this.$parent.setValue("python","djangoRules",!0),this.$parent.setValue("routing","root",!1);break;case"nodejs":this.$parent.setValue("php","php",!1),this.$parent.setValue("reverseProxy","reverseProxy",!0),this.$parent.setValue("routing","root",!1);break;case"singlePageApplication":this.$parent.setValue("routing","index","index.html"),this.$parent.setValue("routing","fallbackHtml",!0);break;case"wordPress":this.$parent.setValue("php","wordPressRules",!0);break;case"drupal":this.$parent.setValue("php","drupalRules",!0);break;case"magento":this.$parent.setValue("php","magentoRules",!0);break;case"joomla":this.$parent.setValue("php","joomlaRules",!0);break}},presetEvent(e,t=!1){F({category:"Preset",action:t?"Overwritten":"Applied",label:e})},toggleCollapse(){this.interacted&&(this.expanded=!this.expanded)}}},Z=W;var U=s(5961),q=(0,U.Z)(Z,M,N,!1,null,null,null);const Y=q.exports;var Q=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field-row"},[s("div",{staticClass:"field"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.server.domain")))]),s("div",{class:"control"+(e.domainChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.domain,expression:"domain"}],staticClass:"input",attrs:{type:"text",placeholder:e.domainDefault},domProps:{value:e.domain},on:{input:function(t){t.target.composing||(e.domain=t.target.value)}}})])]),s("div",{staticClass:"field"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.path")))]),s("div",{class:"control"+(e.pathChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.path,expression:"path"}],staticClass:"input",attrs:{type:"text",placeholder:"/var/www/"+e.domain},domProps:{value:e.path},on:{input:function(t){t.target.composing||(e.path=t.target.value)}}})])]),s("div",{staticClass:"field"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.server.documentRoot")))]),s("div",{class:"control"+(e.documentRootChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.documentRoot,expression:"documentRoot"}],staticClass:"input",attrs:{type:"text",placeholder:e.documentRootDefault},domProps:{value:e.documentRoot},on:{input:function(t){t.target.composing||(e.documentRoot=t.target.value)}}})])])]),e.duplicateDomain?[s("br"),s("div",{staticClass:"message is-warning"},[s("div",{staticClass:"message-body"},[e._v(" "+e._s(e.$t("templates.domainSections.server.oneOrMoreOtherDomainsAreAlsoNamed"))+" "),s("code",{staticClass:"slim"},[e._v(e._s(e.$props.data.domain.computed))]),e._v(". "+e._s(e.$t("templates.domainSections.server.thisWillCauseIssuesWithConfigGeneration"))+" ")])])]:e._e(),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.server.wwwSubdomain")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.wwwSubdomainChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.wwwSubdomain,callback:function(t){e.wwwSubdomain=t},expression:"wwwSubdomain"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" (www."+e._s(e.$props.data.domain.computed)+") ")])],1)])])])]),e.cdnSubdomainEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.server.cdnSubdomain")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.cdnSubdomainChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.cdnSubdomain,callback:function(t){e.cdnSubdomain=t},expression:"cdnSubdomain"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" (cdn."+e._s(e.$props.data.domain.computed)+") ")])],1)])])])]):e._e(),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.server.redirectSubdomains")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.redirectSubdomainsChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.redirectSubdomains,callback:function(t){e.redirectSubdomains=t},expression:"redirectSubdomains"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" ("+e._s(e.wwwSubdomain?e.domain+", ":"")+"*."+e._s(e.$props.data.domain.computed)+" "),s("i",{staticClass:"fas fa-long-arrow-alt-right"}),e._v(" "+e._s(e.wwwSubdomain?"www.":"")+e._s(e.$props.data.domain.computed)+") ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.server.listen")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field has-addons"},[e._m(0),s("div",{class:"control is-expanded"+(e.listenIpv4Changed?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.listenIpv4,expression:"listenIpv4"}],staticClass:"input",attrs:{type:"text",placeholder:e.listenIpv4Default},domProps:{value:e.listenIpv4},on:{input:function(t){t.target.composing||(e.listenIpv4=t.target.value)}}})])]),s("div",{staticClass:"field has-addons"},[e._m(1),s("div",{class:"control is-expanded"+(e.listenIpv6Changed?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.listenIpv6,expression:"listenIpv6"}],staticClass:"input",attrs:{type:"text",placeholder:e.listenIpv6Default},domProps:{value:e.listenIpv6},on:{input:function(t){t.target.composing||(e.listenIpv6=t.target.value)}}})])])])])],2)},K=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"control"},[s("a",{staticClass:"button is-static"},[e._v(" IPv4 ")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"control"},[s("a",{staticClass:"button is-static"},[e._v(" IPv6 ")])])}],X=s(8648),J=s.n(X);const ee={domain:{default:"example.com",enabled:!0},path:{default:"",computed:"/var/www/example.com",enabled:!0},documentRoot:{default:"/public",enabled:!0},wwwSubdomain:{default:!1,enabled:!0},cdnSubdomain:{default:!1,enabled:!1},redirectSubdomains:{default:!0,enabled:!0},listenIpv4:{default:"*",enabled:!0},listenIpv6:{default:"::",enabled:!0}},te={name:"DomainServer",display:"templates.domainSections.server.server",key:"server",delegated:B(ee),components:{PrettyCheck:J()},props:{data:Object},computed:{...V(ee,"server"),duplicateDomain(){return this.$parent.$parent.$data.domains.filter((e=>e&&e.server.domain.computed===this.$props.data.domain.computed)).length>1}},watch:{"$props.data.domain":{handler(e){e.computed=e.computed.replace(/<.+>/,""),e.computed.startsWith("www.")&&(e.computed=e.computed.slice(4),this.wwwSubdomain=!0),e.computed.trim()||(e.computed=e.default),this.$props.data.path.value.trim()||(this.$props.data.path.computed=`/var/www/${e.computed}`)},deep:!0},"$props.data.wwwSubdomain":{handler(e){e.computed?(this.$props.data.cdnSubdomain.enabled=!0,this.$props.data.cdnSubdomain.computed=this.$props.data.cdnSubdomain.value):(this.$props.data.cdnSubdomain.enabled=!1,this.$props.data.cdnSubdomain.computed=!1)},deep:!0},"$props.data.path":{handler(e){e.computed.trim()||(e.computed=`/var/www/${this.$props.data.domain.computed}`)},deep:!0}}},se=te;var ae=(0,U.Z)(se,Q,K,!1,null,null,null);const oe=ae.exports;var ie=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.https")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.httpsChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.https,callback:function(t){e.https=t},expression:"https"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.https.enableEncryptedSslConnection"))+" ")])],1)])])])]),e.http2Enabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.https.http2")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.http2Changed?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.http2,callback:function(t){e.http2=t},expression:"http2"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.https.enableHttp2Connections"))+" ")])],1)])])])]):e._e(),e.http3Enabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.https.http3")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.http3Changed?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.http3,callback:function(t){e.http3=t},expression:"http3"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.https.enableHttp3Connections"))+" ")])],1)])])])]):e._e(),e.portReuseEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.https.portReuse")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.portReuseChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.portReuse,callback:function(t){e.portReuse=t},expression:"portReuse"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.https.enableReuseOfPort"))+" ")])],1)])])])]):e._e(),e.forceHttpsEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.https.forceHttps")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.forceHttpsChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.forceHttps,callback:function(t){e.forceHttps=t},expression:"forceHttps"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" (http://"+e._s(e.$parent.$props.data.server.domain.computed)+" "),s("i",{staticClass:"fas fa-long-arrow-alt-right"}),e._v(" https://"+e._s(e.$parent.$props.data.server.domain.computed)+") ")])],1)])])])]):e._e(),e.hstsEnabled?s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.https.hsts")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.hstsChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.hsts,callback:function(t){e.hsts=t},expression:"hsts"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.https.enableStrictTransportSecurity"))+" ")])],1)]),e.hstsSubdomainsEnabled?s("div",{class:"control"+(e.hstsSubdomainsChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.hstsSubdomains,callback:function(t){e.hstsSubdomains=t},expression:"hstsSubdomains"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.https.enableIncludeSubDomains"))+" ")])],1)]):e._e(),e.hstsPreloadEnabled?s("div",{class:"control"+(e.hstsPreloadChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.hstsPreload,callback:function(t){e.hstsPreload=t},expression:"hstsPreload"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.https.enablePreload"))+" ")])],1)]):e._e()])])]):e._e(),e.certTypeEnabled?s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.https.certificationType")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},e._l(e.$props.data.certType.options,(function(t,a){return s("div",{class:"control"+(e.certTypeChanged&&a===e.certType?" is-changed":"")},[s("div",{staticClass:"radio"},[s("PrettyRadio",{staticClass:"p-default p-round p-fill p-icon",attrs:{value:a},model:{value:e.certType,callback:function(t){e.certType=t},expression:"certType"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t(t))+" ")])],1)])})),0)])]):e._e(),e.letsEncryptEmailEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.https.letsEncryptEmail")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.letsEncryptEmailChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.letsEncryptEmail,expression:"letsEncryptEmail"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.letsEncryptEmail.computed},domProps:{value:e.letsEncryptEmail},on:{input:function(t){t.target.composing||(e.letsEncryptEmail=t.target.value)}}})])])])]):e._e(),e.sslCertificateEnabled?s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.sslCertificateChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.sslCertificate,expression:"sslCertificate"}],staticClass:"input",attrs:{type:"text",placeholder:e.$parent.$parent.$data.global.nginx.nginxConfigDirectory.computed+"/ssl/"+e.$parent.$props.data.server.domain.computed+".crt"},domProps:{value:e.sslCertificate},on:{input:function(t){t.target.composing||(e.sslCertificate=t.target.value)}}})])])])]):e._e(),e.sslCertificateKeyEnabled?s("div",{staticClass:"field is-horizontal"},[e._m(1),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.sslCertificateKeyChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.sslCertificateKey,expression:"sslCertificateKey"}],staticClass:"input",attrs:{type:"text",placeholder:e.$parent.$parent.$data.global.nginx.nginxConfigDirectory.computed+"/ssl/"+e.$parent.$props.data.server.domain.computed+".key"},domProps:{value:e.sslCertificateKey},on:{input:function(t){t.target.composing||(e.sslCertificateKey=t.target.value)}}})])])])]):e._e(),e.$props.data.http3.value?[s("br"),s("div",{staticClass:"message is-warning"},[s("div",{staticClass:"message-body"},[e._v(" "+e._s(e.$t("templates.domainSections.https.http3Warning1"))+" "),s("ExternalLink",{attrs:{text:e.$t("templates.domainSections.https.http3Warning2"),link:"https://quic.nginx.org/README"}}),e._v(" "+e._s(e.$t("templates.domainSections.https.http3Warning3"))+" "),s("ExternalLink",{attrs:{text:e.$t("templates.domainSections.https.http3Warning4"),link:"https://github.com/cloudflare/quiche/tree/master/extras/nginx"}}),e._v(" "+e._s(e.$t("templates.domainSections.https.http3Warning5"))+" ")],1)])]:e._e()],2)},le=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("ssl_certificate")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("ssl_certificate_key")])])}],ne=s(4310),re=s.n(ne),ce=s(8216);const pe={https:{default:!0,enabled:!0},http2:{default:!0,enabled:!0},http3:{default:!1,enabled:!0},portReuse:{default:!0,enabled:!1},forceHttps:{default:!0,enabled:!0},hsts:{default:!0,enabled:!0},hstsSubdomains:{default:!0,enabled:!0},hstsPreload:{default:!1,enabled:!0},certType:{default:"letsEncrypt",options:{letsEncrypt:"common.letsEncrypt",custom:"templates.domainSections.https.customCertificate"},enabled:!0},letsEncryptEmail:{default:"",computed:"info@example.com",enabled:!0},sslCertificate:{default:"",enabled:!1},sslCertificateKey:{default:"",enabled:!1}},de={name:"DomainHTTPS",display:"common.https",key:"https",delegated:B(pe),components:{PrettyCheck:J(),PrettyRadio:re(),ExternalLink:ce.Z},props:{data:Object},computed:V(pe,"https"),watch:{"$props.data.https":{handler(e){const t=e.computed;t?(this.$props.data.http2.enabled=!0,this.$props.data.http2.computed=this.$props.data.http2.value,this.$props.data.http3.enabled=!0,this.$props.data.http3.computed=this.$props.data.http3.value,this.$props.data.forceHttps.enabled=!0,this.$props.data.forceHttps.computed=this.$props.data.forceHttps.value,this.$props.data.hsts.enabled=!0,this.$props.data.hsts.computed=this.$props.data.hsts.value,this.$props.data.certType.enabled=!0,this.$props.data.certType.computed=this.$props.data.certType.value):(this.$props.data.http2.enabled=!1,this.$props.data.http2.computed=!1,this.$props.data.http3.enabled=!1,this.$props.data.http3.computed=!1,this.$props.data.forceHttps.enabled=!1,this.$props.data.forceHttps.computed=!1,this.$props.data.hsts.enabled=!1,this.$props.data.hsts.computed=!1,this.$props.data.certType.enabled=!1,this.$props.data.certType.computed="")},deep:!0},"$props.data.http3":{handler(e){e.computed?(this.$props.data.portReuse.enabled=!0,this.$props.data.portReuse.computed=this.$props.data.portReuse.value):(this.$props.data.portReuse.enabled=!1,this.$props.data.portReuse.computed=!1)},deep:!0},"$props.data":{handler(){this.$props.data.hsts.computed?(this.$props.data.hstsSubdomains.enabled=!0,this.$props.data.hstsSubdomains.computed=this.$props.data.hstsSubdomains.value):(this.$props.data.hstsSubdomains.enabled=!1,this.$props.data.hstsSubdomains.computed=!1),this.$props.data.hsts.computed&&this.$props.data.hstsSubdomains.computed?(this.$props.data.hstsPreload.enabled=!0,this.$props.data.hstsPreload.computed=this.$props.data.hstsPreload.value):(this.$props.data.hstsPreload.enabled=!1,this.$props.data.hstsPreload.computed=!1)},deep:!0},"$props.data.certType":{handler(e){e.enabled?(Object.keys(e.options).includes(e.computed)||(e.computed=e.default),"letsEncrypt"===e.computed?(this.$props.data.letsEncryptEmail.enabled=!0,this.$props.data.letsEncryptEmail.computed=this.$props.data.letsEncryptEmail.value,this.$props.data.sslCertificate.enabled=!1,this.$props.data.sslCertificate.computed="",this.$props.data.sslCertificateKey.enabled=!1,this.$props.data.sslCertificateKey.computed=""):(this.$props.data.sslCertificate.enabled=!0,this.$props.data.sslCertificate.computed=this.$props.data.sslCertificate.value,this.$props.data.sslCertificateKey.enabled=!0,this.$props.data.sslCertificateKey.computed=this.$props.data.sslCertificateKey.value,this.$props.data.letsEncryptEmail.enabled=!1,this.$props.data.letsEncryptEmail.computed="")):(this.$props.data.letsEncryptEmail.enabled=!1,this.$props.data.letsEncryptEmail.computed="",this.$props.data.sslCertificate.enabled=!1,this.$props.data.sslCertificate.computed="",this.$props.data.sslCertificateKey.enabled=!1,this.$props.data.sslCertificateKey.computed="")},deep:!0},"$props.data.letsEncryptEmail":{handler(e){e.computed.trim()||(e.computed=`info@${this.$parent.$props.data.server.domain.computed}`)},deep:!0},"$parent.$props.data.server.domain":{handler(e){this.$props.data.letsEncryptEmail.value.trim()||(this.$props.data.letsEncryptEmail.computed=`info@${e.computed}`)},deep:!0}}},ue=de;var he=(0,U.Z)(ue,ie,le,!1,null,null,null);const me=he.exports;var ve=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.phpEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.php")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.phpChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.php,callback:function(t){e.php=t},expression:"php"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.php.enablePhp"))+" ")])],1)])])])]):s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.php")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control is-changed"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.domainSections.php.phpIsDisabled"))+" "),e.$parent.$props.data.reverseProxy.reverseProxy.computed?[s("br"),e._v(e._s(e.$t("templates.domainSections.php.phpCannotBeEnabledWithReverseProxy"))+" ")]:e._e(),e.$parent.$props.data.python.python.computed?[s("br"),e._v(e._s(e.$t("templates.domainSections.php.phpCannotBeEnabledWithPython"))+" ")]:e._e()],2)])])])]),e.phpServerEnabled?s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label has-margin-top"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.php.phpServer")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.phpServerChanged?" is-changed":"")},[s("VueSelect",{ref:"phpServerSelect",attrs:{options:e.phpServerOptions,clearable:!1,reduce:function(e){return e.value}},model:{value:e.phpServer,callback:function(t){e.phpServer=t},expression:"phpServer"}})],1),e.phpServerCustomEnabled?s("div",{class:"control"+(e.phpServerCustomChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.phpServerCustom,expression:"phpServerCustom"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.phpServerCustom.default},domProps:{value:e.phpServerCustom},on:{input:function(t){t.target.composing||(e.phpServerCustom=t.target.value)}}})]):e._e()])])]):e._e(),e.phpBackupServerEnabled?s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label has-margin-top"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.php.phpBackupServer")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.phpBackupServerChanged?" is-changed":"")},[s("VueSelect",{ref:"phpBackupServerSelect",attrs:{options:e.phpBackupServerOptions,clearable:!1,reduce:function(e){return e.value}},model:{value:e.phpBackupServer,callback:function(t){e.phpBackupServer=t},expression:"phpBackupServer"}})],1),e.phpBackupServerCustomEnabled?s("div",{class:"control"+(e.phpBackupServerCustomChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.phpBackupServerCustom,expression:"phpBackupServerCustom"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.phpBackupServerCustom.default},domProps:{value:e.phpBackupServerCustom},on:{input:function(t){t.target.composing||(e.phpBackupServerCustom=t.target.value)}}})]):e._e()])])]):e._e(),e.wordPressRulesEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.php.wordPressRules")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.wordPressRulesChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.wordPressRules,callback:function(t){e.wordPressRules=t},expression:"wordPressRules"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.php.enableWordPressRules"))+" ")])],1)])])])]):e._e(),e.drupalRulesEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.php.drupalRules")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.drupalRulesChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.drupalRules,callback:function(t){e.drupalRules=t},expression:"drupalRules"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.php.enableDrupalRules"))+" ")])],1)])])])]):e._e(),e.magentoRulesEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.php.magentoRules")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.magentoRulesChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.magentoRules,callback:function(t){e.magentoRules=t},expression:"magentoRules"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.php.enableMagentoRules"))+" ")])],1)])])])]):e._e(),e.joomlaRulesEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.php.joomlaRules")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.joomlaRulesChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.joomlaRules,callback:function(t){e.joomlaRules=t},expression:"joomlaRules"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.php.enableJoomlaRules"))+" ")])],1)])])])]):e._e()])},fe=[];const ge={"127.0.0.1:9000":"templates.domainSections.php.tcp","/var/run/hhvm/sock":"templates.domainSections.php.hhvmSocket","/var/run/hhvm/hhvm.sock":"templates.domainSections.php.hhvmSocket","/var/run/php5-fpm.sock":"templates.domainSections.php.php5Socket","/var/run/php/php7.1-fpm.sock":"templates.domainSections.php.php71Socket","/var/run/php/php7.2-fpm.sock":"templates.domainSections.php.php72Socket","/var/run/php/php7.0-fpm.sock":"templates.domainSections.php.php70Socket","/var/run/php/php7.3-fpm.sock":"templates.domainSections.php.php73Socket","/var/run/php/php7.4-fpm.sock":"templates.domainSections.php.php74Socket","/var/run/php/php8.0-fpm.sock":"templates.domainSections.php.php80Socket","/var/run/php/php-fpm.sock":"templates.domainSections.php.phpSocket",custom:"templates.domainSections.php.custom"},be=["","custom"],Ce={phpServer:{default:"/var/run/php/php-fpm.sock",options:ge,enabled:!0},phpServerCustom:{default:"unix:/var/run/php/php-fpm.sock",enabled:!1},phpBackupServer:{default:"",options:{"":"templates.domainSections.php.disabled",...ge},enabled:!0},phpBackupServerCustom:{default:"unix:/var/run/php/php-fpm.sock",enabled:!1},php:{default:!0,enabled:!0},wordPressRules:{default:!1,enabled:!0},drupalRules:{default:!1,enabled:!0},magentoRules:{default:!1,enabled:!0},joomlaRules:{default:!1,enabled:!0}},$e={name:"DomainPHP",display:"common.php",key:"php",delegated:B(Ce),components:{PrettyCheck:J(),VueSelect:D()},props:{data:Object},computed:{...V(Ce,"php"),phpServerOptions(){return Object.entries(this.$props.data.phpServer.options).map((([e,t])=>this.formattedOption(e,t)))},phpBackupServerOptions(){return Object.entries(this.$props.data.phpBackupServer.options).map((([e,t])=>this.formattedOption(e,t)))}},watch:{"$parent.$props.data":{handler(e){e.reverseProxy.reverseProxy.computed||e.python.python.computed?(this.$props.data.php.enabled=!1,this.$props.data.php.computed=!1):(this.$props.data.php.enabled=!0,this.$props.data.php.computed=this.$props.data.php.value)},deep:!0},"$props.data.php":{handler(e){e.computed?(this.$props.data.phpServer.enabled=!0,this.$props.data.phpServer.computed=this.$props.data.phpServer.value,this.$props.data.phpBackupServer.enabled=!0,this.$props.data.phpBackupServer.computed=this.$props.data.phpBackupServer.value,this.$props.data.wordPressRules.enabled=!0,this.$props.data.wordPressRules.computed=this.$props.data.wordPressRules.value,this.$props.data.drupalRules.enabled=!0,this.$props.data.drupalRules.computed=this.$props.data.drupalRules.value,this.$props.data.magentoRules.enabled=!0,this.$props.data.magentoRules.computed=this.$props.data.magentoRules.value,this.$props.data.joomlaRules.enabled=!0,this.$props.data.joomlaRules.computed=this.$props.data.joomlaRules.value):(this.$props.data.phpServer.enabled=!1,this.$props.data.phpServer.computed="",this.$props.data.phpBackupServer.enabled=!1,this.$props.data.phpBackupServer.computed="",this.$props.data.wordPressRules.enabled=!1,this.$props.data.wordPressRules.computed=!1,this.$props.data.drupalRules.enabled=!1,this.$props.data.drupalRules.computed=!1,this.$props.data.magentoRules.enabled=!1,this.$props.data.magentoRules.computed=!1,this.$props.data.joomlaRules.enabled=!1,this.$props.data.joomlaRules.computed=!1)},deep:!0},"$props.data.phpServer":{handler(e){if(e.enabled)return Object.keys(e.options).includes(e.computed)||(e.computed=e.default),void(this.$props.data.phpServerCustom.enabled="custom"===e.computed);this.$props.data.phpServerCustom.enabled=!1},deep:!0},"$props.data.phpBackupServer":{handler(e){if(e.enabled)return Object.keys(e.options).includes(e.computed)||(e.computed=e.default),void(this.$props.data.phpBackupServerCustom.enabled="custom"===e.computed);this.$props.data.phpBackupServerCustom.enabled=!1},deep:!0},"$i18n.locale"(){if(!this.$refs.phpServerSelect)return!1;const e=this.phpServerOptions.find((e=>e.value===this.$refs.phpServerSelect.$data._value.value));e&&(this.$refs.phpServerSelect.$data._value=e);const t=this.phpBackupServerOptions.find((e=>e.value===this.$refs.phpBackupServerSelect.$data._value.value));t&&(this.$refs.phpBackupServerSelect.$data._value=t)}},methods:{formattedOption(e,t){return{label:`${this.$t(t)}${be.includes(e)?"":`: ${e}`}`,value:e}}}},ye=$e;var _e=(0,U.Z)(ye,ve,fe,!1,null,null,null);const xe=_e.exports;var ke=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.pythonEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.python")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.pythonChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.python,callback:function(t){e.python=t},expression:"python"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.python.enablePython"))+" ")])],1)])])])]):s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.python")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.domainSections.python.pythonIsDisabled"))+" "),e.$parent.$props.data.reverseProxy.reverseProxy.computed?[s("br"),e._v(e._s(e.$t("templates.domainSections.python.pythonCannotBeEnabledWithReverseProxy"))+" ")]:e._e(),e.$parent.$props.data.php.php.computed?[s("br"),e._v(e._s(e.$t("templates.domainSections.python.pythonCannotBeEnabledWithPhp"))+" ")]:e._e()],2)])])])]),e.djangoRulesEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.python.djangoRules")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.djangoRulesChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.djangoRules,callback:function(t){e.djangoRules=t},expression:"djangoRules"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.python.enableDjangoRules"))+" ")])],1)])])])]):e._e()])},Se=[];const Pe={python:{default:!1,enabled:!1},djangoRules:{default:!1,enabled:!1}},Ee={name:"DomainPython",display:"common.python",key:"python",delegated:B(Pe),components:{PrettyCheck:J()},props:{data:Object},computed:V(Pe,"python"),watch:{"$parent.$props.data":{handler(e){e.reverseProxy.reverseProxy.computed||e.php.php.computed?(this.$props.data.python.enabled=!1,this.$props.data.python.computed=!1):(this.$props.data.python.enabled=!0,this.$props.data.python.computed=this.$props.data.python.value)},deep:!0},"$props.data.python":{handler(e){e.computed?(this.$props.data.djangoRules.enabled=!0,this.$props.data.djangoRules.computed=this.$props.data.djangoRules.value):(this.$props.data.djangoRules.enabled=!1,this.$props.data.djangoRules.computed=!1)},deep:!0}}},we=Ee;var Te=(0,U.Z)(we,ke,Se,!1,null,null,null);const Re=Te.exports;var De=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.reverseProxyEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.reverseProxy")))])]),s("div",{staticClass:"field-body"},[s("div",{class:"field"+(e.reverseProxyChanged?" is-changed":"")},[s("div",{staticClass:"control"},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.reverseProxy,callback:function(t){e.reverseProxy=t},expression:"reverseProxy"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.reverseProxy.enableReverseProxy"))+" ")])],1)])])])]):s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.reverseProxy")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.domainSections.reverseProxy.reverseProxyIsDisabled"))+" "),e.$parent.$props.data.php.php.computed?[s("br"),e._v(e._s(e.$t("templates.domainSections.reverseProxy.reverseProxyCannotBeEnabledWithPhp"))+" ")]:e._e(),e.$parent.$props.data.python.python.computed?[s("br"),e._v(e._s(e.$t("templates.domainSections.reverseProxy.reverseProxyCannotBeEnabledWithPython"))+" ")]:e._e()],2)])])])]),e.pathEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.path")))])]),s("div",{staticClass:"field-body"},[s("div",{class:"field"+(e.pathChanged?" is-changed":"")},[s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.path,expression:"path"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.path.default},domProps:{value:e.path},on:{input:function(t){t.target.composing||(e.path=t.target.value)}}})])])])]):e._e(),e.proxyPassEnabled?s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{class:"field"+(e.proxyPassChanged?" is-changed":"")},[s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.proxyPass,expression:"proxyPass"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.proxyPass.default},domProps:{value:e.proxyPass},on:{input:function(t){t.target.composing||(e.proxyPass=t.target.value)}}})])])])]):e._e()])},Oe=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("proxy_pass")])])}];const ze={reverseProxy:{default:!1,enabled:!1},path:{default:"/",enabled:!1},proxyPass:{default:"http://127.0.0.1:3000",enabled:!1}},je={name:"DomainReverseProxy",display:"common.reverseProxy",key:"reverseProxy",delegated:B(ze),components:{PrettyCheck:J()},props:{data:Object},computed:V(ze,"reverseProxy"),watch:{"$parent.$props.data":{handler(e){e.php.php.computed||e.python.python.computed?(this.$props.data.reverseProxy.enabled=!1,this.$props.data.reverseProxy.computed=!1):(this.$props.data.reverseProxy.enabled=!0,this.$props.data.reverseProxy.computed=this.$props.data.reverseProxy.value)},deep:!0},"$props.data.reverseProxy":{handler(e){e.computed?(this.$props.data.path.enabled=!0,this.$props.data.path.computed=this.$props.data.path.value,this.$props.data.proxyPass.enabled=!0,this.$props.data.proxyPass.computed=this.$props.data.proxyPass.value):(this.$props.data.path.enabled=!1,this.$props.data.path.computed="",this.$props.data.proxyPass.enabled=!1,this.$props.data.proxyPass.computed="")},deep:!0}}},Ae=je;var Le=(0,U.Z)(Ae,De,Oe,!1,null,null,null);const He=Le.exports;var Ie=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.rootChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.root,callback:function(t){e.root=t},expression:"root"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("common.enable"))+" ")])],1)])])])]),e.indexEnabled?s("div",{staticClass:"field is-horizontal is-aligned-top"},[e._m(1),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},e._l(e.$props.data.index.options,(function(t){return s("div",{class:"control"+(e.indexChanged&&t===e.index?" is-changed":"")},[s("div",{staticClass:"radio"},[s("PrettyRadio",{staticClass:"p-default p-round p-fill p-icon",attrs:{value:t},model:{value:e.index,callback:function(t){e.index=t},expression:"index"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(t)+" ")])],1)])})),0)])]):e._e(),e.fallbackHtmlEnabled||e.fallbackPhpEnabled?s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.routing.fallbackRouting")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[e.fallbackHtmlEnabled?s("div",{class:"control"+(e.fallbackHtmlChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.fallbackHtml,callback:function(t){e.fallbackHtml=t},expression:"fallbackHtml"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" index.html ")])],1)]):e._e(),e.fallbackPhpEnabled?s("div",{class:"control"+(e.fallbackPhpChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.fallbackPhp,callback:function(t){e.fallbackPhp=t},expression:"fallbackPhp"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" index.php ")])],1)]):e._e()])])]):e._e(),e.fallbackPhpPathEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.routing.fallbackRoutingPhpPath")))])]),s("div",{staticClass:"field-body"},[s("div",{class:"field"+(e.fallbackPhpPathChanged?" is-changed":"")},[s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.fallbackPhpPath,expression:"fallbackPhpPath"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.fallbackPhpPath.default},domProps:{value:e.fallbackPhpPath},on:{input:function(t){t.target.composing||(e.fallbackPhpPath=t.target.value)}}})])])])]):e._e(),e.legacyPhpRoutingEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.routing.legacyPhpRouting")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.legacyPhpRoutingChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.legacyPhpRouting,callback:function(t){e.legacyPhpRouting=t},expression:"legacyPhpRouting"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.routing.enableLegacyRouting"))+" ")])],1)])])])]):e._e()])},Fe=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("root")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("index")])])}];const Me={root:{default:!0,enabled:!0},index:{default:"index.php",options:["index.html","index.php"],enabled:!0},fallbackHtml:{default:!1,enabled:!0},fallbackPhp:{default:!0,enabled:!0},fallbackPhpPath:{default:"/api/",enabled:!1},legacyPhpRouting:{default:!1,enabled:!0}},Ne={name:"DomainRouting",display:"templates.domainSections.routing.routing",key:"routing",delegated:B(Me),components:{PrettyCheck:J(),PrettyRadio:re()},props:{data:Object},computed:V(Me,"routing"),watch:{"$props.data.root":{handler(e){e.computed?(this.$props.data.index.enabled=!0,this.$props.data.index.computed=this.$props.data.index.value,this.$props.data.fallbackHtml.enabled=!0,this.$props.data.fallbackHtml.computed=this.$props.data.fallbackHtml.value,this.$props.data.fallbackPhp.enabled=!0,this.$props.data.fallbackPhp.computed=this.$props.data.fallbackPhp.value):(this.$props.data.index.enabled=!1,this.$props.data.index.computed="",this.$props.data.fallbackHtml.enabled=!1,this.$props.data.fallbackHtml.computed=!1,this.$props.data.fallbackPhp.enabled=!1,this.$props.data.fallbackPhp.computed=!1)},deep:!0},"$props.data":{handler(e){e.fallbackHtml.computed&&e.fallbackPhp.computed?(this.$props.data.fallbackPhpPath.enabled=!0,this.$props.data.fallbackPhpPath.computed=this.$props.data.fallbackPhpPath.value):(this.$props.data.fallbackPhpPath.enabled=!1,this.$props.data.fallbackPhpPath.computed="")},deep:!0}}},Be=Ne;var Ve=(0,U.Z)(Be,Ie,Fe,!1,null,null,null);const Ge=Ve.exports;var We=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("access_log "+e._s(e.$t("templates.domainSections.logging.byDomain")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.accessLogChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.accessLog,callback:function(t){e.accessLog=t},expression:"accessLog"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.logging.enableForThisDomain"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("error_log "+e._s(e.$t("templates.domainSections.logging.byDomain")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.errorLogChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.errorLog,callback:function(t){e.errorLog=t},expression:"errorLog"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.logging.enableForThisDomain"))+" ")])],1)])])])])])},Ze=[];const Ue={accessLog:{default:!1,enabled:!0},errorLog:{default:!1,enabled:!0}},qe={name:"DomainLogging",display:"common.logging",key:"logging",delegated:B(Ue),components:{PrettyCheck:J()},props:{data:Object},computed:V(Ue,"logging")},Ye=qe;var Qe=(0,U.Z)(Ye,We,Ze,!1,null,null,null);const Ke=Qe.exports;var Xe=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"columns"},[s("div",{staticClass:"column"},[s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.getMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.getMethod,callback:function(t){e.getMethod=t},expression:"getMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(1),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.postMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.postMethod,callback:function(t){e.postMethod=t},expression:"postMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(2),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.putMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.putMethod,callback:function(t){e.putMethod=t},expression:"putMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(3),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.patchMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.patchMethod,callback:function(t){e.patchMethod=t},expression:"patchMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(4),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.deleteMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.deleteMethod,callback:function(t){e.deleteMethod=t},expression:"deleteMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])])]),s("div",{staticClass:"column"},[s("div",{staticClass:"field is-horizontal"},[e._m(5),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.headMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.headMethod,callback:function(t){e.headMethod=t},expression:"headMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(6),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.connectMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.connectMethod,callback:function(t){e.connectMethod=t},expression:"connectMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(7),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.optionsMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.optionsMethod,callback:function(t){e.optionsMethod=t},expression:"optionsMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(8),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.traceMethodChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.traceMethod,callback:function(t){e.traceMethod=t},expression:"traceMethod"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.domainSections.restrict.disableForThisDomain"))+" ")])],1)])])])])])]),e.hasAtLeastOneEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.restrict.responseCode")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.responseCodeChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model.number",value:e.responseCode,expression:"responseCode",modifiers:{number:!0}}],class:["input",e.validResponseCode?"":"is-danger"],attrs:{type:"number",min:"100",step:"1",placeholder:e.$props.data.responseCode.default},domProps:{value:e.responseCode},on:{input:function(t){t.target.composing||(e.responseCode=e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})])])])]):e._e()])},Je=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("GET")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("POST")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("PUT")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("PATCH")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("DELETE")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("HEAD")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("CONNECT")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("OPTIONS")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("TRACE")])])}];const et={getMethod:{default:!1,enabled:!0},postMethod:{default:!1,enabled:!0},putMethod:{default:!1,enabled:!0},patchMethod:{default:!1,enabled:!0},deleteMethod:{default:!1,enabled:!0},headMethod:{default:!1,enabled:!0},connectMethod:{default:!1,enabled:!0},optionsMethod:{default:!1,enabled:!0},traceMethod:{default:!1,enabled:!0},responseCode:{default:405,enabled:!0}},tt={name:"DomainRestrict",display:"common.restrict",key:"restrict",delegated:B(et),components:{PrettyCheck:J()},props:{data:Object},data(){return{validResponseCode:!0}},computed:{...V(et,"restrict"),hasAtLeastOneEnabled(){return Object.keys(this.$props.data).filter((e=>this.$props.data[e].computed&&"responseCode"!==e)).length>0}},watch:{"$props.data.responseCode":{handler(e){e.computed&&/^[1-5][0-9][0-9]$/.test(e.computed)?this.validResponseCode=!0:this.validResponseCode=!1},deep:!0}}},st=tt;var at=(0,U.Z)(st,Xe,Je,!1,null,null,null);const ot=at.exports;var it=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label has-margin-top"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.domainSections.onion.onionLocation")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.onionLocationChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.onionLocation,expression:"onionLocation"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.onionLocation.placeholder},domProps:{value:e.onionLocation},on:{input:function(t){t.target.composing||(e.onionLocation=t.target.value)}}})]),e.onionLocationChanged?e._e():[s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.domainSections.onion.provideAnOnionLocationToSetOnionLocationHeader"))+" ")])]),s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.domainSections.onion.letsVisitorsKnownOnionServicesIsAvailable"))+" ")])]),s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[s("ExternalLink",{attrs:{text:e.$t("templates.domainSections.onion.learnMoreAboutOnionServices"),link:"https://community.torproject.org/onion-services/"}})],1)])],e.incorrectEnding?s("div",{staticClass:"control"},[s("label",{staticClass:"text message is-warning"},[s("span",{staticClass:"message-body"},[e._v(" "+e._s(e.$t("templates.domainSections.onion.onionLocationExpectedToEndWithOnion"))+" ")])])]):e._e()],2)])])])},lt=[];const nt={onionLocation:{default:"",placeholder:"<your-onion-address>.onion",enabled:!0}},rt={name:"DomainOnion",display:"templates.domainSections.onion.onion",key:"onion",delegated:B(nt),components:{ExternalLink:ce.Z},props:{data:Object},computed:{...V(nt,"onion"),incorrectEnding(){return this.onionLocationChanged&&!this.$props.data.onionLocation.computed.endsWith(".onion")}},watch:{"$props.data.onionLocation":{handler(e){e.computed=e.computed.replace(/^https?:\/\//,"")},deep:!0}}},ct=rt;var pt=(0,U.Z)(ct,it,lt,!1,null,null,null);const dt=pt.exports,ut=[oe,me,xe,Re,He,Ge,Ke,ot,dt],ht=ut,mt={hasUserInteraction:!1,presets:Y.delegated,...ht.reduce(((e,t)=>(e[t.key]=t.delegated,e)),{})},vt={name:"Domain",delegated:mt,components:{Presets:Y},props:{data:Object},data(){return{active:ht[0].key,tabs:ht}},computed:{nextTab(){const e=this.$data.tabs.map((e=>e.key)),t=e.indexOf(this.$data.active)+1;return t<e.length&&e[t]},previousTab(){const e=this.$data.tabs.map((e=>e.key)),t=e.indexOf(this.$data.active)-1;return t>=0&&e[t]}},methods:{changesCount(e){return Object.keys(this.$props.data[e]).filter((t=>j(this.$props.data[e][t],e,t))).length},changes(e){const t=this.changesCount(e);return t?` (${t.toLocaleString()})`:""},setValue(e,t,s){Object.assign(this.$props.data[e][t],{value:s,computed:s})},resetValue(e,t){this.setValue(e,t,this.$props.data[e][t].default)},tabClass(e){const t=[];e===this.$data.active&&t.push("is-active"),this.changesCount(e)&&t.push("is-changed");const s=this.$data.tabs.map((e=>e.key));return s.indexOf(e)<s.indexOf(this.$data.active)&&t.push("is-before"),t.join(" ")},showTab(e){F({category:"Site",action:"Tab clicked",label:`${this.$data.active}, ${e}`}),this.$data.active=e},showPreviousTab(){F({category:"Site",action:"Back clicked",label:`${this.$data.active}, ${this.previousTab}`}),this.$data.active=this.previousTab},showNextTab(){F({category:"Site",action:"Next clicked",label:`${this.$data.active}, ${this.nextTab}`}),this.$data.active=this.nextTab}}},ft=vt;var gt=(0,U.Z)(ft,H,I,!1,null,null,null);const bt=gt.exports,Ct=e=>"[object Object]"===Object.prototype.toString.call(e),$t=e=>""===e.toString().trim()||e,yt={ssl_profile:["https","sslProfile"],resolver_cloudflare:["https","ocspCloudflare",$t],resolver_google:["https","ocspGoogle",$t],resolver_opendns:["https","ocspOpenDns",$t],directory_letsencrypt:["https","letsEncryptRoot"],referrer_policy:["security","referrerPolicy"],content_security_policy:["security","contentSecurityPolicy"],server_tokens:["security","serverTokens",$t],limit_req:["security","limitReq",$t],php_server:["php","phpServer"],php_server_backup:["php","phpBackupServer"],python_server:["python","pythonServer"],gzip:["performance","gzipCompression",$t],brotli:["performance","brotliCompression",$t],expires_assets:["performance","assetsExpiration"],expires_media:["performance","mediaExpiration"],expires_svg:["performance","svgExpiration"],expires_fonts:["performance","fontsExpiration"],access_log:["logging","accessLog"],error_log:["logging","errorLog"],log_not_found:["logging","logNotFound",$t],directory_nginx:["nginx","nginxConfigDirectory"],worker_processes:["nginx","workerProcesses"],user:["nginx","user"],pid:["nginx","pid"],client_max_body_size:["nginx","clientMaxBodySize"],file_structure:["tools","modularizedStructure",e=>"modularized"===e.toLowerCase().trim()],symlink:["tools","symlinkVhost",$t]},_t={domain:["server","domain"],path:["server","path"],document_root:["server","documentRoot"],non_www:["server","wwwSubdomain",e=>!$t(e)],cdn:["server","cdnSubdomain",$t],redirect:["server","redirectSubdomains",$t],ipv4:["server","listenIpv4"],ipv6:["server","listenIpv6"],https:["https","https",$t],http2:["https","http2",$t],force_https:["https","forceHttps",$t],hsts:["https","hsts",$t],hsts_subdomains:["https","hstsSubdomains",$t],hsts_preload:["https","hstsPreload",$t],cert_type:["https","certType",e=>"custom"===e.toLowerCase().trim()?"custom":"letsEncrypt"],email:["https","letsEncryptEmail"],ssl_certificate:["https","sslCertificate"],ssl_certificate_key:["https","sslCertificateKey"],php:["php","php",$t],wordpress:["php","wordPressRules",$t],drupal:["php","drupalRules",$t],magento:["php","magentoRules",$t],python:["python","python",$t],django:["python","djangoRules",$t],proxy:["reverseProxy","reverseProxy",$t],proxy_path:["reverseProxy","path"],proxy_pass:["reverseProxy","proxyPass"],root:["routing","root",$t],index:["routing","index"],fallback_html:["routing","fallbackHtml",$t],fallback_php:["routing","fallbackPhp",$t],fallback_php_path:["routing","fallbackPhpPath"],php_legacy_routing:["routing","legacyPhpRouting",$t],access_log_domain:["logging","accessLog",$t],error_log_domain:["logging","errorLog",$t]},xt=e=>{const t={};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(!(s in yt)||Ct(e[s]))isNaN(parseInt(s))||(e.domains=Ct(e.domains)?e.domains:{},e.domains[s]=e[s]);else{const a=yt[s];t[a[0]]=t[a[0]]||{},t[a[0]][a[1]]=a.length<3?e[s]:a[2](e[s])}if(e.global={...e.global||{},...t},"domains"in e&&Ct(e.domains))for(const s in e.domains){if(!Object.prototype.hasOwnProperty.call(e.domains,s))continue;if(!Ct(e.domains[s]))continue;const t={};for(const a in e.domains[s])if(Object.prototype.hasOwnProperty.call(e.domains[s],a)&&!Ct(e.domains[s][a])&&a in _t){const o=_t[a];t[o[0]]=t[o[0]]||{},t[o[0]][o[1]]=o.length<3?e.domains[s][a]:o[2](e.domains[s][a])}e.domains[s]={...e.domains[s],...t}}},kt=(e,t)=>{const s=(e,t)=>{Object.keys(t).forEach((a=>{t[a]&&"object"===typeof t[a]?s(e[a]=e[a]||{},t[a]):e[a]=t[a]}))};s(e,t)},St=e=>{if("global"in e&&Ct(e.global)){const t={php:{}},s={php:["phpServer","phpServerCustom","phpBackupServer","phpBackupServerCustom"]};for(const a in e.global)if(Object.prototype.hasOwnProperty.call(e.global,a)&&Object.prototype.hasOwnProperty.call(s,a))for(const o in e.global[a])Object.prototype.hasOwnProperty.call(e.global[a],o)&&s[a].includes(o)&&(t[a][o]=e.global[a][o]);for(const a in e.domains)Object.prototype.hasOwnProperty.call(e.domains,a)&&kt(e.domains[a],t)}},Pt=(e,t)=>{for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&"presets"!==s&&s in t&&Ct(e[s]))for(const a in e[s])Object.prototype.hasOwnProperty.call(e[s],a)&&a in t[s]&&(t[s][a].value=e[s][a],t[s][a].computed=e[s][a])},Et=(e,t,s,a)=>new Promise((o=>{const i=L().parse(e,{ignoreQueryPrefix:!0,allowDots:!0,parseArrays:!1,decoder(e){if(e=decodeURIComponent(e),/^(\d+|\d*\.\d+)$/.test(e))return parseFloat(e);let t={true:!0,false:!1,null:null,undefined:void 0};return e in t?t[e]:e}});if(xt(i),St(i),"domains"in i&&Ct(i.domains)){const e=Object.keys(i.domains).map((e=>parseInt(e))).filter((e=>!isNaN(e)));for(let s=0;s<Math.max(...e)+1;s++){if(!e.includes(s)||!Ct(i.domains[s])){t.push(S()(bt.delegated));continue}const o=S()(bt.delegated);o.hasUserInteraction=!0,t.push(o),a((()=>Pt(i.domains[s],o)))}}else t.push(S()(bt.delegated));"global"in i&&Ct(i.global)&&Pt(i.global,s),a((()=>a((()=>o(i)))))})),wt=e=>Ct(e)||Array.isArray(e)&&e.every((e=>Array.isArray(e)&&2===e.length)),Tt=e=>{let t=0;for(const s of e){if(wt(s[1]))return t;s[0].length>t&&!s[0].startsWith("#")&&(t=s[0].length)}return t},Rt=(e,t)=>{const s=Ct(e)?Object.entries(e):e;if(!Array.isArray(s)||!s.every((e=>Array.isArray(e)&&2===e.length)))return"";let a="",o=Tt(s);const i=" ".repeat(t);let l=!1;for(let n=0;n<s.length;n++){const e=s[n];if(wt(e[1])){a+="\n"+i+e[0]+" {\n",a+=Rt(e[1],t+1),a+=i+"}\n\n",l=!0;continue}l&&(o=Tt(s.slice(n)),l=!1);const r=Array.isArray(e[1])?e[1]:[e[1]],c=o-e[0].length+1,p=" ".repeat(Math.max(c,0));r.forEach((t=>{const s=t.toString();a+=i+(e[0]+p+s).trim()+(e[0].startsWith("#")?"":";")+"\n"}))}return a},Dt=e=>{let t,s=Rt(e,0);s=s.replace(/\n\n\n/g,"\n\n").replace(/^([^\S\r\n]*[^#\s].*[^\n])\n([^\S\r\n]*)#/gm,"$1\n\n$2#").replace(/^([^\S\r\n]*#.*)(?:\n[^\S\r\n]*)+\n([^\S\r\n]*.*{)/gm,"$1\n$2").replace(/^([^\S\r\n]*#.*\n[^\S\r\n]*#.*\n)([^\S\r\n]*[^#\s])/gm,"$1\n$2").replace(/^([^\S\r\n]*.*{)\n[^\S\r\n]*(})/gm,"$1$2");do{t=/^([^\S\r\n]*})(?:\n[^\S\r\n]*)+\n([^\S\r\n]*})/m.exec(s),t&&(s=s.slice(0,t.index)+t[1]+"\n"+t[2]+s.slice(t.index+t[0].length))}while(t);return s.trim()},Ot=s(6358),zt=e=>Ot.stringify(e),jt={modern:{name:"Mozilla Modern",protocols:["TLSv1.3"],ciphers:[],server_preferred_order:!1,dh_param_size:!1,oldest_clients:["Firefox 63","Android 10.0","Chrome 70","Edge 75","Java 11","OpenSSL 1.1.1","Opera 57","Safari 12.1"]},intermediate:{name:"Mozilla Intermediate",protocols:["TLSv1.2","TLSv1.3"],ciphers:["ECDHE-ECDSA-AES128-GCM-SHA256","ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES256-GCM-SHA384","ECDHE-ECDSA-CHACHA20-POLY1305","ECDHE-RSA-CHACHA20-POLY1305","DHE-RSA-AES128-GCM-SHA256","DHE-RSA-AES256-GCM-SHA384"],server_preferred_order:!1,dh_param_size:2048,oldest_clients:["Firefox 27","Android 4.4.2","Chrome 31","Edge","IE 11 on Windows 7","Java 8u31","OpenSSL 1.0.1","Opera 20","Safari 9"]},old:{name:"Mozilla Old",protocols:["TLSv1","TLSv1.1","TLSv1.2","TLSv1.3"],ciphers:["ECDHE-ECDSA-AES128-GCM-SHA256","ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES256-GCM-SHA384","ECDHE-ECDSA-CHACHA20-POLY1305","ECDHE-RSA-CHACHA20-POLY1305","DHE-RSA-AES128-GCM-SHA256","DHE-RSA-AES256-GCM-SHA384","DHE-RSA-CHACHA20-POLY1305","ECDHE-ECDSA-AES128-SHA256","ECDHE-RSA-AES128-SHA256","ECDHE-ECDSA-AES128-SHA","ECDHE-RSA-AES128-SHA","ECDHE-ECDSA-AES256-SHA384","ECDHE-RSA-AES256-SHA384","ECDHE-ECDSA-AES256-SHA","ECDHE-RSA-AES256-SHA","DHE-RSA-AES128-SHA256","DHE-RSA-AES256-SHA256","AES128-GCM-SHA256","AES256-GCM-SHA384","AES128-SHA256","AES256-SHA256","AES128-SHA","AES256-SHA","DES-CBC3-SHA"],server_preferred_order:!0,dh_param_size:1024,oldest_clients:["Firefox 1","Android 2.3","Chrome 1","Edge 12","IE8 on Windows XP","Java 6","OpenSSL 0.9.8","Opera 5","Safari 1"]}},At=(e,t)=>"letsEncrypt"===e.https.certType.computed?`${t.https.letsEncryptCertRoot.computed.replace(/\/+$/,"")}/${e.server.domain.computed}/fullchain.pem`:e.https.sslCertificate.computed?e.https.sslCertificate.computed:`${t.nginx.nginxConfigDirectory.computed.replace(/\/+$/,"")}/ssl/${e.server.domain.computed}.crt`,Lt=(e,t)=>"letsEncrypt"===e.https.certType.computed?`${t.https.letsEncryptCertRoot.computed.replace(/\/+$/,"")}/${e.server.domain.computed}/privkey.pem`:e.https.sslCertificateKey.computed?e.https.sslCertificateKey.computed:`${t.nginx.nginxConfigDirectory.computed.replace(/\/+$/,"")}/ssl/${e.server.domain.computed}.key`,Ht=(e,t)=>t.logging.accessLog.computed.replace(/([^/]+)\.log$/,`${e.server.domain.computed}.$1.log`),It=(e,t)=>t.logging.errorLog.computed.replace(/([^/]+)\.log (.+)$/,`${e.server.domain.computed}.$1.log $2`),Ft="text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml",Mt={assets:"css(\\.map)?|js(\\.map)?",fonts:"ttf|ttc|otf|eot|woff2?",svg:"svgz?",images:"jpe?g|png|gif|ico|cur|heic|webp|tiff?",audio:"mp3|m4a|aac|ogg|midi?|wav",video:"mp4|mov|webm|mpe?g|avi|ogv|flv|wmv",docs:"pdf|docx?|dotx?|docm|dotm|xlsx?|xltx?|xlsm|xltm|pptx?|potx?|pptm|potm|ppsx?"},Nt=e=>e.every((e=>e.https.hsts.computed))&&(e.every((e=>e.https.hstsSubdomains.computed))||e.every((e=>!e.https.hstsSubdomains.computed)))&&(e.every((e=>e.https.hstsPreload.computed))||e.every((e=>!e.https.hstsPreload.computed))),Bt=(e,t)=>{const s=[];if(s.push(["# security headers",""]),s.push(["add_header X-Frame-Options",'"SAMEORIGIN" always']),s.push(["add_header X-XSS-Protection",'"1; mode=block" always']),s.push(["add_header X-Content-Type-Options",'"nosniff" always']),s.push(["add_header Referrer-Policy",`"${t.security.referrerPolicy.computed}" always`]),t.security.contentSecurityPolicy.computed&&s.push(["add_header Content-Security-Policy",`"${t.security.contentSecurityPolicy.computed}" always`]),Nt(e)){const t=e.length&&e[0].https.hstsSubdomains.computed,a=e.length&&e[0].https.hstsPreload.computed;s.push(["add_header Strict-Transport-Security",`"max-age=31536000${t?"; includeSubDomains":""}${a?"; preload":""}" always`])}return s.push(["# . files",""]),s.push(["location ~ /\\.(?!well-known)",{deny:"all"}]),t.security.securityTxt.computed&&(s.push(["# security.txt",""]),s.push(["location /security.txt",{return:"301 /.well-known/security.txt"}]),s.push(["location = /.well-known/security.txt",{alias:`${t.security.securityTxtPath.value}`}])),s},Vt=e=>{const t={"# default uwsgi_params":"",include:"uwsgi_params","# uwsgi settings":""};return t.uwsgi_pass=("/"===e.python.pythonServer.computed[0]?"unix:":"")+e.python.pythonServer.computed,t["uwsgi_param Host"]="$host",t["uwsgi_param X-Real-IP"]="$remote_addr",t["uwsgi_param X-Forwarded-For"]="$proxy_add_x_forwarded_for",t["uwsgi_param X-Forwarded-Proto"]="$http_x_forwarded_proto",t},Gt=e=>{const t={proxy_http_version:"1.1",proxy_cache_bypass:"$http_upgrade","# Proxy headers":"","proxy_set_header Upgrade":"$http_upgrade","proxy_set_header Connection":"$connection_upgrade","proxy_set_header Host":"$host","proxy_set_header X-Real-IP":"$remote_addr","proxy_set_header X-Forwarded-For":"$proxy_add_x_forwarded_for","proxy_set_header X-Forwarded-Proto":"$scheme","proxy_set_header X-Forwarded-Host":"$host","proxy_set_header X-Forwarded-Port":"$server_port","# Proxy timeouts":""};return t["proxy_connect_timeout"]=e.reverseProxy.proxyConnectTimeout.computed,t["proxy_send_timeout"]=e.reverseProxy.proxySendTimeout.computed,t["proxy_read_timeout"]=e.reverseProxy.proxyReadTimeout.computed,t},Wt=e=>{const t=e.some((e=>e.routing.legacyPhpRouting.computed)),s={};return t&&(s["# split path"]="",s.fastcgi_split_path_info="^(.+\\.php)(/.+)$",s.set="$_fastcgi_path_info $fastcgi_path_info"),s["# 404"]="",s.try_files="$fastcgi_script_name =404",s["# default fastcgi_params"]="",s.include="fastcgi_params",s["# fastcgi settings"]="",s.fastcgi_index="index.php",s.fastcgi_buffers="8 16k",s.fastcgi_buffer_size="32k",s["# fastcgi params"]="",s["fastcgi_param DOCUMENT_ROOT"]="$realpath_root",s["fastcgi_param SCRIPT_FILENAME"]="$realpath_root$fastcgi_script_name",t&&(s["fastcgi_param PATH_INFO"]="$_fastcgi_path_info"),s["fastcgi_param PHP_ADMIN_VALUE"]='"open_basedir=$base/:/usr/lib/php/:/tmp/"',s},Zt=(e,t)=>{const s={"# favicon.ico":"","location = /favicon.ico":{log_not_found:"off"}};if(t.logging.accessLog.computed&&(s["location = /favicon.ico"].access_log="off"),s["# robots.txt"]="",s["location = /robots.txt"]={log_not_found:"off"},t.logging.accessLog.computed&&(s["location = /robots.txt"].access_log="off"),e.every((e=>e.routing.root.computed))){if(t.performance.assetsExpiration.computed===t.performance.mediaExpiration.computed){if(t.performance.assetsExpiration.computed){s["# assets, media"]="";const e=`location ~* \\.(?:${Mt.assets}|${Mt.images}|${Mt.audio}|${Mt.video})$`;s[e]={expires:t.performance.assetsExpiration.computed},t.logging.accessLog.computed&&(s[e].access_log="off")}}else{if(t.performance.assetsExpiration.computed){s["# assets"]="";const e=`location ~* \\.(?:${Mt.assets})$`;s[e]={expires:t.performance.assetsExpiration.computed},t.logging.accessLog.computed&&(s[e].access_log="off")}if(t.performance.mediaExpiration.computed){s["# media"]="";const e=`location ~* \\.(?:${Mt.images}|${Mt.audio}|${Mt.video})$`;s[e]={expires:t.performance.mediaExpiration.computed},t.logging.accessLog.computed&&(s[e].access_log="off")}}if(t.performance.svgExpiration.computed===t.performance.fontsExpiration.computed){if(t.performance.svgExpiration.computed){s["# svg, fonts"]="";const e=`location ~* \\.(?:${Mt.svg}|${Mt.fonts})$`;s[e]={add_header:'Access-Control-Allow-Origin "*"',expires:t.performance.svgExpiration.computed},t.logging.accessLog.computed&&(s[e].access_log="off")}}else{if(t.performance.svgExpiration.computed){s["# svg"]="";const e=`location ~* \\.${Mt.svg}$`;s[e]={add_header:'Access-Control-Allow-Origin "*"',expires:t.performance.svgExpiration.computed},t.logging.accessLog.computed&&(s[e].access_log="off")}if(t.performance.fontsExpiration.computed){s["# fonts"]="";const e=`location ~* \\.${Mt.fonts}$`;s[e]={add_header:'Access-Control-Allow-Origin "*"',expires:t.performance.fontsExpiration.computed},t.logging.accessLog.computed&&(s[e].access_log="off")}}}return t.performance.gzipCompression.computed&&(s["# gzip"]="",s.gzip="on",s.gzip_vary="on",s.gzip_proxied="any",s.gzip_comp_level=6,s.gzip_types=Ft),t.performance.brotliCompression.computed&&(s["# brotli"]="",s.brotli="on",s.brotli_comp_level=6,s.brotli_types=Ft),s},Ut=e=>{const t={"# WordPress: allow TinyMCE":"","location = /wp-includes/js/tinymce/wp-tinymce.php":{include:"nginxconfig.io/php_fastcgi.conf"},"# WordPress: deny wp-content, wp-includes php files":"","location ~* ^/(?:wp-content|wp-includes)/.*\\.php$":{deny:"all"},"# WordPress: deny wp-content/uploads nasty stuff":"","location ~* ^/wp-content/uploads/.*\\.(?:s?html?|php|js|swf)$":{deny:"all"},"# WordPress: SEO plugin":"","location ~* ^/wp-content/plugins/wordpress-seo(?:-premium)?/css/main-sitemap\\.xsl$":{},"# WordPress: deny wp-content/plugins (except earlier rules)":"","location ~ ^/wp-content/plugins":{deny:"all"},"# WordPress: deny general stuff":"","location ~* ^/(?:xmlrpc\\.php|wp-links-opml\\.php|wp-config\\.php|wp-config-sample\\.php|readme\\.html|license\\.txt)$":{deny:"all"}};return e.security.limitReq.computed&&(t["# WordPress: throttle wp-login.php"]="",t["location = /wp-login.php"]={limit_req:"zone=login burst=2 nodelay",include:"nginxconfig.io/php_fastcgi.conf"}),t},qt=e=>{const t={"# Drupal: deny private files":"","location ~ ((^|/)\\.|^.*\\.yml$|^/sites/.*/private/|^/sites/[^/]+/[^/]*settings.*\\.php$)":{deny:"all",return:"404"},"# Drupal: deny php in files":"","location ~ ^/sites/[^/]+/files/.*\\.php$":{deny:"all"},"# Drupal: deny php in vendor":"","location ~ /vendor/.*\\.php$":{deny:"all"},"# Drupal: allow image styles to be handled by the CMS":"","location ~ ^/sites/[^/]+/files/styles/":{try_files:"$uri /index.php?q=$uri&$args"},"# Drupal: handle private files":"","location ~ ^(/[a-z\\-]+)?/system/files/":{try_files:"$uri /index.php?$query_string"}};return e.security.limitReq.computed&&(t["# Drupal: throttle user functions"]="",t["location ~ ^/user/(?:login|register|password)"]={limit_req:"zone=login burst=2 nodelay",try_files:"$uri /index.php?$query_string"}),t},Yt=()=>{const e={"# Magento: setup":"","location ^~ /setup":{root:"$base","# allow index.php":"","location ~ ^/setup/index.php":{include:"nginxconfig.io/php_fastcgi.conf"},"# deny everything except pub":"","location ~ ^/setup/(?!pub/).":{deny:"all"}},"# Magento: update":"","location ^~ /update":{root:"$base","# allow index.php":"","location ~ ^/update/index.php":{include:"nginxconfig.io/php_fastcgi.conf"},"# deny everything except pub":"","location ~ ^/update/(?!pub/).":{deny:"all"}},"# Magento: media files":"","location ^~ /media/":{try_files:"$uri $uri/ /get.php?$args","location ~* \\.(?:ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$":{expires:"+1y",add_header:'Cache-Control "public"',try_files:"$uri $uri/ /get.php?$args"},"location ~* \\.(?:zip|gz|gzip|bz2|csv|xml)$":{expires:"off",add_header:'Cache-Control "no-store"',try_files:"$uri $uri/ /get.php?$args"},"location ~ ^/media/theme_customization/.*\\.xml":{deny:"all"},"location ~ ^/media/(?:customer|downloadable|import)/":{deny:"all"}},"# Magento: static route":"","location @magento_static":{rewrite:"^/static/(version\\d*/)?(.*)$ /static.php?resource=$2 last"},"# Magento: static files":"","location ^~ /static/":{expires:"max",try_files:"$uri $uri/ @magento_static","location ~* \\.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$":{expires:"+1y",add_header:'Cache-Control "public"',try_files:"$uri $uri/ magento_static"},"location ~* .(zip|gz|gzip|bz2|csv|xml)$":{expires:"off",add_header:'Cache-Control "no-store"',try_files:"$uri $uri/ @magento_static"}},"# Magento: deny cron":"","location ~ cron\\.php":{deny:"all"}};return e},Qt=()=>{const e={"# Joomla: deny running scripts inside writable directories":"","location ~* /(images|cache|media|logs|tmp)/.*\\.(php|pl|py|jsp|asp|sh|cgi)$":{return:"403",error_page:"403 /403_error.html"},"# Joomla: caching of files":("",""),"location ~* \\.(ico|pdf|flv)$":{expires:"1y"},"location ~* \\.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$":{expires:"14d"}};return e},Kt=e=>{const t={"# ACME-challenge":""};return t["location ^~ /.well-known/acme-challenge/"]={root:e.https.letsEncryptRoot.computed.replace(/(<.+>)|(\/+$)/,"")},t},Xt=(e,t=!1)=>{const s=`php${t?"Backup":""}Server`;return"custom"===e.php[s].computed?e.php[`${s}Custom`].computed:("/"===e.php[s].computed[0]?"unix:":"")+e.php[s].computed},Jt=e=>`php_${e.server.domain.computed.replace(/\./g,"_")}`,es=(e,t)=>{const s=[];return e.https.https.computed&&(s.push(["# SSL",""]),s.push(["ssl_certificate",At(e,t)]),s.push(["ssl_certificate_key",Lt(e,t)]),"letsEncrypt"===e.https.certType.computed&&s.push(["ssl_trusted_certificate",`${t.https.letsEncryptCertRoot.computed.replace(/\/+$/,"")}/${e.server.domain.computed}/chain.pem`])),s},ts=e=>{const t=[];return t.push(["listen",`${"*"===e.server.listenIpv4.computed?"":`${e.server.listenIpv4.computed}:`}443 ssl${e.https.http2.computed?" http2":""}`]),e.https.http3.computed&&t.push(["listen",`${"*"===e.server.listenIpv4.computed?"":`${e.server.listenIpv4.computed}:`}443 http3${e.https.portReuse.computed?" reuseport":""}`]),e.server.listenIpv6.computed&&t.push(["listen",`[${e.server.listenIpv6.computed}]:443 ssl${e.https.http2.computed?" http2":""}`]),e.server.listenIpv6.computed&&e.https.http3.computed&&t.push(["listen",`[${e.server.listenIpv6.computed}]:443 http3${e.https.portReuse.computed?" reuseport":""}`]),t},ss=e=>{const t=[];return t.push(["listen",("*"===e.server.listenIpv4.computed?"":`${e.server.listenIpv4.computed}:`)+"80"]),e.server.listenIpv6.computed&&t.push(["listen",`[${e.server.listenIpv6.computed}]:80`]),t},as=e=>e.https.https.computed?ts(e):ss(e),os=(e,t,s,a)=>{const o=[];return o.push(...ss(e)),o.push(["server_name",s]),"letsEncrypt"===e.https.certType.computed?(t.tools.modularizedStructure.computed?o.push(["include","nginxconfig.io/letsencrypt.conf"]):o.push(...Object.entries(Kt(t))),o.push(["location /",{return:`301 https://${a||s}$request_uri`}])):o.push(["return",`301 https://${a||s}$request_uri`]),o},is=(e,t,s)=>{const a=[],o=[];if(e.https.https.computed&&e.https.forceHttps.computed||o.push(...ss(e)),e.https.https.computed&&o.push(...ts(e)),o.push(["server_name",`${e.server.wwwSubdomain.computed?"www.":""}${e.server.domain.computed}`]),(e.php.php.computed||e.python.python.computed&&e.python.djangoRules.computed)&&(o.push(["set",`$base ${e.server.path.computed}`]),e.routing.root.computed&&o.push(["root",`$base${e.server.documentRoot.computed}`])),e.php.php.computed||e.python.python.computed&&e.python.djangoRules.computed||!e.routing.root.computed||o.push(["root",`${e.server.path.computed}${e.server.documentRoot.computed}`]),o.push(...es(e,s)),e.onion.onionLocation.computed&&(o.push(["# Onion services",""]),o.push(["add_header Onion-Location",`http://${e.onion.onionLocation.computed}$request_uri`])),!Nt(t)&&e.https.hsts.computed&&(o.push(["# HSTS",""]),o.push(["add_header Strict-Transport-Security",`"max-age=31536000${e.https.hstsSubdomains.computed?"; includeSubDomains":""}${e.https.hstsPreload.computed?"; preload":""}" always`])),s.tools.modularizedStructure.computed?(o.push(["# security",""]),o.push(["include","nginxconfig.io/security.conf"])):o.push(...Bt(t,s)),Object.keys(e.restrict).find((t=>e.restrict[t].computed&&"responseCode"!==t))){const t=Object.keys(e.restrict).filter((t=>!e.restrict[t].computed&&"responseCode"!==t)).map((e=>e.replace("Method","").toUpperCase()));o.push(["# restrict methods",""]),o.push([`if ($request_method !~ ^(${t.join("|")})$)`,{return:`'${e.restrict.responseCode.computed}'`}])}if((e.logging.accessLog.computed||e.logging.errorLog.computed)&&(o.push(["# logging",""]),e.logging.accessLog.computed&&o.push(["access_log",Ht(e,s)+(s.logging.cloudflare.computed?" cloudflare":"")]),e.logging.errorLog.computed&&o.push(["error_log",It(e,s)])),"index.php"===e.routing.index.computed&&(o.push(["# index.php",""]),o.push(["index","index.php"])),!e.routing.fallbackHtml.computed&&!e.routing.fallbackPhp.computed||e.reverseProxy.reverseProxy.computed&&"/"===e.reverseProxy.path.computed||(o.push([`# index.${e.routing.fallbackHtml.computed?"html":e.routing.fallbackPhp.computed?"php":""} fallback`,""]),o.push(["location /",{try_files:"$uri $uri/ /index."+(e.routing.fallbackHtml.computed?"html":e.routing.fallbackPhp.computed?"php?$query_string":"")}])),e.routing.fallbackHtml.computed&&e.routing.fallbackPhp.computed&&(o.push(["# index.php fallback",""]),o.push([`location ~ ^${e.routing.fallbackPhpPath.computed}`,{try_files:"$uri $uri/ /index.php?$query_string"}])),e.python.python.computed&&(s.tools.modularizedStructure.computed?o.push(["location /",{include:"nginxconfig.io/python_uwsgi.conf"}]):o.push(["location /",Vt(s)]),e.python.djangoRules.computed&&(o.push(["# Django media",""]),o.push(["location /media/",{alias:"$base/media/"}]),o.push(["# Django static",""]),o.push(["location /static/",{alias:"$base/static/"}]))),e.reverseProxy.reverseProxy.computed){const t=[];t.push(["proxy_pass",e.reverseProxy.proxyPass.computed]),s.tools.modularizedStructure.computed?t.push(["include","nginxconfig.io/proxy.conf"]):t.push(...Object.entries(Gt(s))),o.push(["# reverse proxy",""]),o.push([`location ${e.reverseProxy.path.computed}`,t])}if(s.tools.modularizedStructure.computed?(o.push(["# additional config",""]),o.push(["include","nginxconfig.io/general.conf"]),e.https.forceHttps.computed||"letsEncrypt"!==e.https.certType.computed||o.push(["include","nginxconfig.io/letsencrypt.conf"]),e.php.wordPressRules.computed&&o.push(["include","nginxconfig.io/wordpress.conf"]),e.php.drupalRules.computed&&o.push(["include","nginxconfig.io/drupal.conf"]),e.php.magentoRules.computed&&o.push(["include","nginxconfig.io/magento.conf"]),e.php.joomlaRules.computed&&o.push(["include","nginxconfig.io/joomla.conf"])):(o.push(...Object.entries(Zt(t,s))),e.https.forceHttps.computed||"letsEncrypt"!==e.https.certType.computed||o.push(...Object.entries(Kt(s))),e.php.wordPressRules.computed&&o.push(...Object.entries(Ut(s))),e.php.drupalRules.computed&&o.push(...Object.entries(qt(s))),e.php.magentoRules.computed&&o.push(...Object.entries(Yt())),e.php.joomlaRules.computed&&o.push(...Object.entries(Qt()))),e.php.php.computed){e.php.phpBackupServer.computed&&a.push([`upstream ${Jt(e)}`,{server:[Xt(e),`${Xt(e,!0)} backup`]}]),o.push(["# handle .php",""]);const i="location ~ "+(e.routing.legacyPhpRouting.computed?"[^/]\\.php(/|$)":"\\.php$"),l={fastcgi_pass:""!==e.php.phpBackupServer.computed?Jt(e):Xt(e)};s.tools.modularizedStructure.computed||e.php.wordPressRules.computed?o.push([i,{...l,include:"nginxconfig.io/php_fastcgi.conf"}]):o.push([i,{...l,...Wt(t)}])}if(a.push(["server",o]),e.server.cdnSubdomain.computed){const t=[];t.push(...as(e)),t.push(["server_name",`cdn.${e.server.domain.computed}`]),t.push(["root",`${e.server.path.computed}${e.server.documentRoot.computed}`]),t.push(...es(e,s)),t.push(["# disable access_log",""]),t.push(["access_log","off"]),s.performance.gzipCompression.computed&&(t.push(["# gzip",""]),t.push(["gzip","on"]),t.push(["gzip_vary","on"]),t.push(["gzip_proxied","any"]),t.push(["gzip_comp_level",6]),t.push(["gzip_types",Ft])),t.push(["# allow safe files",""]),t.push([`location ~* \\.(?:${Mt.assets}|${Mt.fonts}|${Mt.svg}|${Mt.images}|${Mt.audio}|${Mt.video}|${Mt.docs})$`,[["add_header",'Access-Control-Allow-Origin "*"'],["add_header",'Cache-Control "public"'],["expires","30d"]]]),t.push(["# deny everything else",""]),t.push(["location /",{deny:"all"}]),a.push(["# CDN",""]),a.push(["server",t])}if(e.server.redirectSubdomains.computed){const t=[];t.push(...as(e)),t.push(["server_name",`${e.server.wwwSubdomain.computed?"":"*"}.${e.server.domain.computed}`]),t.push(...es(e,s)),t.push(["return",`301 http${e.https.https.computed?"s":""}://${e.server.wwwSubdomain.computed?"www.":""}${e.server.domain.computed}$request_uri`]),a.push([`# ${e.server.wwwSubdomain.computed?"non-www, ":""}subdomains redirect`,""]),a.push(["server",t])}return e.https.forceHttps.computed&&(a.push(["# HTTP redirect",""]),e.server.wwwSubdomain.computed&&!e.server.redirectSubdomains.computed?(a.push(["server",os(e,s,e.server.domain.computed,`www.${e.server.domain.computed}`)]),a.push(["server",os(e,s,`www.${e.server.domain.computed}`)])):e.server.wwwSubdomain.computed||e.server.redirectSubdomains.computed||a.push(["server",os(e,s,e.server.domain.computed)]),e.server.cdnSubdomain.computed&&a.push(["server",os(e,s,`cdn.${e.server.domain.computed}`)]),e.server.redirectSubdomains.computed&&a.push(["server",os(e,s,`.${e.server.domain.computed}`,`${e.server.wwwSubdomain.computed?"www.":""}${e.server.domain.computed}`)])),a},ls=e=>{const t={};for(const s in e){if("presets"===s)continue;const a={};for(const t in e[s]){const o=e[s][t];o.value!==o.default&&(a[t]=o.value)}Object.keys(a).length&&(t[s]=a)}return t},ns=(e,t)=>{const s={};s.domains=e.map((e=>ls(e[0]))).reduce(((e,t,s)=>(e[s]=t,e)),{});const a=ls(t);return Object.keys(a).length&&(s.global=a),s},rs=(e,t)=>{const s=ns(e,t),a=L().stringify(s,{allowDots:!0});return`${a.length>4e3?"#":""}${a.length?"?":""}${a}`},cs=(e,t)=>{const s={"# Generated by nginxconfig.io":""},a=rs(e.map(((e,t)=>[e,t])).filter((e=>null!==e[0])),t);if(s[`# ${window.location.protocol}//${window.location.host}${window.location.pathname}${a}`]="",s.user=t.nginx.user.computed,t.nginx.pid.computed&&(s.pid=t.nginx.pid.computed),s.worker_processes=t.nginx.workerProcesses.computed,s.worker_rlimit_nofile=65535,s["# Load modules"]="",s.include=`${t.nginx.nginxConfigDirectory.computed.replace(/\/+$/,"")}/modules-enabled/*.conf`,s.events={multi_accept:"on",worker_connections:65535},s.http=[],s.http.push(["charset","utf-8"]),s.http.push(["sendfile","on"]),s.http.push(["tcp_nopush","on"]),s.http.push(["tcp_nodelay","on"]),t.security.serverTokens.computed||s.http.push(["server_tokens","off"]),t.logging.logNotFound.computed||s.http.push(["log_not_found","off"]),s.http.push(["types_hash_max_size",t.nginx.typesHashMaxSize.computed]),s.http.push(["types_hash_bucket_size",t.nginx.typesHashBucketSize.computed]),s.http.push(["client_max_body_size",`${t.nginx.clientMaxBodySize.computed}M`]),s.http.push(["# MIME",""]),s.http.push(["include","mime.types"]),s.http.push(["default_type","application/octet-stream"]),t.logging.cloudflare.computed){s.http.push(["# Log Format",""]);let e=["$remote_addr","-","$remote_user","[$time_local]",'"$request"',"$status","$body_bytes_sent",'"$http_referer"','"$http_user_agent"'];t.logging.cfRay.computed&&e.push("$http_cf_ray"),t.logging.cfConnectingIp.computed&&e.push("$http_cf_connecting_ip"),t.logging.xForwardedFor.computed&&e.push("$http_x_forwarded_for"),t.logging.xForwardedProto.computed&&e.push("$http_x_forwarded_proto"),t.logging.trueClientIp.computed&&e.push("$http_true_client_ip"),t.logging.cfIpCountry.computed&&e.push("$http_cf_ipcountry"),t.logging.cfVisitor.computed&&e.push("$http_cf_visitor"),t.logging.cdnLoop.computed&&e.push("$http_cdn_loop"),s.http.push(["log_format",`cloudflare '${e.join(" ")}'`])}s.http.push(["# Logging",""]),s.http.push(["access_log",t.logging.accessLog.computed.trim()+(t.logging.cloudflare.computed?" cloudflare":"")||"off"]),s.http.push(["error_log",t.logging.errorLog.computed.trim()||"/dev/null"]),t.security.limitReq.computed&&(s.http.push(["# Limits",""]),s.http.push(["limit_req_log_level","warn"]),s.http.push(["limit_req_zone","$binary_remote_addr zone=login:10m rate=10r/m"]));let o=!1;for(const i of e)if(i&&i.https&&i.https.https&&i.https.https.computed){o=!0;break}if(o){s.http.push(["# SSL",""]),s.http.push(["ssl_session_timeout","1d"]),s.http.push(["ssl_session_cache","shared:SSL:10m"]),s.http.push(["ssl_session_tickets","off"]);const e=jt[t.https.sslProfile.computed];e&&(e.dh_param_size&&(s.http.push(["# Diffie-Hellman parameter for DHE ciphersuites",""]),s.http.push(["ssl_dhparam",`${t.nginx.nginxConfigDirectory.computed.replace(/\/+$/,"")}/dhparam.pem`])),s.http.push([`# ${e.name} configuration`,""]),s.http.push(["ssl_protocols",e.protocols.join(" ")]),e.ciphers.length&&s.http.push(["ssl_ciphers",e.ciphers.join(":")]),e.server_preferred_order&&s.http.push(["ssl_prefer_server_ciphers","on"])),s.http.push(["# OCSP Stapling",""]),s.http.push(["ssl_stapling","on"]),s.http.push(["ssl_stapling_verify","on"]);const a=[];t.https.ocspCloudflare.computed&&(["ipv4","both"].includes(t.https.ocspCloudflareType.computed)&&a.push("1.1.1.1","1.0.0.1"),["ipv6","both"].includes(t.https.ocspCloudflareType.computed)&&a.push("[2606:4700:4700::1111]","[2606:4700:4700::1001]")),t.https.ocspGoogle.computed&&(["ipv4","both"].includes(t.https.ocspGoogleType.computed)&&a.push("8.8.8.8","8.8.4.4"),["ipv6","both"].includes(t.https.ocspGoogleType.computed)&&a.push("[2001:4860:4860::8888]","[2001:4860:4860::8844]")),t.https.ocspOpenDns.computed&&(["ipv4","both"].includes(t.https.ocspOpenDnsType.computed)&&a.push("208.67.222.222","208.67.220.220"),["ipv6","both"].includes(t.https.ocspOpenDnsType.computed)&&a.push("[2620:119:35::35]","[2620:119:53::53]")),t.https.ocspQuad9.computed&&(["ipv4","both"].includes(t.https.ocspQuad9Type.computed)&&a.push("9.9.9.9","149.112.112.112"),["ipv6","both"].includes(t.https.ocspQuad9Type.computed)&&a.push("[2620:fe::fe]","[2620:fe::9]")),t.https.ocspVerisign.computed&&(["ipv4","both"].includes(t.https.ocspVerisignType.computed)&&a.push("64.6.64.6","64.6.65.6"),["ipv6","both"].includes(t.https.ocspVerisignType.computed)&&a.push("[2620:74:1b::1:1]","[2620:74:1c::2:2]")),a.length&&(s.http.push(["resolver",`${a.join(" ")} valid=60s`]),s.http.push(["resolver_timeout","2s"]))}if(e.some((e=>e.reverseProxy.reverseProxy.computed))&&(s.http.push(["# Connection header for WebSocket reverse proxy",""]),s.http.push(["map $http_upgrade $connection_upgrade",{default:"upgrade",'""':"close"}])),s.http.push(["# Load configs",""]),s.http.push(["include",[`${t.nginx.nginxConfigDirectory.computed.replace(/\/+$/,"")}/conf.d/*.conf`,t.tools.modularizedStructure.computed?`${t.nginx.nginxConfigDirectory.computed.replace(/\/+$/,"")}/sites-enabled/*`:""].filter((e=>e.length))]),!t.tools.modularizedStructure.computed)for(const i of e)s.http.push([`# ${i.server.domain.computed}`,""]),s.http.push(...is(i,e,t));return s},ps=()=>({version:"3.3",services:{nginx:{build:{context:".",dockerfile:"Dockerfile"}}}}),ds=()=>"FROM nginx:latest\nCOPY . /etc/nginx/",us=(e,t)=>{const s={};if(s["nginx.conf"]=Dt(cs(e,t)),t.docker.dockerfile.computed&&(s["Dockerfile"]=ds()),t.docker.dockerCompose.computed&&(s["docker-compose.yaml"]=zt(ps())),t.tools.modularizedStructure.computed){for(const a of e)s[`sites-${t.tools.symlinkVhost.computed?"available":"enabled"}/${a.server.domain.computed}.conf`]=Dt(is(a,e,t));e.some((e=>"letsEncrypt"===e.https.certType.computed))&&(s["nginxconfig.io/letsencrypt.conf"]=Dt(Kt(t))),s["nginxconfig.io/security.conf"]=Dt(Bt(e,t)),s["nginxconfig.io/general.conf"]=Dt(Zt(e,t)),e.some((e=>e.php.php.computed))&&(s["nginxconfig.io/php_fastcgi.conf"]=Dt(Wt(e))),e.some((e=>e.python.python.computed))&&(s["nginxconfig.io/python_uwsgi.conf"]=Dt(Vt(t))),e.some((e=>e.reverseProxy.reverseProxy.computed))&&(s["nginxconfig.io/proxy.conf"]=Dt(Gt(t))),e.some((e=>e.php.wordPressRules.computed))&&(s["nginxconfig.io/wordpress.conf"]=Dt(Ut(t))),e.some((e=>e.php.drupalRules.computed))&&(s["nginxconfig.io/drupal.conf"]=Dt(qt(t))),e.some((e=>e.php.magentoRules.computed))&&(s["nginxconfig.io/magento.conf"]=Dt(Yt())),e.some((e=>e.php.joomlaRules.computed))&&(s["nginxconfig.io/joomla.conf"]=Dt(Qt()))}else e.some((e=>e.php.wordPressRules.computed))&&(s["nginxconfig.io/php_fastcgi.conf"]=Dt(Wt(e)));return s};var hs=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"panel"},[s("div",{staticClass:"tabs"},[s("ul",e._l(e.tabs,(function(t){return s("li",{key:t.key,class:e.tabClass(t.key)},[s("a",{on:{click:function(s){return e.showTab(t.key)}}},[e._v(e._s(e.$t(t.display))+e._s(e.changes(t.key)))])])})),0)]),e._l(e.tabs,(function(t){return s(t,{key:t.key,tag:"component",staticClass:"container",style:{display:e.active===t.key?void 0:"none"},attrs:{data:e.$props.data[t.key]}})})),s("div",{staticClass:"navigation-buttons"},[!1!==e.previousTab?s("a",{staticClass:"button is-mini",on:{click:e.showPreviousTab}},[s("i",{staticClass:"fas fa-long-arrow-alt-left"}),e._v(" "),s("span",[e._v(e._s(e.$t("common.back")))])]):e._e(),!1!==e.nextTab?s("a",{staticClass:"button is-primary is-mini",on:{click:e.showNextTab}},[s("span",[e._v(e._s(e.$t("common.next")))]),e._v(" "),s("i",{staticClass:"fas fa-long-arrow-alt-right"})]):e._e()])],2)},ms=[],vs=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.sslProfileEnabled?[s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.https.sslProfile")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"field"},e._l(e.$props.data.sslProfile.options,(function(t,a){return s("div",{class:"control"+(e.sslProfileChanged&&a===e.sslProfile?" is-changed":"")},[s("div",{staticClass:"radio"},[s("PrettyRadio",{staticClass:"p-default p-round p-fill p-icon",attrs:{value:a},model:{value:e.sslProfile,callback:function(t){e.sslProfile=t},expression:"sslProfile"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t(t))+" ")])],1)])})),0)])])]),s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.https.ocspDnsResolvers")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.ocspCloudflareChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.ocspCloudflare,callback:function(t){e.ocspCloudflare=t},expression:"ocspCloudflare"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.https.cloudflareResolver"))+" ")])],1)]),e.$props.data.ocspCloudflare.computed?s("div",{staticClass:"control field is-horizontal is-expanded"},e._l(e.$props.data.ocspCloudflareType.options,(function(t,a){return s("div",{class:"control"+(e.ocspCloudflareTypeChanged&&a===e.ocspCloudflareType?" is-changed":"")},[s("div",{staticClass:"radio"},[s("PrettyRadio",{staticClass:"p-default p-round p-fill p-icon",attrs:{value:a},model:{value:e.ocspCloudflareType,callback:function(t){e.ocspCloudflareType=t},expression:"ocspCloudflareType"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t(t))+" ")])],1)])})),0):e._e(),s("div",{class:"control"+(e.ocspGoogleChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.ocspGoogle,callback:function(t){e.ocspGoogle=t},expression:"ocspGoogle"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.https.googlePublicDns"))+" ")])],1)]),e.$props.data.ocspGoogle.computed?s("div",{staticClass:"control field is-horizontal is-expanded"},e._l(e.$props.data.ocspGoogleType.options,(function(t,a){return s("div",{class:"control"+(e.ocspGoogleTypeChanged&&a===e.ocspGoogleType?" is-changed":"")},[s("div",{staticClass:"radio"},[s("PrettyRadio",{staticClass:"p-default p-round p-fill p-icon",attrs:{value:a},model:{value:e.ocspGoogleType,callback:function(t){e.ocspGoogleType=t},expression:"ocspGoogleType"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t(t))+" ")])],1)])})),0):e._e(),s("div",{class:"control"+(e.ocspOpenDnsChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.ocspOpenDns,callback:function(t){e.ocspOpenDns=t},expression:"ocspOpenDns"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.https.openDns"))+" ")])],1)]),e.$props.data.ocspOpenDns.computed?s("div",{staticClass:"control field is-horizontal is-expanded"},e._l(e.$props.data.ocspOpenDnsType.options,(function(t,a){return s("div",{class:"control"+(e.ocspOpenDnsTypeChanged&&a===e.ocspOpenDnsType?" is-changed":"")},[s("div",{staticClass:"radio"},[s("PrettyRadio",{staticClass:"p-default p-round p-fill p-icon",attrs:{value:a},model:{value:e.ocspOpenDnsType,callback:function(t){e.ocspOpenDnsType=t},expression:"ocspOpenDnsType"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t(t))+" ")])],1)])})),0):e._e(),s("div",{class:"control"+(e.ocspQuad9Changed?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.ocspQuad9,callback:function(t){e.ocspQuad9=t},expression:"ocspQuad9"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.https.quad9"))+" ")])],1)]),e.$props.data.ocspQuad9.computed?s("div",{staticClass:"control field is-horizontal is-expanded"},e._l(e.$props.data.ocspQuad9Type.options,(function(t,a){return s("div",{class:"control"+(e.ocspQuad9TypeChanged&&a===e.ocspQuad9Type?" is-changed":"")},[s("div",{staticClass:"radio"},[s("PrettyRadio",{staticClass:"p-default p-round p-fill p-icon",attrs:{value:a},model:{value:e.ocspQuad9Type,callback:function(t){e.ocspQuad9Type=t},expression:"ocspQuad9Type"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t(t))+" ")])],1)])})),0):e._e(),s("div",{class:"control"+(e.ocspVerisignChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.ocspVerisign,callback:function(t){e.ocspVerisign=t},expression:"ocspVerisign"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.https.verisign"))+" ")])],1)]),e.$props.data.ocspVerisign.computed?s("div",{staticClass:"control field is-horizontal is-expanded"},e._l(e.$props.data.ocspVerisignType.options,(function(t,a){return s("div",{class:"control"+(e.ocspVerisignTypeChanged&&a===e.ocspVerisignType?" is-changed":"")},[s("div",{staticClass:"radio"},[s("PrettyRadio",{staticClass:"p-default p-round p-fill p-icon",attrs:{value:a},model:{value:e.ocspVerisignType,callback:function(t){e.ocspVerisignType=t},expression:"ocspVerisignType"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t(t))+" ")])],1)])})),0):e._e()])])]),e.letsEncryptRootEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.https.letsEncryptWebroot")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.letsEncryptRootChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.letsEncryptRoot,expression:"letsEncryptRoot"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.letsEncryptRoot.default},domProps:{value:e.letsEncryptRoot},on:{input:function(t){t.target.composing||(e.letsEncryptRoot=t.target.value)}}})])])])]):e._e(),e.letsEncryptCertRootEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.https.letsEncryptCertRoot")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.letsEncryptCertRootChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.letsEncryptCertRoot,expression:"letsEncryptCertRoot"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.letsEncryptCertRoot.default},domProps:{value:e.letsEncryptCertRoot},on:{input:function(t){t.target.composing||(e.letsEncryptCertRoot=t.target.value)}}})])])])]):e._e()]:s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.https.sslProfile")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.globalSections.https.httpsMustBeEnabledOnOneSite"))+" ")])])])])])],2)},fs=[];const gs={default:"ipv4",options:{ipv4:"templates.globalSections.https.ipv4Only",ipv6:"templates.globalSections.https.ipv6Only",both:"templates.globalSections.https.ipv4AndIpv6"},enabled:!0},bs=e=>{e.enabled&&(Object.keys(e.options).includes(e.computed)||(e.computed=e.default))},Cs={sslProfile:{default:"intermediate",options:{modern:"templates.globalSections.https.mozillaModern",intermediate:"templates.globalSections.https.mozillaIntermediate",old:"templates.globalSections.https.mozillaOld"},enabled:!0},ocspCloudflare:{default:!0,enabled:!0},ocspCloudflareType:S()(gs),ocspGoogle:{default:!0,enabled:!0},ocspGoogleType:S()(gs),ocspOpenDns:{default:!0,enabled:!0},ocspOpenDnsType:S()(gs),ocspQuad9:{default:!1,enabled:!0},ocspQuad9Type:S()(gs),ocspVerisign:{default:!1,enabled:!0},ocspVerisignType:S()(gs),letsEncryptRoot:{default:"/var/www/_letsencrypt/",enabled:!0},letsEncryptCertRoot:{default:"/etc/letsencrypt/live/",enabled:!0}},$s={name:"GlobalHTTPS",display:"common.https",key:"https",delegated:B(Cs),components:{PrettyCheck:J(),PrettyRadio:re()},props:{data:Object},computed:V(Cs,"https"),watch:{"$props.data.sslProfile":{handler:bs,deep:!0},"$props.data.ocspCloudflareType":{handler:bs,deep:!0},"$props.data.ocspGoogleType":{handler:bs,deep:!0},"$props.data.ocspOpenDnsType":{handler:bs,deep:!0},"$props.data.ocspQuad9Type":{handler:bs,deep:!0},"$props.data.ocspVerisignType":{handler:bs,deep:!0},"$parent.$parent.$data.domains":{handler(e){let t=!1,s=!1;for(const a of e)a&&a.https&&a.https.https&&a.https.https.computed&&(this.$props.data.sslProfile.enabled=!0,this.$props.data.sslProfile.computed=this.$props.data.sslProfile.value,this.$props.data.ocspCloudflare.enabled=!0,this.$props.data.ocspCloudflare.computed=this.$props.data.ocspCloudflare.value,this.$props.data.ocspGoogle.enabled=!0,this.$props.data.ocspGoogle.computed=this.$props.data.ocspGoogle.value,this.$props.data.ocspOpenDns.enabled=!0,this.$props.data.ocspOpenDns.computed=this.$props.data.ocspOpenDns.value,this.$props.data.letsEncryptRoot.enabled=!0,this.$props.data.letsEncryptRoot.computed=this.$props.data.letsEncryptRoot.value,t=!0),a&&a.https&&a.https.certType&&"letsEncrypt"===a.https.certType.computed&&(this.$props.data.letsEncryptRoot.enabled=!0,this.$props.data.letsEncryptRoot.computed=this.$props.data.letsEncryptRoot.value,s=!0);t||(this.$props.data.sslProfile.enabled=!1,this.$props.data.sslProfile.computed="",this.$props.data.ocspCloudflare.enabled=!1,this.$props.data.ocspCloudflare.computed=!1,this.$props.data.ocspGoogle.enabled=!1,this.$props.data.ocspGoogle.computed=!1,this.$props.data.ocspOpenDns.enabled=!1,this.$props.data.ocspOpenDns.computed=!1,this.$props.data.letsEncryptRoot.enabled=!1,this.$props.data.letsEncryptRoot.computed=""),s||(this.$props.data.letsEncryptRoot.enabled=!1,this.$props.data.letsEncryptRoot.computed="")},deep:!0}}},ys=$s;var _s=(0,U.Z)(ys,vs,fs,!1,null,null,null);const xs=_s.exports;var ks=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.referrerPolicyChanged?" is-changed":"")},[s("VueSelect",{attrs:{options:e.$props.data.referrerPolicy.options,clearable:!1},model:{value:e.referrerPolicy,callback:function(t){e.referrerPolicy=t},expression:"referrerPolicy"}})],1)])])]),s("div",{class:"field is-horizontal"+(e.hasWordPress&&!e.hasUnsafeEval?" is-aligned-top":"")},[e._m(1),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.contentSecurityPolicyChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.contentSecurityPolicy,expression:"contentSecurityPolicy"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.contentSecurityPolicy.default},domProps:{value:e.contentSecurityPolicy},on:{input:function(t){t.target.composing||(e.contentSecurityPolicy=t.target.value)}}})]),e.hasWordPress&&!e.hasUnsafeEval?[s("br"),s("div",{staticClass:"message is-warning"},[s("div",{staticClass:"message-body",domProps:{innerHTML:e._s(e.$t("templates.globalSections.security.whenUsingWordPressUnsafeEvalIsOftenRequiredToAllowFunctionality"))}})])]:e._e()],2)])]),s("div",{staticClass:"field is-horizontal"},[e._m(2),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.serverTokensChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.serverTokens,callback:function(t){e.serverTokens=t},expression:"serverTokens"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("common.enable"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(3),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.limitReqChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.limitReq,callback:function(t){e.limitReq=t},expression:"limitReq"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("common.enable"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(4),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.securityTxt?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.securityTxt,callback:function(t){e.securityTxt=t},expression:"securityTxt"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("common.enable"))+" ")])],1)])])])]),e.$props.data.securityTxt.computed?s("div",{staticClass:"field is-horizontal"},[e._m(5),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.securityTxtChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.securityTxtPath,expression:"securityTxtPath"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.securityTxtPath.default},domProps:{value:e.securityTxtPath},on:{input:function(t){t.target.composing||(e.securityTxtPath=t.target.value)}}})])])])]):e._e()])},Ss=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("Referrer-Policy")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("Content-Security-Policy")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("server_tokens")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("limit_req")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("security.txt")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("security.txt path")])])}];const Ps={referrerPolicy:{default:"no-referrer-when-downgrade",options:["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"],enabled:!0},contentSecurityPolicy:{default:"default-src 'self' http: https: data: blob: 'unsafe-inline'",enabled:!0},serverTokens:{default:!1,enabled:!0},limitReq:{default:!1,enabled:!0},securityTxt:{default:!1,enabled:!0},securityTxtPath:{default:"~/security.txt",enabled:!0}},Es={name:"GlobalSecurity",display:"templates.globalSections.security.security",key:"security",delegated:B(Ps),components:{PrettyCheck:J(),VueSelect:D()},props:{data:Object},computed:{...V(Ps,"security"),hasWordPress(){return this.$parent.$parent.$data.domains.some((e=>e&&e.php.wordPressRules.computed))},hasUnsafeEval(){return this.$props.data.contentSecurityPolicy.computed.includes("'unsafe-eval'")}},watch:{"$props.data.referrerPolicy":{handler(e){e.enabled&&(e.options.includes(e.computed)||(e.computed=e.default))},deep:!0}}},ws=Es;var Ts=(0,U.Z)(ws,ks,Ss,!1,null,null,null);const Rs=Ts.exports;var Ds=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.pythonServerEnabled?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.python.pythonServer")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.pythonServerChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.pythonServer,expression:"pythonServer"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.pythonServer.default},domProps:{value:e.pythonServer},on:{input:function(t){t.target.composing||(e.pythonServer=t.target.value)}}})])])])]):s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.python.pythonServer")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.globalSections.python.pythonMustBeEnabledOnOneSite"))+" ")])])])])])])},Os=[];const zs={pythonServer:{default:"/tmp/uwsgi.sock",enabled:!1}},js={name:"GlobalPython",display:"common.python",key:"python",delegated:B(zs),props:{data:Object},computed:V(zs,"python"),watch:{"$parent.$parent.$data.domains":{handler(e){for(const t of e)if(t&&t.python&&t.python.python&&t.python.python.computed)return this.$props.data.pythonServer.enabled=!0,void(this.$props.data.pythonServer.computed=this.$props.data.pythonServer.value);this.$props.data.pythonServer.enabled=!1,this.$props.data.pythonServer.computed=""},deep:!0}}},As=js;var Ls=(0,U.Z)(As,Ds,Os,!1,null,null,null);const Hs=Ls.exports;var Is=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.reverseProxyEnabled?[s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field has-addons"},[s("div",{class:"control is-expanded"+(e.proxyConnectTimeoutChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model.number",value:e.proxyConnectTimeout,expression:"proxyConnectTimeout",modifiers:{number:!0}}],staticClass:"input",attrs:{type:"number",min:"0",step:"1",placeholder:e.$props.data.proxyConnectTimeout.default},domProps:{value:e.proxyConnectTimeout},on:{input:function(t){t.target.composing||(e.proxyConnectTimeout=e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),s("div",{staticClass:"control"},[s("a",{staticClass:"button is-static"},[e._v(" "+e._s(e.$t("templates.globalSections.reverseProxy.seconds"))+" ")])])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(1),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field has-addons"},[s("div",{class:"control is-expanded"+(e.proxySendTimeoutChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model.number",value:e.proxySendTimeout,expression:"proxySendTimeout",modifiers:{number:!0}}],staticClass:"input",attrs:{type:"number",min:"0",step:"1",placeholder:e.$props.data.proxySendTimeout.default},domProps:{value:e.proxySendTimeout},on:{input:function(t){t.target.composing||(e.proxySendTimeout=e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),s("div",{staticClass:"control"},[s("a",{staticClass:"button is-static"},[e._v(" "+e._s(e.$t("templates.globalSections.reverseProxy.seconds"))+" ")])])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(2),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field has-addons"},[s("div",{class:"control is-expanded"+(e.proxyReadTimeoutChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model.number",value:e.proxyReadTimeout,expression:"proxyReadTimeout",modifiers:{number:!0}}],staticClass:"input",attrs:{type:"number",min:"0",step:"1",placeholder:e.$props.data.proxyReadTimeout.default},domProps:{value:e.proxyReadTimeout},on:{input:function(t){t.target.composing||(e.proxyReadTimeout=e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),s("div",{staticClass:"control"},[s("a",{staticClass:"button is-static"},[e._v(" "+e._s(e.$t("templates.globalSections.reverseProxy.seconds"))+" ")])])])])])]:s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("common.reverseProxy")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.globalSections.reverseProxy.reverseProxyMustBeEnabledOnOneSite"))+" ")])])])])])],2)},Fs=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("proxy_connect_timeout")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("proxy_send_timeout")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("proxy_read_timeout")])])}];const Ms={proxyConnectTimeout:{default:60,computed:"60s",enabled:!1},proxySendTimeout:{default:60,computed:"60s",enabled:!1},proxyReadTimeout:{default:60,computed:"60s",enabled:!1}},Ns=e=>{let t=parseFloat(e.computed);isNaN(t)&&(t=e.default),e.computed=`${t}s`},Bs={name:"GlobalReverseProxy",display:"common.reverseProxy",key:"reverseProxy",delegated:B(Ms),props:{data:Object},data(){return{reverseProxyEnabled:!1}},computed:V(Ms,"reverseProxy"),watch:{"$parent.$parent.$data.domains":{handler(e){for(const t of e)if(t&&t.reverseProxy&&t.reverseProxy.reverseProxy&&t.reverseProxy.reverseProxy.computed)return this.$data.reverseProxyEnabled=!0,this.$props.data.proxyConnectTimeout.enabled=!0,this.$props.data.proxyConnectTimeout.computed=this.$props.data.proxyConnectTimeout.value,this.$props.data.proxySendTimeout.enabled=!0,this.$props.data.proxySendTimeout.computed=this.$props.data.proxySendTimeout.value,this.$props.data.proxyReadTimeout.enabled=!0,void(this.$props.data.proxyReadTimeout.computed=this.$props.data.proxyReadTimeout.value);this.$data.reverseProxyEnabled=!1,this.$props.data.proxyConnectTimeout.enabled=!1,this.$props.data.proxyConnectTimeout.computed="",this.$props.data.proxySendTimeout.enabled=!1,this.$props.data.proxySendTimeout.computed="",this.$props.data.proxyReadTimeout.enabled=!1,this.$props.data.proxyReadTimeout.computed=""},deep:!0},"$props.data.proxyConnectTimeout":{handler:Ns,deep:!0},"$props.data.proxySendTimeout":{handler:Ns,deep:!0},"$props.data.proxyReadTimeout":{handler:Ns,deep:!0}}},Vs=Bs;var Gs=(0,U.Z)(Vs,Is,Fs,!1,null,null,null);const Ws=Gs.exports;var Zs=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.performance.gzipCompression")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.gzipCompressionChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.gzipCompression,callback:function(t){e.gzipCompression=t},expression:"gzipCompression"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.performance.enableGzipCompression"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.performance.brotliCompression")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.brotliCompressionChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.brotliCompression,callback:function(t){e.brotliCompression=t},expression:"brotliCompression"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.performance.enableBrotliCompression"))+" ")])],1)])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.performance.expirationForAssets")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.assetsExpirationChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.assetsExpiration,expression:"assetsExpiration"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.assetsExpiration.default},domProps:{value:e.assetsExpiration},on:{input:function(t){t.target.composing||(e.assetsExpiration=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.performance.expirationForMedia")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.mediaExpirationChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.mediaExpiration,expression:"mediaExpiration"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.mediaExpiration.default},domProps:{value:e.mediaExpiration},on:{input:function(t){t.target.composing||(e.mediaExpiration=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.performance.expirationForSvgs")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.svgExpirationChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.svgExpiration,expression:"svgExpiration"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.svgExpiration.default},domProps:{value:e.svgExpiration},on:{input:function(t){t.target.composing||(e.svgExpiration=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.performance.expirationForFonts")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.fontsExpirationChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.fontsExpiration,expression:"fontsExpiration"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.fontsExpiration.default},domProps:{value:e.fontsExpiration},on:{input:function(t){t.target.composing||(e.fontsExpiration=t.target.value)}}})])])])])])},Us=[];const qs={gzipCompression:{default:!0,enabled:!0},brotliCompression:{default:!1,enabled:!0},assetsExpiration:{default:"7d",enabled:!0},mediaExpiration:{default:"7d",enabled:!0},svgExpiration:{default:"7d",enabled:!0},fontsExpiration:{default:"7d",enabled:!0}},Ys={name:"GlobalPerformance",display:"templates.globalSections.performance.performance",key:"performance",delegated:B(qs),components:{PrettyCheck:J()},props:{data:Object},computed:V(qs,"performance")},Qs=Ys;var Ks=(0,U.Z)(Qs,Zs,Us,!1,null,null,null);const Xs=Ks.exports;var Js=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.accessLogChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.accessLog,expression:"accessLog"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.accessLog.default},domProps:{value:e.accessLog},on:{input:function(t){t.target.composing||(e.accessLog=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(1),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.errorLogChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.errorLog,expression:"errorLog"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.errorLog.default},domProps:{value:e.errorLog},on:{input:function(t){t.target.composing||(e.errorLog=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal is-aligned-top"},[e._m(2),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.logNotFoundChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.logNotFound,callback:function(t){e.logNotFound=t},expression:"logNotFound"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.enableFileNotFoundErrorLogging"))+" error_log ")])],1)])])])]),s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.logging.logformat")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[e.cloudflareEnabled?s("div",{class:"control"+(e.cloudflareChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.cloudflare,callback:function(t){e.cloudflare=t},expression:"cloudflare"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.enableCloudflare"))+" ")])],1)]):e._e(),e.cfRayEnabled?s("div",{class:"control"+(e.cfRayChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.cfRay,callback:function(t){e.cfRay=t},expression:"cfRay"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.cfRay"))+" ")])],1)]):e._e(),e.cfConnectingIpEnabled?s("div",{class:"control"+(e.cfConnectingIpChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.cfConnectingIp,callback:function(t){e.cfConnectingIp=t},expression:"cfConnectingIp"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.cfConnectingIp"))+" ")])],1)]):e._e(),e.xForwardedForEnabled?s("div",{class:"control"+(e.xForwardedForChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.xForwardedFor,callback:function(t){e.xForwardedFor=t},expression:"xForwardedFor"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.xForwardedFor"))+" ")])],1)]):e._e(),e.xForwardedProtoEnabled?s("div",{class:"control"+(e.xForwardedProtoChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.xForwardedProto,callback:function(t){e.xForwardedProto=t},expression:"xForwardedProto"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.xForwardedProto"))+" ")])],1)]):e._e(),e.trueClientIpEnabled?s("div",{class:"control"+(e.trueClientIpChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.trueClientIp,callback:function(t){e.trueClientIp=t},expression:"trueClientIp"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.trueClientIp"))+" ")])],1)]):e._e(),e.cfIpCountryEnabled?s("div",{class:"control"+(e.cfIpCountryChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.cfIpCountry,callback:function(t){e.cfIpCountry=t},expression:"cfIpCountry"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.cfIpCountry"))+" ")])],1)]):e._e(),e.cfVisitorEnabled?s("div",{class:"control"+(e.cfVisitorChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.cfVisitor,callback:function(t){e.cfVisitor=t},expression:"cfVisitor"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.cfVisitor"))+" ")])],1)]):e._e(),e.cdnLoopEnabled?s("div",{class:"control"+(e.cdnLoopChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.cdnLoop,callback:function(t){e.cdnLoop=t},expression:"cdnLoop"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.logging.cdnLoop"))+" ")])],1)]):e._e()])])])])},ea=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("access_log")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("error_log")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("log_not_found")])])}];const ta={accessLog:{default:"/var/log/nginx/access.log",enabled:!0},errorLog:{default:"/var/log/nginx/error.log warn",enabled:!0},logNotFound:{default:!1,enabled:!0},cloudflare:{default:!1,enabled:!0},cfRay:{default:!0,enabled:!1},cfConnectingIp:{default:!0,enabled:!1},xForwardedFor:{default:!1,enabled:!1},xForwardedProto:{default:!1,enabled:!1},trueClientIp:{default:!1,enabled:!1},cfIpCountry:{default:!1,enabled:!1},cfVisitor:{default:!1,enabled:!1},cdnLoop:{default:!1,enabled:!1}},sa={name:"GlobalLogging",display:"common.logging",key:"logging",delegated:B(ta),components:{PrettyCheck:J()},props:{data:Object},computed:V(ta,"logging"),watch:{"$props.data.cloudflare":{handler(e){e.computed?(this.$props.data.cfRay.enabled=!0,this.$props.data.cfRay.computed=this.$props.data.cfRay.value,this.$props.data.cfConnectingIp.enabled=!0,this.$props.data.cfConnectingIp.computed=this.$props.data.cfConnectingIp.value,this.$props.data.xForwardedFor.enabled=!0,this.$props.data.xForwardedFor.computed=this.$props.data.xForwardedFor.value,this.$props.data.xForwardedProto.enabled=!0,this.$props.data.xForwardedProto.computed=this.$props.data.xForwardedProto.value,this.$props.data.trueClientIp.enabled=!0,this.$props.data.trueClientIp.computed=this.$props.data.trueClientIp.value,this.$props.data.cfIpCountry.enabled=!0,this.$props.data.cfIpCountry.computed=this.$props.data.cfIpCountry.value,this.$props.data.cfVisitor.enabled=!0,this.$props.data.cfVisitor.computed=this.$props.data.cfVisitor.value,this.$props.data.cdnLoop.enabled=!0,this.$props.data.cdnLoop.computed=this.$props.data.cdnLoop.value):(this.$props.data.cfRay.enabled=!1,this.$props.data.cfRay.computed=!1,this.$props.data.cfConnectingIp.enabled=!1,this.$props.data.cfConnectingIp.computed=!1,this.$props.data.xForwardedFor.enabled=!1,this.$props.data.xForwardedFor.computed=!1,this.$props.data.xForwardedProto.enabled=!1,this.$props.data.xForwardedProto.computed=!1,this.$props.data.trueClientIp.enabled=!1,this.$props.data.trueClientIp.computed=!1,this.$props.data.cfIpCountry.enabled=!1,this.$props.data.cfIpCountry.computed=!1,this.$props.data.cfVisitor.enabled=!1,this.$props.data.cfVisitor.computed=!1,this.$props.data.cdnLoop.enabled=!1,this.$props.data.cdnLoop.computed=!1)},deep:!0}}},aa=sa;var oa=(0,U.Z)(aa,Js,ea,!1,null,null,null);const ia=oa.exports;var la=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.nginx.nginxConfigDirectory")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.nginxConfigDirectoryChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.nginxConfigDirectory,expression:"nginxConfigDirectory"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.nginxConfigDirectory.default},domProps:{value:e.nginxConfigDirectory},on:{input:function(t){t.target.composing||(e.nginxConfigDirectory=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.workerProcessesChanged?" is-changed":"")},[s("VueSelect",{attrs:{options:e.$props.data.workerProcesses.options,clearable:!1},model:{value:e.workerProcesses,callback:function(t){e.workerProcesses=t},expression:"workerProcesses"}})],1)])])]),s("div",{staticClass:"field is-horizontal"},[e._m(1),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.userChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.user.default},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(2),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.pidChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.pid,expression:"pid"}],staticClass:"input",attrs:{type:"text",placeholder:e.$props.data.pid.default},domProps:{value:e.pid},on:{input:function(t){t.target.composing||(e.pid=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(3),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field has-addons"},[s("div",{class:"control is-expanded"+(e.clientMaxBodySizeChanged?" is-changed":"")},[s("input",{directives:[{name:"model",rawName:"v-model.number",value:e.clientMaxBodySize,expression:"clientMaxBodySize",modifiers:{number:!0}}],staticClass:"input",attrs:{type:"number",min:"0",step:"1",placeholder:e.$props.data.clientMaxBodySize.default},domProps:{value:e.clientMaxBodySize},on:{input:function(t){t.target.composing||(e.clientMaxBodySize=e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),s("div",{staticClass:"control"},[s("a",{staticClass:"button is-static"},[e._v(" "+e._s(e.$t("templates.globalSections.nginx.mb"))+" ")])])])])]),s("div",{staticClass:"field is-horizontal"},[e._m(4),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.typesHashMaxSizeChanged?" is-changed":"")},[s("VueSelect",{attrs:{options:e.$props.data.typesHashMaxSize.options,clearable:!1},model:{value:e.typesHashMaxSize,callback:function(t){e.typesHashMaxSize=t},expression:"typesHashMaxSize"}})],1)])])]),s("div",{staticClass:"field is-horizontal"},[e._m(5),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.typesHashBucketSizeChanged?" is-changed":"")},[s("VueSelect",{attrs:{options:e.$props.data.typesHashBucketSize.options,clearable:!1},model:{value:e.typesHashBucketSize,callback:function(t){e.typesHashBucketSize=t},expression:"typesHashBucketSize"}})],1)])])])])},na=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("worker_processes")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("user")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("pid")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("client_max_body_size")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("types_hash_max_size")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v("types_hash_bucket_size")])])}];const ra={nginxConfigDirectory:{default:"/etc/nginx/",computed:"/etc/nginx",enabled:!0},workerProcesses:{default:"auto",options:["auto",...Array.from({length:16},((e,t)=>t+1))],enabled:!0},user:{default:"www-data",enabled:!0},pid:{default:"/run/nginx.pid",enabled:!0},clientMaxBodySize:{default:16,enabled:!0},typesHashMaxSize:{default:2048,options:Array.from({length:8},((e,t)=>Math.pow(2,t+6))),enabled:!0},typesHashBucketSize:{default:64,options:Array.from({length:10},((e,t)=>Math.pow(2,t+4))),enabled:!0}},ca={name:"GlobalNGINX",display:"common.nginx",key:"nginx",delegated:B(ra),components:{VueSelect:D()},props:{data:Object},computed:V(ra,"nginx"),watch:{"$props.data.nginxConfigDirectory":{handler(e){e.enabled&&e.computed.endsWith("/")&&(e.computed=e.computed.replace(/\/+$/,""))},deep:!0},"$props.data.workerProcesses":{handler(e){e.enabled&&(e.options.includes(e.computed)||(e.computed=e.default))},deep:!0},"$props.data.clientMaxBodySize":{handler(e){e.enabled&&e.computed<0&&(e.computed=0)},deep:!0},"$props.data.typesHashMaxSize":{handler(e){e.enabled&&(e.options.includes(e.computed)||(e.computed=e.default))},deep:!0},"$props.data.typesHashBucketSize":{handler(e){e.enabled&&(e.options.includes(e.computed)||(e.computed=e.default))},deep:!0}}},pa=ca;var da=(0,U.Z)(pa,la,na,!1,null,null,null);const ua=da.exports;var ha=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.docker.docker")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field is-horizontal is-aligned-top"},[s("a",{staticClass:"button is-primary is-tiny dark-button",on:{click:e.applyDockerTweaks}},[e._v(" "+e._s(e.$t("templates.globalSections.docker.applyDockerTweaks"))+" ")]),s("p",[e._v(" "+e._s(e.$t("templates.globalSections.docker.applyDockerTweaksForNginx"))+" "),s("br"),s("small",{domProps:{innerHTML:e._s(e.$t("templates.globalSections.docker.applyDockerTweaksExplainer"))}})])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.docker.dockerfile")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.dockerfileChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.dockerfile,callback:function(t){e.dockerfile=t},expression:"dockerfile"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.docker.includeDockerfile"))+" ")])],1)])])])]),e.dockerfile?s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.docker.dockerCompose")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.dockerComposeChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.dockerCompose,callback:function(t){e.dockerCompose=t},expression:"dockerCompose"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.docker.includeDockerCompose"))+" ")])],1)])])])]):e._e()])},ma=[];const va={dockerfile:{default:!1,enabled:!0},dockerCompose:{default:!1,enabled:!1}},fa={name:"GlobalDocker",display:"templates.globalSections.docker.docker",key:"docker",delegated:B(va),components:{PrettyCheck:J()},props:{data:Object},computed:V(va,"docker"),watch:{"$props.data.dockerfile":{handler(e){e.computed?(this.$props.data.dockerCompose.enabled=!0,this.$props.data.dockerCompose.computed=this.$props.data.dockerCompose.value):(this.$props.data.dockerCompose.enabled=!1,this.$props.data.dockerCompose.computed=!1)},deep:!0}},methods:{applyDockerTweaks(){F("apply_docker_tweaks","Presets"),this.$parent.setValue("nginx","user","nginx"),this.$parent.setValue("nginx","pid","/var/run/nginx.pid"),this.$parent.setValue("docker","dockerfile",!0)}}},ga=fa;var ba=(0,U.Z)(ga,ha,ma,!1,null,null,null);const Ca=ba.exports;var $a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.tools.modularizedStructure")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.modularizedStructureChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.modularizedStructure,callback:function(t){e.modularizedStructure=t},expression:"modularizedStructure"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.tools.enableModularizedConfigFiles"))+" ")])],1)])])])]),e.symlinkVhostEnabled?s("div",{staticClass:"field is-horizontal"},[e._m(0),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{class:"control"+(e.symlinkVhostChanged?" is-changed":"")},[s("div",{staticClass:"checkbox"},[s("PrettyCheck",{staticClass:"p-default p-curve p-fill p-icon",model:{value:e.symlinkVhost,callback:function(t){e.symlinkVhost=t},expression:"symlinkVhost"}},[s("i",{staticClass:"icon fas fa-check",attrs:{slot:"extra"},slot:"extra"}),e._v(" "+e._s(e.$t("templates.globalSections.tools.enableSymLinksFrom"))+" sites-available/ "+e._s(e.$t("templates.globalSections.tools.to"))+" sites-enabled/ ")])],1)])])])]):e._e(),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.tools.shareConfiguration")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.shareLink,expression:"shareLink"}],staticClass:"input",attrs:{type:"text",readonly:"readonly"},domProps:{value:e.shareLink},on:{click:e.select,input:function(t){t.target.composing||(e.shareLink=t.target.value)}}})])])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(e.$t("templates.globalSections.tools.resetConfiguration")))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field is-grouped"},[s("div",{staticClass:"control"},[s("a",{staticClass:"button is-danger is-outline is-mini",on:{click:e.resetGlobal}},[e._v(" "+e._s(e.$t("templates.globalSections.tools.resetGlobalConfig"))+" ")])]),e.hasDomain?s("div",{staticClass:"control"},[s("a",{staticClass:"button is-danger is-outline is-mini",on:{click:e.resetDomains}},[e._v(" "+e._s(e.$t("templates.globalSections.tools.resetAllDomains"))+" ")])]):e._e(),e.hasDomain?s("div",{staticClass:"control"},[s("a",{staticClass:"button is-danger is-outline is-mini",on:{click:e.removeDomains}},[e._v(" "+e._s(e.$t("templates.globalSections.tools.removeAllDomains"))+" ")])]):e._e()])])]),s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"}),s("div",{staticClass:"field-body is-vertical"},e._l(e.$parent.$parent.activeDomains,(function(t){return s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"},[e._v(e._s(t[0].server.domain.computed))])]),s("div",{staticClass:"field-body"},[s("div",{staticClass:"field is-grouped"},[s("div",{staticClass:"control"},[s("a",{staticClass:"button is-danger is-outline is-mini",on:{click:function(s){return e.resetDomain(t[1])}}},[e._v(" "+e._s(e.$t("templates.globalSections.tools.resetDomainConfig"))+" ")])]),s("div",{staticClass:"control"},[s("a",{staticClass:"button is-danger is-outline is-mini",on:{click:function(s){return e.removeDomain(t[1])}}},[e._v(" "+e._s(e.$t("templates.globalSections.tools.removeDomain"))+" ")])])])])])})),0)]),s("Modal",{ref:"confirmModal",attrs:{title:e.confirmTitle}},[s("p",[e._v(e._s(e.confirmBody))]),s("a",{staticClass:"button is-danger is-outline",on:{click:e.doConfirmAction}},[e._v(" "+e._s(e.$t("templates.globalSections.tools.yesImSure"))+" ")]),s("a",{staticClass:"button is-outline",on:{click:function(t){return e.$refs.confirmModal.close()}}},[e._v(" "+e._s(e.$t("templates.globalSections.tools.noCancel"))+" ")])])],1)},ya=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"field-label"},[s("label",{staticClass:"label"})])}],_a=s(1667);const xa={modularizedStructure:{default:!0,enabled:!0},symlinkVhost:{default:!0,enabled:!0}},ka={name:"GlobalTools",display:"templates.globalSections.tools.tools",key:"tools",delegated:B(xa),components:{PrettyCheck:J(),Modal:_a.Z},props:{data:Object},data(){return{confirmTitle:"",confirmBody:"",confirmAction:()=>{}}},computed:{...V(xa,"tools"),hasDomain(){return this.$parent.$parent.activeDomains.length>0},shareQuery(){return rs(this.$parent.$parent.activeDomains,this.$parent.$props.data)},shareLink(){const e=`${window.location.protocol}//${window.location.host}${window.location.pathname}`;return`${e}${this.shareQuery}`}},watch:{shareQuery(e){window.history.replaceState({},"",`${window.location.pathname}${e||""}`)},"$props.data.modularizedStructure":{handler(e){e.computed?(this.$props.data.symlinkVhost.enabled=!0,this.$props.data.symlinkVhost.computed=this.$props.data.symlinkVhost.value):(this.$props.data.symlinkVhost.enabled=!1,this.$props.data.symlinkVhost.computed=!1)},deep:!0}},methods:{confirm(e,t,s){this.$data.confirmTitle=e,this.$data.confirmBody=t,this.$data.confirmAction=s,this.$refs.confirmModal.open()},doConfirmAction(){this.$refs.confirmModal.close(),this.$data.confirmAction()},doResetDomain(e){e&&Object.values(e).forEach((e=>{Object.values(e).forEach((e=>{e.value=e.default,e.computed=e.default}))}))},doRemoveDomain(e){this.$set(this.$parent.$parent.$data.domains,e,null)},resetGlobal(){this.confirm(this.$t("templates.globalSections.tools.resetGlobalConfig"),this.$t("templates.globalSections.tools.resetGlobalConfigBody"),(()=>{this.resetGlobalEvent(),Object.values(this.$parent.$props.data).forEach((e=>{Object.values(e).forEach((e=>{e.value=e.default,e.computed=e.default}))}))}))},resetDomain(e){if(e>=this.$parent.$parent.$data.domains.length)return;const t=this.$parent.$parent.$data.domains[e];t&&this.confirm(this.$t("templates.globalSections.tools.resetDomainConfig"),`${this.$t("templates.globalSections.tools.areYouSureYouWantToResetAllConfigurationOptionsForThe")}\n ${t.server.domain.computed}\n ${this.$t("templates.globalSections.tools.domain")}`,(()=>{this.resetDomainEvent(t.server.domain.computed),this.doResetDomain(t)}))},removeDomain(e){if(e>=this.$parent.$parent.$data.domains.length)return;const t=this.$parent.$parent.$data.domains[e];t&&this.confirm(this.$t("templates.globalSections.tools.removeDomain"),`${this.$t("templates.globalSections.tools.areYouSureYouWantToRemoveThe")}\n ${t.server.domain.computed}\n ${this.$t("templates.globalSections.tools.domainConfiguration")}`,(()=>{this.removeDomainEvent(t.server.domain.computed),this.doRemoveDomain(e)}))},resetDomains(){this.confirm(this.$t("templates.globalSections.tools.resetAllDomainsConfig"),this.$t("templates.globalSections.tools.resetAllDomainsConfigBody"),(()=>{this.resetDomainsEvent(this.$parent.$parent.activeDomains.map((e=>e[0].server.domain.computed)),this.$parent.$parent.activeDomains.length);for(let e=0;e<this.$parent.$parent.$data.domains.length;e++)this.doResetDomain(this.$parent.$parent.$data.domains[e])}))},removeDomains(){this.confirm(this.$t("templates.globalSections.tools.removeAllDomains"),this.$t("templates.globalSections.tools.removeAllDomainsBody"),(()=>{this.removeDomainsEvent(this.$parent.$parent.activeDomains.map((e=>e[0].server.domain.computed)),this.$parent.$parent.activeDomains.length);for(let e=0;e<this.$parent.$parent.$data.domains.length;e++)this.doRemoveDomain(e)}))},resetGlobalEvent(){F({category:"Tools",action:"Global settings reset"})},resetDomainEvent(e){F({category:"Tools",action:"Site reset",label:e})},removeDomainEvent(e){F({category:"Tools",action:"Removed site",label:e}),this.$parent.$parent.removeSiteEvent(this.$parent.$parent.activeDomains.length-1,e)},resetDomainsEvent(e,t){F({category:"Tools",action:"All sites reset",label:e.join(", "),value:t})},removeDomainsEvent(e,t){F({category:"Tools",action:"All sites removed",label:e.join(", "),value:t});for(let s=0;s<this.$parent.$parent.$data.domains.length;s++)this.$parent.$parent.removeSiteEvent(this.$parent.$parent.activeDomains.length-s-1,e[s])},select(e){e.target.setSelectionRange(0,e.target.value.length)}}},Sa=ka;var Pa=(0,U.Z)(Sa,$a,ya,!1,null,null,null);const Ea=Pa.exports,wa=[xs,Rs,Hs,Ws,Xs,ia,ua,Ca,Ea],Ta=wa,Ra=Ta.reduce(((e,t)=>(e[t.key]=t.delegated,e)),{}),Da={name:"Global",delegated:Ra,props:{data:Object},data(){return{active:Ta[0].key,tabs:Ta}},computed:{nextTab(){const e=this.$data.tabs.map((e=>e.key)),t=e.indexOf(this.$data.active)+1;return t<e.length&&e[t]},previousTab(){const e=this.$data.tabs.map((e=>e.key)),t=e.indexOf(this.$data.active)-1;return t>=0&&e[t]}},methods:{changesCount(e){return Object.keys(this.$props.data[e]).filter((t=>j(this.$props.data[e][t],e,t))).length},changes(e){const t=this.changesCount(e);return t?` (${t.toLocaleString()})`:""},setValue(e,t,s){Object.assign(this.$props.data[e][t],{value:s,computed:s})},resetValue(e,t){this.setValue(e,t,this.$props.data[e][t].default)},tabClass(e){const t=[];e===this.$data.active&&t.push("is-active"),this.changesCount(e)&&t.push("is-changed");const s=this.$data.tabs.map((e=>e.key));return s.indexOf(e)<s.indexOf(this.$data.active)&&t.push("is-before"),t.join(" ")},showTab(e){F({category:"Global",action:"Tab clicked",label:`${this.$data.active}, ${e}`}),this.$data.active=e},showPreviousTab(){F({category:"Global",action:"Back clicked",label:`${this.$data.active}, ${this.previousTab}`}),this.$data.active=this.previousTab},showNextTab(){F({category:"Global",action:"Next clicked",label:`${this.$data.active}, ${this.nextTab}`}),this.$data.active=this.nextTab}}},Oa=Da;var za=(0,U.Z)(Oa,hs,ms,!1,null,null,null);const ja=za.exports;var Aa=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"callout"},[s("p",[e._v(" "+e._s(e.$t("templates.callouts.droplet.lookingForAPlaceToDeploy"))+" "),s("ExternalLink",{attrs:{text:e.$t("templates.callouts.droplet.tryOutDigitalOceansDroplet"),link:"https://marketplace.digitalocean.com/apps/lemp"},nativeOn:{click:function(t){return e.linkClickEvent(t)}}})],1)])},La=[];const Ha={name:"DropletCallout",components:{ExternalLink:ce.Z},data(){return{observer:null}},mounted(){if("IntersectionObserver"in window)return this.observer=new window.IntersectionObserver(this.observerCallback,{root:null,rootMargin:"0px",threshold:1}),void this.observer.observe(this.$el);this.calloutVisibleEvent()},updated(){this.$nextTick((()=>{this.observer&&(this.observer.disconnect(),this.observer.observe(this.$el))}))},beforeDestroy(){this.observerCleanup()},methods:{observerCleanup(){this.observer&&(this.observer.disconnect(),this.observer=null)},observerCallback(e){for(const t of e)t.isIntersecting&&(this.observerCleanup(),this.calloutVisibleEvent())},calloutVisibleEvent(){F({category:"Droplet callout",action:"Visible",nonInteraction:!0})},linkClickEvent(){F({category:"Droplet callout",action:"Clicked"})}}},Ia=Ha;var Fa=(0,U.Z)(Ia,Aa,La,!1,null,null,null);const Ma=Fa.exports;var Na=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"callout floating",style:e.style},[s("div",{staticClass:"close"},[s("p",[e._v(" "+e._s(e.$t("templates.callouts.contribute.wantToContributeChanges"))+" ")]),s("a",{on:{click:function(t){return t.preventDefault(),e.close(t)}}},[s("i",{staticClass:"fas fa-times"})])]),s("a",{staticClass:"button is-primary",attrs:{href:"https://github.com/digitalocean/nginxconfig.io",target:"_blank"},on:{click:e.linkClickEvent}},[e._v(" "+e._s(e.$t("templates.callouts.contribute.getInvolvedOnGitHub"))+" ")])])},Ba=[];const Va={name:"ContributeCallout",data(){return{scrolled:!1,closed:!1}},computed:{visible(){return this.$data.scrolled&&!this.$data.closed},style(){return this.visible?void 0:{opacity:0,pointerEvents:"none"}}},mounted(){document.addEventListener("scroll",(()=>{this.$data.scrolled||window.scrollY<300||(this.$data.scrolled=!0,this.calloutVisibleEvent())}))},methods:{close(){this.$data.closed=!0,this.closedEvent()},closedEvent(){F({category:"Contribute callout",action:"Closed"})},calloutVisibleEvent(){F({category:"Contribute callout",action:"Visible",nonInteraction:!0})},linkClickEvent(){F({category:"Contribute callout",action:"Clicked"})}}},Ga=Va;var Wa=(0,U.Z)(Ga,Na,Ba,!1,null,null,null);const Za=Wa.exports;var Ua=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"setup"},[s("div",{staticClass:"panel"},[s("div",{staticClass:"tabs"},[s("ul",e._l(e.tabs,(function(t){return s("li",{key:t.key,class:e.tabClass(t.key)},[s("a",{on:{click:function(s){return e.showTab(t.key)}}},[e._v(e._s(e.$t(t.display)))])])})),0)]),e._l(e.tabs,(function(t){return s(t,{key:t.key,tag:"component",staticClass:"container",style:{display:e.active===t.key?void 0:"none"},attrs:{data:e.$props.data}})})),s("div",{staticClass:"navigation-buttons"},[!1!==e.previousTab?s("a",{staticClass:"button is-mini",on:{click:e.showPreviousTab}},[s("i",{staticClass:"fas fa-long-arrow-alt-left"}),e._v(" "),s("span",[e._v(e._s(e.$t("common.back")))])]):e._e(),!1!==e.nextTab?s("a",{staticClass:"button is-primary is-mini",on:{click:e.showNextTab}},[s("span",[e._v(e._s(e.$t("common.next")))]),e._v(" "),s("i",{staticClass:"fas fa-long-arrow-alt-right"})]):e._e()])],2),s("div",{staticClass:"buttons is-centered"},[s("a",{staticClass:"button is-success",on:{click:e.downloadTar}},[e._v(e._s(e.$t("templates.setup.downloadConfig")))]),s("a",{ref:"copyTar",staticClass:"button is-primary dark-button"},[e._v(e._s(e.$t("templates.setup.copyBase64")))])])])},qa=[],Ya=s(1898),Qa=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("ol",[s("li",[s("p",[s("span",{domProps:{innerHTML:e._s(e.$t("templates.setupSections.download.downloadTheGeneratedConfig"))}}),s("b",[e._v(" "),s("a",{on:{click:e.$parent.downloadTar}},[e._v(e._s(e.$parent.tarName))])]),s("br"),s("span",{domProps:{innerHTML:e._s(e.$t("templates.setupSections.download.andUploadItToYourServers"))}}),s("code",{staticClass:"slim"},[e._v(e._s(e.$props.data.global.nginx.nginxConfigDirectory.computed))]),e._v(" "+e._s(e.$t("templates.setupSections.download.directory"))+" ")]),s("p",[e._v(" "+e._s(e.$t("templates.setupSections.download.or"))+" "),s("b",[s("a",{ref:"copyTar"},[e._v(" "+e._s(e.$t("templates.setupSections.download.copyBase64StringOfCompressedConfig")))])]),s("span",{domProps:{innerHTML:e._s(e.$t("templates.setupSections.download.pasteItInYourServersCommandLineAndExecute"))}})])]),s("li",[s("p",[s("span",{domProps:{innerHTML:e._s(e.$t("templates.setupSections.download.navigateToYourNginxConfigurationDirectoryOnYourServer"))}}),s("br"),s("BashPrism",{key:e.$props.data.global.nginx.nginxConfigDirectory.computed,attrs:{cmd:"cd "+e.$props.data.global.nginx.nginxConfigDirectory.computed},on:{copied:function(t){return e.codeCopiedEvent("Navigate to nginx config directory")}}})],1)]),s("li",[s("p",[s("span",{domProps:{innerHTML:e._s(e.$t("templates.setupSections.download.createABackupOfYourCurrentNginxConfiguration"))}}),s("br"),s("BashPrism",{attrs:{cmd:"tar -czvf nginx_$(date +'%F_%H-%M-%S').tar.gz nginx.conf sites-available/ sites-enabled/ nginxconfig.io/"},on:{copied:function(t){return e.codeCopiedEvent("Create nginx config backup tar")}}})],1)]),s("li",[s("p",[s("span",{domProps:{innerHTML:e._s(e.$t("templates.setupSections.download.extractTheNewCompressedConfigurationArchiveUsingTar"))}}),s("br"),s("BashPrism",{key:e.$parent.tarName,attrs:{cmd:"tar -xzvf "+e.$parent.tarName},on:{copied:function(t){return e.codeCopiedEvent("Extract new nginx config tar")}}})],1)])])])},Ka=[],Xa=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{on:{copied:e.copied}},[s("pre",[s("code",{staticClass:"language-bash"},[e._v(e._s(e.cmd))])])])},Ja=[];const eo={name:"BashPrism",props:{cmd:String},mounted(){console.info(`Highlighting ${this.$props.cmd}...`),window.Prism.highlightAllUnder(this.$el)},methods:{copied(e){this.$emit("copied",e.detail.text)}}},to=eo;var so=(0,U.Z)(to,Xa,Ja,!1,null,null,null);const ao=so.exports,oo={name:"SetupDownload",display:"templates.setupSections.download.download",key:"download",components:{BashPrism:ao},props:{data:Object},mounted(){this.$parent.setupCopy(this.$refs.copyTar)},methods:{codeCopiedEvent(e){F({category:"Setup",action:"Code snippet copied",label:`download: ${e}`})}}},io=oo;var lo=(0,U.Z)(io,Qa,Ka,!1,null,null,null);const no=lo.exports;var ro=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.diffieHellmanValue||e.letsEncryptActive?s("ol",[e.diffieHellmanValue?s("li",[s("p",[s("span",{domProps:{innerHTML:e._s(e.$t("templates.setupSections.ssl.generateDiffieHellmanKeysByRunningThisCommandOnYourServer"))}}),s("br"),s("BashPrism",{key:e.$props.data.global.nginx.nginxConfigDirectory.computed+"-"+e.diffieHellmanValue,attrs:{cmd:"openssl dhparam -out "+e.$props.data.global.nginx.nginxConfigDirectory.computed+"/dhparam.pem "+e.diffieHellmanValue},on:{copied:function(t){return e.codeCopiedEvent("Generate diffie-hellman keys")}}})],1)]):e._e(),e.letsEncryptActive?s("li",[s("p",[s("span",{domProps:{innerHTML:e._s(e.$t("templates.setupSections.ssl.createACommonAcmeChallengeDirectoryForLetsEncrypt"))}}),s("br"),s("BashPrism",{key:e.letsEncryptDir,attrs:{cmd:"mkdir -p "+e.letsEncryptDir},on:{copied:function(t){return e.codeCopiedEvent("Create let's encrypt directory")}}}),s("BashPrism",{key:e.nginxUser+"-"+e.letsEncryptDir,attrs:{cmd:"chown "+e.nginxUser+" "+e.letsEncryptDir},on:{copied:function(t){return e.codeCopiedEvent("Set let's encrypt directory ownership")}}})],1)]):e._e()]):s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.setupSections.ssl.noAdditionalStepsAreNeededToSetUpSslForNginx"))+" ")])])])])])])},co=[];const po={name:"SetupSSL",display:"templates.setupSections.ssl.sslInit",key:"ssl",components:{BashPrism:ao},props:{data:Object},computed:{letsEncryptDir(){return this.$props.data.global.https.letsEncryptRoot.computed.replace(/\/+$/,"")},nginxUser(){return this.$props.data.global.nginx.user.computed},diffieHellmanValue(){switch(this.$props.data.global.https.sslProfile.computed){case"intermediate":return 2048;case"old":return 1024;case"modern":default:return 0}},letsEncryptActive(){for(const e of this.$props.data.domains)if(e&&"letsEncrypt"===e.https.certType.computed)return!0;return!1}},methods:{codeCopiedEvent(e){F({category:"Setup",action:"Code snippet copied",label:`ssl: ${e}`})}}},uo=po;var ho=(0,U.Z)(uo,ro,co,!1,null,null,null);const mo=ho.exports;var vo=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.letsEncryptActive?s("ol",[s("li",[s("p",[e._v(" "+e._s(e.$t("templates.setupSections.certbot.commentOutSslDirectivesInConfiguration"))+" "),s("br")]),s("BashPrism",{key:e.sitesAvailable,attrs:{cmd:"sed -i -r 's/(listen .*443)/\\1; #/g; s/(ssl_(certificate|certificate_key|trusted_certificate) )/#;#\\1/g; s/(server \\{)/\\1\\n ssl off;/g' "+e.sitesAvailable},on:{copied:function(t){return e.codeCopiedEvent("Disable ssl directives")}}})],1),s("li",[s("p",[e._v(" "+e._s(e.$t("templates.setupSections.certbot.reloadYourNginxServer"))+" "),s("br")]),s("BashPrism",{attrs:{cmd:"sudo nginx -t && sudo systemctl reload nginx"},on:{copied:function(t){return e.codeCopiedEvent("Reload nginx")}}})],1),s("li",[s("p",[e._v(" "+e._s(e.$t("templates.setupSections.certbot.obtainSslCertificatesFromLetsEncrypt"))+" "),s("br")]),s("BashPrism",{key:e.certbotCmds,attrs:{cmd:e.certbotCmds},on:{copied:function(t){return e.codeCopiedEvent("Obtain certificates using certbot")}}})],1),s("li",[s("p",[e._v(" "+e._s(e.$t("templates.setupSections.certbot.uncommentSslDirectivesInConfiguration"))+" "),s("br")]),s("BashPrism",{key:e.sitesAvailable,attrs:{cmd:"sed -i -r -z 's/#?; ?#//g; s/(server \\{)\\n ssl off;/\\1/g' "+e.sitesAvailable},on:{copied:function(t){return e.codeCopiedEvent("Enable ssl directives")}}})],1),s("li",[s("p",[e._v(" "+e._s(e.$t("templates.setupSections.certbot.reloadYourNginxServer"))+" "),s("br")]),s("BashPrism",{attrs:{cmd:"sudo nginx -t && sudo systemctl reload nginx"},on:{copied:function(t){e.codeCopiedEvent("Reload nginx (2)")}}})],1),s("li",[s("p",[e._v(" "+e._s(e.$t("templates.setupSections.certbot.configureCertbotToReloadNginxOnCertificateRenewal"))+" "),s("br")]),s("BashPrism",{attrs:{cmd:"echo -e '#!/bin/bash\\nnginx -t && systemctl reload nginx' | sudo tee /etc/letsencrypt/renewal-hooks/post/nginx-reload.sh"},on:{copied:function(t){return e.codeCopiedEvent("Create nginx auto-restart on renewal")}}}),s("BashPrism",{attrs:{cmd:"sudo chmod a+x /etc/letsencrypt/renewal-hooks/post/nginx-reload.sh"},on:{copied:function(t){return e.codeCopiedEvent("Enable execution of auto-restart")}}})],1)]):s("div",{staticClass:"field is-horizontal"},[s("div",{staticClass:"field-body"},[s("div",{staticClass:"field"},[s("div",{staticClass:"control"},[s("label",{staticClass:"text"},[e._v(" "+e._s(e.$t("templates.setupSections.certbot.certbotDoesNotNeedToBeSetupForYourConfiguration"))+" ")])])])])])])},fo=[];const go={name:"SetupCertbot",display:"templates.setupSections.certbot.certbot",key:"certbot",components:{BashPrism:ao},props:{data:Object},computed:{letsEncryptDir(){return this.$props.data.global.https.letsEncryptRoot.computed.replace(/\/+$/,"")},letsEncryptActive(){for(const e of this.$props.data.domains)if(e&&"letsEncrypt"===e.https.certType.computed)return!0;return!1},sitesAvailable(){if(!this.$props.data.global.tools.modularizedStructure.computed)return`${this.$props.data.global.nginx.nginxConfigDirectory.computed}/nginx.conf`;const e=this.$props.data.global.tools.symlinkVhost.computed?"available":"enabled";return this.$props.data.domains.filter((e=>"letsEncrypt"===e.https.certType.computed)).map((t=>`${this.$props.data.global.nginx.nginxConfigDirectory.computed}/sites-${e}/${t.server.domain.computed}.conf`)).join(" ")},certbotCmds(){return this.$props.data.domains.filter((e=>"letsEncrypt"===e.https.certType.computed)).map((e=>["certbot certonly --webroot",`-d ${e.server.domain.computed}`,e.server.wwwSubdomain.computed?`-d www.${e.server.domain.computed}`:null,e.server.cdnSubdomain.computed?`-d cdn.${e.server.domain.computed}`:null,`--email ${e.https.letsEncryptEmail.computed}`,`-w ${this.letsEncryptDir}`,"-n --agree-tos --force-renewal"].filter((e=>null!==e)).join(" "))).join("\n")}},methods:{codeCopiedEvent(e){F({category:"Setup",action:"Code snippet copied",label:`certbot: ${e}`})}}},bo=go;var Co=(0,U.Z)(bo,vo,fo,!1,null,null,null);const $o=Co.exports;var yo=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("p",[s("b",[e._v(e._s(e.$t("templates.setupSections.goLive.letsGoLive")))]),e._v(" 🎉 ")]),s("p",[e._v(" "+e._s(e.$t("templates.setupSections.goLive.reloadNginxToLoadInYourNewConfiguration"))+" "),s("br"),s("BashPrism",{attrs:{cmd:"sudo nginx -t && sudo systemctl reload nginx"},on:{copied:function(t){return e.codeCopiedEvent("Reload nginx")}}})],1)])},_o=[];const xo={name:"SetupGoLive",display:"templates.setupSections.goLive.goLive",key:"goLive",components:{BashPrism:ao},props:{data:Object},methods:{codeCopiedEvent(e){F({category:"Setup",action:"Code snippet copied",label:`goLive: ${e}`})}}},ko=xo;var So=(0,U.Z)(ko,yo,_o,!1,null,null,null);const Po=So.exports,Eo=[no,mo,$o,Po],wo=Eo,To={name:"Setup",props:{data:Object},data(){return{active:wo[0].key,tabs:wo}},computed:{nextTab(){const e=this.$data.tabs.map((e=>e.key)),t=e.indexOf(this.$data.active)+1;return t<e.length&&e[t]},previousTab(){const e=this.$data.tabs.map((e=>e.key)),t=e.indexOf(this.$data.active)-1;return t>=0&&e[t]},domainCount(){return this.$props.data.domains.filter((e=>null!==e)).length},tarName(){const e=this.$props.data.domains.filter((e=>null!==e)).map((e=>e.server.domain.computed));return`nginxconfig.io-${e.join(",")}.tar.gz`}},mounted(){this.setupCopy(this.$refs.copyTar)},methods:{tabClass(e){if(e===this.$data.active)return"is-active";const t=this.$data.tabs.map((e=>e.key));return t.indexOf(e)<t.indexOf(this.$data.active)?"is-before":void 0},tarContents(){const e={};for(const t in this.$props.data.confFiles)Object.prototype.hasOwnProperty.call(this.$props.data.confFiles,t)&&(e[t]={contents:this.$props.data.confFiles[t]},this.$props.data.global.tools.symlinkVhost.computed&&t.startsWith("sites-available")&&(e[t.replace(/^sites-available/,"sites-enabled")]={target:`../${t}`}));return new Ya.Z(e).gz()},downloadTar(){F({category:"Setup",action:"Downloaded tar file",label:this.tarName,value:this.domainCount}),this.tarContents().download(this.tarName)},copyTar(){F({category:"Setup",action:"Copied base64 tar",label:this.tarName,value:this.domainCount});const e=`${this.$props.data.global.nginx.nginxConfigDirectory.computed}/${this.tarName}`;return this.tarContents().base64(e)},setupCopy(e){const t=e.textContent,s=()=>{setTimeout((()=>{e.textContent=t}),5e3)},a=new(i())(e,{text:this.copyTar});a.on("success",(t=>{e.textContent=this.$t("templates.setup.copied"),t.clearSelection(),s()})),a.on("error",(()=>{e.textContent=this.$t("templates.setup.press_to_copy"),s()}))},showTab(e){F({category:"Setup",action:"Tab clicked",label:`${this.$data.active}, ${e}`}),this.$data.active=e},showPreviousTab(){F({category:"Setup",action:"Back clicked",label:`${this.$data.active}, ${this.previousTab}`}),this.$data.active=this.previousTab},showNextTab(){F({category:"Setup",action:"Next clicked",label:`${this.$data.active}, ${this.nextTab}`}),this.$data.active=this.nextTab}}},Ro=To;var Do=(0,U.Z)(Ro,Ua,qa,!1,null,null,null);const Oo=Do.exports;var zo=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"footer"},[s("div",{staticClass:"container"},[s("p",[s("a",{staticClass:"button is-primary is-small",attrs:{href:"#top"}},[e._v(e._s(e.$t("templates.footer.backToTop")))])]),s("p",[e._v(" "+e._s(e.$t("templates.footer.thisToolIs"))+" "),s("ExternalLink",{attrs:{text:e.$t("templates.footer.openSourceOnGitHub"),link:"https://github.com/digitalocean/nginxconfig.io"}}),e._v(" "+e._s(e.$t("templates.footer.underThe"))+" "),s("ExternalLink",{attrs:{text:e.$t("templates.footer.mit"),link:"https://github.com/digitalocean/nginxconfig.io/blob/master/LICENSE"}}),e._v(" "+e._s(e.$t("templates.footer.license"))+" "+e._s(e.$t("templates.footer.weWelcomeFeedbackAndContributions"))+" ")],1),s("p",[e._v(" "+e._s(e.$t("templates.footer.originallyCreatedBy"))+" "),s("ExternalLink",{attrs:{text:e.$t("templates.footer.balintSzekeres"),link:"https://b4lint.hu/"}}),e._v(", "+e._s(e.$t("templates.footer.maintainedBy"))+" "),s("ExternalLink",{attrs:{text:e.$t("templates.footer.digitalOcean"),link:"https://github.com/digitalocean/nginxconfig.io"}}),e._v(". ")],1)])])},jo=[];const Ao={name:"Footer",components:{ExternalLink:ce.Z}},Lo=Ao;var Ho=(0,U.Z)(Lo,zo,jo,!1,null,null,null);const Io=Ho.exports;var Fo=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{class:"column "+(e.half?"is-half":"is-full")+" is-full-mobile is-full-tablet",on:{copied:e.copied}},[s("h3",{domProps:{innerHTML:e._s(e.name)}}),s("pre",[s("code",{staticClass:"language-nginx",domProps:{innerHTML:e._s(e.conf)}})])])},Mo=[];const No={name:"NginxPrism",props:{name:String,conf:String,half:Boolean},mounted(){console.info(`Highlighting ${this.$props.name}...`),window.Prism.highlightAllUnder(this.$el)},methods:{copied(e){this.$emit("copied",e.detail.text)}}},Bo=No;var Vo=(0,U.Z)(Bo,Fo,Mo,!1,null,null,null);const Go=Vo.exports,Wo={name:"App",components:{Header:O.Z,VueSelect:D(),Footer:Io,Domain:bt,Global:ja,DropletCallout:Ma,ContributeCallout:Za,Setup:Oo,NginxPrism:Go,YamlPrism:()=>s.e(172).then(s.bind(s,9172)),DockerPrism:()=>s.e(10).then(s.bind(s,2010))},data(){return{domains:[],global:{...ja.delegated,app:{lang:{default:d,value:d,computed:d,enabled:!0}}},active:0,ready:!1,splitColumn:!1,confWatcherWaiting:!1,confFilesPrevious:{},confFilesOutput:[],languageLoading:!1,languagePrevious:d,interactiveEvents:!1}},computed:{activeDomains(){return this.$data.domains.map(((e,t)=>[e,t])).filter((e=>null!==e[0]))},confFiles(){return us(this.$data.domains.filter((e=>null!==e)),this.$data.global)},lang:{get(){return this.$data.global.app.lang.value},set(e){this.$data.global.app.lang.value=e,this.$data.global.app.lang.computed=e}},i18nPacks(){return v.map((e=>({label:this.$t(`languages.${e}`)+(e===this.$i18n.locale?"":` - ${this.$t(`languages.${e}`,e)}`),value:e})))}},watch:{confFiles(e,t){this.$data.confWatcherWaiting||(this.$data.confWatcherWaiting=!0,this.$data.confFilesPrevious=t,this.$nextTick((()=>this.checkChange(e))))},"$data.global.app.lang":{handler(e){this.$data.languageLoading=!0;const t=this.$data.interactiveEvents;v.includes(e.value)||(e.computed=e.default),y(e.computed).then((()=>{console.log("Language set to",e.computed),this.$data.languagePrevious=e.computed,this.$data.languageLoading=!1,this.languageSetEvent(!t)})).catch((t=>{console.log("Failed to set language to",e.computed),console.error(t),e.value=this.$data.languagePrevious,e.computed=this.$data.languagePrevious,this.$data.languageLoading=!1}))},deep:!0}},async mounted(){const e=window.location.search||window.location.hash.slice(1);await Et(e,this.$data.domains,this.$data.global,this.$nextTick);this.splitColumnEvent(!0);for(let t=0;t<this.activeDomains.length;t++)this.addSiteEvent(t+1,!0);this.$data.interactiveEvents=!0},methods:{changes(e){const t=this.$data.domains[e],s=Object.entries(t).reduce(((e,t)=>"presets"===t[0]?e:Ct(t[1])?(e+=Object.keys(t[1]).filter((e=>j(t[1][e],t[0],e))).length,e):e),0);return s?` (${s.toLocaleString()})`:""},add(){const e=S()(bt.delegated);let t=1;while(this.$data.domains.some((t=>t&&t.server.domain.computed===e.server.domain.computed)))t++,e.server.domain.computed=e.server.domain.default.replace(".com",`${t}.com`);e.server.domain.value=e.server.domain.computed,this.$data.domains.push(e),this.$data.active=this.$data.domains.length-1,this.addSiteEvent(this.activeDomains.length)},remove(e){const t=this.$data.domains[e].server.domain.computed;this.$set(this.$data.domains,e,null),this.$data.active===e&&(this.$data.active=this.$data.domains.findIndex((e=>null!==e))),this.removeSiteEvent(this.activeDomains.length,t)},checkChange(e){if(e===this.confFiles)return this.$data.ready||(this.$data.confFilesPrevious=this.confFiles,this.$nextTick((()=>{this.$data.ready=!0}))),void this.updateDiff(this.confFiles,this.$data.confFilesPrevious);this.$nextTick((()=>this.checkChange(this.confFiles)))},updateDiff(e,t){try{const s=(0,z.Z)(e,t,{highlightFunction:e=>`<mark>${e}</mark>`});this.$data.confFilesOutput=Object.entries(s).map((([e,{name:t,content:s}])=>{const a=t.filter((e=>!e.removed)).map((e=>e.value)).join(""),o=`${T()(this.$data.global.nginx.nginxConfigDirectory.computed)}/${a}`,i=s.filter((e=>!e.removed)).map((e=>e.value)).join("");return[o,i,`${E()(o)}-${E()(i)}`,e]}))}catch(s){console.error(s),this.$data.confFilesOutput=Object.entries(e).map((([e,t])=>{const s=`${T()(this.$data.global.nginx.nginxConfigDirectory.computed)}/${e}`;return[s,t,`${E()(s)}-${E()(t)}`,e]}))}this.$nextTick((()=>this.$data.confWatcherWaiting=!1))},splitColumnToggle(){this.$data.splitColumn=!this.$data.splitColumn,this.splitColumnEvent()},splitColumnEvent(e=!1){F({category:"Split column",action:this.$data.splitColumn?"Enabled":"Disabled",nonInteraction:e})},languageSetEvent(e=!1){F({category:"Language",action:"Set",label:this.$data.global.app.lang.computed,nonInteraction:e})},addSiteEvent(e,t=!1){F({category:"Site",action:"Added",value:e,nonInteraction:t})},removeSiteEvent(e,t){F({category:"Site",action:"Removed",label:t,value:e})},codeCopiedEvent(e){F({category:"Config files",action:"Code snippet copied",label:e})},getPrismComponent(e){switch(e){case"/etc/nginx/Dockerfile":return"DockerPrism";case"/etc/nginx/docker-compose.yaml":return"YamlPrism";default:return"NginxPrism"}}}},Zo=Wo;var Uo=(0,U.Z)(Zo,_,x,!1,null,null,null);const qo=Uo.exports,Yo=document.currentScript.src.split("/").slice(0,-1).join("/");("undefined"===typeof global?window:global).__replaceWebpackDynamicImport=e=>{const t=e.split("/").pop();return console.log(`Modifying import ${e} to use dir ${Yo} and base ${t}`),`${Yo}/${t}`},new a.Z({i18n:C,render:e=>e(qo)}).$mount("#app")},4654:()=>{}},t={};function s(a){var o=t[a];if(void 0!==o)return o.exports;var i=t[a]={exports:{}};return e[a].call(i.exports,i,i.exports,s),i.exports}if(s.m=e,(()=>{s.amdO={}})(),(()=>{var e=[];s.O=(t,a,o,i)=>{if(!a){var l=1/0;for(c=0;c<e.length;c++){for(var[a,o,i]=e[c],n=!0,r=0;r<a.length;r++)(!1&i||l>=i)&&Object.keys(s.O).every((e=>s.O[e](a[r])))?a.splice(r--,1):(n=!1,i<l&&(l=i));n&&(e.splice(c--,1),t=o())}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[a,o,i]}})(),(()=>{s.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return s.d(t,{a:t}),t}})(),(()=>{s.d=(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,a)=>(s.f[a](e,t),t)),[]))})(),(()=>{s.u=e=>"js/"+e+".js"})(),(()=>{s.miniCssF=e=>{}})(),(()=>{s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e={},t="nginxconfig.io:";s.l=(a,o,i,l)=>{if(e[a])e[a].push(o);else{var n,r;if(void 0!==i)for(var c=document.getElementsByTagName("script"),p=0;p<c.length;p++){var d=c[p];if(d.getAttribute("src")==a||d.getAttribute("data-webpack")==t+i){n=d;break}}n||(r=!0,n=document.createElement("script"),n.charset="utf-8",n.timeout=120,s.nc&&n.setAttribute("nonce",s.nc),n.setAttribute("data-webpack",t+i),n.src=a),e[a]=[o];var u=(t,s)=>{n.onerror=n.onload=null,clearTimeout(h);var o=e[a];if(delete e[a],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach((e=>e(s))),t)return t(s)},h=setTimeout(u.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=u.bind(null,n.onerror),n.onload=u.bind(null,n.onload),r&&document.head.appendChild(n)}}})(),(()=>{s.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{s.p=""})(),"function"===typeof jsonpScriptSrc){var a=jsonpScriptSrc;function o(){try{if("function"!==typeof __replaceWebpackDynamicImport)throw new Error("WebpackRequireFrom: '__replaceWebpackDynamicImport' is not a function or not available at runtime. See https://github.com/agoldis/webpack-require-from#troubleshooting");var e=__replaceWebpackDynamicImport(a.apply(this,arguments));if(!e||"string"!==typeof e)throw new Error("WebpackRequireFrom: '__replaceWebpackDynamicImport' does not return string. See https://github.com/agoldis/webpack-require-from#troubleshooting");return e}catch(t){return console.error(t),a.apply(this,arguments)}}jsonpScriptSrc=o}(()=>{var e={143:0};s.f.j=(t,a)=>{var o=s.o(e,t)?e[t]:void 0;if(0!==o)if(o)a.push(o[2]);else{var i=new Promise(((s,a)=>o=e[t]=[s,a]));a.push(o[2]=i);var l=s.p+s.u(t),n=new Error,r=a=>{if(s.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){var i=a&&("load"===a.type?"missing":a.type),l=a&&a.target&&a.target.src;n.message="Loading chunk "+t+" failed.\n("+i+": "+l+")",n.name="ChunkLoadError",n.type=i,n.request=l,o[1](n)}};s.l(l,r,"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,a)=>{var o,i,[l,n,r]=a,c=0;for(o in n)s.o(n,o)&&(s.m[o]=n[o]);for(r&&r(s),t&&t(a);c<l.length;c++)i=l[c],s.o(e,i)&&e[i]&&e[i][0](),e[l[c]]=0;s.O()},a=self["webpackChunknginxconfig_io"]=self["webpackChunknginxconfig_io"]||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var i=s.O(void 0,[998],(()=>s(8977)));i=s.O(i)})();