nginxconfig.io/js/app.js

1 line
215 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(()=>{var e={4141:(e,t,o)=>{var a={"./de/languages.js":9594,"./en/languages.js":3862,"./es/languages.js":1157,"./fa/languages.js":788,"./fr/languages.js":5149,"./ja/languages.js":4184,"./pl/languages.js":4545,"./pt-br/languages.js":1046,"./ru/languages.js":9068,"./zh-cn/languages.js":6249,"./zh-tw/languages.js":7469};function s(e){return l(e).then(o)}function l(e){return Promise.resolve().then((()=>{if(!o.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}))}s.keys=()=>Object.keys(a),s.resolve=l,s.id=4141,e.exports=s},8311:(e,t,o)=>{var a={"./de/index.js":[6619,619],"./en/index.js":[1935],"./es/index.js":[9054,673],"./fa/index.js":[5833,833],"./fr/index.js":[726,726],"./ja/index.js":[5589,589],"./pl/index.js":[1202,202],"./pt-br/index.js":[8671,671],"./ru/index.js":[1937,937],"./zh-cn/index.js":[346,346],"./zh-tw/index.js":[4054,54]};function s(e){if(!o.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],s=t[0];return Promise.all(t.slice(1).map(o.e)).then((()=>o(s)))}s.keys=()=>Object.keys(a),s.id=8311,e.exports=s},2634:()=>{},8884:(e,t,o)=>{"use strict";var a=o(4555);const s=document.currentScript.src.split("/").slice(0,-2).join("/")+"/";window.__webpackDynamicImportURL=()=>((0,a.pq)(`Using ${s} for webpack dynamic import`),s)},9594:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"Englisch",es:"Spanisch",zhCN:"Chinesisch (vereinfacht)",zhTW:"Chinesisch (traditionell)",ptBR:"Portugiesisch (Brasilien)",fr:"Französisch",ru:"Russisch",pl:"Polnisch",de:"Deutsch",ja:"Japanisch",fa:"Persisch"}},1935:(e,t,o)=>{"use strict";o.d(t,{default:()=>N});const a={back:"Back",next:"Next",enable:"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",logging:"Logging",reverseProxy:"Reverse proxy",reverseProxyLower:"reverse proxy",restrict:"Restrict",path:"Path"};var s=o(3862);const l={title:`${a.nginx}Config`,description:`The easiest way to configure a performant, secure, and stable ${a.nginx} server.`,singleColumnMode:"Single column mode",splitColumnMode:"Side-by-side mode",perWebsiteConfig:"Per-website config",addSite:"Add site",globalConfig:"Global config",setup:"Setup",configFiles:"Config files",copied:"Copied"},i={downloadConfig:"Download Config",copyBase64:"Copy Base64"},n={backToTop:"Back To Top",thisToolIs:"This tool is",openSourceOnGitHub:"open-source on GitHub",underThe:"under the",mit:"MIT",license:"license!",weWelcomeFeedbackAndContributions:"We welcome feedback and contributions.",originallyCreatedBy:"Originally created by",balintSzekeres:"Bálint Szekeres",maintainedBy:"maintained by",digitalOcean:"DigitalOcean"},d={enableEncryptedSslConnection:`${a.enable} encrypted ${a.ssl} connections`,http2:`${a.http}/2`,enableHttp2Connections:`${a.enable} ${a.http}/2 connections`,http3:`${a.http}/3`,enableHttp3Connections:`${a.enable} ${a.http}/3 connections`,forceHttps:`Force ${a.https}`,hsts:"HSTS",enableStrictTransportSecurity:`${a.enable} Strict Transport Security, requiring HTTPS connections`,enableIncludeSubDomains:`${a.enable} includeSubDomains directive, requiring HTTPS connections for ALL subdomains`,enablePreload:`${a.enable} preload directive, telling browsers to always make HTTPS connections only`,certificationType:"Certification type",customCertificate:"Custom certificate",letsEncryptEmail:`${a.letsEncrypt} email`,http3IsANonStandardModule:"HTTP/3 isn't a standard NGINX module, check the ",http3NginxQuicReadme:"NGINX QUIC readme",http3OrThe:" or the ",http3CloudflareQuicheProject:"Cloudflare quiche project",http3ForBuildingNginxWithHttp3:" for how to build NGINX with HTTP/3!"},r={byDomain:"by domain",enableForThisDomain:`${a.enable} for this domain`,arguments:"arguments",level:"logging level",forRedirects:"for redirects"},p={phpIsDisabled:`${a.php} is disabled.`,phpCannotBeEnabledWithReverseProxy:`${a.php} cannot be enabled whilst the reverse proxy is enabled.`,phpCannotBeEnabledWithPython:`${a.php} cannot be enabled whilst ${a.python} is enabled.`,enablePhp:`${a.enable} ${a.php}`,wordPressRules:`${a.wordPress} rules`,enableWordPressRules:`${a.enable} ${a.wordPress}-specific rules`,drupalRules:`${a.drupal} rules`,enableDrupalRules:`${a.enable} ${a.drupal}-specific rules`,magentoRules:`${a.magento} rules`,enableMagentoRules:`${a.enable} ${a.magento}-specific rules`,joomlaRules:`${a.joomla} rules`,enableJoomlaRules:`${a.enable} ${a.joomla}-specific rules`,phpServer:`${a.php} server`,phpBackupServer:`${a.php} backup server`,tcp:"TCP",hhvmSocket:"HHVM socket",php70Socket:"7.0 socket",php71Socket:"7.1 socket",php72Socket:"7.2 socket",php73Socket:"7.3 socket",php74Socket:"7.4 socket",php80Socket:"8.0 socket",php81Socket:"8.1 socket",php82Socket:"8.2 socket",phpSocket:"PHP socket",custom:"Custom",disabled:"Disabled"},c={presets:"Presets",itLooksLikeYouCustomisedTheConfig:"It looks like you've customised the configuration for this domain. Choosing a new preset may reset or change some of the settings that you've customised.",frontend:"Frontend",nodeJs:"Node.js",singlePageApplication:"Single-page application"},u={pythonIsDisabled:`${a.python} is disabled.`,pythonCannotBeEnabledWithReverseProxy:`${a.python} cannot be enabled whilst the reverse proxy is enabled.`,pythonCannotBeEnabledWithPhp:`${a.python} cannot be enabled whilst ${a.php} is enabled.`,enablePython:`${a.enable} ${a.python}`,djangoRules:`${a.django} rules`,enableDjangoRules:`${a.enable} ${a.django}-specific rules`},h={reverseProxyIsDisabled:`${a.reverseProxy} is disabled.`,reverseProxyCannotBeEnabledWithPhp:`${a.reverseProxy} cannot be enabled whilst ${a.php} is enabled.`,reverseProxyCannotBeEnabledWithPython:`${a.reverseProxy} cannot be enabled whilst ${a.python} is enabled.`,enableReverseProxy:`${a.enable} ${a.reverseProxyLower}`,proxyHostHeader:"Proxy Host header"},m={fallbackRouting:"Fallback routing",fallbackRoutingPhpPath:`Fallback routing ${a.php} path`,legacyPhpRouting:`Legacy ${a.php} routing`,enableLegacyRouting:`${a.enable} legacy routing`,routing:"Routing"},g={domain:"Domain",documentRoot:"Document root",oneOrMoreOtherDomainsAreAlsoNamed:"One or more other domains are also named",thisWillCauseIssuesWithConfigGeneration:"This will cause issues with config generation.",wwwSubdomain:"www subdomain",cdnSubdomain:"CDN subdomain",redirectSubdomains:"Redirect subdomains",server:"Server",listen:"listen"},f={disableForThisDomain:"disable for this domain",responseCode:"Response code"},v="Onion",b={onion:v,onionLocation:`${v} location`,provideAnOnionLocationToSetOnionLocationHeader:"Provide an onion location address to set the Onion-Location header for your site.",letsVisitorsKnownOnionServicesIsAvailable:"This lets visitors know that an onion services version of your site is available for Tor browsers.",learnMoreAboutOnionServices:"Learn more about Onion services",onionLocationExpectedToEndWithOnion:"Onion location addresses normally end with `.onion`."},k={https:d,logging:r,php:p,presets:c,python:u,reverseProxy:h,routing:m,server:g,restrict:f,onion:b},y="Mozilla",$="IPv4",L="IPv6",C={sslProfile:`${a.ssl} Profile`,httpsMustBeEnabledOnOneSite:`${a.https} must be enabled on at least one site to configure global ${a.https} settings.`,portReuse:"Reuseport",enableReuseOfPort:`${a.enable} reuseport to generate a listening socket per worker`,ocspDnsResolvers:"OCSP DNS Resolvers",cloudflareResolver:"Cloudflare Resolver",googlePublicDns:"Google Public DNS",openDns:"OpenDNS",quad9:"Quad9",verisign:"Verisign",letsEncryptWebroot:`${a.letsEncrypt} webroot`,letsEncryptCertRoot:`${a.letsEncrypt} certificate directory`,mozillaModern:`${y} Modern`,mozillaIntermediate:`${y} Intermediate`,mozillaOld:`${y} Old`,ipv4Only:`${$} only`,ipv6Only:`${L} only`,ipv4AndIpv6:`${$} & ${L}`},x={enableFileNotFoundErrorLogging:`${a.enable} file not found error logging in`,logformat:"log_format",level:"logging level",enableCloudflare:"add Cloudflare request headers to the default log format",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} config directory`,mb:"MB"},_={disableHtmlCaching:"Disable HTML caching",enableDisableHtmlCaching:"disable HTML caching",gzipCompression:"Gzip compression",enableGzipCompression:`${a.enable} gzip compression`,brotliCompression:"Brotli compression",enableBrotliCompression:`${a.enable} brotli compression`,brotliIsANonStandardModule:"Brotli isn't a standard NGINX module, check the ",brotliGoogleNgxBrotliProject:"Google ngx_brotli project",brotliForBuildingNginxWithBrotli:" for how to build NGINX with Brotli!",expirationForAssets:"Expiration for assets",expirationForMedia:"Expiration for media",expirationForSvgs:"Expiration for SVGs",expirationForFonts:"Expiration for fonts",performance:"Performance"},E={pythonServer:`${a.python} server`,pythonMustBeEnabledOnOneSite:`${a.python} must be enabled on at least one site to configure global ${a.python} settings.`},w="Legacy X-Forwarded-* headers",P={reverseProxyMustBeEnabledOnOneSite:`${a.reverseProxy} must be enabled on at least one site to configure global ${a.reverseProxyLower} settings.`,seconds:"seconds",passOn:`${w} passed on`,remove:`${w} actively removed`},T={whenUsingWordPressUnsafeEvalIsOftenRequiredToAllowFunctionality:`When using ${a.wordPress}, <code class="slim">script-src 'self' 'unsafe-inline' 'unsafe-eval';</code> is often required in the Content Security Policy to allow the admin panel to function correctly.`,security:"Security"},V={modularizedStructure:"Modularized structure",enableModularizedConfigFiles:`${a.enable} modularized config files`,symlinkVhost:"Symlink vhost",enableSymLinksFrom:`${a.enable} symlinks from`,to:"to",shareConfiguration:"Share configuration",resetConfiguration:"Reset configuration",resetGlobalConfig:"Reset global config",resetAllDomains:"Reset all domains",removeAllDomains:"Remove all domains",resetAllDomainsConfig:"Reset all domain configs",resetDomainConfig:"Reset domain config",removeDomain:"Remove domain",yesImSure:"Yes, I'm sure",noCancel:"No, cancel",tools:"Tools",resetGlobalConfigBody:"Are you sure you want to reset all configuration options in the global config section?",resetAllDomainsConfigBody:"Are you sure you want to reset the configuration of ALL domains?",removeAllDomainsBody:"Are you sure you want to remove ALL domain configurations?",areYouSureYouWantToResetAllConfigurationOptionsForThe:"Are you sure you want to reset all configuration options for the",domain:"domain?",areYouSureYouWantToRemoveThe:"Are you sure you want to remove the ",domainConfiguration:"domain configuration?"},R="Docker",F="Dockerfile",D={docker:R,dockerfile:F,dockerCompose:`${R} Compose`,applyDockerTweaks:`Apply ${R} tweaks`,applyDockerTweaksForNginx:`Apply configuration tweaks for running ${a.nginx} with ${R}`,applyDockerTweaksExplainer:`Updates the ${a.nginx} user to be <code class="slim">nginx</code> and the pid to <code class="slim">/var/run/nginx.pid</code>`,includeDockerfile:`Include ${F} to run ${a.nginx} with ${R}`,includeDockerCompose:`Include docker-compose to run ${a.nginx} with docker-compose`},A={https:C,logging:x,nginx:S,performance:_,python:E,reverseProxy:P,security:T,tools:V,docker:D},O="Certbot",z={commentOutSslDirectivesInConfiguration:`Comment out ${a.ssl} related directives in the configuration:`,sslOffDeprecationWarning:`This command will add a temporary <code class="slim">ssl off</code> directive to ensure that ${a.ssl} directives are not active. This may cause ${a.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${O} is configured.`,reloadYourNginxServer:`Reload your ${a.nginx} server:`,obtainSslCertificatesFromLetsEncrypt:`Obtain ${a.ssl} certificates from ${a.letsEncrypt} using ${O}:`,uncommentSslDirectivesInConfiguration:`Uncomment ${a.ssl} related directives in the configuration:`,configureCertbotToReloadNginxOnCertificateRenewal:`Configure ${O} to reload ${a.nginx} when it successfully renews certificates:`,certbotDoesNotNeedToBeSetupForYourConfiguration:`${O} does not need to be set up for your ${a.nginx} configuration.`,certbot:O},j={downloadTheGeneratedConfig:"<b>Download</b> the generated config:",andUploadItToYourServers:"and <b>upload</b> it to your server's",directory:"directory.",or:"or, ",copyBase64StringOfCompressedConfig:"Copy a base64 string of the compressed config",pasteItInYourServersCommandLineAndExecute:", paste it in your server's command line and execute it.",navigateToYourNginxConfigurationDirectoryOnYourServer:`Navigate to your ${a.nginx} <b>configuration directory</b> on your server:`,createABackupOfYourCurrentNginxConfiguration:`Create a <b>backup</b> of your current ${a.nginx} configuration:`,extractTheNewCompressedConfigurationArchiveUsingTar:"<b>Extract</b> the new compressed configuration archive using tar:",download:"Download"},H={letsGoLive:"Let's go live!",reloadNginxToLoadInYourNewConfiguration:`Reload ${a.nginx} to load in your new configuration:`,goLive:"Go live!"},W={generateDiffieHellmanKeysByRunningThisCommandOnYourServer:"Generate <b>Diffie-Hellman keys</b> by running this command on your server:",createACommonAcmeChallengeDirectoryForLetsEncrypt:`Create a common <b>ACME-challenge</b> directory (for <b>${a.letsEncrypt}</b>):`,noAdditionalStepsAreNeededToSetUpSslForNginx:`No additional steps are needed to set up ${a.ssl} for your ${a.nginx} configuration.`,sslInit:`${a.ssl} init`},X={certbot:z,download:j,goLive:H,ssl:W},I={lookingForAPlaceToDeploy:"👋 Looking for a place to deploy your new configuration?",tryOutDigitalOceansDroplet:"Try out DigitalOcean's LEMP Droplet with NGINX"},M={wantToContributeChanges:"👋 Want to request new features, contribute changes, or translate the tool into a new language?",getInvolvedOnGitHub:"Get involved on GitHub"},U={droplet:I,contribute:M},B={app:l,setup:i,footer:n,domainSections:k,globalSections:A,setupSections:X,callouts:U},N={common:a,languages:s["default"],templates:B}},3862:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"English",es:"Spanish",zhCN:"Chinese (simplified)",zhTW:"Chinese (traditional)",ptBR:"Portuguese (brazilian)",fr:"French",ru:"Russian",pl:"Polish",de:"German",ja:"Japanese",fa:"Persian"}},1157:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"Ingles",es:"Español",zhCN:"Chino (simplificado)",zhTW:"Chino (tradicional)",ptBR:"Portugués (brasileño)",fr:"Francés",ru:"Ruso",pl:"Polaco",de:"Alemán",ja:"Japonés",fa:"Persa"}},788:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"انگلیسی",es:"اسپانیایی",zhCN:"چینی (ساده شده)",zhTW:"چینی (سنتی)",ptBR:"پرتغالی (برزیلی)",fr:"فرانسوی",ru:"روسی",pl:"لهستانی",de:"آلمانی",ja:"ژاپنی",fa:"فارسی"}},5149:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"Anglais",es:"Espanol",zhCN:"Chinois (simplifié)",zhTW:"Chinois (traditionnel)",ptBR:"Portugais (brésilien)",fr:"Français",ru:"Russe",pl:"Polonais",de:"Allemand",ja:"Japonais",fa:"Persan"}},4184:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"英語",es:"スペイン語",zhCN:"中国語 (簡体字)",zhTW:"中国語 (繁体字)",ptBR:"ポルトガル語 (ブラジル)",fr:"フランス語",ru:"ロシア語",pl:"ポーランド語",de:"ドイツ語",ja:"日本語",fa:"ペルシア語"}},4545:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"Angielski",es:"Hiszpański",zhCN:"Chiński (uproszczony)",zhTW:"Chiński (tradycyjny)",ptBR:"Portugalski (brazylijski)",fr:"Francuski",ru:"Rosyjski",pl:"Polski",de:"Niemiecki",ja:"Japoński",fa:"Perski"}},1046:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"Inglês",es:"Espanhol",zhCN:"Chinês (simplificado)",zhTW:"Chinês (tradicional)",ptBR:"Português (brasileiro)",fr:"Francês",ru:"Russa",pl:"Polonês",de:"Alemão",ja:"Japonês",fa:"Persa"}},9068:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"Английский",es:"испанский",zhCN:"Китайский (упрощённый)",zhTW:"Китайский (традиционный)",ptBR:"Португальский (бразильский)",fr:"Французский",ru:"Русский",pl:"Польский",de:"Немецкий",ja:"Японский",fa:"Фарси"}},6249:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"英语",es:"西班牙语",zhCN:"简体中文",zhTW:"繁体中文",ptBR:"葡萄牙语 (巴西)",fr:"法语",ru:"俄语",pl:"波兰语",de:"德语",ja:"日语",fa:"波斯语"}},7469:(e,t,o)=>{"use strict";o.d(t,{default:()=>a});const a={en:"英語",es:"西班牙語",zhCN:"簡體中文",zhTW:"繁體中文",ptBR:"葡萄牙語(巴西)",fr:"法語",ru:"俄語",pl:"波蘭語",de:"德語",ja:"日語",fa:"波斯語"}},7775:(e,t,o)=>{"use strict";var a=o(3751),s=o(7576),l=o.n(s),i=o(8848),n=(o(9486),o(7022),o(4173),o(301),o(4555));const d=()=>{i.plugins.toolbar?i.plugins.toolbar.registerButton("copy-to-clipboard",(e=>{const t=document.createElement("button");t.textContent="Copy";const o=e.element,a=new s(t,{text:()=>o.textContent}),l=()=>{setTimeout((()=>{t.textContent="Copy"}),5e3)},i=()=>{t.dispatchEvent(new CustomEvent("copied",{bubbles:!0,detail:{text:o.textContent}}))};return a.on("success",(()=>{t.textContent="Copied!",i(),l()})),a.on("error",(()=>{const e=navigator.platform.includes("Mac");t.textContent=`Press ${e?"Cmd":"Ctrl"}+C to copy`,l()})),t})):(0,n.R8)("Copy to Clipboard loaded before Toolbar.")};d();var r=o(6992),p=o(1935);const c="en",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=Object.freeze(["de","en","es","fr","ja","pl","ptBR","ru","zhCN","zhTW","fa"]),g={};g[c]=p["default"];const f=[c];let v=null;const b=async()=>{if(v)return v;for(const e of m){if(e===c)continue;if(g[e])continue;const{default:t}=await o(4141)(`./${u(e,"-")}/languages.js`);g[e]={languages:t}}return v=(0,r.hU)({locale:c,fallbackLocale:c,messages:g}),v},k=async e=>{if(v.locale===e)return;if(f.includes(e))return;const{default:t}=await o(8311)(`./${u(e,"-")}/index.js`);g[e]=t},y=async e=>{v&&(await k(e),v.global.locale=e)};var $=o(641),L=o(33);const C={class:"all do-bulma"},x={class:"has-icon"},S={key:0,class:"icon fas fa-spinner fa-pulse"},_={key:1,class:"icon fas fa-language"},E={class:"columns is-multiline"},w={class:"tabs"},P=["onClick"],T={key:0,class:"fas fa-exclamation-triangle"},V=["onClick"],R=(0,$.Lk)("i",{class:"fas fa-times"},null,-1),F=[R],D=(0,$.Lk)("i",{class:"fas fa-plus"},null,-1),A={ref:"files",class:"columns is-multiline files"};function O(e,t,o,a,s,l){const i=(0,$.g2)("VueSelect"),n=(0,$.g2)("Header"),d=(0,$.g2)("Domain"),r=(0,$.g2)("Global"),p=(0,$.g2)("DropletCallout"),c=(0,$.g2)("Setup"),u=(0,$.g2)("Footer"),h=(0,$.g2)("ContributeCallout");return(0,$.uX)(),(0,$.CE)("div",C,[(0,$.bF)(n,{title:e.$t("templates.app.title")},{description:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.app.description")),1)])),header:(0,$.k6)((()=>[])),buttons:(0,$.k6)((()=>[(0,$.bF)(i,{modelValue:l.lang,"onUpdate:modelValue":t[0]||(t[0]=e=>l.lang=e),options:l.i18nPacks,clearable:!1,reduce:e=>e.value,disabled:s.languageLoading},{"selected-option":(0,$.k6)((({label:e})=>[(0,$.Lk)("span",x,[s.languageLoading?((0,$.uX)(),(0,$.CE)("i",S)):((0,$.uX)(),(0,$.CE)("i",_)),(0,$.Lk)("span",null,(0,L.v_)(e),1)])])),_:1},8,["modelValue","options","reduce","disabled"]),s.splitColumn?((0,$.uX)(),(0,$.CE)("a",{key:0,class:"button is-primary is-outline is-hidden-touch",onClick:t[1]||(t[1]=(...e)=>l.splitColumnToggle&&l.splitColumnToggle(...e))},(0,L.v_)(e.$t("templates.app.singleColumnMode")),1)):((0,$.uX)(),(0,$.CE)("a",{key:1,class:"button is-primary is-hidden-touch",onClick:t[2]||(t[2]=(...e)=>l.splitColumnToggle&&l.splitColumnToggle(...e))},(0,L.v_)(e.$t("templates.app.splitColumnMode")),1))])),_:1},8,["title"]),(0,$.Lk)("div",{class:"main container",style:(0,L.Tr)({display:s.ready?void 0:"none"})},[(0,$.Lk)("div",E,[(0,$.Lk)("div",{class:(0,L.C4)(`column ${s.splitColumn?"is-half column-scroll-y":"is-full"} is-full-touch`)},[(0,$.Lk)("h2",null,(0,L.v_)(e.$t("templates.app.perWebsiteConfig")),1),(0,$.Lk)("div",w,[(0,$.Lk)("ul",null,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(l.activeDomains,(e=>((0,$.uX)(),(0,$.CE)("li",{class:(0,L.C4)(e[1]===s.active?"is-active":void 0)},[(0,$.Lk)("a",{class:"domain",onClick:t=>s.active=e[1]},[(0,$.eW)((0,L.v_)(e[0].server.domain.computed)+(0,L.v_)(l.changes(e[1]))+" ",1),l.warnings(e[1])?((0,$.uX)(),(0,$.CE)("i",T)):(0,$.Q3)("",!0)],8,P),(0,$.Lk)("a",{class:"remove",onClick:t=>l.remove(e[1])},F,8,V)],2)))),256)),(0,$.Lk)("li",null,[(0,$.Lk)("a",{onClick:t[3]||(t[3]=(...e)=>l.add&&l.add(...e))},[D,(0,$.eW)(" "+(0,L.v_)(e.$t("templates.app.addSite")),1)])])])]),((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(l.activeDomains,(e=>((0,$.uX)(),(0,$.Wv)(d,{key:e[1],ref_for:!0,ref:`domain-${e[1]}`,data:e[0],style:(0,L.Tr)({display:e[1]===s.active?void 0:"none"})},null,8,["data","style"])))),128)),(0,$.Lk)("h2",null,(0,L.v_)(e.$t("templates.app.globalConfig")),1),(0,$.bF)(r,{data:s.global},null,8,["data"]),(0,$.bF)(p),(0,$.Lk)("h2",null,(0,L.v_)(e.$t("templates.app.setup")),1),(0,$.bF)(c,{data:{domains:s.domains.filter((e=>null!==e)),global:s.global,confFiles:l.confFiles}},null,8,["data"])],2),(0,$.Lk)("div",{class:(0,L.C4)(`column ${s.splitColumn?"is-half column-scroll-y":"is-full"} is-full-touch`)},[(0,$.Lk)("h2",null,(0,L.v_)(e.$t("templates.app.configFiles")),1),(0,$.Lk)("div",A,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(s.confFilesOutput,(e=>((0,$.uX)(),(0,$.Wv)((0,$.$y)(l.getPrismComponent(e[0])),{key:e[2],name:e[0],conf:e[1],half:Object.keys(s.confFilesOutput).length>1&&!s.splitColumn,onCopied:t=>l.codeCopiedEvent(e[3])},null,40,["name","conf","half","onCopied"])))),128))],512)],2)])],4),(0,$.bF)(u),(0,$.bF)(h)])}var z=o(1779),j=o.n(z),H=o(6220),W=o.n(H),X=o(580),I=o.n(X),M=o(8936),U=o(4857),B=o(5146);const N=(e,t,o)=>e.enabled&&e.value!==e.default||"php"===t&&"php"===o&&e.computed!==e.default;var Q=o(5373);const G={class:"panel presets"},J={class:"panel"},K={class:"tabs"},q=["onClick"],Y={key:0,class:"fas fa-exclamation-triangle"},Z={class:"navigation-buttons"},ee=(0,$.Lk)("i",{class:"fas fa-long-arrow-alt-left"},null,-1),te=(0,$.Lk)("i",{class:"fas fa-long-arrow-alt-right"},null,-1);function oe(e,t,o,a,s,l){const i=(0,$.g2)("Presets");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",G,[(0,$.bF)(i,{data:e.$props.data.presets},null,8,["data"])]),(0,$.Lk)("div",J,[(0,$.Lk)("div",K,[(0,$.Lk)("ul",null,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(s.tabs,(t=>((0,$.uX)(),(0,$.CE)("li",{class:(0,L.C4)(l.tabClass(t.key))},[(0,$.Lk)("a",{onClick:e=>l.showTab(t.key)},[(0,$.eW)((0,L.v_)(e.$t(t.display))+(0,L.v_)(l.changes(t.key))+" ",1),l.warnings(t.key)?((0,$.uX)(),(0,$.CE)("i",Y)):(0,$.Q3)("",!0)],8,q)],2)))),256))])]),((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(s.tabs,(t=>((0,$.uX)(),(0,$.Wv)((0,$.$y)(t),{key:t.key,ref_for:!0,ref:t.key,data:e.$props.data[t.key],style:(0,L.Tr)({display:s.active===t.key?void 0:"none"}),class:"container"},null,8,["data","style"])))),128)),(0,$.Lk)("div",Z,[!1!==l.previousTab?((0,$.uX)(),(0,$.CE)("a",{key:0,class:"button is-mini",onClick:t[0]||(t[0]=(...e)=>l.showPreviousTab&&l.showPreviousTab(...e))},[ee,(0,$.Lk)("span",null,(0,L.v_)(e.$t("common.back")),1)])):(0,$.Q3)("",!0),!1!==l.nextTab?((0,$.uX)(),(0,$.CE)("a",{key:1,class:"button is-primary is-mini",onClick:t[1]||(t[1]=(...e)=>l.showNextTab&&l.showNextTab(...e))},[(0,$.Lk)("span",null,(0,L.v_)(e.$t("common.next")),1),te])):(0,$.Q3)("",!0)])])])}const ae=({category:e,action:t,label:o,value:a,nonInteraction:s})=>{(0,n.pq)("Analytics event:",{category:e,action:t,label:o,value:a,nonInteraction:s});try{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"nginx_tool",category:e,action:t,label:o,value:a,nonInteraction:s})}catch(l){}try{window.analytics.track("Web Interaction",{category:e,action:t,label:o,value:a,nonInteraction:s})}catch(l){}},se={class:"container"},le={key:0,class:"button is-tiny"},ie={key:0,class:"message is-warning"},ne={class:"message-body"},de={class:"buttons-group"},re=["onClick"];function pe(e,t,o,a,s,l){return(0,$.uX)(),(0,$.CE)("div",se,[(0,$.Lk)("div",{class:"header-group",style:(0,L.Tr)({cursor:l.interacted?"pointer":void 0}),onClick:t[0]||(t[0]=(...e)=>l.toggleCollapse&&l.toggleCollapse(...e))},[(0,$.Lk)("h3",null,(0,L.v_)(e.$t("templates.domainSections.presets.presets")),1),l.interacted?((0,$.uX)(),(0,$.CE)("a",le,[(0,$.Lk)("i",{class:(0,L.C4)("fas fa-angle-"+(s.expanded?"up":"down"))},null,2)])):(0,$.Q3)("",!0)],4),!e.$parent.$props.data.hasUserInteraction||s.expanded?((0,$.uX)(),(0,$.CE)($.FK,{key:0},[e.$parent.$props.data.hasUserInteraction?((0,$.uX)(),(0,$.CE)("div",ie,[(0,$.Lk)("p",ne,(0,L.v_)(e.$t("templates.domainSections.presets.itLooksLikeYouCustomisedTheConfig")),1)])):(0,$.Q3)("",!0),(0,$.Lk)("div",de,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data,((t,o)=>((0,$.uX)(),(0,$.CE)("a",{class:(0,L.C4)("button"+(t.computed?" is-primary":"")),onClick:e=>l.setPreset(o)},(0,L.v_)(e.$t(t.display)),11,re)))),256))])],64)):(0,$.Q3)("",!0)])}const ce=e=>Object.keys(e).reduce(((t,o)=>(t[o]={value:e[o].default,computed:e[o].default,...e[o]},t)),{}),ue=(e,t,o=!0)=>Object.keys(e).reduce(((e,a)=>(e[a]={get(){return this.$props.data[a].value},set(e){o&&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 N(this.$props.data[a],t,a)}},e)),{}),he={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}}},me={name:"DomainPresets",display:"templates.domainSections.presets.presets",key:"presets",delegated:ce(he),props:{data:Object},data(){return{expanded:!1}},computed:{...ue(he,"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){ae({category:"Preset",action:t?"Overwritten":"Applied",label:e})},toggleCollapse(){this.interacted&&(this.expanded=!this.expanded)}}};var ge=o(6262);const fe=(0,ge.A)(me,[["render",pe]]),ve=fe,be={class:"field-row"},ke={class:"field"},ye={class:"label"},$e=["placeholder"],Le={class:"field"},Ce={class:"label"},xe=["placeholder"],Se={class:"field"},_e={class:"label"},Ee=["placeholder"],we={key:0,class:"field"},Pe={class:"control"},Te={class:"text message is-warning"},Ve={class:"message-body"},Re={class:"slim"},Fe={class:"field is-horizontal"},De={class:"field-label"},Ae={class:"label"},Oe={class:"field-body"},ze={class:"field"},je={class:"checkbox"},He={key:1,class:"field is-horizontal"},We={class:"field-label"},Xe={class:"label"},Ie={class:"field-body"},Me={class:"field"},Ue={class:"checkbox"},Be={class:"field is-horizontal"},Ne={class:"field-label"},Qe={class:"label"},Ge={class:"field-body"},Je={class:"field"},Ke={class:"checkbox"},qe=(0,$.Lk)("i",{class:"fas fa-long-arrow-alt-right"},null,-1),Ye={class:"field is-horizontal"},Ze={class:"field-label"},et={class:"label"},tt={class:"field-body"},ot={class:"field has-addons"},at=(0,$.Lk)("div",{class:"control"},[(0,$.Lk)("a",{class:"button is-static"},"IPv4")],-1),st=["placeholder"],lt={class:"field has-addons"},it=(0,$.Lk)("div",{class:"control"},[(0,$.Lk)("a",{class:"button is-static"},"IPv6")],-1),nt=["placeholder"];function dt(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",be,[(0,$.Lk)("div",ke,[(0,$.Lk)("label",ye,(0,L.v_)(e.$t("templates.domainSections.server.domain")),1),(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.domainChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.domain=t),class:"input",type:"text",placeholder:e.domainDefault},null,8,$e),[[a.Jo,e.domain]])],2)]),(0,$.Lk)("div",Le,[(0,$.Lk)("label",Ce,(0,L.v_)(e.$t("common.path")),1),(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.pathChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=t=>e.path=t),class:"input",type:"text",placeholder:`/var/www/${e.domain}`},null,8,xe),[[a.Jo,e.path]])],2)]),(0,$.Lk)("div",Se,[(0,$.Lk)("label",_e,(0,L.v_)(e.$t("templates.domainSections.server.documentRoot")),1),(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.documentRootChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.documentRoot=t),class:"input",type:"text",placeholder:e.documentRootDefault},null,8,Ee),[[a.Jo,e.documentRoot]])],2)])]),i.duplicateDomain?((0,$.uX)(),(0,$.CE)("div",we,[(0,$.Lk)("div",Pe,[(0,$.Lk)("label",Te,[(0,$.Lk)("span",Ve,[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.server.oneOrMoreOtherDomainsAreAlsoNamed"))+" ",1),(0,$.Lk)("code",Re,(0,L.v_)(e.$props.data.domain.computed),1),(0,$.eW)(" . "+(0,L.v_)(e.$t("templates.domainSections.server.thisWillCauseIssuesWithConfigGeneration")),1)])])])])):(0,$.Q3)("",!0),(0,$.Lk)("div",Fe,[(0,$.Lk)("div",De,[(0,$.Lk)("label",Ae,(0,L.v_)(e.$t("templates.domainSections.server.wwwSubdomain")),1)]),(0,$.Lk)("div",Oe,[(0,$.Lk)("div",ze,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.wwwSubdomainChanged?" is-changed":""))},[(0,$.Lk)("div",je,[(0,$.bF)(n,{modelValue:e.wwwSubdomain,"onUpdate:modelValue":t[3]||(t[3]=t=>e.wwwSubdomain=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)(" (www."+(0,L.v_)(e.$props.data.domain.computed)+") ",1)])),_:1},8,["modelValue"])])],2)])])]),e.cdnSubdomainEnabled?((0,$.uX)(),(0,$.CE)("div",He,[(0,$.Lk)("div",We,[(0,$.Lk)("label",Xe,(0,L.v_)(e.$t("templates.domainSections.server.cdnSubdomain")),1)]),(0,$.Lk)("div",Ie,[(0,$.Lk)("div",Me,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.cdnSubdomainChanged?" is-changed":""))},[(0,$.Lk)("div",Ue,[(0,$.bF)(n,{modelValue:e.cdnSubdomain,"onUpdate:modelValue":t[4]||(t[4]=t=>e.cdnSubdomain=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)(" (cdn."+(0,L.v_)(e.$props.data.domain.computed)+") ",1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0),(0,$.Lk)("div",Be,[(0,$.Lk)("div",Ne,[(0,$.Lk)("label",Qe,(0,L.v_)(e.$t("templates.domainSections.server.redirectSubdomains")),1)]),(0,$.Lk)("div",Ge,[(0,$.Lk)("div",Je,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.redirectSubdomainsChanged?" is-changed":""))},[(0,$.Lk)("div",Ke,[(0,$.bF)(n,{modelValue:e.redirectSubdomains,"onUpdate:modelValue":t[5]||(t[5]=t=>e.redirectSubdomains=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)(" ("+(0,L.v_)(e.wwwSubdomain?`${e.domain}, `:"")+"*."+(0,L.v_)(e.$props.data.domain.computed)+" ",1),qe,(0,$.eW)(" "+(0,L.v_)(e.wwwSubdomain?"www.":"")+(0,L.v_)(e.$props.data.domain.computed)+") ",1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",Ye,[(0,$.Lk)("div",Ze,[(0,$.Lk)("label",et,(0,L.v_)(e.$t("templates.domainSections.server.listen")),1)]),(0,$.Lk)("div",tt,[(0,$.Lk)("div",ot,[at,(0,$.Lk)("div",{class:(0,L.C4)("control is-expanded"+(e.listenIpv4Changed?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[6]||(t[6]=t=>e.listenIpv4=t),class:"input",type:"text",placeholder:e.listenIpv4Default},null,8,st),[[a.Jo,e.listenIpv4]])],2)]),(0,$.Lk)("div",lt,[it,(0,$.Lk)("div",{class:(0,L.C4)("control is-expanded"+(e.listenIpv6Changed?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[7]||(t[7]=t=>e.listenIpv6=t),class:"input",type:"text",placeholder:e.listenIpv6Default},null,8,nt),[[a.Jo,e.listenIpv6]])],2)])])])])}const rt="example.com";var pt=o(1828);const ct=(0,$.Lk)("i",{class:"icon fas fa-check"},null,-1),ut={__name:"checkbox",setup(e){return(e,t)=>((0,$.uX)(),(0,$.Wv)(pt.A,null,(0,$.eX)({extra:(0,$.k6)((()=>[(0,$.RG)(e.$slots,"extra",{},(()=>[ct]))])),_:2},[(0,$.pI)(e.$slots,((t,o)=>({name:o,fn:(0,$.k6)((t=>[(0,$.RG)(e.$slots,o,(0,L._B)((0,$.Ng)(t||{})))]))})))]),1024))}},ht=ut,mt=ht,gt={domain:{default:rt,enabled:!0},path:{default:"",computed:`/var/www/${rt}`,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}},ft={name:"DomainServer",display:"templates.domainSections.server.server",key:"server",delegated:ce(gt),components:{PrettyCheck:mt},props:{data:Object},computed:{...ue(gt,"server"),duplicateDomain(){return this.$parent.$parent.$data.domains.filter((e=>e&&e.server.domain.computed===this.$props.data.domain.computed)).length>1},hasWarnings(){return this.duplicateDomain}},watch:{"$props.data.domain":{handler(e){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}}},vt=(0,ge.A)(ft,[["render",dt]]),bt=vt,kt={class:"field is-horizontal"},yt={class:"field-label"},$t={class:"label"},Lt={class:"field-body"},Ct={class:"field"},xt={class:"checkbox"},St={key:0,class:"field is-horizontal"},_t={class:"field-label"},Et={class:"label"},wt={class:"field-body"},Pt={class:"field"},Tt={class:"checkbox"},Vt={key:1,class:"field is-horizontal is-aligned-top"},Rt={class:"field-label has-small-margin-top"},Ft={class:"label"},Dt={class:"field-body"},At={class:"field"},Ot={class:"checkbox"},zt={key:0,class:"control"},jt={class:"text message is-warning"},Ht={class:"message-body"},Wt={key:2,class:"field is-horizontal"},Xt={class:"field-label"},It={class:"label"},Mt={class:"field-body"},Ut={class:"field"},Bt={class:"checkbox"},Nt=(0,$.Lk)("i",{class:"fas fa-long-arrow-alt-right"},null,-1),Qt={key:3,class:"field is-horizontal is-aligned-top"},Gt={class:"field-label"},Jt={class:"label"},Kt={class:"field-body"},qt={class:"field"},Yt={class:"checkbox"},Zt={class:"checkbox"},eo={class:"checkbox"},to={key:4,class:"field is-horizontal is-aligned-top"},oo={class:"field-label"},ao={class:"label"},so={class:"field-body"},lo={class:"field"},io={class:"radio"},no={key:5,class:"field is-horizontal"},ro={class:"field-label"},po={class:"label"},co={class:"field-body"},uo={class:"field"},ho=["placeholder"],mo={key:6,class:"field is-horizontal"},go=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"ssl_certificate")],-1),fo={class:"field-body"},vo={class:"field"},bo=["placeholder"],ko={key:7,class:"field is-horizontal"},yo=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"ssl_certificate_key")],-1),$o={class:"field-body"},Lo={class:"field"},Co=["placeholder"];function xo(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck"),d=(0,$.g2)("ExternalLink"),r=(0,$.g2)("PrettyRadio");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",kt,[(0,$.Lk)("div",yt,[(0,$.Lk)("label",$t,(0,L.v_)(e.$t("common.https")),1)]),(0,$.Lk)("div",Lt,[(0,$.Lk)("div",Ct,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.httpsChanged?" is-changed":""))},[(0,$.Lk)("div",xt,[(0,$.bF)(n,{modelValue:e.https,"onUpdate:modelValue":t[0]||(t[0]=t=>e.https=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.https.enableEncryptedSslConnection")),1)])),_:1},8,["modelValue"])])],2)])])]),e.http2Enabled?((0,$.uX)(),(0,$.CE)("div",St,[(0,$.Lk)("div",_t,[(0,$.Lk)("label",Et,(0,L.v_)(e.$t("templates.domainSections.https.http2")),1)]),(0,$.Lk)("div",wt,[(0,$.Lk)("div",Pt,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.http2Changed?" is-changed":""))},[(0,$.Lk)("div",Tt,[(0,$.bF)(n,{modelValue:e.http2,"onUpdate:modelValue":t[1]||(t[1]=t=>e.http2=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.https.enableHttp2Connections")),1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0),e.http3Enabled?((0,$.uX)(),(0,$.CE)("div",Vt,[(0,$.Lk)("div",Rt,[(0,$.Lk)("label",Ft,(0,L.v_)(e.$t("templates.domainSections.https.http3")),1)]),(0,$.Lk)("div",Dt,[(0,$.Lk)("div",At,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.http3Changed?" is-changed":""))},[(0,$.Lk)("div",Ot,[(0,$.bF)(n,{modelValue:e.http3,"onUpdate:modelValue":t[2]||(t[2]=t=>e.http3=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.https.enableHttp3Connections")),1)])),_:1},8,["modelValue"])])],2),i.showHttp3Warning?((0,$.uX)(),(0,$.CE)("div",zt,[(0,$.Lk)("label",jt,[(0,$.Lk)("span",Ht,[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.https.http3IsANonStandardModule"))+" ",1),(0,$.bF)(d,{text:e.$t("templates.domainSections.https.http3NginxQuicReadme"),link:"https://quic.nginx.org/README"},null,8,["text"]),(0,$.eW)(" "+(0,L.v_)(e.$t("templates.domainSections.https.http3OrThe"))+" ",1),(0,$.bF)(d,{text:e.$t("templates.domainSections.https.http3CloudflareQuicheProject"),link:"https://github.com/cloudflare/quiche/tree/master/nginx"},null,8,["text"]),(0,$.eW)(" "+(0,L.v_)(e.$t("templates.domainSections.https.http3ForBuildingNginxWithHttp3")),1)])])])):(0,$.Q3)("",!0)])])])):(0,$.Q3)("",!0),e.forceHttpsEnabled?((0,$.uX)(),(0,$.CE)("div",Wt,[(0,$.Lk)("div",Xt,[(0,$.Lk)("label",It,(0,L.v_)(e.$t("templates.domainSections.https.forceHttps")),1)]),(0,$.Lk)("div",Mt,[(0,$.Lk)("div",Ut,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.forceHttpsChanged?" is-changed":""))},[(0,$.Lk)("div",Bt,[(0,$.bF)(n,{modelValue:e.forceHttps,"onUpdate:modelValue":t[3]||(t[3]=t=>e.forceHttps=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)(" (http://"+(0,L.v_)(e.$parent.$props.data.server.domain.computed)+" ",1),Nt,(0,$.eW)(" https://"+(0,L.v_)(e.$parent.$props.data.server.domain.computed)+") ",1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0),e.hstsEnabled?((0,$.uX)(),(0,$.CE)("div",Qt,[(0,$.Lk)("div",Gt,[(0,$.Lk)("label",Jt,(0,L.v_)(e.$t("templates.domainSections.https.hsts")),1)]),(0,$.Lk)("div",Kt,[(0,$.Lk)("div",qt,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.hstsChanged?" is-changed":""))},[(0,$.Lk)("div",Yt,[(0,$.bF)(n,{modelValue:e.hsts,"onUpdate:modelValue":t[4]||(t[4]=t=>e.hsts=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.https.enableStrictTransportSecurity")),1)])),_:1},8,["modelValue"])])],2),e.hstsSubdomainsEnabled?((0,$.uX)(),(0,$.CE)("div",{key:0,class:(0,L.C4)("control"+(e.hstsSubdomainsChanged?" is-changed":""))},[(0,$.Lk)("div",Zt,[(0,$.bF)(n,{modelValue:e.hstsSubdomains,"onUpdate:modelValue":t[5]||(t[5]=t=>e.hstsSubdomains=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.https.enableIncludeSubDomains")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.hstsPreloadEnabled?((0,$.uX)(),(0,$.CE)("div",{key:1,class:(0,L.C4)("control"+(e.hstsPreloadChanged?" is-changed":""))},[(0,$.Lk)("div",eo,[(0,$.bF)(n,{modelValue:e.hstsPreload,"onUpdate:modelValue":t[6]||(t[6]=t=>e.hstsPreload=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.https.enablePreload")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0)])])])):(0,$.Q3)("",!0),e.certTypeEnabled?((0,$.uX)(),(0,$.CE)("div",to,[(0,$.Lk)("div",oo,[(0,$.Lk)("label",ao,(0,L.v_)(e.$t("templates.domainSections.https.certificationType")),1)]),(0,$.Lk)("div",so,[(0,$.Lk)("div",lo,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.certType.options,((o,a)=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.certTypeChanged&&a===e.certType?" is-changed":""))},[(0,$.Lk)("div",io,[(0,$.bF)(r,{modelValue:e.certType,"onUpdate:modelValue":t[7]||(t[7]=t=>e.certType=t),value:a,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t(o)),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])])])):(0,$.Q3)("",!0),e.letsEncryptEmailEnabled?((0,$.uX)(),(0,$.CE)("div",no,[(0,$.Lk)("div",ro,[(0,$.Lk)("label",po,(0,L.v_)(e.$t("templates.domainSections.https.letsEncryptEmail")),1)]),(0,$.Lk)("div",co,[(0,$.Lk)("div",uo,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.letsEncryptEmailChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[8]||(t[8]=t=>e.letsEncryptEmail=t),class:"input",type:"text",placeholder:e.$props.data.letsEncryptEmail.computed},null,8,ho),[[a.Jo,e.letsEncryptEmail]])],2)])])])):(0,$.Q3)("",!0),e.sslCertificateEnabled?((0,$.uX)(),(0,$.CE)("div",mo,[go,(0,$.Lk)("div",fo,[(0,$.Lk)("div",vo,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.sslCertificateChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[9]||(t[9]=t=>e.sslCertificate=t),class:"input",type:"text",placeholder:`${e.$parent.$parent.$data.global.nginx.nginxConfigDirectory.computed}/ssl/${e.$parent.$props.data.server.domain.computed}.crt`},null,8,bo),[[a.Jo,e.sslCertificate]])],2)])])])):(0,$.Q3)("",!0),e.sslCertificateKeyEnabled?((0,$.uX)(),(0,$.CE)("div",ko,[yo,(0,$.Lk)("div",$o,[(0,$.Lk)("div",Lo,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.sslCertificateKeyChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[10]||(t[10]=t=>e.sslCertificateKey=t),class:"input",type:"text",placeholder:`${e.$parent.$parent.$data.global.nginx.nginxConfigDirectory.computed}/ssl/${e.$parent.$props.data.server.domain.computed}.key`},null,8,Co),[[a.Jo,e.sslCertificateKey]])],2)])])])):(0,$.Q3)("",!0)])}var So=o(2584),_o=o(7071);const Eo=(0,$.Lk)("i",{class:"icon fas fa-check"},null,-1),wo={__name:"radio",setup(e){return(e,t)=>((0,$.uX)(),(0,$.Wv)(_o.A,null,(0,$.eX)({extra:(0,$.k6)((()=>[(0,$.RG)(e.$slots,"extra",{},(()=>[Eo]))])),_:2},[(0,$.pI)(e.$slots,((t,o)=>({name:o,fn:(0,$.k6)((t=>[(0,$.RG)(e.$slots,o,(0,L._B)((0,$.Ng)(t||{})))]))})))]),1024))}},Po=wo,To=Po,Vo={https:{default:!0,enabled:!0},http2:{default:!0,enabled:!0},http3:{default:!1,enabled:!0},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@${rt}`,enabled:!0},sslCertificate:{default:"",enabled:!1},sslCertificateKey:{default:"",enabled:!1}},Ro={name:"DomainHTTPS",display:"common.https",key:"https",delegated:ce(Vo),components:{PrettyCheck:mt,PrettyRadio:To,ExternalLink:So.A},props:{data:Object},computed:{...ue(Vo,"https"),showHttp3Warning(){return this.$props.data.http3.computed},hasWarnings(){return this.showHttp3Warning}},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":{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}}},Fo=(0,ge.A)(Ro,[["render",xo]]),Do=Fo,Ao={key:0,class:"field is-horizontal is-aligned-top"},Oo={class:"field-label"},zo={class:"label"},jo={class:"field-body"},Ho={class:"field"},Wo={class:"control is-changed"},Xo={class:"text"},Io=(0,$.Lk)("br",null,null,-1),Mo=(0,$.Lk)("br",null,null,-1),Uo={key:1,class:"field is-horizontal"},Bo={class:"field-label"},No={class:"label"},Qo={class:"field-body"},Go={class:"field"},Jo={class:"checkbox"},Ko={key:2,class:"field is-horizontal is-aligned-top"},qo={class:"field-label has-margin-top"},Yo={class:"label"},Zo={class:"field-body"},ea={class:"field"},ta=["placeholder"],oa={key:3,class:"field is-horizontal is-aligned-top"},aa={class:"field-label has-margin-top"},sa={class:"label"},la={class:"field-body"},ia={class:"field"},na=["placeholder"],da={key:4,class:"field is-horizontal"},ra={class:"field-label"},pa={class:"label"},ca={class:"field-body"},ua={class:"field"},ha={class:"checkbox"},ma={key:5,class:"field is-horizontal"},ga={class:"field-label"},fa={class:"label"},va={class:"field-body"},ba={class:"field"},ka={class:"checkbox"},ya={key:6,class:"field is-horizontal"},$a={class:"field-label"},La={class:"label"},Ca={class:"field-body"},xa={class:"field"},Sa={class:"checkbox"},_a={key:7,class:"field is-horizontal"},Ea={class:"field-label"},wa={class:"label"},Pa={class:"field-body"},Ta={class:"field"},Va={class:"checkbox"};function Ra(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck"),d=(0,$.g2)("VueSelect");return(0,$.uX)(),(0,$.CE)("div",null,[e.phpEnabled?((0,$.uX)(),(0,$.CE)("div",Uo,[(0,$.Lk)("div",Bo,[(0,$.Lk)("label",No,(0,L.v_)(e.$t("common.php")),1)]),(0,$.Lk)("div",Qo,[(0,$.Lk)("div",Go,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.phpChanged?" is-changed":""))},[(0,$.Lk)("div",Jo,[(0,$.bF)(n,{modelValue:e.php,"onUpdate:modelValue":t[0]||(t[0]=t=>e.php=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.php.enablePhp")),1)])),_:1},8,["modelValue"])])],2)])])])):((0,$.uX)(),(0,$.CE)("div",Ao,[(0,$.Lk)("div",Oo,[(0,$.Lk)("label",zo,(0,L.v_)(e.$t("common.php")),1)]),(0,$.Lk)("div",jo,[(0,$.Lk)("div",Ho,[(0,$.Lk)("div",Wo,[(0,$.Lk)("label",Xo,[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.php.phpIsDisabled"))+" ",1),e.$parent.$props.data.reverseProxy.reverseProxy.computed?((0,$.uX)(),(0,$.CE)($.FK,{key:0},[Io,(0,$.eW)(" "+(0,L.v_)(e.$t("templates.domainSections.php.phpCannotBeEnabledWithReverseProxy")),1)],64)):(0,$.Q3)("",!0),e.$parent.$props.data.python.python.computed?((0,$.uX)(),(0,$.CE)($.FK,{key:1},[Mo,(0,$.eW)(" "+(0,L.v_)(e.$t("templates.domainSections.php.phpCannotBeEnabledWithPython")),1)],64)):(0,$.Q3)("",!0)])])])])])),e.phpServerEnabled?((0,$.uX)(),(0,$.CE)("div",Ko,[(0,$.Lk)("div",qo,[(0,$.Lk)("label",Yo,(0,L.v_)(e.$t("templates.domainSections.php.phpServer")),1)]),(0,$.Lk)("div",Zo,[(0,$.Lk)("div",ea,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.phpServerChanged?" is-changed":""))},[(0,$.bF)(d,{ref:"phpServerSelect",modelValue:e.phpServer,"onUpdate:modelValue":t[1]||(t[1]=t=>e.phpServer=t),options:i.phpServerOptions,clearable:!1,reduce:e=>e.value},null,8,["modelValue","options","reduce"])],2),e.phpServerCustomEnabled?((0,$.uX)(),(0,$.CE)("div",{key:0,class:(0,L.C4)("control"+(e.phpServerCustomChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.phpServerCustom=t),class:"input",type:"text",placeholder:e.$props.data.phpServerCustom.default},null,8,ta),[[a.Jo,e.phpServerCustom]])],2)):(0,$.Q3)("",!0)])])])):(0,$.Q3)("",!0),e.phpBackupServerEnabled?((0,$.uX)(),(0,$.CE)("div",oa,[(0,$.Lk)("div",aa,[(0,$.Lk)("label",sa,(0,L.v_)(e.$t("templates.domainSections.php.phpBackupServer")),1)]),(0,$.Lk)("div",la,[(0,$.Lk)("div",ia,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.phpBackupServerChanged?" is-changed":""))},[(0,$.bF)(d,{ref:"phpBackupServerSelect",modelValue:e.phpBackupServer,"onUpdate:modelValue":t[3]||(t[3]=t=>e.phpBackupServer=t),options:i.phpBackupServerOptions,clearable:!1,reduce:e=>e.value},null,8,["modelValue","options","reduce"])],2),e.phpBackupServerCustomEnabled?((0,$.uX)(),(0,$.CE)("div",{key:0,class:(0,L.C4)("control"+(e.phpBackupServerCustomChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=t=>e.phpBackupServerCustom=t),class:"input",type:"text",placeholder:e.$props.data.phpBackupServerCustom.default},null,8,na),[[a.Jo,e.phpBackupServerCustom]])],2)):(0,$.Q3)("",!0)])])])):(0,$.Q3)("",!0),e.wordPressRulesEnabled?((0,$.uX)(),(0,$.CE)("div",da,[(0,$.Lk)("div",ra,[(0,$.Lk)("label",pa,(0,L.v_)(e.$t("templates.domainSections.php.wordPressRules")),1)]),(0,$.Lk)("div",ca,[(0,$.Lk)("div",ua,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.wordPressRulesChanged?" is-changed":""))},[(0,$.Lk)("div",ha,[(0,$.bF)(n,{modelValue:e.wordPressRules,"onUpdate:modelValue":t[5]||(t[5]=t=>e.wordPressRules=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.php.enableWordPressRules")),1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0),e.drupalRulesEnabled?((0,$.uX)(),(0,$.CE)("div",ma,[(0,$.Lk)("div",ga,[(0,$.Lk)("label",fa,(0,L.v_)(e.$t("templates.domainSections.php.drupalRules")),1)]),(0,$.Lk)("div",va,[(0,$.Lk)("div",ba,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.drupalRulesChanged?" is-changed":""))},[(0,$.Lk)("div",ka,[(0,$.bF)(n,{modelValue:e.drupalRules,"onUpdate:modelValue":t[6]||(t[6]=t=>e.drupalRules=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.php.enableDrupalRules")),1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0),e.magentoRulesEnabled?((0,$.uX)(),(0,$.CE)("div",ya,[(0,$.Lk)("div",$a,[(0,$.Lk)("label",La,(0,L.v_)(e.$t("templates.domainSections.php.magentoRules")),1)]),(0,$.Lk)("div",Ca,[(0,$.Lk)("div",xa,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.magentoRulesChanged?" is-changed":""))},[(0,$.Lk)("div",Sa,[(0,$.bF)(n,{modelValue:e.magentoRules,"onUpdate:modelValue":t[7]||(t[7]=t=>e.magentoRules=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.php.enableMagentoRules")),1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0),e.joomlaRulesEnabled?((0,$.uX)(),(0,$.CE)("div",_a,[(0,$.Lk)("div",Ea,[(0,$.Lk)("label",wa,(0,L.v_)(e.$t("templates.domainSections.php.joomlaRules")),1)]),(0,$.Lk)("div",Pa,[(0,$.Lk)("div",Ta,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.joomlaRulesChanged?" is-changed":""))},[(0,$.Lk)("div",Va,[(0,$.bF)(n,{modelValue:e.joomlaRules,"onUpdate:modelValue":t[8]||(t[8]=t=>e.joomlaRules=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.php.enableJoomlaRules")),1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0)])}const Fa={"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/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/php8.1-fpm.sock":"templates.domainSections.php.php81Socket","/var/run/php/php8.2-fpm.sock":"templates.domainSections.php.php82Socket","/var/run/php/php-fpm.sock":"templates.domainSections.php.phpSocket",custom:"templates.domainSections.php.custom"},Da=["","custom"],Aa={phpServer:{default:"/var/run/php/php-fpm.sock",options:Fa,enabled:!0},phpServerCustom:{default:"unix:/var/run/php/php-fpm.sock",enabled:!1},phpBackupServer:{default:"",options:{"":"templates.domainSections.php.disabled",...Fa},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}},Oa={name:"DomainPHP",display:"common.php",key:"php",delegated:ce(Aa),components:{PrettyCheck:mt,VueSelect:M.A},props:{data:Object},computed:{...ue(Aa,"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)}${Da.includes(e)?"":`: ${e}`}`,value:e}}}},za=(0,ge.A)(Oa,[["render",Ra]]),ja=za,Ha={key:0,class:"field is-horizontal is-aligned-top"},Wa={class:"field-label"},Xa={class:"label"},Ia={class:"field-body"},Ma={class:"field"},Ua={class:"control"},Ba={class:"text"},Na=(0,$.Lk)("br",null,null,-1),Qa=(0,$.Lk)("br",null,null,-1),Ga={key:1,class:"field is-horizontal"},Ja={class:"field-label"},Ka={class:"label"},qa={class:"field-body"},Ya={class:"field"},Za={class:"checkbox"},es={key:2,class:"field is-horizontal"},ts={class:"field-label"},os={class:"label"},as={class:"field-body"},ss={class:"field"},ls={class:"checkbox"};function is(e,t,o,a,s,l){const i=(0,$.g2)("PrettyCheck");return(0,$.uX)(),(0,$.CE)("div",null,[e.pythonEnabled?((0,$.uX)(),(0,$.CE)("div",Ga,[(0,$.Lk)("div",Ja,[(0,$.Lk)("label",Ka,(0,L.v_)(e.$t("common.python")),1)]),(0,$.Lk)("div",qa,[(0,$.Lk)("div",Ya,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.pythonChanged?" is-changed":""))},[(0,$.Lk)("div",Za,[(0,$.bF)(i,{modelValue:e.python,"onUpdate:modelValue":t[0]||(t[0]=t=>e.python=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.python.enablePython")),1)])),_:1},8,["modelValue"])])],2)])])])):((0,$.uX)(),(0,$.CE)("div",Ha,[(0,$.Lk)("div",Wa,[(0,$.Lk)("label",Xa,(0,L.v_)(e.$t("common.python")),1)]),(0,$.Lk)("div",Ia,[(0,$.Lk)("div",Ma,[(0,$.Lk)("div",Ua,[(0,$.Lk)("label",Ba,[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.python.pythonIsDisabled"))+" ",1),e.$parent.$props.data.reverseProxy.reverseProxy.computed?((0,$.uX)(),(0,$.CE)($.FK,{key:0},[Na,(0,$.eW)(" "+(0,L.v_)(e.$t("templates.domainSections.python.pythonCannotBeEnabledWithReverseProxy")),1)],64)):(0,$.Q3)("",!0),e.$parent.$props.data.php.php.computed?((0,$.uX)(),(0,$.CE)($.FK,{key:1},[Qa,(0,$.eW)(" "+(0,L.v_)(e.$t("templates.domainSections.python.pythonCannotBeEnabledWithPhp")),1)],64)):(0,$.Q3)("",!0)])])])])])),e.djangoRulesEnabled?((0,$.uX)(),(0,$.CE)("div",es,[(0,$.Lk)("div",ts,[(0,$.Lk)("label",os,(0,L.v_)(e.$t("templates.domainSections.python.djangoRules")),1)]),(0,$.Lk)("div",as,[(0,$.Lk)("div",ss,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.djangoRulesChanged?" is-changed":""))},[(0,$.Lk)("div",ls,[(0,$.bF)(i,{modelValue:e.djangoRules,"onUpdate:modelValue":t[1]||(t[1]=t=>e.djangoRules=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.python.enableDjangoRules")),1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0)])}const ns={python:{default:!1,enabled:!1},djangoRules:{default:!1,enabled:!1}},ds={name:"DomainPython",display:"common.python",key:"python",delegated:ce(ns),components:{PrettyCheck:mt},props:{data:Object},computed:ue(ns,"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}}},rs=(0,ge.A)(ds,[["render",is]]),ps=rs,cs={key:0,class:"field is-horizontal is-aligned-top"},us={class:"field-label"},hs={class:"label"},ms={class:"field-body"},gs={class:"field"},fs={class:"control"},vs={class:"text"},bs=(0,$.Lk)("br",null,null,-1),ks=(0,$.Lk)("br",null,null,-1),ys={key:1,class:"field is-horizontal"},$s={class:"field-label"},Ls={class:"label"},Cs={class:"field-body"},xs={class:"control"},Ss={class:"checkbox"},_s={key:2,class:"field is-horizontal"},Es={class:"field-label"},ws={class:"label"},Ps={class:"field-body"},Ts={class:"control"},Vs=["placeholder"],Rs={key:3,class:"field is-horizontal"},Fs=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"proxy_pass")],-1),Ds={class:"field-body"},As={class:"control"},Os=["placeholder"],zs={key:4,class:"field is-horizontal"},js={class:"field-label"},Hs={class:"label"},Ws={class:"field-body"},Xs={class:"control"},Is=["placeholder"];function Ms(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck");return(0,$.uX)(),(0,$.CE)("div",null,[e.reverseProxyEnabled?((0,$.uX)(),(0,$.CE)("div",ys,[(0,$.Lk)("div",$s,[(0,$.Lk)("label",Ls,(0,L.v_)(e.$t("common.reverseProxy")),1)]),(0,$.Lk)("div",Cs,[(0,$.Lk)("div",{class:(0,L.C4)("field"+(e.reverseProxyChanged?" is-changed":""))},[(0,$.Lk)("div",xs,[(0,$.Lk)("div",Ss,[(0,$.bF)(n,{modelValue:e.reverseProxy,"onUpdate:modelValue":t[0]||(t[0]=t=>e.reverseProxy=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.reverseProxy.enableReverseProxy")),1)])),_:1},8,["modelValue"])])])],2)])])):((0,$.uX)(),(0,$.CE)("div",cs,[(0,$.Lk)("div",us,[(0,$.Lk)("label",hs,(0,L.v_)(e.$t("common.reverseProxy")),1)]),(0,$.Lk)("div",ms,[(0,$.Lk)("div",gs,[(0,$.Lk)("div",fs,[(0,$.Lk)("label",vs,[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.reverseProxy.reverseProxyIsDisabled"))+" ",1),e.$parent.$props.data.php.php.computed?((0,$.uX)(),(0,$.CE)($.FK,{key:0},[bs,(0,$.eW)(" "+(0,L.v_)(e.$t("templates.domainSections.reverseProxy.reverseProxyCannotBeEnabledWithPhp")),1)],64)):(0,$.Q3)("",!0),e.$parent.$props.data.python.python.computed?((0,$.uX)(),(0,$.CE)($.FK,{key:1},[ks,(0,$.eW)(" "+(0,L.v_)(e.$t("templates.domainSections.reverseProxy.reverseProxyCannotBeEnabledWithPython")),1)],64)):(0,$.Q3)("",!0)])])])])])),e.pathEnabled?((0,$.uX)(),(0,$.CE)("div",_s,[(0,$.Lk)("div",Es,[(0,$.Lk)("label",ws,(0,L.v_)(e.$t("common.path")),1)]),(0,$.Lk)("div",Ps,[(0,$.Lk)("div",{class:(0,L.C4)("field"+(e.pathChanged?" is-changed":""))},[(0,$.Lk)("div",Ts,[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=t=>e.path=t),class:"input",type:"text",placeholder:e.$props.data.path.default},null,8,Vs),[[a.Jo,e.path]])])],2)])])):(0,$.Q3)("",!0),e.proxyPassEnabled?((0,$.uX)(),(0,$.CE)("div",Rs,[Fs,(0,$.Lk)("div",Ds,[(0,$.Lk)("div",{class:(0,L.C4)("field"+(e.proxyPassChanged?" is-changed":""))},[(0,$.Lk)("div",As,[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.proxyPass=t),class:"input",type:"text",placeholder:e.$props.data.proxyPass.default},null,8,Os),[[a.Jo,e.proxyPass]])])],2)])])):(0,$.Q3)("",!0),e.proxyHostHeaderEnabled?((0,$.uX)(),(0,$.CE)("div",zs,[(0,$.Lk)("div",js,[(0,$.Lk)("label",Hs,(0,L.v_)(e.$t("templates.domainSections.reverseProxy.proxyHostHeader")),1)]),(0,$.Lk)("div",Ws,[(0,$.Lk)("div",{class:(0,L.C4)("field"+(e.proxyHostHeaderChanged?" is-changed":""))},[(0,$.Lk)("div",Xs,[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[3]||(t[3]=t=>e.proxyHostHeader=t),class:"input",type:"text",placeholder:e.$props.data.proxyHostHeader.default},null,8,Is),[[a.Jo,e.proxyHostHeader]])])],2)])])):(0,$.Q3)("",!0)])}const Us={reverseProxy:{default:!1,enabled:!1},path:{default:"/",enabled:!1},proxyPass:{default:"http://127.0.0.1:3000",enabled:!1},proxyHostHeader:{default:"$host",enabled:!1}},Bs={name:"DomainReverseProxy",display:"common.reverseProxy",key:"reverseProxy",delegated:ce(Us),components:{PrettyCheck:mt},props:{data:Object},computed:ue(Us,"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.proxyHostHeader.enabled=!0,this.$props.data.proxyHostHeader.computed=this.$props.data.proxyHostHeader.value):(this.$props.data.path.enabled=!1,this.$props.data.path.computed="",this.$props.data.proxyPass.enabled=!1,this.$props.data.proxyPass.computed="",this.$props.data.proxyHostHeader.enabled=!1,this.$props.data.proxyHostHeader.computed="")},deep:!0}}},Ns=(0,ge.A)(Bs,[["render",Ms]]),Qs=Ns,Gs={class:"field is-horizontal"},Js=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"root")],-1),Ks={class:"field-body"},qs={class:"field"},Ys={class:"checkbox"},Zs={key:0,class:"field is-horizontal is-aligned-top"},el=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"index")],-1),tl={class:"field-body"},ol={class:"field"},al={class:"radio"},sl={key:1,class:"field is-horizontal is-aligned-top"},ll={class:"field-label"},il={class:"label"},nl={class:"field-body"},dl={class:"field"},rl={class:"checkbox"},pl={class:"checkbox"},cl={key:2,class:"field is-horizontal"},ul={class:"field-label"},hl={class:"label"},ml={class:"field-body"},gl={class:"control"},fl=["placeholder"],vl={key:3,class:"field is-horizontal"},bl={class:"field-label"},kl={class:"label"},yl={class:"field-body"},$l={class:"field"},Ll={class:"checkbox"};function Cl(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck"),d=(0,$.g2)("PrettyRadio");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",Gs,[Js,(0,$.Lk)("div",Ks,[(0,$.Lk)("div",qs,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.rootChanged?" is-changed":""))},[(0,$.Lk)("div",Ys,[(0,$.bF)(n,{modelValue:e.root,"onUpdate:modelValue":t[0]||(t[0]=t=>e.root=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("common.enable")),1)])),_:1},8,["modelValue"])])],2)])])]),e.indexEnabled?((0,$.uX)(),(0,$.CE)("div",Zs,[el,(0,$.Lk)("div",tl,[(0,$.Lk)("div",ol,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.index.options,(o=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.indexChanged&&o===e.index?" is-changed":""))},[(0,$.Lk)("div",al,[(0,$.bF)(d,{modelValue:e.index,"onUpdate:modelValue":t[1]||(t[1]=t=>e.index=t),value:o,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(o),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])])])):(0,$.Q3)("",!0),e.fallbackHtmlEnabled||e.fallbackPhpEnabled?((0,$.uX)(),(0,$.CE)("div",sl,[(0,$.Lk)("div",ll,[(0,$.Lk)("label",il,(0,L.v_)(e.$t("templates.domainSections.routing.fallbackRouting")),1)]),(0,$.Lk)("div",nl,[(0,$.Lk)("div",dl,[e.fallbackHtmlEnabled?((0,$.uX)(),(0,$.CE)("div",{key:0,class:(0,L.C4)("control"+(e.fallbackHtmlChanged?" is-changed":""))},[(0,$.Lk)("div",rl,[(0,$.bF)(n,{modelValue:e.fallbackHtml,"onUpdate:modelValue":t[2]||(t[2]=t=>e.fallbackHtml=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)(" index.html ")])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.fallbackPhpEnabled?((0,$.uX)(),(0,$.CE)("div",{key:1,class:(0,L.C4)("control"+(e.fallbackPhpChanged?" is-changed":""))},[(0,$.Lk)("div",pl,[(0,$.bF)(n,{modelValue:e.fallbackPhp,"onUpdate:modelValue":t[3]||(t[3]=t=>e.fallbackPhp=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)(" index.php ")])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0)])])])):(0,$.Q3)("",!0),e.fallbackPhpPathEnabled?((0,$.uX)(),(0,$.CE)("div",cl,[(0,$.Lk)("div",ul,[(0,$.Lk)("label",hl,(0,L.v_)(e.$t("templates.domainSections.routing.fallbackRoutingPhpPath")),1)]),(0,$.Lk)("div",ml,[(0,$.Lk)("div",{class:(0,L.C4)("field"+(e.fallbackPhpPathChanged?" is-changed":""))},[(0,$.Lk)("div",gl,[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=t=>e.fallbackPhpPath=t),class:"input",type:"text",placeholder:e.$props.data.fallbackPhpPath.default},null,8,fl),[[a.Jo,e.fallbackPhpPath]])])],2)])])):(0,$.Q3)("",!0),e.legacyPhpRoutingEnabled?((0,$.uX)(),(0,$.CE)("div",vl,[(0,$.Lk)("div",bl,[(0,$.Lk)("label",kl,(0,L.v_)(e.$t("templates.domainSections.routing.legacyPhpRouting")),1)]),(0,$.Lk)("div",yl,[(0,$.Lk)("div",$l,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.legacyPhpRoutingChanged?" is-changed":""))},[(0,$.Lk)("div",Ll,[(0,$.bF)(n,{modelValue:e.legacyPhpRouting,"onUpdate:modelValue":t[5]||(t[5]=t=>e.legacyPhpRouting=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.routing.enableLegacyRouting")),1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0)])}const xl={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}},Sl={name:"DomainRouting",display:"templates.domainSections.routing.routing",key:"routing",delegated:ce(xl),components:{PrettyCheck:mt,PrettyRadio:To},props:{data:Object},computed:ue(xl,"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}}},_l=(0,ge.A)(Sl,[["render",Cl]]),El=_l,wl={class:"field is-horizontal is-aligned-top"},Pl={class:"field-label has-small-margin-top"},Tl={class:"label"},Vl={class:"field-body"},Rl={class:"field"},Fl={class:"checkbox"},Dl=["placeholder"],Al={key:0,class:"field is-horizontal"},Ol={class:"field-label"},zl={class:"label"},jl={class:"field-body"},Hl={class:"field"},Wl=["placeholder"],Xl={class:"field is-horizontal is-aligned-top"},Il={class:"field-label has-small-margin-top"},Ml={class:"label"},Ul={class:"field-body"},Bl={class:"field"},Nl={class:"checkbox"},Ql={class:"field is-horizontal is-aligned-top"},Gl={class:"field-label has-small-margin-top"},Jl={class:"label"},Kl={class:"field-body"},ql={class:"field"},Yl={class:"checkbox"},Zl=["disabled","placeholder"],ei={key:1,class:"field is-horizontal"},ti={class:"field-label"},oi={class:"label"},ai={class:"field-body"},si={class:"field is-horizontal"},li={class:"radio"},ii={class:"field is-horizontal is-aligned-top"},ni={class:"field-label has-small-margin-top"},di={class:"label"},ri={class:"field-body"},pi={class:"field"},ci={class:"checkbox"};function ui(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck"),d=(0,$.g2)("PrettyRadio");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",wl,[(0,$.Lk)("div",Pl,[(0,$.Lk)("label",Tl," access_log "+(0,L.v_)(e.$t("templates.domainSections.logging.byDomain")),1)]),(0,$.Lk)("div",Vl,[(0,$.Lk)("div",Rl,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.accessLogEnabledChanged?" is-changed":""))},[(0,$.Lk)("div",Fl,[(0,$.bF)(n,{modelValue:e.accessLogEnabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.accessLogEnabled=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.logging.enableForThisDomain")),1)])),_:1},8,["modelValue"])])],2),e.$props.data.accessLogEnabled.computed?((0,$.uX)(),(0,$.CE)("div",{key:0,class:(0,L.C4)("control field is-horizontal is-expanded"+(e.accessLogPathChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=t=>e.accessLogPath=t),class:"input",type:"text",placeholder:e.$props.data.accessLogPath.default},null,8,Dl),[[a.Jo,e.accessLogPath]])],2)):(0,$.Q3)("",!0)])])]),e.$props.data.accessLogEnabled.computed?((0,$.uX)(),(0,$.CE)("div",Al,[(0,$.Lk)("div",Ol,[(0,$.Lk)("label",zl," access_log "+(0,L.v_)(e.$t("templates.domainSections.logging.arguments")),1)]),(0,$.Lk)("div",jl,[(0,$.Lk)("div",Hl,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.accessLogParametersChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.accessLogParameters=t),class:"input",type:"text",placeholder:e.$props.data.accessLogParameters.default},null,8,Wl),[[a.Jo,e.accessLogParameters]])],2)])])])):(0,$.Q3)("",!0),(0,$.Lk)("div",Xl,[(0,$.Lk)("div",Il,[(0,$.Lk)("label",Ml," access_log "+(0,L.v_)(e.$t("templates.domainSections.logging.forRedirects")),1)]),(0,$.Lk)("div",Ul,[(0,$.Lk)("div",Bl,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.redirectAccessLogChanged?" is-changed":""))},[(0,$.Lk)("div",Nl,[(0,$.bF)(n,{modelValue:e.redirectAccessLog,"onUpdate:modelValue":t[3]||(t[3]=t=>e.redirectAccessLog=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("common.enable")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",Ql,[(0,$.Lk)("div",Gl,[(0,$.Lk)("label",Jl," error_log "+(0,L.v_)(e.$t("templates.domainSections.logging.byDomain")),1)]),(0,$.Lk)("div",Kl,[(0,$.Lk)("div",ql,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.errorLogEnabledChanged?" is-changed":""))},[(0,$.Lk)("div",Yl,[(0,$.bF)(n,{modelValue:e.errorLogEnabled,"onUpdate:modelValue":t[4]||(t[4]=t=>e.errorLogEnabled=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.logging.enableForThisDomain")),1)])),_:1},8,["modelValue"])]),e.$props.data.errorLogEnabled.computed?((0,$.uX)(),(0,$.CE)("div",{key:0,class:(0,L.C4)("control field is-horizontal is-expanded"+(e.errorLogPathChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[5]||(t[5]=t=>e.errorLogPath=t),class:"input",type:"text",disabled:!e.errorLogPathEnabled,placeholder:e.$props.data.errorLogPath.default},null,8,Zl),[[a.Jo,e.errorLogPath]])],2)):(0,$.Q3)("",!0)],2)])])]),e.$props.data.errorLogEnabled.computed?((0,$.uX)(),(0,$.CE)("div",ei,[(0,$.Lk)("div",ti,[(0,$.Lk)("label",oi," error_log "+(0,L.v_)(e.$t("templates.domainSections.logging.level")),1)]),(0,$.Lk)("div",ai,[(0,$.Lk)("div",si,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.errorLogLevel.options,(o=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.errorLogLevelChanged&&o===e.errorLogLevel?" is-changed":""))},[(0,$.Lk)("div",li,[(0,$.bF)(d,{modelValue:e.errorLogLevel,"onUpdate:modelValue":t[6]||(t[6]=t=>e.errorLogLevel=t),value:o,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(o),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])])])):(0,$.Q3)("",!0),(0,$.Lk)("div",ii,[(0,$.Lk)("div",ni,[(0,$.Lk)("label",di," error_log "+(0,L.v_)(e.$t("templates.domainSections.logging.forRedirects")),1)]),(0,$.Lk)("div",ri,[(0,$.Lk)("div",pi,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.redirectErrorLogChanged?" is-changed":""))},[(0,$.Lk)("div",ci,[(0,$.bF)(n,{modelValue:e.redirectErrorLog,"onUpdate:modelValue":t[7]||(t[7]=t=>e.redirectErrorLog=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("common.enable")),1)])),_:1},8,["modelValue"])])],2)])])])])}const hi="/var/log/nginx/access.log",mi="buffer=512k flush=1m",gi="/var/log/nginx/error.log",fi="/dev/null",vi="warn",bi=Object.freeze(["debug","info","notice","warn","error","crit","alert","emerg"]),ki="none",yi=(e,t)=>{let o=e.logging.accessLogPath.computed.trim();return o||(o=hi),o+(t.logging.cloudflare.computed?" cloudflare":" combined")+(e.logging.accessLogParameters.computed.trim()?` ${e.logging.accessLogParameters.computed.trim()}`:"")},$i=e=>{let t=e.logging.errorLogPath.computed.trim();t||(t=gi);const o=bi.includes(e.logging.errorLogLevel.computed)?` ${e.logging.errorLogLevel.computed}`:"";return`${t}${o}`},Li={accessLogEnabled:{default:!0,enabled:!0},accessLogPath:{default:hi,enabled:!0},accessLogParameters:{default:mi,enabled:!0},redirectAccessLog:{default:!1,enabled:!0},errorLogEnabled:{default:!0,enabled:!0},errorLogPath:{default:gi,enabled:!0},errorLogLevel:{default:vi,options:[ki,...bi],enabled:!0},redirectErrorLog:{default:!1,enabled:!0}},Ci={name:"DomainLogging",display:"common.logging",key:"logging",delegated:ce(Li),components:{PrettyCheck:mt,PrettyRadio:To},props:{data:Object},computed:ue(Li,"logging"),watch:{"$props.data.errorLogLevel":{handler(e){e.computed===ki?(this.$props.data.errorLogPath.enabled=!1,this.$props.data.errorLogPath.computed=fi):this.$props.data.errorLogPath.enabled||(this.$props.data.errorLogPath.enabled=!0,this.$props.data.errorLogPath.computed=this.$props.data.errorLogPath.value)},deep:!0}}},xi=(0,ge.A)(Ci,[["render",ui]]),Si=xi,_i={class:"columns"},Ei={class:"column"},wi={class:"field is-horizontal"},Pi=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"GET")],-1),Ti={class:"field-body"},Vi={class:"field"},Ri={class:"checkbox"},Fi={class:"field is-horizontal"},Di=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"POST")],-1),Ai={class:"field-body"},Oi={class:"field"},zi={class:"checkbox"},ji={class:"field is-horizontal"},Hi=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"PUT")],-1),Wi={class:"field-body"},Xi={class:"field"},Ii={class:"checkbox"},Mi={class:"field is-horizontal"},Ui=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"PATCH")],-1),Bi={class:"field-body"},Ni={class:"field"},Qi={class:"checkbox"},Gi={class:"field is-horizontal"},Ji=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"DELETE")],-1),Ki={class:"field-body"},qi={class:"field"},Yi={class:"checkbox"},Zi={class:"column"},en={class:"field is-horizontal"},tn=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"HEAD")],-1),on={class:"field-body"},an={class:"field"},sn={class:"checkbox"},ln={class:"field is-horizontal"},nn=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"CONNECT")],-1),dn={class:"field-body"},rn={class:"field"},pn={class:"checkbox"},cn={class:"field is-horizontal"},un=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"OPTIONS")],-1),hn={class:"field-body"},mn={class:"field"},gn={class:"checkbox"},fn={class:"field is-horizontal"},vn=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"TRACE")],-1),bn={class:"field-body"},kn={class:"field"},yn={class:"checkbox"},$n={key:0,class:"field is-horizontal"},Ln={class:"field-label"},Cn={class:"label"},xn={class:"field-body"},Sn={class:"field"},_n=["placeholder"];function En(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",_i,[(0,$.Lk)("div",Ei,[(0,$.Lk)("div",wi,[Pi,(0,$.Lk)("div",Ti,[(0,$.Lk)("div",Vi,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.getMethodChanged?" is-changed":""))},[(0,$.Lk)("div",Ri,[(0,$.bF)(n,{modelValue:e.getMethod,"onUpdate:modelValue":t[0]||(t[0]=t=>e.getMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",Fi,[Di,(0,$.Lk)("div",Ai,[(0,$.Lk)("div",Oi,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.postMethodChanged?" is-changed":""))},[(0,$.Lk)("div",zi,[(0,$.bF)(n,{modelValue:e.postMethod,"onUpdate:modelValue":t[1]||(t[1]=t=>e.postMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",ji,[Hi,(0,$.Lk)("div",Wi,[(0,$.Lk)("div",Xi,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.putMethodChanged?" is-changed":""))},[(0,$.Lk)("div",Ii,[(0,$.bF)(n,{modelValue:e.putMethod,"onUpdate:modelValue":t[2]||(t[2]=t=>e.putMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",Mi,[Ui,(0,$.Lk)("div",Bi,[(0,$.Lk)("div",Ni,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.patchMethodChanged?" is-changed":""))},[(0,$.Lk)("div",Qi,[(0,$.bF)(n,{modelValue:e.patchMethod,"onUpdate:modelValue":t[3]||(t[3]=t=>e.patchMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",Gi,[Ji,(0,$.Lk)("div",Ki,[(0,$.Lk)("div",qi,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.deleteMethodChanged?" is-changed":""))},[(0,$.Lk)("div",Yi,[(0,$.bF)(n,{modelValue:e.deleteMethod,"onUpdate:modelValue":t[4]||(t[4]=t=>e.deleteMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])])]),(0,$.Lk)("div",Zi,[(0,$.Lk)("div",en,[tn,(0,$.Lk)("div",on,[(0,$.Lk)("div",an,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.headMethodChanged?" is-changed":""))},[(0,$.Lk)("div",sn,[(0,$.bF)(n,{modelValue:e.headMethod,"onUpdate:modelValue":t[5]||(t[5]=t=>e.headMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",ln,[nn,(0,$.Lk)("div",dn,[(0,$.Lk)("div",rn,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.connectMethodChanged?" is-changed":""))},[(0,$.Lk)("div",pn,[(0,$.bF)(n,{modelValue:e.connectMethod,"onUpdate:modelValue":t[6]||(t[6]=t=>e.connectMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",cn,[un,(0,$.Lk)("div",hn,[(0,$.Lk)("div",mn,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.optionsMethodChanged?" is-changed":""))},[(0,$.Lk)("div",gn,[(0,$.bF)(n,{modelValue:e.optionsMethod,"onUpdate:modelValue":t[7]||(t[7]=t=>e.optionsMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",fn,[vn,(0,$.Lk)("div",bn,[(0,$.Lk)("div",kn,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.traceMethodChanged?" is-changed":""))},[(0,$.Lk)("div",yn,[(0,$.bF)(n,{modelValue:e.traceMethod,"onUpdate:modelValue":t[8]||(t[8]=t=>e.traceMethod=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.domainSections.restrict.disableForThisDomain")),1)])),_:1},8,["modelValue"])])],2)])])])])]),i.hasAtLeastOneEnabled?((0,$.uX)(),(0,$.CE)("div",$n,[(0,$.Lk)("div",Ln,[(0,$.Lk)("label",Cn,(0,L.v_)(e.$t("templates.domainSections.restrict.responseCode")),1)]),(0,$.Lk)("div",xn,[(0,$.Lk)("div",Sn,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.responseCodeChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[9]||(t[9]=t=>e.responseCode=t),class:(0,L.C4)(["input",l.validResponseCode?"":"is-danger"]),type:"number",min:"100",step:"1",placeholder:e.$props.data.responseCode.default},null,10,_n),[[a.Jo,e.responseCode,void 0,{number:!0}]])],2)])])])):(0,$.Q3)("",!0)])}const wn={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}},Pn={name:"DomainRestrict",display:"common.restrict",key:"restrict",delegated:ce(wn),components:{PrettyCheck:mt},props:{data:Object},data(){return{validResponseCode:!0}},computed:{...ue(wn,"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}}},Tn=(0,ge.A)(Pn,[["render",En]]),Vn=Tn,Rn={class:"field is-horizontal is-aligned-top"},Fn={class:"field-label has-margin-top"},Dn={class:"label"},An={class:"field-body"},On={class:"field"},zn=["placeholder"],jn={class:"control"},Hn={class:"text"},Wn={class:"control"},Xn={class:"text"},In={class:"control"},Mn={class:"text"},Un={key:1,class:"control"},Bn={class:"text message is-warning"},Nn={class:"message-body"};function Qn(e,t,o,s,l,i){const n=(0,$.g2)("ExternalLink");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",Rn,[(0,$.Lk)("div",Fn,[(0,$.Lk)("label",Dn,(0,L.v_)(e.$t("templates.domainSections.onion.onionLocation")),1)]),(0,$.Lk)("div",An,[(0,$.Lk)("div",On,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.onionLocationChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.onionLocation=t),class:"input",type:"text",placeholder:e.$props.data.onionLocation.placeholder},null,8,zn),[[a.Jo,e.onionLocation]])],2),e.onionLocationChanged?(0,$.Q3)("",!0):((0,$.uX)(),(0,$.CE)($.FK,{key:0},[(0,$.Lk)("div",jn,[(0,$.Lk)("label",Hn,(0,L.v_)(e.$t("templates.domainSections.onion.provideAnOnionLocationToSetOnionLocationHeader")),1)]),(0,$.Lk)("div",Wn,[(0,$.Lk)("label",Xn,(0,L.v_)(e.$t("templates.domainSections.onion.letsVisitorsKnownOnionServicesIsAvailable")),1)]),(0,$.Lk)("div",In,[(0,$.Lk)("label",Mn,[(0,$.bF)(n,{text:e.$t("templates.domainSections.onion.learnMoreAboutOnionServices"),link:"https://community.torproject.org/onion-services/"},null,8,["text"])])])],64)),i.incorrectEnding?((0,$.uX)(),(0,$.CE)("div",Un,[(0,$.Lk)("label",Bn,[(0,$.Lk)("span",Nn,(0,L.v_)(e.$t("templates.domainSections.onion.onionLocationExpectedToEndWithOnion")),1)])])):(0,$.Q3)("",!0)])])])])}const Gn={onionLocation:{default:"",placeholder:"<your-onion-address>.onion",enabled:!0}},Jn={name:"DomainOnion",display:"templates.domainSections.onion.onion",key:"onion",delegated:ce(Gn),components:{ExternalLink:So.A},props:{data:Object},computed:{...ue(Gn,"onion"),incorrectEnding(){return this.onionLocationChanged&&!this.$props.data.onionLocation.computed.endsWith(".onion")},hasWarnings(){return this.incorrectEnding}},watch:{"$props.data.onionLocation":{handler(e){e.computed=e.computed.replace(/^https?:\/\//,"")},deep:!0}}},Kn=(0,ge.A)(Jn,[["render",Qn]]),qn=Kn,Yn=[bt,Do,ja,ps,Qs,El,Si,Vn,qn],Zn={hasUserInteraction:!1,presets:ve.delegated,...Yn.reduce(((e,t)=>(e[t.key]=t.delegated,e)),{})},ed={name:"Domain",delegated:Zn,components:{Presets:ve},props:{data:Object},data(){return{active:Yn[0].key,tabs:Yn}},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]},hasWarnings(){return Object.values(this.$refs).some((e=>e[0].hasWarnings||!1))}},methods:{changesCount(e){return Object.keys(this.$props.data[e]).filter((t=>N(this.$props.data[e][t],e,t))).length},changes(e){const t=this.changesCount(e);return t?` (${t.toLocaleString()})`:""},warnings(e){return Object.prototype.hasOwnProperty.call(this.$refs,e)&&this.$refs[e][0].hasWarnings||!1},setValue(e,t,o){Object.assign(this.$props.data[e][t],{value:o,computed:o})},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 o=this.$data.tabs.map((e=>e.key));return o.indexOf(e)<o.indexOf(this.$data.active)&&t.push("is-before"),t.join(" ")},showTab(e){ae({category:"Site",action:"Tab clicked",label:`${this.$data.active}, ${e}`}),this.$data.active=e},showPreviousTab(){ae({category:"Site",action:"Back clicked",label:`${this.$data.active}, ${this.previousTab}`}),this.$data.active=this.previousTab},showNextTab(){ae({category:"Site",action:"Next clicked",label:`${this.$data.active}, ${this.nextTab}`}),this.$data.active=this.nextTab}}},td=(0,ge.A)(ed,[["render",oe]]),od=td,ad=e=>"[object Object]"===Object.prototype.toString.call(e),sd=e=>""===e.toString().trim()||e,ld={ssl_profile:["https","sslProfile"],resolver_cloudflare:["https","ocspCloudflare",sd],resolver_google:["https","ocspGoogle",sd],resolver_opendns:["https","ocspOpenDns",sd],directory_letsencrypt:["https","letsEncryptRoot"],referrer_policy:["security","referrerPolicy"],content_security_policy:["security","contentSecurityPolicy"],server_tokens:["security","serverTokens",sd],limit_req:["security","limitReq",sd],php_server:["php","phpServer"],php_server_backup:["php","phpBackupServer"],python_server:["python","pythonServer"],gzip:["performance","gzipCompression",sd],brotli:["performance","brotliCompression",sd],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",sd],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",sd]},id={domain:["server","domain"],path:["server","path"],document_root:["server","documentRoot"],non_www:["server","wwwSubdomain",e=>!sd(e)],cdn:["server","cdnSubdomain",sd],redirect:["server","redirectSubdomains",sd],ipv4:["server","listenIpv4"],ipv6:["server","listenIpv6"],https:["https","https",sd],http2:["https","http2",sd],force_https:["https","forceHttps",sd],hsts:["https","hsts",sd],hsts_subdomains:["https","hstsSubdomains",sd],hsts_preload:["https","hstsPreload",sd],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",sd],wordpress:["php","wordPressRules",sd],drupal:["php","drupalRules",sd],magento:["php","magentoRules",sd],python:["python","python",sd],django:["python","djangoRules",sd],proxy:["reverseProxy","reverseProxy",sd],proxy_path:["reverseProxy","path"],proxy_pass:["reverseProxy","proxyPass"],root:["routing","root",sd],index:["routing","index"],fallback_html:["routing","fallbackHtml",sd],fallback_php:["routing","fallbackPhp",sd],fallback_php_path:["routing","fallbackPhpPath"],php_legacy_routing:["routing","legacyPhpRouting",sd],access_log_domain:["logging","accessLog",sd],error_log_domain:["logging","errorLog",sd]},nd=e=>{const t={};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(!(o in ld)||ad(e[o]))isNaN(parseInt(o))||(e.domains=ad(e.domains)?e.domains:{},e.domains[o]=e[o]);else{const a=ld[o];t[a[0]]=t[a[0]]||{},t[a[0]][a[1]]=a.length<3?e[o]:a[2](e[o])}if(e.global={...e.global||{},...t},"domains"in e&&ad(e.domains))for(const o in e.domains){if(!Object.prototype.hasOwnProperty.call(e.domains,o))continue;if(!ad(e.domains[o]))continue;const t={};for(const a in e.domains[o])if(Object.prototype.hasOwnProperty.call(e.domains[o],a)&&!ad(e.domains[o][a])&&a in id){const s=id[a];t[s[0]]=t[s[0]]||{},t[s[0]][s[1]]=s.length<3?e.domains[o][a]:s[2](e.domains[o][a])}e.domains[o]={...e.domains[o],...t}}},dd=(e,t)=>{const o=(e,t)=>{Object.keys(t).forEach((a=>{t[a]&&"object"===typeof t[a]?o(e[a]=e[a]||{},t[a]):e[a]=t[a]}))};o(e,t)},rd=e=>{if(0===Object.keys(e).length)return;const t="logging"in e.global&&ad(e.global.logging)?e.global.logging:{},[o,...a]=(t.accessLog||hi).split(" "),s=!("accessLog"in t)||""!==o&&"off"!==o,[l,...i]=(t.errorLog||`${gi} ${vi}`).split(" "),n=!("errorLog"in t)||""!==l&&l!==fi;for(const d in e.domains){if(!Object.prototype.hasOwnProperty.call(e.domains,d))continue;const t={domain:rt,..."server"in e.domains[d]&&ad(e.domains[d].server)?e.domains[d].server:{}},r="logging"in e.domains[d]&&ad(e.domains[d].logging)?e.domains[d].logging:{};let p=s,c=o;const u=a.join(" ")||mi,h=!!r.accessLog;h&&(p=!0,c=c.replace(/([^/]+)\.log$/,`${t.domain}.$1.log`));let m=n,g=l;const f=i.join(" ")||vi,v=!!r.errorLog;v&&(m=!0,g=g.replace(/([^/]+)\.log$/,`${t.domain}.$1.log`)),e.domains[d].logging={accessLogEnabled:p,accessLogPath:c,accessLogParameters:u,errorLogEnabled:m,errorLogPath:g,errorLogLevel:f,...r}}},pd=e=>{if("global"in e&&ad(e.global)){const t={php:{}},o={php:["phpServer","phpServerCustom","phpBackupServer","phpBackupServerCustom"]};for(const a in e.global)if(Object.prototype.hasOwnProperty.call(e.global,a)&&Object.prototype.hasOwnProperty.call(o,a))for(const s in e.global[a])Object.prototype.hasOwnProperty.call(e.global[a],s)&&o[a].includes(s)&&(t[a][s]=e.global[a][s]);for(const a in e.domains)Object.prototype.hasOwnProperty.call(e.domains,a)&&dd(e.domains[a],t)}rd(e)},cd=(e,t)=>{for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&"presets"!==o&&o in t&&ad(e[o]))for(const a in e[o])Object.prototype.hasOwnProperty.call(e[o],a)&&a in t[o]&&(t[o][a].value=e[o][a],t[o][a].computed=e[o][a])},ud=(e,t,o,a)=>new Promise((s=>{const l=Q.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(nd(l),pd(l),"domains"in l&&ad(l.domains)){const e=Object.keys(l.domains).map((e=>parseInt(e))).filter((e=>!isNaN(e)));for(let o=0;o<Math.max(...e)+1;o++){if(!e.includes(o)||!ad(l.domains[o])){t.push(z(od.delegated));continue}const s=t[t.push(z(od.delegated))-1];s.hasUserInteraction=!0,a((()=>cd(l.domains[o],s)))}}else t.push(z(od.delegated));"global"in l&&ad(l.global)&&cd(l.global,o),a((()=>a((()=>s(l)))))})),hd=e=>{if("object"===typeof window&&"object"===typeof window.navigator){const t=new Set;Array.isArray(window.navigator.languages)&&window.navigator.languages.forEach((e=>t.add(e))),"string"===typeof window.navigator.language&&t.add(window.navigator.language),Intl&&"DateTimeFormat"in Intl&&"und"!==Intl.DateTimeFormat().resolvedOptions().locale&&t.add(Intl.DateTimeFormat().resolvedOptions().locale);const o=[...t.values()].find((t=>e.includes(h(t,"-"))));if(o)return h(o,"-");const a=e.reduce(((e,t)=>{const o=t.match(/^[a-z]+/)[0];return o in e||(e[o]=t),e}),{}),s=[...t.values()].find((e=>Object.keys(a).includes(e.split("-")[0].toLowerCase())));return!!s&&a[s.split("-")[0].toLowerCase()]}},md=e=>ad(e)||Array.isArray(e)&&e.every((e=>Array.isArray(e)&&2===e.length)),gd=e=>{let t=0;for(const o of e){if(md(o[1]))return t;o[0].length>t&&!o[0].startsWith("#")&&(t=o[0].length)}return t},fd=(e,t)=>{const o=ad(e)?Object.entries(e):e;if(!Array.isArray(o)||!o.every((e=>Array.isArray(e)&&2===e.length)))return"";let a="",s=gd(o);const l=" ".repeat(t);let i=!1;for(let n=0;n<o.length;n++){const e=o[n];if(md(e[1])){a+="\n"+l+e[0]+" {\n",a+=fd(e[1],t+1),a+=l+"}\n\n",i=!0;continue}i&&(s=gd(o.slice(n)),i=!1);const d=Array.isArray(e[1])?e[1]:[e[1]],r=s-e[0].length+1,p=" ".repeat(Math.max(r,0));d.forEach((t=>{const o=t.toString();a+=l+(e[0]+p+o).trim()+(e[0].startsWith("#")?"":";")+"\n"}))}return a},vd=e=>{let t,o=fd(e,0);o=o.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(o),t&&(o=o.slice(0,t.index)+t[1]+"\n"+t[2]+o.slice(t.index+t[0].length))}while(t);return o.trim()};var bd=o(1370);const kd=e=>bd.stringify(e),yd={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"]}},$d=(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`,Ld=(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`,Cd="text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml",xd={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?",html:"html?"},Sd=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))),_d=(e,t)=>{const o=[];if(o.push(["# security headers",""]),o.push(["add_header X-XSS-Protection",'"1; mode=block" always']),o.push(["add_header X-Content-Type-Options",'"nosniff" always']),o.push(["add_header Referrer-Policy",`"${t.security.referrerPolicy.computed}" always`]),t.security.contentSecurityPolicy.computed&&o.push(["add_header Content-Security-Policy",`"${t.security.contentSecurityPolicy.computed}" always`]),t.security.permissionsPolicy.computed&&o.push(["add_header Permissions-Policy",`"${t.security.permissionsPolicy.computed}" always`]),Sd(e)){const t=e.length&&e[0].https.hstsSubdomains.computed,a=e.length&&e[0].https.hstsPreload.computed;o.push(["add_header Strict-Transport-Security",`"max-age=31536000${t?"; includeSubDomains":""}${a?"; preload":""}" always`])}return o.push(["# . files",""]),o.push(["location ~ /\\.(?!well-known)",{deny:"all"}]),t.security.securityTxt.computed&&(o.push(["# security.txt",""]),o.push(["location /security.txt",{return:"301 /.well-known/security.txt"}]),o.push(["location = /.well-known/security.txt",{alias:`${t.security.securityTxtPath.value}`}])),o},Ed=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},wd=e=>{const t={proxy_http_version:"1.1",proxy_cache_bypass:"$http_upgrade","# Proxy SSL":"",proxy_ssl_server_name:"on","# Proxy headers":"","proxy_set_header Upgrade":"$http_upgrade","proxy_set_header Connection":"$connection_upgrade","proxy_set_header X-Real-IP":"$remote_addr","proxy_set_header Forwarded":"$proxy_add_forwarded"};return"passOn"==e.reverseProxy.proxyCoexistenceXForwarded.computed?(t["proxy_set_header X-Forwarded-For"]="$proxy_add_x_forwarded_for",t["proxy_set_header X-Forwarded-Proto"]="$scheme",t["proxy_set_header X-Forwarded-Host"]="$host",t["proxy_set_header X-Forwarded-Port"]="$server_port"):(t["proxy_set_header X-Forwarded-For"]='""',t["proxy_set_header X-Forwarded-Proto"]='""',t["proxy_set_header X-Forwarded-Host"]='""',t["proxy_set_header X-Forwarded-Port"]='""'),t["# Proxy timeouts"]="",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},Pd=e=>{const t=e.some((e=>e.routing.legacyPhpRouting.computed)),o={};return t&&(o["# split path"]="",o.fastcgi_split_path_info="^(.+\\.php)(/.+)$",o.set="$_fastcgi_path_info $fastcgi_path_info"),o["# 404"]="",o.try_files="$fastcgi_script_name =404",o["# default fastcgi_params"]="",o.include="fastcgi_params",o["# fastcgi settings"]="",o.fastcgi_index="index.php",o.fastcgi_buffers="8 16k",o.fastcgi_buffer_size="32k",o["# fastcgi params"]="",o["fastcgi_param DOCUMENT_ROOT"]="$realpath_root",o["fastcgi_param SCRIPT_FILENAME"]="$realpath_root$fastcgi_script_name",t&&(o["fastcgi_param PATH_INFO"]="$_fastcgi_path_info"),o["fastcgi_param PHP_ADMIN_VALUE"]='"open_basedir=$base/:/usr/lib/php/:/tmp/"',o},Td=(e,t)=>{const o={"# favicon.ico":"","location = /favicon.ico":{log_not_found:"off"},"# robots.txt":"","location = /robots.txt":{log_not_found:"off"}};if(t.performance.disableHtmlCaching.computed){o["# Disable HTML caching"]="";const e=`location ~* \\.(?:${xd.html})$`;o[e]={add_header:'Cache-Control "no-cache"'}}if(e.every((e=>e.routing.root.computed))){if(t.performance.assetsExpiration.computed===t.performance.mediaExpiration.computed){if(t.performance.assetsExpiration.computed){o["# assets, media"]="";const e=`location ~* \\.(?:${xd.assets}|${xd.images}|${xd.audio}|${xd.video})$`;o[e]={expires:t.performance.assetsExpiration.computed}}}else{if(t.performance.assetsExpiration.computed){o["# assets"]="";const e=`location ~* \\.(?:${xd.assets})$`;o[e]={expires:t.performance.assetsExpiration.computed}}if(t.performance.mediaExpiration.computed){o["# media"]="";const e=`location ~* \\.(?:${xd.images}|${xd.audio}|${xd.video})$`;o[e]={expires:t.performance.mediaExpiration.computed}}}if(t.performance.svgExpiration.computed===t.performance.fontsExpiration.computed){if(t.performance.svgExpiration.computed){o["# svg, fonts"]="";const e=`location ~* \\.(?:${xd.svg}|${xd.fonts})$`;o[e]={add_header:'Access-Control-Allow-Origin "*"',expires:t.performance.svgExpiration.computed}}}else{if(t.performance.svgExpiration.computed){o["# svg"]="";const e=`location ~* \\.${xd.svg}$`;o[e]={add_header:'Access-Control-Allow-Origin "*"',expires:t.performance.svgExpiration.computed}}if(t.performance.fontsExpiration.computed){o["# fonts"]="";const e=`location ~* \\.${xd.fonts}$`;o[e]={add_header:'Access-Control-Allow-Origin "*"',expires:t.performance.fontsExpiration.computed}}}}return t.performance.gzipCompression.computed&&(o["# gzip"]="",o.gzip="on",o.gzip_vary="on",o.gzip_proxied="any",o.gzip_comp_level=6,o.gzip_types=Cd),t.performance.brotliCompression.computed&&(o["# brotli"]="",o.brotli="on",o.brotli_comp_level=6,o.brotli_types=Cd),o},Vd=(e,t=!1)=>{const o=`php${t?"Backup":""}Server`;return"custom"===e.php[o].computed?e.php[`${o}Custom`].computed:("/"===e.php[o].computed[0]?"unix:":"")+e.php[o].computed},Rd=e=>`php_${e.server.domain.computed.replace(/\./g,"_")}`,Fd=(e,t)=>{const o={"# 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&&(o["# WordPress: throttle wp-login.php"]="",o["location = /wp-login.php"]={limit_req:"zone=login burst=2 nodelay",include:"nginxconfig.io/php_fastcgi.conf"},t.php.wordPressRules.computed&&(o["location = /wp-login.php"].fastcgi_pass=""!==t.php.phpBackupServer.computed?Rd(t):Vd(t))),o},Dd=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},Ad=()=>{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},Od=()=>{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},zd=e=>{const t={"# ACME-challenge":""};return t["location ^~ /.well-known/acme-challenge/"]={root:e.https.letsEncryptRoot.computed.replace(/\/+$/,"")},t},jd=(e,t)=>{const o=[];return e.https.https.computed&&(o.push(["# SSL",""]),o.push(["ssl_certificate",$d(e,t)]),o.push(["ssl_certificate_key",Ld(e,t)]),"letsEncrypt"===e.https.certType.computed&&o.push(["ssl_trusted_certificate",`${t.https.letsEncryptCertRoot.computed.replace(/\/+$/,"")}/${e.server.domain.computed}/chain.pem`])),o},Hd=(e,t,o)=>{const a=[],s=("*"===e.server.listenIpv4.computed?"":`${e.server.listenIpv4.computed}:`)+"443",l=t.https.portReuse.computed&&!o.has(s);if(l&&o.add(s),a.push(["listen",`${s} ssl${e.https.http2.computed?" http2":""}${l?" reuseport":""}`]),e.https.http3.computed&&a.push(["listen",`${s} http3`]),e.server.listenIpv6.computed){const s=`[${e.server.listenIpv6.computed}]:443`,l=t.https.portReuse.computed&&!o.has(s);l&&o.add(s),a.push(["listen",`${s} ssl${e.https.http2.computed?" http2":""}${l?" reuseport":""}`]),e.https.http3.computed&&a.push(["listen",`${s} http3`])}return a},Wd=(e,t,o)=>{const a=[],s=("*"===e.server.listenIpv4.computed?"":`${e.server.listenIpv4.computed}:`)+"80",l=t.https.portReuse.computed&&!o.has(s);if(l&&o.add(s),a.push(["listen",`${s}${l?" reuseport":""}`]),e.server.listenIpv6.computed){const s=`[${e.server.listenIpv6.computed}]:80`,l=t.https.portReuse.computed&&!o.has(s);l&&o.add(s),a.push(["listen",`${s}${l?" reuseport":""}`])}return a},Xd=(e,t,o)=>e.https.https.computed?Hd(e,t,o):Wd(e,t,o),Id=(e,t,o,a,s)=>{const l=[];return l.push(...Wd(e,t,o)),l.push(["server_name",a]),(e.logging.redirectAccessLog.computed||e.logging.redirectErrorLog.computed)&&(l.push(["# logging",""]),e.logging.redirectAccessLog.computed&&l.push(["access_log",yi(e,t)]),e.logging.redirectErrorLog.computed&&l.push(["error_log",$i(e)])),"letsEncrypt"===e.https.certType.computed?(t.tools.modularizedStructure.computed?l.push(["include","nginxconfig.io/letsencrypt.conf"]):l.push(...Object.entries(zd(t))),l.push(["location /",{return:`301 https://${s||a}$request_uri`}])):l.push(["return",`301 https://${s||a}$request_uri`]),l},Md=(e,t,o,a)=>{const s=[],l=[];if(e.https.https.computed&&e.https.forceHttps.computed||l.push(...Wd(e,o,a)),e.https.https.computed&&l.push(...Hd(e,o,a)),l.push(["server_name",`${e.server.wwwSubdomain.computed?"www.":""}${e.server.domain.computed}`]),(e.php.php.computed||e.python.python.computed&&e.python.djangoRules.computed)&&(l.push(["set",`$base ${e.server.path.computed}`]),e.routing.root.computed&&l.push(["root",`$base${e.server.documentRoot.computed}`])),e.php.php.computed||e.python.python.computed&&e.python.djangoRules.computed||!e.routing.root.computed||l.push(["root",`${e.server.path.computed}${e.server.documentRoot.computed}`]),l.push(...jd(e,o)),e.onion.onionLocation.computed&&(l.push(["# Onion services",""]),l.push(["add_header Onion-Location",`http://${e.onion.onionLocation.computed}$request_uri`])),!Sd(t)&&e.https.hsts.computed&&(l.push(["# HSTS",""]),l.push(["add_header Strict-Transport-Security",`"max-age=31536000${e.https.hstsSubdomains.computed?"; includeSubDomains":""}${e.https.hstsPreload.computed?"; preload":""}" always`])),o.tools.modularizedStructure.computed?(l.push(["# security",""]),l.push(["include","nginxconfig.io/security.conf"])):l.push(..._d(t,o)),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()));l.push(["# restrict methods",""]),l.push([`if ($request_method !~ ^(${t.join("|")})$)`,{return:`'${e.restrict.responseCode.computed}'`}])}if((e.logging.accessLogEnabled.computed||e.logging.errorLogEnabled.computed)&&(l.push(["# logging",""]),e.logging.accessLogEnabled.computed&&l.push(["access_log",yi(e,o)]),e.logging.errorLogEnabled.computed&&l.push(["error_log",$i(e)])),"index.php"===e.routing.index.computed&&(l.push(["# index.php",""]),l.push(["index","index.php"])),!e.routing.fallbackHtml.computed&&!e.routing.fallbackPhp.computed||e.reverseProxy.reverseProxy.computed&&"/"===e.reverseProxy.path.computed||(l.push([`# index.${e.routing.fallbackHtml.computed?"html":e.routing.fallbackPhp.computed?"php":""} fallback`,""]),l.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&&(l.push(["# index.php fallback",""]),l.push([`location ~ ^${e.routing.fallbackPhpPath.computed}`,{try_files:"$uri $uri/ /index.php?$query_string"}])),e.python.python.computed&&(o.tools.modularizedStructure.computed?l.push(["location /",{include:"nginxconfig.io/python_uwsgi.conf"}]):l.push(["location /",Ed(o)]),e.python.djangoRules.computed&&(l.push(["# Django media",""]),l.push(["location /media/",{alias:"$base/media/"}]),l.push(["# Django static",""]),l.push(["location /static/",{alias:"$base/static/"}]))),e.reverseProxy.reverseProxy.computed){const t=[];t.push(["proxy_pass",e.reverseProxy.proxyPass.computed]),t.push(["proxy_set_header Host",e.reverseProxy.proxyHostHeader.computed]),o.tools.modularizedStructure.computed?t.push(["include","nginxconfig.io/proxy.conf"]):t.push(...Object.entries(wd(o))),l.push(["# reverse proxy",""]),l.push([`location ${e.reverseProxy.path.computed}`,t])}if(o.tools.modularizedStructure.computed?(l.push(["# additional config",""]),l.push(["include","nginxconfig.io/general.conf"]),e.https.forceHttps.computed||"letsEncrypt"!==e.https.certType.computed||l.push(["include","nginxconfig.io/letsencrypt.conf"]),e.php.wordPressRules.computed&&l.push(["include",`nginxconfig.io/${e.server.domain.computed}.wordpress.conf`]),e.php.drupalRules.computed&&l.push(["include","nginxconfig.io/drupal.conf"]),e.php.magentoRules.computed&&l.push(["include","nginxconfig.io/magento.conf"]),e.php.joomlaRules.computed&&l.push(["include","nginxconfig.io/joomla.conf"])):(l.push(...Object.entries(Td(t,o))),e.https.forceHttps.computed||"letsEncrypt"!==e.https.certType.computed||l.push(...Object.entries(zd(o))),e.php.wordPressRules.computed&&l.push(...Object.entries(Fd(o,e))),e.php.drupalRules.computed&&l.push(...Object.entries(Dd(o))),e.php.magentoRules.computed&&l.push(...Object.entries(Ad())),e.php.joomlaRules.computed&&l.push(...Object.entries(Od()))),e.php.php.computed){e.php.phpBackupServer.computed&&s.push([`upstream ${Rd(e)}`,{server:[Vd(e),`${Vd(e,!0)} backup`]}]),l.push(["# handle .php",""]);const a="location ~ "+(e.routing.legacyPhpRouting.computed?"[^/]\\.php(/|$)":"\\.php$"),i={fastcgi_pass:""!==e.php.phpBackupServer.computed?Rd(e):Vd(e)};o.tools.modularizedStructure.computed||e.php.wordPressRules.computed?l.push([a,{...i,include:"nginxconfig.io/php_fastcgi.conf"}]):l.push([a,{...i,...Pd(t)}])}if(s.push(["server",l]),e.server.cdnSubdomain.computed){const t=[];t.push(...Xd(e,o,a)),t.push(["server_name",`cdn.${e.server.domain.computed}`]),t.push(["root",`${e.server.path.computed}${e.server.documentRoot.computed}`]),t.push(...jd(e,o)),t.push(["# disable access_log",""]),t.push(["access_log","off"]),o.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",Cd])),t.push(["# allow safe files",""]),t.push([`location ~* \\.(?:${xd.assets}|${xd.fonts}|${xd.svg}|${xd.images}|${xd.audio}|${xd.video}|${xd.docs})$`,[["add_header",'Access-Control-Allow-Origin "*"'],["add_header",'Cache-Control "public"'],["expires","30d"]]]),t.push(["# deny everything else",""]),t.push(["location /",{deny:"all"}]),s.push(["# CDN",""]),s.push(["server",t])}if(e.server.redirectSubdomains.computed){const t=[];t.push(...Xd(e,o,a)),t.push(["server_name",`${e.server.wwwSubdomain.computed?"":"*"}.${e.server.domain.computed}`]),t.push(...jd(e,o)),(e.logging.redirectAccessLog.computed||e.logging.redirectErrorLog.computed)&&(t.push(["# logging",""]),e.logging.redirectAccessLog.computed&&t.push(["access_log",yi(e,o)]),e.logging.redirectErrorLog.computed&&t.push(["error_log",$i(e)])),t.push(["return",`301 http${e.https.https.computed?"s":""}://${e.server.wwwSubdomain.computed?"www.":""}${e.server.domain.computed}$request_uri`]),s.push([`# ${e.server.wwwSubdomain.computed?"non-www, ":""}subdomains redirect`,""]),s.push(["server",t])}return e.https.forceHttps.computed&&(s.push(["# HTTP redirect",""]),e.server.wwwSubdomain.computed&&!e.server.redirectSubdomains.computed?(s.push(["server",Id(e,o,a,e.server.domain.computed,`www.${e.server.domain.computed}`)]),s.push(["server",Id(e,o,a,`www.${e.server.domain.computed}`)])):e.server.wwwSubdomain.computed||e.server.redirectSubdomains.computed||s.push(["server",Id(e,o,a,e.server.domain.computed)]),e.server.cdnSubdomain.computed&&s.push(["server",Id(e,o,a,`cdn.${e.server.domain.computed}`)]),e.server.redirectSubdomains.computed&&s.push(["server",Id(e,o,a,`.${e.server.domain.computed}`,`${e.server.wwwSubdomain.computed?"www.":""}${e.server.domain.computed}`)])),s},Ud=(e,t)=>{const o={"# Generated by nginxconfig.io":"","# See nginxconfig.txt for the configuration share link":""};if(o.user=t.nginx.user.computed,t.nginx.pid.computed&&(o.pid=t.nginx.pid.computed),o.worker_processes=t.nginx.workerProcesses.computed,o.worker_rlimit_nofile=65535,o["# Load modules"]="",o.include=`${t.nginx.nginxConfigDirectory.computed.replace(/\/+$/,"")}/modules-enabled/*.conf`,o.events={multi_accept:"on",worker_connections:65535},o.http=[],o.http.push(["charset","utf-8"]),o.http.push(["sendfile","on"]),o.http.push(["tcp_nopush","on"]),o.http.push(["tcp_nodelay","on"]),t.security.serverTokens.computed||o.http.push(["server_tokens","off"]),t.logging.logNotFound.computed||o.http.push(["log_not_found","off"]),o.http.push(["types_hash_max_size",t.nginx.typesHashMaxSize.computed]),o.http.push(["types_hash_bucket_size",t.nginx.typesHashBucketSize.computed]),o.http.push(["client_max_body_size",`${t.nginx.clientMaxBodySize.computed}M`]),o.http.push(["# MIME",""]),o.http.push(["include","mime.types"]),o.http.push(["default_type","application/octet-stream"]),t.logging.cloudflare.computed){o.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"),o.http.push(["log_format",`cloudflare '${e.join(" ")}'`])}o.http.push(["# Logging",""]),o.http.push(["access_log","off"]),t.logging.errorLogEnabled.computed?o.http.push(["error_log",t.logging.errorLogPath.computed.trim()+` ${t.logging.errorLogLevel.computed}`]):o.http.push(["error_log",fi]),t.security.limitReq.computed&&(o.http.push(["# Limits",""]),o.http.push(["limit_req_log_level","warn"]),o.http.push(["limit_req_zone","$binary_remote_addr zone=login:10m rate=10r/m"]));let a=!1;for(const s of e)if(s&&s.https&&s.https.https&&s.https.https.computed){a=!0;break}if(a){o.http.push(["# SSL",""]),o.http.push(["ssl_session_timeout","1d"]),o.http.push(["ssl_session_cache","shared:SSL:10m"]),o.http.push(["ssl_session_tickets","off"]);const e=yd[t.https.sslProfile.computed];e&&(e.dh_param_size&&(o.http.push(["# Diffie-Hellman parameter for DHE ciphersuites",""]),o.http.push(["ssl_dhparam",`${t.nginx.nginxConfigDirectory.computed.replace(/\/+$/,"")}/dhparam.pem`])),o.http.push([`# ${e.name} configuration`,""]),o.http.push(["ssl_protocols",e.protocols.join(" ")]),e.ciphers.length&&o.http.push(["ssl_ciphers",e.ciphers.join(":")]),e.server_preferred_order&&o.http.push(["ssl_prefer_server_ciphers","on"])),o.http.push(["# OCSP Stapling",""]),o.http.push(["ssl_stapling","on"]),o.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&&(o.http.push(["resolver",`${a.join(" ")} valid=60s`]),o.http.push(["resolver_timeout","2s"]))}if(e.some((e=>e.reverseProxy.reverseProxy.computed))&&(o.http.push(["# Connection header for WebSocket reverse proxy",""]),o.http.push(["map $http_upgrade $connection_upgrade",{default:"upgrade",'""':"close"}]),o.http.push(["map $remote_addr $proxy_forwarded_elem",{"# IPv4 addresses can be sent as-is":"","~^[0-9.]+$":'"for=$remote_addr"',"# IPv6 addresses need to be bracketed and quoted":"","~^[0-9A-Fa-f:.]+$":'"for=\\"[$remote_addr]\\""',"# Unix domain socket names cannot be represented in RFC 7239 syntax":"",default:'"for=unknown"'}]),o.http.push(["map $http_forwarded $proxy_add_forwarded",{"# If the incoming Forwarded header is syntactically valid, append to it":"","":'"~^(,[ \\\\t]*)*([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?(;([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?)*([ \\\\t]*,([ \\\\t]*([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?(;([!#$%&\'*+.^_`|~0-9A-Za-z-]+=([!#$%&\'*+.^_`|~0-9A-Za-z-]+|\\"([\\\\t \\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E\\\\x80-\\\\xFF]|\\\\\\\\[\\\\t \\\\x21-\\\\x7E\\\\x80-\\\\xFF])*\\"))?)*)?)*$" "$http_forwarded, $proxy_forwarded_elem"',"# Otherwise, replace it":"",default:'"$proxy_forwarded_elem"'}])),o.http.push(["# Load configs",""]),o.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){const a=new Set;for(const s of e)o.http.push([`# ${s.server.domain.computed}`,""]),o.http.push(...Md(s,e,t,a))}return o},Bd=()=>({version:"3.3",services:{nginx:{build:{context:".",dockerfile:"Dockerfile"}}}}),Nd=()=>"FROM nginx:latest\nCOPY . /etc/nginx/",Qd=e=>{const t={};for(const o in e){if("presets"===o)continue;const a={};for(const t in e[o]){const s=e[o][t];s.value!==s.default&&(a[t]=s.value)}Object.keys(a).length&&(t[o]=a)}return t},Gd=(e,t)=>{const o={};o.domains=e.map((e=>Qd(e[0]))).reduce(((e,t,o)=>(e[o]=t,e)),{});const a=Qd(t);return Object.keys(a).length&&(o.global=a),o},Jd=(e,t)=>{const o=Gd(e,t),a=Q.stringify(o,{allowDots:!0});return`${a.length>1e3?"#":""}${a.length?"?":""}${a}`},Kd=(e,t)=>{const o={};if(o["nginx.conf"]=vd(Ud(e,t)),t.docker.dockerfile.computed&&(o["Dockerfile"]=Nd()),t.docker.dockerCompose.computed&&(o["docker-compose.yaml"]=kd(Bd())),t.tools.modularizedStructure.computed){const a="sites-"+(t.tools.symlinkVhost.computed?"available":"enabled"),s=new Set;for(const l of e)o[`${a}/${l.server.domain.computed}.conf`]=vd(Md(l,e,t,s)),e.some((e=>e.php.wordPressRules.computed))&&(o[`nginxconfig.io/${l.server.domain.computed}.wordpress.conf`]=vd(Fd(t,l)));e.some((e=>"letsEncrypt"===e.https.certType.computed))&&(o["nginxconfig.io/letsencrypt.conf"]=vd(zd(t))),o["nginxconfig.io/security.conf"]=vd(_d(e,t)),o["nginxconfig.io/general.conf"]=vd(Td(e,t)),e.some((e=>e.php.php.computed))&&(o["nginxconfig.io/php_fastcgi.conf"]=vd(Pd(e))),e.some((e=>e.python.python.computed))&&(o["nginxconfig.io/python_uwsgi.conf"]=vd(Ed(t))),e.some((e=>e.reverseProxy.reverseProxy.computed))&&(o["nginxconfig.io/proxy.conf"]=vd(wd(t))),e.some((e=>e.php.drupalRules.computed))&&(o["nginxconfig.io/drupal.conf"]=vd(Dd(t))),e.some((e=>e.php.magentoRules.computed))&&(o["nginxconfig.io/magento.conf"]=vd(Ad())),e.some((e=>e.php.joomlaRules.computed))&&(o["nginxconfig.io/joomla.conf"]=vd(Od()))}else e.some((e=>e.php.wordPressRules.computed))&&(o["nginxconfig.io/php_fastcgi.conf"]=vd(Pd(e)));const a=Jd(e.map(((e,t)=>[e,t])).filter((e=>null!==e[0])),t);return o["nginxconfig.txt"]=`${window.location.protocol}//${window.location.host}${window.location.pathname}${a}`,o},qd={class:"panel"},Yd={class:"tabs"},Zd=["onClick"],er={key:0,class:"fas fa-exclamation-triangle"},tr={class:"navigation-buttons"},or=(0,$.Lk)("i",{class:"fas fa-long-arrow-alt-left"},null,-1),ar=(0,$.Lk)("i",{class:"fas fa-long-arrow-alt-right"},null,-1);function sr(e,t,o,a,s,l){return(0,$.uX)(),(0,$.CE)("div",qd,[(0,$.Lk)("div",Yd,[(0,$.Lk)("ul",null,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(s.tabs,(t=>((0,$.uX)(),(0,$.CE)("li",{class:(0,L.C4)(l.tabClass(t.key))},[(0,$.Lk)("a",{onClick:e=>l.showTab(t.key)},[(0,$.eW)((0,L.v_)(e.$t(t.display))+(0,L.v_)(l.changes(t.key))+" ",1),l.warnings(t.key)?((0,$.uX)(),(0,$.CE)("i",er)):(0,$.Q3)("",!0)],8,Zd)],2)))),256))])]),((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(s.tabs,(t=>((0,$.uX)(),(0,$.Wv)((0,$.$y)(t),{key:t.key,ref_for:!0,ref:t.key,data:e.$props.data[t.key],style:(0,L.Tr)({display:s.active===t.key?void 0:"none"}),class:"container"},null,8,["data","style"])))),128)),(0,$.Lk)("div",tr,[!1!==l.previousTab?((0,$.uX)(),(0,$.CE)("a",{key:0,class:"button is-mini",onClick:t[0]||(t[0]=(...e)=>l.showPreviousTab&&l.showPreviousTab(...e))},[or,(0,$.Lk)("span",null,(0,L.v_)(e.$t("common.back")),1)])):(0,$.Q3)("",!0),!1!==l.nextTab?((0,$.uX)(),(0,$.CE)("a",{key:1,class:"button is-primary is-mini",onClick:t[1]||(t[1]=(...e)=>l.showNextTab&&l.showNextTab(...e))},[(0,$.Lk)("span",null,(0,L.v_)(e.$t("common.next")),1),ar])):(0,$.Q3)("",!0)])])}const lr={class:"field is-horizontal"},ir={class:"field-label"},nr={class:"label"},dr={class:"field-body"},rr={class:"field"},pr={class:"checkbox"},cr={key:0,class:"field is-horizontal is-aligned-top"},ur={class:"field-label"},hr={class:"label"},mr={class:"field-body"},gr={class:"field"},fr={class:"control"},vr={class:"text"},br={class:"field is-horizontal is-aligned-top"},kr={class:"field-label"},yr={class:"label"},$r={class:"field-body"},Lr={class:"field"},Cr={class:"field"},xr={class:"radio"},Sr={class:"field is-horizontal is-aligned-top"},_r={class:"field-label"},Er={class:"label"},wr={class:"field-body"},Pr={class:"field"},Tr={class:"checkbox"},Vr={key:0,class:"control field is-horizontal is-expanded"},Rr={class:"radio"},Fr={class:"checkbox"},Dr={key:1,class:"control field is-horizontal is-expanded"},Ar={class:"radio"},Or={class:"checkbox"},zr={key:2,class:"control field is-horizontal is-expanded"},jr={class:"radio"},Hr={class:"checkbox"},Wr={key:3,class:"control field is-horizontal is-expanded"},Xr={class:"radio"},Ir={class:"checkbox"},Mr={key:4,class:"control field is-horizontal is-expanded"},Ur={class:"radio"},Br={key:0,class:"field is-horizontal"},Nr={class:"field-label"},Qr={class:"label"},Gr={class:"field-body"},Jr={class:"field"},Kr=["placeholder"],qr={key:1,class:"field is-horizontal"},Yr={class:"field-label"},Zr={class:"label"},ep={class:"field-body"},tp={class:"field"},op=["placeholder"];function ap(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck"),d=(0,$.g2)("PrettyRadio");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",lr,[(0,$.Lk)("div",ir,[(0,$.Lk)("label",nr,(0,L.v_)(e.$t("templates.globalSections.https.portReuse")),1)]),(0,$.Lk)("div",dr,[(0,$.Lk)("div",rr,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.portReuseChanged?" is-changed":""))},[(0,$.Lk)("div",pr,[(0,$.bF)(n,{modelValue:e.portReuse,"onUpdate:modelValue":t[0]||(t[0]=t=>e.portReuse=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.https.enableReuseOfPort")),1)])),_:1},8,["modelValue"])])],2)])])]),e.sslProfileEnabled?((0,$.uX)(),(0,$.CE)($.FK,{key:1},[(0,$.Lk)("div",br,[(0,$.Lk)("div",kr,[(0,$.Lk)("label",yr,(0,L.v_)(e.$t("templates.globalSections.https.sslProfile")),1)]),(0,$.Lk)("div",$r,[(0,$.Lk)("div",Lr,[(0,$.Lk)("div",Cr,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.sslProfile.options,((o,a)=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.sslProfileChanged&&a===e.sslProfile?" is-changed":""))},[(0,$.Lk)("div",xr,[(0,$.bF)(d,{modelValue:e.sslProfile,"onUpdate:modelValue":t[1]||(t[1]=t=>e.sslProfile=t),value:a,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t(o)),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])])])]),(0,$.Lk)("div",Sr,[(0,$.Lk)("div",_r,[(0,$.Lk)("label",Er,(0,L.v_)(e.$t("templates.globalSections.https.ocspDnsResolvers")),1)]),(0,$.Lk)("div",wr,[(0,$.Lk)("div",Pr,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.ocspCloudflareChanged?" is-changed":""))},[(0,$.Lk)("div",Tr,[(0,$.bF)(n,{modelValue:e.ocspCloudflare,"onUpdate:modelValue":t[2]||(t[2]=t=>e.ocspCloudflare=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.https.cloudflareResolver")),1)])),_:1},8,["modelValue"])])],2),e.$props.data.ocspCloudflare.computed?((0,$.uX)(),(0,$.CE)("div",Vr,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.ocspCloudflareType.options,((o,a)=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.ocspCloudflareTypeChanged&&a===e.ocspCloudflareType?" is-changed":""))},[(0,$.Lk)("div",Rr,[(0,$.bF)(d,{modelValue:e.ocspCloudflareType,"onUpdate:modelValue":t[3]||(t[3]=t=>e.ocspCloudflareType=t),value:a,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t(o)),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])):(0,$.Q3)("",!0),(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.ocspGoogleChanged?" is-changed":""))},[(0,$.Lk)("div",Fr,[(0,$.bF)(n,{modelValue:e.ocspGoogle,"onUpdate:modelValue":t[4]||(t[4]=t=>e.ocspGoogle=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.https.googlePublicDns")),1)])),_:1},8,["modelValue"])])],2),e.$props.data.ocspGoogle.computed?((0,$.uX)(),(0,$.CE)("div",Dr,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.ocspGoogleType.options,((o,a)=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.ocspGoogleTypeChanged&&a===e.ocspGoogleType?" is-changed":""))},[(0,$.Lk)("div",Ar,[(0,$.bF)(d,{modelValue:e.ocspGoogleType,"onUpdate:modelValue":t[5]||(t[5]=t=>e.ocspGoogleType=t),value:a,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t(o)),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])):(0,$.Q3)("",!0),(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.ocspOpenDnsChanged?" is-changed":""))},[(0,$.Lk)("div",Or,[(0,$.bF)(n,{modelValue:e.ocspOpenDns,"onUpdate:modelValue":t[6]||(t[6]=t=>e.ocspOpenDns=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.https.openDns")),1)])),_:1},8,["modelValue"])])],2),e.$props.data.ocspOpenDns.computed?((0,$.uX)(),(0,$.CE)("div",zr,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.ocspOpenDnsType.options,((o,a)=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.ocspOpenDnsTypeChanged&&a===e.ocspOpenDnsType?" is-changed":""))},[(0,$.Lk)("div",jr,[(0,$.bF)(d,{modelValue:e.ocspOpenDnsType,"onUpdate:modelValue":t[7]||(t[7]=t=>e.ocspOpenDnsType=t),value:a,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t(o)),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])):(0,$.Q3)("",!0),(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.ocspQuad9Changed?" is-changed":""))},[(0,$.Lk)("div",Hr,[(0,$.bF)(n,{modelValue:e.ocspQuad9,"onUpdate:modelValue":t[8]||(t[8]=t=>e.ocspQuad9=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.https.quad9")),1)])),_:1},8,["modelValue"])])],2),e.$props.data.ocspQuad9.computed?((0,$.uX)(),(0,$.CE)("div",Wr,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.ocspQuad9Type.options,((o,a)=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.ocspQuad9TypeChanged&&a===e.ocspQuad9Type?" is-changed":""))},[(0,$.Lk)("div",Xr,[(0,$.bF)(d,{modelValue:e.ocspQuad9Type,"onUpdate:modelValue":t[9]||(t[9]=t=>e.ocspQuad9Type=t),value:a,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t(o)),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])):(0,$.Q3)("",!0),(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.ocspVerisignChanged?" is-changed":""))},[(0,$.Lk)("div",Ir,[(0,$.bF)(n,{modelValue:e.ocspVerisign,"onUpdate:modelValue":t[10]||(t[10]=t=>e.ocspVerisign=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.https.verisign")),1)])),_:1},8,["modelValue"])])],2),e.$props.data.ocspVerisign.computed?((0,$.uX)(),(0,$.CE)("div",Mr,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.ocspVerisignType.options,((o,a)=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.ocspVerisignTypeChanged&&a===e.ocspVerisignType?" is-changed":""))},[(0,$.Lk)("div",Ur,[(0,$.bF)(d,{modelValue:e.ocspVerisignType,"onUpdate:modelValue":t[11]||(t[11]=t=>e.ocspVerisignType=t),value:a,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t(o)),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])):(0,$.Q3)("",!0)])])]),e.letsEncryptRootEnabled?((0,$.uX)(),(0,$.CE)("div",Br,[(0,$.Lk)("div",Nr,[(0,$.Lk)("label",Qr,(0,L.v_)(e.$t("templates.globalSections.https.letsEncryptWebroot")),1)]),(0,$.Lk)("div",Gr,[(0,$.Lk)("div",Jr,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.letsEncryptRootChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[12]||(t[12]=t=>e.letsEncryptRoot=t),class:"input",type:"text",placeholder:e.$props.data.letsEncryptRoot.default},null,8,Kr),[[a.Jo,e.letsEncryptRoot]])],2)])])])):(0,$.Q3)("",!0),e.letsEncryptCertRootEnabled?((0,$.uX)(),(0,$.CE)("div",qr,[(0,$.Lk)("div",Yr,[(0,$.Lk)("label",Zr,(0,L.v_)(e.$t("templates.globalSections.https.letsEncryptCertRoot")),1)]),(0,$.Lk)("div",ep,[(0,$.Lk)("div",tp,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.letsEncryptCertRootChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[13]||(t[13]=t=>e.letsEncryptCertRoot=t),class:"input",type:"text",placeholder:e.$props.data.letsEncryptCertRoot.default},null,8,op),[[a.Jo,e.letsEncryptCertRoot]])],2)])])])):(0,$.Q3)("",!0)],64)):((0,$.uX)(),(0,$.CE)("div",cr,[(0,$.Lk)("div",ur,[(0,$.Lk)("label",hr,(0,L.v_)(e.$t("templates.globalSections.https.sslProfile")),1)]),(0,$.Lk)("div",mr,[(0,$.Lk)("div",gr,[(0,$.Lk)("div",fr,[(0,$.Lk)("label",vr,(0,L.v_)(e.$t("templates.globalSections.https.httpsMustBeEnabledOnOneSite")),1)])])])]))])}const sp={default:"ipv4",options:{ipv4:"templates.globalSections.https.ipv4Only",ipv6:"templates.globalSections.https.ipv6Only",both:"templates.globalSections.https.ipv4AndIpv6"},enabled:!0},lp=e=>{e.enabled&&(Object.keys(e.options).includes(e.computed)||(e.computed=e.default))},ip={portReuse:{default:!1,enabled:!0},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:j()(sp),ocspGoogle:{default:!0,enabled:!0},ocspGoogleType:j()(sp),ocspOpenDns:{default:!0,enabled:!0},ocspOpenDnsType:j()(sp),ocspQuad9:{default:!1,enabled:!0},ocspQuad9Type:j()(sp),ocspVerisign:{default:!1,enabled:!0},ocspVerisignType:j()(sp),letsEncryptRoot:{default:"/var/www/_letsencrypt/",enabled:!0},letsEncryptCertRoot:{default:"/etc/letsencrypt/live/",enabled:!0}},np={name:"GlobalHTTPS",display:"common.https",key:"https",delegated:ce(ip),components:{PrettyCheck:mt,PrettyRadio:To},props:{data:Object},computed:ue(ip,"https"),watch:{"$props.data.sslProfile":{handler:lp,deep:!0},"$props.data.ocspCloudflareType":{handler:lp,deep:!0},"$props.data.ocspGoogleType":{handler:lp,deep:!0},"$props.data.ocspOpenDnsType":{handler:lp,deep:!0},"$props.data.ocspQuad9Type":{handler:lp,deep:!0},"$props.data.ocspVerisignType":{handler:lp,deep:!0},"$parent.$parent.$data.domains":{handler(e){let t=!1,o=!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,o=!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=""),o||(this.$props.data.letsEncryptRoot.enabled=!1,this.$props.data.letsEncryptRoot.computed="")},deep:!0}}},dp=(0,ge.A)(np,[["render",ap]]),rp=dp,pp={class:"field is-horizontal"},cp=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"Referrer-Policy")],-1),up={class:"field-body"},hp={class:"field"},mp=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"Content-Security-Policy")],-1),gp={class:"field-body"},fp={class:"field"},vp=["placeholder"],bp={key:0,class:"control"},kp={class:"text message is-warning"},yp=["innerHTML"],$p={class:"field is-horizontal"},Lp=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"Permissions-Policy")],-1),Cp={class:"field-body"},xp={class:"field"},Sp=["placeholder"],_p={class:"field is-horizontal"},Ep=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"server_tokens")],-1),wp={class:"field-body"},Pp={class:"field"},Tp={class:"checkbox"},Vp={class:"field is-horizontal"},Rp=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"limit_req")],-1),Fp={class:"field-body"},Dp={class:"field"},Ap={class:"checkbox"},Op={class:"field is-horizontal"},zp=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"security.txt")],-1),jp={class:"field-body"},Hp={class:"field"},Wp={class:"checkbox"},Xp={key:0,class:"field is-horizontal"},Ip=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"security.txt path")],-1),Mp={class:"field-body"},Up={class:"field"},Bp=["placeholder"];function Np(e,t,o,s,l,i){const n=(0,$.g2)("VueSelect"),d=(0,$.g2)("PrettyCheck");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",pp,[cp,(0,$.Lk)("div",up,[(0,$.Lk)("div",hp,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.referrerPolicyChanged?" is-changed":""))},[(0,$.bF)(n,{modelValue:e.referrerPolicy,"onUpdate:modelValue":t[0]||(t[0]=t=>e.referrerPolicy=t),options:e.$props.data.referrerPolicy.options,clearable:!1},null,8,["modelValue","options"])],2)])])]),(0,$.Lk)("div",{class:(0,L.C4)("field is-horizontal"+(i.hasWordPress&&!e.hasUnsafeEval?" is-aligned-top":""))},[mp,(0,$.Lk)("div",gp,[(0,$.Lk)("div",fp,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.contentSecurityPolicyChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=t=>e.contentSecurityPolicy=t),class:"input",type:"text",placeholder:e.$props.data.contentSecurityPolicy.default},null,8,vp),[[a.Jo,e.contentSecurityPolicy]])],2),i.hasWordPress&&!i.hasWordPressUnsafeEval?((0,$.uX)(),(0,$.CE)("div",bp,[(0,$.Lk)("label",kp,[(0,$.Lk)("span",{class:"message-body",innerHTML:e.$t("templates.globalSections.security.whenUsingWordPressUnsafeEvalIsOftenRequiredToAllowFunctionality")},null,8,yp)])])):(0,$.Q3)("",!0)])])],2),(0,$.Lk)("div",$p,[Lp,(0,$.Lk)("div",Cp,[(0,$.Lk)("div",xp,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.permissionsPolicyChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.permissionsPolicy=t),class:"input",type:"text",placeholder:e.$props.data.permissionsPolicy.default},null,8,Sp),[[a.Jo,e.permissionsPolicy]])],2)])])]),(0,$.Lk)("div",_p,[Ep,(0,$.Lk)("div",wp,[(0,$.Lk)("div",Pp,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.serverTokensChanged?" is-changed":""))},[(0,$.Lk)("div",Tp,[(0,$.bF)(d,{modelValue:e.serverTokens,"onUpdate:modelValue":t[3]||(t[3]=t=>e.serverTokens=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("common.enable")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",Vp,[Rp,(0,$.Lk)("div",Fp,[(0,$.Lk)("div",Dp,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.limitReqChanged?" is-changed":""))},[(0,$.Lk)("div",Ap,[(0,$.bF)(d,{modelValue:e.limitReq,"onUpdate:modelValue":t[4]||(t[4]=t=>e.limitReq=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("common.enable")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",Op,[zp,(0,$.Lk)("div",jp,[(0,$.Lk)("div",Hp,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.securityTxt?" is-changed":""))},[(0,$.Lk)("div",Wp,[(0,$.bF)(d,{modelValue:e.securityTxt,"onUpdate:modelValue":t[5]||(t[5]=t=>e.securityTxt=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("common.enable")),1)])),_:1},8,["modelValue"])])],2)])])]),e.$props.data.securityTxt.computed?((0,$.uX)(),(0,$.CE)("div",Xp,[Ip,(0,$.Lk)("div",Mp,[(0,$.Lk)("div",Up,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.securityTxtChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[6]||(t[6]=t=>e.securityTxtPath=t),class:"input",type:"text",placeholder:e.$props.data.securityTxtPath.default},null,8,Bp),[[a.Jo,e.securityTxtPath]])],2)])])])):(0,$.Q3)("",!0)])}const Qp={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: ws: wss: data: blob: 'unsafe-inline'; frame-ancestors 'self';",enabled:!0},permissionsPolicy:{default:"interest-cohort=()",enabled:!0},serverTokens:{default:!1,enabled:!0},limitReq:{default:!1,enabled:!0},securityTxt:{default:!1,enabled:!0},securityTxtPath:{default:"~/security.txt",enabled:!0}},Gp={name:"GlobalSecurity",display:"templates.globalSections.security.security",key:"security",delegated:ce(Qp),components:{PrettyCheck:mt,VueSelect:M.A},props:{data:Object},computed:{...ue(Qp,"security"),hasWordPress(){return this.$parent.$parent.$data.domains.some((e=>e&&e.php.wordPressRules.computed))},hasWordPressUnsafeEval(){return null!==this.$props.data.contentSecurityPolicy.computed.match(/(default|script)-src[^;]+'self'[^;]+'unsafe-inline'[^;]+'unsafe-eval'[^;]*;/)},hasWarnings(){return this.hasWordPress&&!this.hasWordPressUnsafeEval}},watch:{"$props.data.referrerPolicy":{handler(e){e.enabled&&(e.options.includes(e.computed)||(e.computed=e.default))},deep:!0}}},Jp=(0,ge.A)(Gp,[["render",Np]]),Kp=Jp,qp={key:0,class:"field is-horizontal is-aligned-top"},Yp={class:"field-label"},Zp={class:"label"},ec={class:"field-body"},tc={class:"field"},oc={class:"control"},ac={class:"text"},sc={key:1,class:"field is-horizontal"},lc={class:"field-label"},ic={class:"label"},nc={class:"field-body"},dc={class:"field"},rc=["placeholder"];function pc(e,t,o,s,l,i){return(0,$.uX)(),(0,$.CE)("div",null,[e.pythonServerEnabled?((0,$.uX)(),(0,$.CE)("div",sc,[(0,$.Lk)("div",lc,[(0,$.Lk)("label",ic,(0,L.v_)(e.$t("templates.globalSections.python.pythonServer")),1)]),(0,$.Lk)("div",nc,[(0,$.Lk)("div",dc,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.pythonServerChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.pythonServer=t),class:"input",type:"text",placeholder:e.$props.data.pythonServer.default},null,8,rc),[[a.Jo,e.pythonServer]])],2)])])])):((0,$.uX)(),(0,$.CE)("div",qp,[(0,$.Lk)("div",Yp,[(0,$.Lk)("label",Zp,(0,L.v_)(e.$t("templates.globalSections.python.pythonServer")),1)]),(0,$.Lk)("div",ec,[(0,$.Lk)("div",tc,[(0,$.Lk)("div",oc,[(0,$.Lk)("label",ac,(0,L.v_)(e.$t("templates.globalSections.python.pythonMustBeEnabledOnOneSite")),1)])])])]))])}const cc={pythonServer:{default:"/tmp/uwsgi.sock",enabled:!1}},uc={name:"GlobalPython",display:"common.python",key:"python",delegated:ce(cc),props:{data:Object},computed:ue(cc,"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}}},hc=(0,ge.A)(uc,[["render",pc]]),mc=hc,gc={key:0,class:"field is-horizontal is-aligned-top"},fc={class:"field-label"},vc={class:"label"},bc={class:"field-body"},kc={class:"field"},yc={class:"control"},$c={class:"text"},Lc={class:"field is-horizontal"},Cc=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"proxy_connect_timeout")],-1),xc={class:"field-body"},Sc={class:"field has-addons"},_c=["placeholder"],Ec={class:"control"},wc={class:"button is-static"},Pc={class:"field is-horizontal"},Tc=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"proxy_send_timeout")],-1),Vc={class:"field-body"},Rc={class:"field has-addons"},Fc=["placeholder"],Dc={class:"control"},Ac={class:"button is-static"},Oc={class:"field is-horizontal"},zc=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"proxy_read_timeout")],-1),jc={class:"field-body"},Hc={class:"field has-addons"},Wc=["placeholder"],Xc={class:"control"},Ic={class:"button is-static"},Mc={class:"field is-horizontal"},Uc=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"Coexistence with X-Forwarded-*")],-1),Bc={class:"field-body"},Nc={class:"field"},Qc={class:"field"},Gc={class:"radio"};function Jc(e,t,o,s,l,i){const n=(0,$.g2)("PrettyRadio");return(0,$.uX)(),(0,$.CE)("div",null,[l.reverseProxyEnabled?((0,$.uX)(),(0,$.CE)($.FK,{key:1},[(0,$.Lk)("div",Lc,[Cc,(0,$.Lk)("div",xc,[(0,$.Lk)("div",Sc,[(0,$.Lk)("div",{class:(0,L.C4)("control is-expanded"+(e.proxyConnectTimeoutChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.proxyConnectTimeout=t),class:"input",type:"number",min:"0",step:"1",placeholder:e.$props.data.proxyConnectTimeout.default},null,8,_c),[[a.Jo,e.proxyConnectTimeout,void 0,{number:!0}]])],2),(0,$.Lk)("div",Ec,[(0,$.Lk)("a",wc,(0,L.v_)(e.$t("templates.globalSections.reverseProxy.seconds")),1)])])])]),(0,$.Lk)("div",Pc,[Tc,(0,$.Lk)("div",Vc,[(0,$.Lk)("div",Rc,[(0,$.Lk)("div",{class:(0,L.C4)("control is-expanded"+(e.proxySendTimeoutChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=t=>e.proxySendTimeout=t),class:"input",type:"number",min:"0",step:"1",placeholder:e.$props.data.proxySendTimeout.default},null,8,Fc),[[a.Jo,e.proxySendTimeout,void 0,{number:!0}]])],2),(0,$.Lk)("div",Dc,[(0,$.Lk)("a",Ac,(0,L.v_)(e.$t("templates.globalSections.reverseProxy.seconds")),1)])])])]),(0,$.Lk)("div",Oc,[zc,(0,$.Lk)("div",jc,[(0,$.Lk)("div",Hc,[(0,$.Lk)("div",{class:(0,L.C4)("control is-expanded"+(e.proxyReadTimeoutChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.proxyReadTimeout=t),class:"input",type:"number",min:"0",step:"1",placeholder:e.$props.data.proxyReadTimeout.default},null,8,Wc),[[a.Jo,e.proxyReadTimeout,void 0,{number:!0}]])],2),(0,$.Lk)("div",Xc,[(0,$.Lk)("a",Ic,(0,L.v_)(e.$t("templates.globalSections.reverseProxy.seconds")),1)])])])]),(0,$.Lk)("div",Mc,[Uc,(0,$.Lk)("div",Bc,[(0,$.Lk)("div",Nc,[(0,$.Lk)("div",Qc,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.proxyCoexistenceXForwarded.options,((o,a)=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.proxyCoexistenceXForwardedChanged&&a===e.proxyCoexistenceXForwarded?" is-changed":""))},[(0,$.Lk)("div",Gc,[(0,$.bF)(n,{modelValue:e.proxyCoexistenceXForwarded,"onUpdate:modelValue":t[3]||(t[3]=t=>e.proxyCoexistenceXForwarded=t),value:a,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t(o)),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])])])])],64)):((0,$.uX)(),(0,$.CE)("div",gc,[(0,$.Lk)("div",fc,[(0,$.Lk)("label",vc,(0,L.v_)(e.$t("common.reverseProxy")),1)]),(0,$.Lk)("div",bc,[(0,$.Lk)("div",kc,[(0,$.Lk)("div",yc,[(0,$.Lk)("label",$c,(0,L.v_)(e.$t("templates.globalSections.reverseProxy.reverseProxyMustBeEnabledOnOneSite")),1)])])])]))])}const Kc={proxyConnectTimeout:{default:60,computed:"60s",enabled:!1},proxySendTimeout:{default:60,computed:"60s",enabled:!1},proxyReadTimeout:{default:60,computed:"60s",enabled:!1},proxyCoexistenceXForwarded:{default:"passOn",options:{passOn:"templates.globalSections.reverseProxy.passOn",remove:"templates.globalSections.reverseProxy.remove"},enabled:!1}},qc=e=>{let t=parseFloat(e.computed);isNaN(t)&&(t=e.default),e.computed=`${t}s`},Yc={name:"GlobalReverseProxy",display:"common.reverseProxy",key:"reverseProxy",delegated:ce(Kc),components:{PrettyRadio:To},props:{data:Object},data(){return{reverseProxyEnabled:!1}},computed:ue(Kc,"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,this.$props.data.proxyReadTimeout.computed=this.$props.data.proxyReadTimeout.value,this.$props.data.proxyCoexistenceXForwarded.enabled=!0,void(this.$props.data.proxyCoexistenceXForwarded.computed=this.$props.data.proxyCoexistenceXForwarded.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="",this.$props.data.proxyCoexistenceXForwarded.enabled=!1,this.$props.data.proxyCoexistenceXForwarded.computed=""},deep:!0},"$props.data.proxyConnectTimeout":{handler:qc,deep:!0},"$props.data.proxySendTimeout":{handler:qc,deep:!0},"$props.data.proxyReadTimeout":{handler:qc,deep:!0}}},Zc=(0,ge.A)(Yc,[["render",Jc]]),eu=Zc,tu={class:"field is-horizontal"},ou={class:"field-label"},au={class:"label"},su={class:"field-body"},lu={class:"field"},iu={class:"checkbox"},nu={class:"field is-horizontal"},du={class:"field-label"},ru={class:"label"},pu={class:"field-body"},cu={class:"field"},uu={class:"checkbox"},hu={class:"field is-horizontal is-aligned-top"},mu={class:"field-label has-small-margin-top"},gu={class:"label"},fu={class:"field-body"},vu={class:"field"},bu={class:"checkbox"},ku={key:0,class:"control"},yu={class:"text message is-warning"},$u={class:"message-body"},Lu={class:"field is-horizontal"},Cu={class:"field-label"},xu={class:"label"},Su={class:"field-body"},_u={class:"field"},Eu=["placeholder"],wu={class:"field is-horizontal"},Pu={class:"field-label"},Tu={class:"label"},Vu={class:"field-body"},Ru={class:"field"},Fu=["placeholder"],Du={class:"field is-horizontal"},Au={class:"field-label"},Ou={class:"label"},zu={class:"field-body"},ju={class:"field"},Hu=["placeholder"],Wu={class:"field is-horizontal"},Xu={class:"field-label"},Iu={class:"label"},Mu={class:"field-body"},Uu={class:"field"},Bu=["placeholder"];function Nu(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck"),d=(0,$.g2)("ExternalLink");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",tu,[(0,$.Lk)("div",ou,[(0,$.Lk)("label",au,(0,L.v_)(e.$t("templates.globalSections.performance.disableHtmlCaching")),1)]),(0,$.Lk)("div",su,[(0,$.Lk)("div",lu,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.disableHtmlCachingChanged?" is-changed":""))},[(0,$.Lk)("div",iu,[(0,$.bF)(n,{modelValue:e.disableHtmlCaching,"onUpdate:modelValue":t[0]||(t[0]=t=>e.disableHtmlCaching=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.performance.enableDisableHtmlCaching")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",nu,[(0,$.Lk)("div",du,[(0,$.Lk)("label",ru,(0,L.v_)(e.$t("templates.globalSections.performance.gzipCompression")),1)]),(0,$.Lk)("div",pu,[(0,$.Lk)("div",cu,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.gzipCompressionChanged?" is-changed":""))},[(0,$.Lk)("div",uu,[(0,$.bF)(n,{modelValue:e.gzipCompression,"onUpdate:modelValue":t[1]||(t[1]=t=>e.gzipCompression=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.performance.enableGzipCompression")),1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",hu,[(0,$.Lk)("div",mu,[(0,$.Lk)("label",gu,(0,L.v_)(e.$t("templates.globalSections.performance.brotliCompression")),1)]),(0,$.Lk)("div",fu,[(0,$.Lk)("div",vu,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.brotliCompressionChanged?" is-changed":""))},[(0,$.Lk)("div",bu,[(0,$.bF)(n,{modelValue:e.brotliCompression,"onUpdate:modelValue":t[2]||(t[2]=t=>e.brotliCompression=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.performance.enableBrotliCompression")),1)])),_:1},8,["modelValue"])])],2),i.showBrotliWarning?((0,$.uX)(),(0,$.CE)("div",ku,[(0,$.Lk)("label",yu,[(0,$.Lk)("span",$u,[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.performance.brotliIsANonStandardModule"))+" ",1),(0,$.bF)(d,{text:e.$t("templates.globalSections.performance.brotliGoogleNgxBrotliProject"),link:"https://github.com/google/ngx_brotli"},null,8,["text"]),(0,$.eW)(" "+(0,L.v_)(e.$t("templates.globalSections.performance.brotliForBuildingNginxWithBrotli")),1)])])])):(0,$.Q3)("",!0)])])]),(0,$.Lk)("div",Lu,[(0,$.Lk)("div",Cu,[(0,$.Lk)("label",xu,(0,L.v_)(e.$t("templates.globalSections.performance.expirationForAssets")),1)]),(0,$.Lk)("div",Su,[(0,$.Lk)("div",_u,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.assetsExpirationChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[3]||(t[3]=t=>e.assetsExpiration=t),class:"input",type:"text",placeholder:e.$props.data.assetsExpiration.default},null,8,Eu),[[a.Jo,e.assetsExpiration]])],2)])])]),(0,$.Lk)("div",wu,[(0,$.Lk)("div",Pu,[(0,$.Lk)("label",Tu,(0,L.v_)(e.$t("templates.globalSections.performance.expirationForMedia")),1)]),(0,$.Lk)("div",Vu,[(0,$.Lk)("div",Ru,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.mediaExpirationChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=t=>e.mediaExpiration=t),class:"input",type:"text",placeholder:e.$props.data.mediaExpiration.default},null,8,Fu),[[a.Jo,e.mediaExpiration]])],2)])])]),(0,$.Lk)("div",Du,[(0,$.Lk)("div",Au,[(0,$.Lk)("label",Ou,(0,L.v_)(e.$t("templates.globalSections.performance.expirationForSvgs")),1)]),(0,$.Lk)("div",zu,[(0,$.Lk)("div",ju,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.svgExpirationChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[5]||(t[5]=t=>e.svgExpiration=t),class:"input",type:"text",placeholder:e.$props.data.svgExpiration.default},null,8,Hu),[[a.Jo,e.svgExpiration]])],2)])])]),(0,$.Lk)("div",Wu,[(0,$.Lk)("div",Xu,[(0,$.Lk)("label",Iu,(0,L.v_)(e.$t("templates.globalSections.performance.expirationForFonts")),1)]),(0,$.Lk)("div",Mu,[(0,$.Lk)("div",Uu,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.fontsExpirationChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[6]||(t[6]=t=>e.fontsExpiration=t),class:"input",type:"text",placeholder:e.$props.data.fontsExpiration.default},null,8,Bu),[[a.Jo,e.fontsExpiration]])],2)])])])])}const Qu={disableHtmlCaching:{default:!1,enabled:!0},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}},Gu={name:"GlobalPerformance",display:"templates.globalSections.performance.performance",key:"performance",delegated:ce(Qu),components:{PrettyCheck:mt,ExternalLink:So.A},props:{data:Object},computed:{...ue(Qu,"performance"),showBrotliWarning(){return this.$props.data.brotliCompression.computed},hasWarnings(){return this.showBrotliWarning}}},Ju=(0,ge.A)(Gu,[["render",Nu]]),Ku=Ju,qu={class:"field is-horizontal is-aligned-top"},Yu=(0,$.Lk)("div",{class:"field-label has-small-margin-top"},[(0,$.Lk)("label",{class:"label"},"error_log")],-1),Zu={class:"field-body"},eh={class:"field"},th={class:"checkbox"},oh=["placeholder"],ah={key:0,class:"field is-horizontal"},sh={class:"field-label"},lh={class:"label"},ih={class:"field-body"},nh={class:"field is-horizontal"},dh={class:"radio"},rh={class:"field is-horizontal is-aligned-top"},ph=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"log_not_found")],-1),ch={class:"field-body"},uh={class:"field"},hh={class:"checkbox"},mh={class:"field is-horizontal is-aligned-top"},gh={class:"field-label"},fh={class:"label"},vh={class:"field-body"},bh={class:"field"},kh={class:"checkbox"},yh={class:"checkbox"},$h={class:"checkbox"},Lh={class:"checkbox"},Ch={class:"checkbox"},xh={class:"checkbox"},Sh={class:"checkbox"},_h={class:"checkbox"},Eh={class:"checkbox"};function wh(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck"),d=(0,$.g2)("PrettyRadio");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",qu,[Yu,(0,$.Lk)("div",Zu,[(0,$.Lk)("div",eh,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.errorLogEnabledChanged?" is-changed":""))},[(0,$.Lk)("div",th,[(0,$.bF)(n,{modelValue:e.errorLogEnabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.errorLogEnabled=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("common.enable")),1)])),_:1},8,["modelValue"])])],2),e.$props.data.errorLogEnabled.computed?((0,$.uX)(),(0,$.CE)("div",{key:0,class:(0,L.C4)("control field is-horizontal is-expanded"+(e.errorLogPathChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[1]||(t[1]=t=>e.errorLogPath=t),class:"input",type:"text",placeholder:e.$props.data.errorLogPath.default},null,8,oh),[[a.Jo,e.errorLogPath]])],2)):(0,$.Q3)("",!0)])])]),e.$props.data.errorLogEnabled.computed?((0,$.uX)(),(0,$.CE)("div",ah,[(0,$.Lk)("div",sh,[(0,$.Lk)("label",lh," error_log "+(0,L.v_)(e.$t("templates.globalSections.logging.level")),1)]),(0,$.Lk)("div",ih,[(0,$.Lk)("div",nh,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$props.data.errorLogLevel.options,(o=>((0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)("control"+(e.errorLogLevelChanged&&o===e.errorLogLevel?" is-changed":""))},[(0,$.Lk)("div",dh,[(0,$.bF)(d,{modelValue:e.errorLogLevel,"onUpdate:modelValue":t[2]||(t[2]=t=>e.errorLogLevel=t),value:o,class:"p-default p-round p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(o),1)])),_:2},1032,["modelValue","value"])])],2)))),256))])])])):(0,$.Q3)("",!0),(0,$.Lk)("div",rh,[ph,(0,$.Lk)("div",ch,[(0,$.Lk)("div",uh,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.logNotFoundChanged?" is-changed":""))},[(0,$.Lk)("div",hh,[(0,$.bF)(n,{modelValue:e.logNotFound,"onUpdate:modelValue":t[3]||(t[3]=t=>e.logNotFound=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.enableFileNotFoundErrorLogging"))+" error_log ",1)])),_:1},8,["modelValue"])])],2)])])]),(0,$.Lk)("div",mh,[(0,$.Lk)("div",gh,[(0,$.Lk)("label",fh,(0,L.v_)(e.$t("templates.globalSections.logging.logformat")),1)]),(0,$.Lk)("div",vh,[(0,$.Lk)("div",bh,[e.cloudflareEnabled?((0,$.uX)(),(0,$.CE)("div",{key:0,class:(0,L.C4)("control"+(e.cloudflareChanged?" is-changed":""))},[(0,$.Lk)("div",kh,[(0,$.bF)(n,{modelValue:e.cloudflare,"onUpdate:modelValue":t[4]||(t[4]=t=>e.cloudflare=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.enableCloudflare")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.cfRayEnabled?((0,$.uX)(),(0,$.CE)("div",{key:1,class:(0,L.C4)("control"+(e.cfRayChanged?" is-changed":""))},[(0,$.Lk)("div",yh,[(0,$.bF)(n,{modelValue:e.cfRay,"onUpdate:modelValue":t[5]||(t[5]=t=>e.cfRay=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.cfRay")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.cfConnectingIpEnabled?((0,$.uX)(),(0,$.CE)("div",{key:2,class:(0,L.C4)("control"+(e.cfConnectingIpChanged?" is-changed":""))},[(0,$.Lk)("div",$h,[(0,$.bF)(n,{modelValue:e.cfConnectingIp,"onUpdate:modelValue":t[6]||(t[6]=t=>e.cfConnectingIp=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.cfConnectingIp")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.xForwardedForEnabled?((0,$.uX)(),(0,$.CE)("div",{key:3,class:(0,L.C4)("control"+(e.xForwardedForChanged?" is-changed":""))},[(0,$.Lk)("div",Lh,[(0,$.bF)(n,{modelValue:e.xForwardedFor,"onUpdate:modelValue":t[7]||(t[7]=t=>e.xForwardedFor=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.xForwardedFor")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.xForwardedProtoEnabled?((0,$.uX)(),(0,$.CE)("div",{key:4,class:(0,L.C4)("control"+(e.xForwardedProtoChanged?" is-changed":""))},[(0,$.Lk)("div",Ch,[(0,$.bF)(n,{modelValue:e.xForwardedProto,"onUpdate:modelValue":t[8]||(t[8]=t=>e.xForwardedProto=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.xForwardedProto")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.trueClientIpEnabled?((0,$.uX)(),(0,$.CE)("div",{key:5,class:(0,L.C4)("control"+(e.trueClientIpChanged?" is-changed":""))},[(0,$.Lk)("div",xh,[(0,$.bF)(n,{modelValue:e.trueClientIp,"onUpdate:modelValue":t[9]||(t[9]=t=>e.trueClientIp=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.trueClientIp")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.cfIpCountryEnabled?((0,$.uX)(),(0,$.CE)("div",{key:6,class:(0,L.C4)("control"+(e.cfIpCountryChanged?" is-changed":""))},[(0,$.Lk)("div",Sh,[(0,$.bF)(n,{modelValue:e.cfIpCountry,"onUpdate:modelValue":t[10]||(t[10]=t=>e.cfIpCountry=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.cfIpCountry")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.cfVisitorEnabled?((0,$.uX)(),(0,$.CE)("div",{key:7,class:(0,L.C4)("control"+(e.cfVisitorChanged?" is-changed":""))},[(0,$.Lk)("div",_h,[(0,$.bF)(n,{modelValue:e.cfVisitor,"onUpdate:modelValue":t[11]||(t[11]=t=>e.cfVisitor=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.cfVisitor")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0),e.cdnLoopEnabled?((0,$.uX)(),(0,$.CE)("div",{key:8,class:(0,L.C4)("control"+(e.cdnLoopChanged?" is-changed":""))},[(0,$.Lk)("div",Eh,[(0,$.bF)(n,{modelValue:e.cdnLoop,"onUpdate:modelValue":t[12]||(t[12]=t=>e.cdnLoop=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.logging.cdnLoop")),1)])),_:1},8,["modelValue"])])],2)):(0,$.Q3)("",!0)])])])])}const Ph={errorLogEnabled:{default:!1,enabled:!0},errorLogPath:{default:gi,enabled:!0},errorLogLevel:{default:vi,options:bi,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}},Th={name:"GlobalLogging",display:"common.logging",key:"logging",delegated:ce(Ph),components:{PrettyCheck:mt,PrettyRadio:To},props:{data:Object},computed:ue(Ph,"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}}},Vh=(0,ge.A)(Th,[["render",wh]]),Rh=Vh,Fh={class:"field is-horizontal"},Dh={class:"field-label"},Ah={class:"label"},Oh={class:"field-body"},zh={class:"field"},jh=["placeholder"],Hh={class:"field is-horizontal"},Wh=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"worker_processes")],-1),Xh={class:"field-body"},Ih={class:"field"},Mh={class:"field is-horizontal"},Uh=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"user")],-1),Bh={class:"field-body"},Nh={class:"field"},Qh=["placeholder"],Gh={class:"field is-horizontal"},Jh=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"pid")],-1),Kh={class:"field-body"},qh={class:"field"},Yh=["placeholder"],Zh={class:"field is-horizontal"},em=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"client_max_body_size")],-1),tm={class:"field-body"},om={class:"field has-addons"},am=["placeholder"],sm={class:"control"},lm={class:"button is-static"},im={class:"field is-horizontal"},nm=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"types_hash_max_size")],-1),dm={class:"field-body"},rm={class:"field"},pm={class:"field is-horizontal"},cm=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"},"types_hash_bucket_size")],-1),um={class:"field-body"},hm={class:"field"};function mm(e,t,o,s,l,i){const n=(0,$.g2)("VueSelect");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",Fh,[(0,$.Lk)("div",Dh,[(0,$.Lk)("label",Ah,(0,L.v_)(e.$t("templates.globalSections.nginx.nginxConfigDirectory")),1)]),(0,$.Lk)("div",Oh,[(0,$.Lk)("div",zh,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.nginxConfigDirectoryChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.nginxConfigDirectory=t),class:"input",type:"text",placeholder:e.$props.data.nginxConfigDirectory.default},null,8,jh),[[a.Jo,e.nginxConfigDirectory]])],2)])])]),(0,$.Lk)("div",Hh,[Wh,(0,$.Lk)("div",Xh,[(0,$.Lk)("div",Ih,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.workerProcessesChanged?" is-changed":""))},[(0,$.bF)(n,{modelValue:e.workerProcesses,"onUpdate:modelValue":t[1]||(t[1]=t=>e.workerProcesses=t),options:e.$props.data.workerProcesses.options,clearable:!1},null,8,["modelValue","options"])],2)])])]),(0,$.Lk)("div",Mh,[Uh,(0,$.Lk)("div",Bh,[(0,$.Lk)("div",Nh,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.userChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=t=>e.user=t),class:"input",type:"text",placeholder:e.$props.data.user.default},null,8,Qh),[[a.Jo,e.user]])],2)])])]),(0,$.Lk)("div",Gh,[Jh,(0,$.Lk)("div",Kh,[(0,$.Lk)("div",qh,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.pidChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[3]||(t[3]=t=>e.pid=t),class:"input",type:"text",placeholder:e.$props.data.pid.default},null,8,Yh),[[a.Jo,e.pid]])],2)])])]),(0,$.Lk)("div",Zh,[em,(0,$.Lk)("div",tm,[(0,$.Lk)("div",om,[(0,$.Lk)("div",{class:(0,L.C4)("control is-expanded"+(e.clientMaxBodySizeChanged?" is-changed":""))},[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[4]||(t[4]=t=>e.clientMaxBodySize=t),class:"input",type:"number",min:"0",step:"1",placeholder:e.$props.data.clientMaxBodySize.default},null,8,am),[[a.Jo,e.clientMaxBodySize,void 0,{number:!0}]])],2),(0,$.Lk)("div",sm,[(0,$.Lk)("a",lm,(0,L.v_)(e.$t("templates.globalSections.nginx.mb")),1)])])])]),(0,$.Lk)("div",im,[nm,(0,$.Lk)("div",dm,[(0,$.Lk)("div",rm,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.typesHashMaxSizeChanged?" is-changed":""))},[(0,$.bF)(n,{modelValue:e.typesHashMaxSize,"onUpdate:modelValue":t[5]||(t[5]=t=>e.typesHashMaxSize=t),options:e.$props.data.typesHashMaxSize.options,clearable:!1},null,8,["modelValue","options"])],2)])])]),(0,$.Lk)("div",pm,[cm,(0,$.Lk)("div",um,[(0,$.Lk)("div",hm,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.typesHashBucketSizeChanged?" is-changed":""))},[(0,$.bF)(n,{modelValue:e.typesHashBucketSize,"onUpdate:modelValue":t[6]||(t[6]=t=>e.typesHashBucketSize=t),options:e.$props.data.typesHashBucketSize.options,clearable:!1},null,8,["modelValue","options"])],2)])])])])}const gm={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}},fm={name:"GlobalNGINX",display:"common.nginx",key:"nginx",delegated:ce(gm),components:{VueSelect:M.A},props:{data:Object},computed:ue(gm,"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}}},vm=(0,ge.A)(fm,[["render",mm]]),bm=vm,km={class:"field is-horizontal"},ym={class:"field-label"},$m={class:"label"},Lm={class:"field-body"},Cm={class:"field is-horizontal is-aligned-top"},xm=(0,$.Lk)("br",null,null,-1),Sm=["innerHTML"],_m={class:"field is-horizontal"},Em={class:"field-label"},wm={class:"label"},Pm={class:"field-body"},Tm={class:"field"},Vm={class:"checkbox"},Rm={key:0,class:"field is-horizontal"},Fm={class:"field-label"},Dm={class:"label"},Am={class:"field-body"},Om={class:"field"},zm={class:"checkbox"};function jm(e,t,o,a,s,l){const i=(0,$.g2)("PrettyCheck");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",km,[(0,$.Lk)("div",ym,[(0,$.Lk)("label",$m,(0,L.v_)(e.$t("templates.globalSections.docker.docker")),1)]),(0,$.Lk)("div",Lm,[(0,$.Lk)("div",Cm,[(0,$.Lk)("a",{class:"button is-primary is-tiny",onClick:t[0]||(t[0]=(...e)=>l.applyDockerTweaks&&l.applyDockerTweaks(...e))},(0,L.v_)(e.$t("templates.globalSections.docker.applyDockerTweaks")),1),(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.docker.applyDockerTweaksForNginx"))+" ",1),xm,(0,$.Lk)("small",{innerHTML:e.$t("templates.globalSections.docker.applyDockerTweaksExplainer")},null,8,Sm)])])])]),(0,$.Lk)("div",_m,[(0,$.Lk)("div",Em,[(0,$.Lk)("label",wm,(0,L.v_)(e.$t("templates.globalSections.docker.dockerfile")),1)]),(0,$.Lk)("div",Pm,[(0,$.Lk)("div",Tm,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.dockerfileChanged?" is-changed":""))},[(0,$.Lk)("div",Vm,[(0,$.bF)(i,{modelValue:e.dockerfile,"onUpdate:modelValue":t[1]||(t[1]=t=>e.dockerfile=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.docker.includeDockerfile")),1)])),_:1},8,["modelValue"])])],2)])])]),e.dockerfile?((0,$.uX)(),(0,$.CE)("div",Rm,[(0,$.Lk)("div",Fm,[(0,$.Lk)("label",Dm,(0,L.v_)(e.$t("templates.globalSections.docker.dockerCompose")),1)]),(0,$.Lk)("div",Am,[(0,$.Lk)("div",Om,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.dockerComposeChanged?" is-changed":""))},[(0,$.Lk)("div",zm,[(0,$.bF)(i,{modelValue:e.dockerCompose,"onUpdate:modelValue":t[2]||(t[2]=t=>e.dockerCompose=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.docker.includeDockerCompose")),1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0)])}const Hm={dockerfile:{default:!1,enabled:!0},dockerCompose:{default:!1,enabled:!1}},Wm={name:"GlobalDocker",display:"templates.globalSections.docker.docker",key:"docker",delegated:ce(Hm),components:{PrettyCheck:mt},props:{data:Object},computed:ue(Hm,"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(){ae("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)}}},Xm=(0,ge.A)(Wm,[["render",jm]]),Im=Xm,Mm={class:"field is-horizontal"},Um={class:"field-label"},Bm={class:"label"},Nm={class:"field-body"},Qm={class:"field"},Gm={class:"checkbox"},Jm={key:0,class:"field is-horizontal"},Km=(0,$.Lk)("div",{class:"field-label"},[(0,$.Lk)("label",{class:"label"})],-1),qm={class:"field-body"},Ym={class:"field"},Zm={class:"checkbox"},eg={class:"field is-horizontal"},tg={class:"field-label"},og={class:"label"},ag={class:"field-body"},sg={class:"field"},lg={class:"control"},ig={class:"field is-horizontal"},ng={class:"field-label"},dg={class:"label"},rg={class:"field-body"},pg={class:"field is-grouped"},cg={class:"control"},ug={key:0,class:"control"},hg={key:1,class:"control"},mg={class:"field is-horizontal"},gg=(0,$.Lk)("div",{class:"field-label"},null,-1),fg={class:"field-body is-vertical"},vg={class:"field is-horizontal"},bg={class:"field-label"},kg={class:"label"},yg={class:"field-body"},$g={class:"field is-grouped"},Lg={class:"control"},Cg=["onClick"],xg={class:"control"},Sg=["onClick"];function _g(e,t,o,s,l,i){const n=(0,$.g2)("PrettyCheck"),d=(0,$.g2)("Modal");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("div",Mm,[(0,$.Lk)("div",Um,[(0,$.Lk)("label",Bm,(0,L.v_)(e.$t("templates.globalSections.tools.modularizedStructure")),1)]),(0,$.Lk)("div",Nm,[(0,$.Lk)("div",Qm,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.modularizedStructureChanged?" is-changed":""))},[(0,$.Lk)("div",Gm,[(0,$.bF)(n,{modelValue:e.modularizedStructure,"onUpdate:modelValue":t[0]||(t[0]=t=>e.modularizedStructure=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.tools.enableModularizedConfigFiles")),1)])),_:1},8,["modelValue"])])],2)])])]),e.symlinkVhostEnabled?((0,$.uX)(),(0,$.CE)("div",Jm,[Km,(0,$.Lk)("div",qm,[(0,$.Lk)("div",Ym,[(0,$.Lk)("div",{class:(0,L.C4)("control"+(e.symlinkVhostChanged?" is-changed":""))},[(0,$.Lk)("div",Zm,[(0,$.bF)(n,{modelValue:e.symlinkVhost,"onUpdate:modelValue":t[1]||(t[1]=t=>e.symlinkVhost=t),class:"p-default p-curve p-fill p-icon"},{default:(0,$.k6)((()=>[(0,$.eW)((0,L.v_)(e.$t("templates.globalSections.tools.enableSymLinksFrom"))+" sites-available/ "+(0,L.v_)(e.$t("templates.globalSections.tools.to"))+" sites-enabled/ ",1)])),_:1},8,["modelValue"])])],2)])])])):(0,$.Q3)("",!0),(0,$.Lk)("div",eg,[(0,$.Lk)("div",tg,[(0,$.Lk)("label",og,(0,L.v_)(e.$t("templates.globalSections.tools.shareConfiguration")),1)]),(0,$.Lk)("div",ag,[(0,$.Lk)("div",sg,[(0,$.Lk)("div",lg,[(0,$.bo)((0,$.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=e=>i.shareLink=e),class:"input",type:"text",readonly:"readonly",onClick:t[3]||(t[3]=(...e)=>i.select&&i.select(...e))},null,512),[[a.Jo,i.shareLink]])])])])]),(0,$.Lk)("div",ig,[(0,$.Lk)("div",ng,[(0,$.Lk)("label",dg,(0,L.v_)(e.$t("templates.globalSections.tools.resetConfiguration")),1)]),(0,$.Lk)("div",rg,[(0,$.Lk)("div",pg,[(0,$.Lk)("div",cg,[(0,$.Lk)("a",{class:"button is-danger is-outline is-mini",onClick:t[4]||(t[4]=(...e)=>i.resetGlobal&&i.resetGlobal(...e))},(0,L.v_)(e.$t("templates.globalSections.tools.resetGlobalConfig")),1)]),i.hasDomain?((0,$.uX)(),(0,$.CE)("div",ug,[(0,$.Lk)("a",{class:"button is-danger is-outline is-mini",onClick:t[5]||(t[5]=(...e)=>i.resetDomains&&i.resetDomains(...e))},(0,L.v_)(e.$t("templates.globalSections.tools.resetAllDomains")),1)])):(0,$.Q3)("",!0),i.hasDomain?((0,$.uX)(),(0,$.CE)("div",hg,[(0,$.Lk)("a",{class:"button is-danger is-outline is-mini",onClick:t[6]||(t[6]=(...e)=>i.removeDomains&&i.removeDomains(...e))},(0,L.v_)(e.$t("templates.globalSections.tools.removeAllDomains")),1)])):(0,$.Q3)("",!0)])])]),(0,$.Lk)("div",mg,[gg,(0,$.Lk)("div",fg,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(e.$parent.$parent.activeDomains,(t=>((0,$.uX)(),(0,$.CE)("div",vg,[(0,$.Lk)("div",bg,[(0,$.Lk)("label",kg,(0,L.v_)(t[0].server.domain.computed),1)]),(0,$.Lk)("div",yg,[(0,$.Lk)("div",$g,[(0,$.Lk)("div",Lg,[(0,$.Lk)("a",{class:"button is-danger is-outline is-mini",onClick:e=>i.resetDomain(t[1])},(0,L.v_)(e.$t("templates.globalSections.tools.resetDomainConfig")),9,Cg)]),(0,$.Lk)("div",xg,[(0,$.Lk)("a",{class:"button is-danger is-outline is-mini",onClick:e=>i.removeDomain(t[1])},(0,L.v_)(e.$t("templates.globalSections.tools.removeDomain")),9,Sg)])])])])))),256))])]),(0,$.bF)(d,{ref:"confirmModal",title:l.confirmTitle},{default:(0,$.k6)((()=>[(0,$.Lk)("p",null,(0,L.v_)(l.confirmBody),1),(0,$.Lk)("a",{class:"button is-danger is-outline",onClick:t[7]||(t[7]=(...e)=>i.doConfirmAction&&i.doConfirmAction(...e))},(0,L.v_)(e.$t("templates.globalSections.tools.yesImSure")),1),(0,$.Lk)("a",{class:"button is-outline",onClick:t[8]||(t[8]=t=>e.$refs.confirmModal.close())},(0,L.v_)(e.$t("templates.globalSections.tools.noCancel")),1)])),_:1},8,["title"])])}var Eg=o(9145);const wg={modularizedStructure:{default:!0,enabled:!0},symlinkVhost:{default:!0,enabled:!0}},Pg={name:"GlobalTools",display:"templates.globalSections.tools.tools",key:"tools",delegated:ce(wg),components:{PrettyCheck:mt,Modal:Eg.A},props:{data:Object},data(){return{confirmTitle:"",confirmBody:"",confirmAction:()=>{}}},computed:{...ue(wg,"tools"),hasDomain(){return this.$parent.$parent.activeDomains.length>0},shareQuery(){return Jd(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,o){this.$data.confirmTitle=e,this.$data.confirmBody=t,this.$data.confirmAction=o,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(){ae({category:"Tools",action:"Global settings reset"})},resetDomainEvent(e){ae({category:"Tools",action:"Site reset",label:e})},removeDomainEvent(e){ae({category:"Tools",action:"Removed site",label:e}),this.$parent.$parent.removeSiteEvent(this.$parent.$parent.activeDomains.length-1,e)},resetDomainsEvent(e,t){ae({category:"Tools",action:"All sites reset",label:e.join(", "),value:t})},removeDomainsEvent(e,t){ae({category:"Tools",action:"All sites removed",label:e.join(", "),value:t});for(let o=0;o<this.$parent.$parent.$data.domains.length;o++)this.$parent.$parent.removeSiteEvent(this.$parent.$parent.activeDomains.length-o-1,e[o])},select(e){e.target.setSelectionRange(0,e.target.value.length)}}},Tg=(0,ge.A)(Pg,[["render",_g]]),Vg=Tg,Rg=[rp,Kp,mc,eu,Ku,Rh,bm,Im,Vg],Fg=Rg.reduce(((e,t)=>(e[t.key]=t.delegated,e)),{}),Dg={name:"Global",delegated:Fg,props:{data:Object},data(){return{active:Rg[0].key,tabs:Rg}},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=>N(this.$props.data[e][t],e,t))).length},changes(e){const t=this.changesCount(e);return t?` (${t.toLocaleString()})`:""},warnings(e){return Object.prototype.hasOwnProperty.call(this.$refs,e)&&this.$refs[e][0].hasWarnings||!1},setValue(e,t,o){Object.assign(this.$props.data[e][t],{value:o,computed:o})},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 o=this.$data.tabs.map((e=>e.key));return o.indexOf(e)<o.indexOf(this.$data.active)&&t.push("is-before"),t.join(" ")},showTab(e){ae({category:"Global",action:"Tab clicked",label:`${this.$data.active}, ${e}`}),this.$data.active=e},showPreviousTab(){ae({category:"Global",action:"Back clicked",label:`${this.$data.active}, ${this.previousTab}`}),this.$data.active=this.previousTab},showNextTab(){ae({category:"Global",action:"Next clicked",label:`${this.$data.active}, ${this.nextTab}`}),this.$data.active=this.nextTab}}},Ag=(0,ge.A)(Dg,[["render",sr]]),Og=Ag,zg={class:"callout"};function jg(e,t,o,a,s,l){const i=(0,$.g2)("ExternalLink");return(0,$.uX)(),(0,$.CE)("div",zg,[(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.callouts.droplet.lookingForAPlaceToDeploy"))+" ",1),(0,$.bF)(i,{text:e.$t("templates.callouts.droplet.tryOutDigitalOceansDroplet"),link:"https://marketplace.digitalocean.com/apps/lemp",onClick:l.linkClickEvent},null,8,["text","onClick"])])])}const Hg={name:"DropletCallout",components:{ExternalLink:So.A},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(){ae({category:"Droplet callout",action:"Visible",nonInteraction:!0})},linkClickEvent(){ae({category:"Droplet callout",action:"Clicked"})}}},Wg=(0,ge.A)(Hg,[["render",jg]]),Xg=Wg,Ig={class:"close"},Mg=(0,$.Lk)("i",{class:"fas fa-times"},null,-1),Ug=[Mg];function Bg(e,t,o,s,l,i){return(0,$.uX)(),(0,$.CE)("div",{class:"callout floating",style:(0,L.Tr)(i.style)},[(0,$.Lk)("div",Ig,[(0,$.Lk)("p",null,(0,L.v_)(e.$t("templates.callouts.contribute.wantToContributeChanges")),1),(0,$.Lk)("a",{onClick:t[0]||(t[0]=(0,a.D$)(((...e)=>i.close&&i.close(...e)),["prevent"]))},Ug)]),(0,$.Lk)("a",{href:"https://github.com/digitalocean/nginxconfig.io",class:"button is-primary",target:"_blank",onClick:t[1]||(t[1]=(...e)=>i.linkClickEvent&&i.linkClickEvent(...e))},(0,L.v_)(e.$t("templates.callouts.contribute.getInvolvedOnGitHub")),1)],4)}const Ng={name:"ContributeCallout",data(){return{scrolled:!1,closed:!1}},computed:{visible(){return this.$data.scrolled&&!this.$data.closed},style(){const e={opacity:0,pointerEvents:"none"};return this.visible?void 0:e}},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(){ae({category:"Contribute callout",action:"Closed"})},calloutVisibleEvent(){ae({category:"Contribute callout",action:"Visible",nonInteraction:!0})},linkClickEvent(){ae({category:"Contribute callout",action:"Clicked"})}}},Qg=(0,ge.A)(Ng,[["render",Bg]]),Gg=Qg,Jg={class:"setup"},Kg={class:"panel"},qg={class:"tabs"},Yg=["onClick"],Zg={class:"navigation-buttons"},ef=(0,$.Lk)("i",{class:"fas fa-long-arrow-alt-left"},null,-1),tf=(0,$.Lk)("i",{class:"fas fa-long-arrow-alt-right"},null,-1),of={class:"buttons is-centered"};function af(e,t,o,a,s,l){return(0,$.uX)(),(0,$.CE)("div",Jg,[(0,$.Lk)("div",Kg,[(0,$.Lk)("div",qg,[(0,$.Lk)("ul",null,[((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(s.tabs,(t=>((0,$.uX)(),(0,$.CE)("li",{class:(0,L.C4)(l.tabClass(t.key))},[(0,$.Lk)("a",{onClick:e=>l.showTab(t.key)},(0,L.v_)(e.$t(t.display)),9,Yg)],2)))),256))])]),((0,$.uX)(!0),(0,$.CE)($.FK,null,(0,$.pI)(s.tabs,(t=>((0,$.uX)(),(0,$.Wv)((0,$.$y)(t),{key:t.key,data:e.$props.data,style:(0,L.Tr)({display:s.active===t.key?void 0:"none"}),class:"container"},null,8,["data","style"])))),128)),(0,$.Lk)("div",Zg,[!1!==l.previousTab?((0,$.uX)(),(0,$.CE)("a",{key:0,class:"button is-mini",onClick:t[0]||(t[0]=(...e)=>l.showPreviousTab&&l.showPreviousTab(...e))},[ef,(0,$.Lk)("span",null,(0,L.v_)(e.$t("common.back")),1)])):(0,$.Q3)("",!0),!1!==l.nextTab?((0,$.uX)(),(0,$.CE)("a",{key:1,class:"button is-primary is-mini",onClick:t[1]||(t[1]=(...e)=>l.showNextTab&&l.showNextTab(...e))},[(0,$.Lk)("span",null,(0,L.v_)(e.$t("common.next")),1),tf])):(0,$.Q3)("",!0)])]),(0,$.Lk)("div",of,[(0,$.Lk)("a",{class:"button is-success",onClick:t[2]||(t[2]=(...e)=>l.downloadTar&&l.downloadTar(...e))},(0,L.v_)(e.$t("templates.setup.downloadConfig")),1),(0,$.Lk)("a",{ref:"copyTar",class:"button is-primary"},(0,L.v_)(e.$t("templates.setup.copyBase64")),513)])])}var sf=o(111);const lf=["innerHTML"],nf=(0,$.Lk)("br",null,null,-1),df=["innerHTML"],rf={class:"slim"},pf=["innerHTML"],cf=["innerHTML"],uf=(0,$.Lk)("br",null,null,-1),hf=["innerHTML"],mf=(0,$.Lk)("br",null,null,-1),gf=["innerHTML"],ff=(0,$.Lk)("br",null,null,-1);function vf(e,t,o,a,s,l){const i=(0,$.g2)("BashPrism");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("ol",null,[(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.Lk)("span",{innerHTML:e.$t("templates.setupSections.download.downloadTheGeneratedConfig")},null,8,lf),(0,$.Lk)("b",null,[(0,$.eW)("   "),(0,$.Lk)("a",{onClick:t[0]||(t[0]=(...t)=>e.$parent.downloadTar&&e.$parent.downloadTar(...t))},(0,L.v_)(e.$parent.tarName),1)]),nf,(0,$.Lk)("span",{innerHTML:e.$t("templates.setupSections.download.andUploadItToYourServers")},null,8,df),(0,$.Lk)("code",rf,(0,L.v_)(e.$props.data.global.nginx.nginxConfigDirectory.computed),1),(0,$.eW)(" "+(0,L.v_)(e.$t("templates.setupSections.download.directory")),1)]),(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.setupSections.download.or"))+" ",1),(0,$.Lk)("b",null,[(0,$.Lk)("a",{ref:"copyTar"},(0,L.v_)(e.$t("templates.setupSections.download.copyBase64StringOfCompressedConfig")),513)]),(0,$.Lk)("span",{innerHTML:e.$t("templates.setupSections.download.pasteItInYourServersCommandLineAndExecute")},null,8,pf)])]),(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.Lk)("span",{innerHTML:e.$t("templates.setupSections.download.navigateToYourNginxConfigurationDirectoryOnYourServer")},null,8,cf),uf,((0,$.uX)(),(0,$.Wv)(i,{key:e.$props.data.global.nginx.nginxConfigDirectory.computed,cmd:`cd ${e.$props.data.global.nginx.nginxConfigDirectory.computed}`,onCopied:t[1]||(t[1]=e=>l.codeCopiedEvent("Navigate to nginx config directory"))},null,8,["cmd"]))])]),(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.Lk)("span",{innerHTML:e.$t("templates.setupSections.download.createABackupOfYourCurrentNginxConfiguration")},null,8,hf),mf,(0,$.bF)(i,{cmd:"tar -czvf nginx_$(date +'%F_%H-%M-%S').tar.gz nginx.conf sites-available/ sites-enabled/ nginxconfig.io/",onCopied:t[2]||(t[2]=e=>l.codeCopiedEvent("Create nginx config backup tar"))})])]),(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.Lk)("span",{innerHTML:e.$t("templates.setupSections.download.extractTheNewCompressedConfigurationArchiveUsingTar")},null,8,gf),ff,((0,$.uX)(),(0,$.Wv)(i,{key:e.$parent.tarName,cmd:`tar -xzvf ${e.$parent.tarName} | xargs chmod 0644`,onCopied:t[3]||(t[3]=e=>l.codeCopiedEvent("Extract new nginx config tar"))},null,8,["cmd"]))])])])])}const bf={class:"language-bash"};function kf(e,t,o,a,s,l){return(0,$.uX)(),(0,$.CE)("div",{onCopied:t[0]||(t[0]=(...e)=>l.copied&&l.copied(...e))},[(0,$.Lk)("pre",null,[(0,$.Lk)("code",bf,(0,L.v_)(o.cmd),1)])],32)}const yf={name:"BashPrism",props:{cmd:String},mounted(){(0,n.pq)(`Highlighting ${this.$props.cmd}...`),window.Prism.highlightAllUnder(this.$el)},methods:{copied(e){this.$emit("copied",e.detail.text)}}},$f=(0,ge.A)(yf,[["render",kf]]),Lf=$f,Cf={name:"SetupDownload",display:"templates.setupSections.download.download",key:"download",components:{BashPrism:Lf},props:{data:Object},mounted(){this.$parent.setupCopy(this.$refs.copyTar)},methods:{codeCopiedEvent(e){ae({category:"Setup",action:"Code snippet copied",label:`download: ${e}`})}}},xf=(0,ge.A)(Cf,[["render",vf]]),Sf=xf,_f={key:0},Ef={key:0},wf=["innerHTML"],Pf=(0,$.Lk)("br",null,null,-1),Tf={key:1},Vf=["innerHTML"],Rf=(0,$.Lk)("br",null,null,-1),Ff={key:1,class:"field is-horizontal"},Df={class:"field-body"},Af={class:"field"},Of={class:"control"},zf={class:"text"};function jf(e,t,o,a,s,l){const i=(0,$.g2)("BashPrism");return(0,$.uX)(),(0,$.CE)("div",null,[l.diffieHellmanValue||l.letsEncryptActive?((0,$.uX)(),(0,$.CE)("ol",_f,[l.diffieHellmanValue?((0,$.uX)(),(0,$.CE)("li",Ef,[(0,$.Lk)("p",null,[(0,$.Lk)("span",{innerHTML:e.$t("templates.setupSections.ssl.generateDiffieHellmanKeysByRunningThisCommandOnYourServer")},null,8,wf),Pf,((0,$.uX)(),(0,$.Wv)(i,{key:`${e.$props.data.global.nginx.nginxConfigDirectory.computed}-${l.diffieHellmanValue}`,cmd:`openssl dhparam -out ${e.$props.data.global.nginx.nginxConfigDirectory.computed}/dhparam.pem ${l.diffieHellmanValue}`,onCopied:t[0]||(t[0]=e=>l.codeCopiedEvent("Generate diffie-hellman keys"))},null,8,["cmd"]))])])):(0,$.Q3)("",!0),l.letsEncryptActive?((0,$.uX)(),(0,$.CE)("li",Tf,[(0,$.Lk)("p",null,[(0,$.Lk)("span",{innerHTML:e.$t("templates.setupSections.ssl.createACommonAcmeChallengeDirectoryForLetsEncrypt")},null,8,Vf),Rf,((0,$.uX)(),(0,$.Wv)(i,{key:l.letsEncryptDir,cmd:`mkdir -p ${l.letsEncryptDir}`,onCopied:t[1]||(t[1]=e=>l.codeCopiedEvent("Create let's encrypt directory"))},null,8,["cmd"])),((0,$.uX)(),(0,$.Wv)(i,{key:`${l.nginxUser}-${l.letsEncryptDir}`,cmd:`chown ${l.nginxUser} ${l.letsEncryptDir}`,onCopied:t[2]||(t[2]=e=>l.codeCopiedEvent("Set let's encrypt directory ownership"))},null,8,["cmd"]))])])):(0,$.Q3)("",!0)])):((0,$.uX)(),(0,$.CE)("div",Ff,[(0,$.Lk)("div",Df,[(0,$.Lk)("div",Af,[(0,$.Lk)("div",Of,[(0,$.Lk)("label",zf,(0,L.v_)(e.$t("templates.setupSections.ssl.noAdditionalStepsAreNeededToSetUpSslForNginx")),1)])])])]))])}const Hf={name:"SetupSSL",display:"templates.setupSections.ssl.sslInit",key:"ssl",components:{BashPrism:Lf},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){ae({category:"Setup",action:"Code snippet copied",label:`ssl: ${e}`})}}},Wf=(0,ge.A)(Hf,[["render",jf]]),Xf=Wf,If={key:0},Mf=(0,$.Lk)("br",null,null,-1),Uf={class:"text message is-warning"},Bf=["innerHTML"],Nf=(0,$.Lk)("br",null,null,-1),Qf=(0,$.Lk)("br",null,null,-1),Gf=(0,$.Lk)("br",null,null,-1),Jf=(0,$.Lk)("br",null,null,-1),Kf=(0,$.Lk)("br",null,null,-1),qf={key:1,class:"field is-horizontal"},Yf={class:"field-body"},Zf={class:"field"},ev={class:"control"},tv={class:"text"};function ov(e,t,o,a,s,l){const i=(0,$.g2)("BashPrism");return(0,$.uX)(),(0,$.CE)("div",null,[l.letsEncryptActive?((0,$.uX)(),(0,$.CE)("ol",If,[(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.setupSections.certbot.commentOutSslDirectivesInConfiguration"))+" ",1),Mf]),((0,$.uX)(),(0,$.Wv)(i,{key:l.sitesAvailable,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' ${l.sitesAvailable}`,onCopied:t[0]||(t[0]=e=>l.codeCopiedEvent("Disable ssl directives"))},null,8,["cmd"])),(0,$.Lk)("div",Uf,[(0,$.Lk)("p",{class:"message-body",innerHTML:e.$t("templates.setupSections.certbot.sslOffDeprecationWarning")},null,8,Bf)])]),(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.setupSections.certbot.reloadYourNginxServer"))+" ",1),Nf]),(0,$.bF)(i,{cmd:"sudo nginx -t && sudo systemctl reload nginx",onCopied:t[1]||(t[1]=e=>l.codeCopiedEvent("Reload nginx"))})]),(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.setupSections.certbot.obtainSslCertificatesFromLetsEncrypt"))+" ",1),Qf]),((0,$.uX)(),(0,$.Wv)(i,{key:l.certbotCmds,cmd:l.certbotCmds,onCopied:t[2]||(t[2]=e=>l.codeCopiedEvent("Obtain certificates using certbot"))},null,8,["cmd"]))]),(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.setupSections.certbot.uncommentSslDirectivesInConfiguration"))+" ",1),Gf]),((0,$.uX)(),(0,$.Wv)(i,{key:l.sitesAvailable,cmd:`sed -i -r -z 's/#?; ?#//g; s/(server \\{)\\n ssl off;/\\1/g' ${l.sitesAvailable}`,onCopied:t[3]||(t[3]=e=>l.codeCopiedEvent("Enable ssl directives"))},null,8,["cmd"]))]),(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.setupSections.certbot.reloadYourNginxServer"))+" ",1),Jf]),(0,$.bF)(i,{cmd:"sudo nginx -t && sudo systemctl reload nginx",onCopied:t[4]||(t[4]=e=>l.codeCopiedEvent("Reload nginx (2)"))})]),(0,$.Lk)("li",null,[(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.setupSections.certbot.configureCertbotToReloadNginxOnCertificateRenewal"))+" ",1),Kf]),(0,$.bF)(i,{cmd:"echo -e '#!/bin/bash\\nnginx -t && systemctl reload nginx' | sudo tee /etc/letsencrypt/renewal-hooks/post/nginx-reload.sh",onCopied:t[5]||(t[5]=e=>l.codeCopiedEvent("Create nginx auto-restart on renewal"))}),(0,$.bF)(i,{cmd:"sudo chmod a+x /etc/letsencrypt/renewal-hooks/post/nginx-reload.sh",onCopied:t[6]||(t[6]=e=>l.codeCopiedEvent("Enable execution of auto-restart"))})])])):((0,$.uX)(),(0,$.CE)("div",qf,[(0,$.Lk)("div",Yf,[(0,$.Lk)("div",Zf,[(0,$.Lk)("div",ev,[(0,$.Lk)("label",tv,(0,L.v_)(e.$t("templates.setupSections.certbot.certbotDoesNotNeedToBeSetupForYourConfiguration")),1)])])])]))])}const av={name:"SetupCertbot",display:"templates.setupSections.certbot.certbot",key:"certbot",components:{BashPrism:Lf},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){ae({category:"Setup",action:"Code snippet copied",label:`certbot: ${e}`})}}},sv=(0,ge.A)(av,[["render",ov]]),lv=sv,iv=(0,$.Lk)("br",null,null,-1);function nv(e,t,o,a,s,l){const i=(0,$.g2)("BashPrism");return(0,$.uX)(),(0,$.CE)("div",null,[(0,$.Lk)("p",null,[(0,$.Lk)("b",null,(0,L.v_)(e.$t("templates.setupSections.goLive.letsGoLive")),1),(0,$.eW)(" 🎉 ")]),(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.setupSections.goLive.reloadNginxToLoadInYourNewConfiguration"))+" ",1),iv,(0,$.bF)(i,{cmd:"sudo nginx -t && sudo systemctl reload nginx",onCopied:t[0]||(t[0]=e=>l.codeCopiedEvent("Reload nginx"))})])])}const dv={name:"SetupGoLive",display:"templates.setupSections.goLive.goLive",key:"goLive",components:{BashPrism:Lf},props:{data:Object},methods:{codeCopiedEvent(e){ae({category:"Setup",action:"Code snippet copied",label:`goLive: ${e}`})}}},rv=(0,ge.A)(dv,[["render",nv]]),pv=rv,cv=[Sf,Xf,lv,pv],uv={name:"Setup",props:{data:Object},data(){return{active:cv[0].key,tabs:cv}},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 sf.A(e).gz()},downloadTar(){ae({category:"Setup",action:"Downloaded tar file",label:this.tarName,value:this.domainCount}),this.tarContents().download(this.tarName)},copyTar(){ae({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=t=>{setTimeout((()=>{e.textContent=t}),5e3)},o=new(l())(e,{text:this.copyTar});o.on("success",(o=>{const a=e.textContent;e.textContent=this.$t("templates.app.copied"),o.clearSelection(),t(a)})),o.on("error",(()=>{const o=e.textContent;e.textContent="Press Ctrl + C to copy",t(o)}))},showTab(e){ae({category:"Setup",action:"Tab clicked",label:`${this.$data.active}, ${e}`}),this.$data.active=e},showPreviousTab(){ae({category:"Setup",action:"Back clicked",label:`${this.$data.active}, ${this.previousTab}`}),this.$data.active=this.previousTab},showNextTab(){ae({category:"Setup",action:"Next clicked",label:`${this.$data.active}, ${this.nextTab}`}),this.$data.active=this.nextTab}}},hv=(0,ge.A)(uv,[["render",af]]),mv=hv,gv={class:"footer"},fv={class:"container"};function vv(e,t,o,a,s,l){const i=(0,$.g2)("ExternalLink");return(0,$.uX)(),(0,$.CE)("div",gv,[(0,$.Lk)("div",fv,[(0,$.Lk)("p",null,[(0,$.Lk)("button",{type:"button",class:"button is-primary is-small",onClick:t[0]||(t[0]=(...e)=>l.handleScrollToTop&&l.handleScrollToTop(...e))},(0,L.v_)(e.$t("templates.footer.backToTop")),1)]),(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.footer.thisToolIs"))+" ",1),(0,$.bF)(i,{text:e.$t("templates.footer.openSourceOnGitHub"),link:"https://github.com/digitalocean/nginxconfig.io"},null,8,["text"]),(0,$.eW)(" "+(0,L.v_)(e.$t("templates.footer.underThe"))+" ",1),(0,$.bF)(i,{text:e.$t("templates.footer.mit"),link:"https://github.com/digitalocean/nginxconfig.io/blob/master/LICENSE"},null,8,["text"]),(0,$.eW)(" "+(0,L.v_)(e.$t("templates.footer.license"))+" "+(0,L.v_)(e.$t("templates.footer.weWelcomeFeedbackAndContributions")),1)]),(0,$.Lk)("p",null,[(0,$.eW)((0,L.v_)(e.$t("templates.footer.originallyCreatedBy"))+" ",1),(0,$.bF)(i,{text:e.$t("templates.footer.balintSzekeres"),link:"https://b4lint.hu/"},null,8,["text"]),(0,$.eW)(" , "+(0,L.v_)(e.$t("templates.footer.maintainedBy"))+" ",1),(0,$.bF)(i,{text:e.$t("templates.footer.digitalOcean"),link:"https://github.com/digitalocean/nginxconfig.io"},null,8,["text"]),(0,$.eW)(" . ")])])])}const bv={name:"Footer",components:{ExternalLink:So.A},methods:{handleScrollToTop:()=>{window.scrollTo({top:0}),document.querySelectorAll(".column-scroll-y").forEach((e=>e.scrollTo({top:0})))}}},kv=(0,ge.A)(bv,[["render",vv]]),yv=kv,$v=["innerHTML"],Lv=["innerHTML"];function Cv(e,t,o,a,s,l){return(0,$.uX)(),(0,$.CE)("div",{class:(0,L.C4)(`column ${o.half?"is-half":"is-full"} is-full-mobile is-full-tablet`),onCopied:t[0]||(t[0]=(...e)=>l.copied&&l.copied(...e))},[(0,$.Lk)("h3",{innerHTML:o.name},null,8,$v),(0,$.Lk)("pre",null,[(0,$.Lk)("code",{class:"language-nginx",innerHTML:o.conf},null,8,Lv)])],34)}const xv={name:"NginxPrism",props:{name:String,conf:String,half:Boolean},mounted(){(0,n.pq)(`Highlighting ${this.$props.name}...`),window.Prism.highlightAllUnder(this.$el)},methods:{copied(e){this.$emit("copied",e.detail.text)}}},Sv=(0,ge.A)(xv,[["render",Cv]]),_v=Sv,Ev={name:"App",components:{Header:U.A,VueSelect:M.A,Footer:yv,Domain:od,Global:Og,DropletCallout:Xg,ContributeCallout:Gg,Setup:mv,NginxPrism:_v,YamlPrism:(0,$.$V)((()=>o.e(51).then(o.bind(o,6051)))),DockerPrism:(0,$.$V)((()=>o.e(434).then(o.bind(o,5434))))},data(){return{domains:[],global:{...Og.delegated,app:{lang:{default:c,value:c,computed:c,enabled:!0}}},active:0,ready:!1,splitColumn:!1,confWatcherWaiting:!1,confFilesPrevious:{},confFilesOutput:[],languageLoading:!1,languagePrevious:c,interactiveEvents:!1}},computed:{activeDomains(){return this.$data.domains.map(((e,t)=>[e,t])).filter((e=>null!==e[0]))},confFiles(){return Kd(this.$data.domains.filter((e=>null!==e)),this.$data.global)},confFilesWithDirectory(){return Object.entries(this.confFiles).reduce(((e,[t,o])=>({...e,[`${this.$data.global.nginx.nginxConfigDirectory.computed}/${t}`]:o})),{})},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 m.map((e=>({label:this.$t(`languages.${e}`)+(e===this.$i18n.locale?"":` - ${this.$t(`languages.${e}`,e)}`),value:e})))}},watch:{confFilesWithDirectory(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;m.includes(e.value)||(e.computed=e.default),y(e.computed).then((()=>{(0,n.pq)("Language set to",e.computed),this.$data.languagePrevious=e.computed,this.$data.languageLoading=!1,this.languageSetEvent(!t)})).catch((t=>{(0,n.z3)(`Failed to set language to ${e.computed}`,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),t=await ud(e,this.$data.domains,this.$data.global,this.$nextTick);if(!t||!t.global||!t.global.app||!t.global.app.lang){const e=hd(m);e&&(this.lang=e)}this.splitColumnEvent(!0);for(let o=0;o<this.activeDomains.length;o++)this.addSiteEvent(o+1,!0);this.$data.interactiveEvents=!0},methods:{changes(e){const t=this.$data.domains[e],o=Object.entries(t).reduce(((e,t)=>"presets"===t[0]?e:ad(t[1])?(e+=Object.keys(t[1]).filter((e=>N(t[1][e],t[0],e))).length,e):e),0);return o?` (${o.toLocaleString()})`:""},warnings(e){return Object.prototype.hasOwnProperty.call(this.$refs,`domain-${e}`)&&this.$refs[`domain-${e}`][0].hasWarnings||!1},add(){const e=j()(od.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.$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.confFilesWithDirectory)return this.$data.ready||(this.$data.confFilesPrevious=this.confFilesWithDirectory,this.$nextTick((()=>{this.$data.ready=!0}))),void this.updateDiff(this.confFilesWithDirectory,this.$data.confFilesPrevious);this.$nextTick((()=>this.checkChange(this.confFilesWithDirectory)))},updateDiff(e,t){try{const o=(0,B.A)(e,t,{highlightFunction:e=>`<mark>${e}</mark>`});this.$data.confFilesOutput=Object.entries(o).map((([e,{name:t,content:o}])=>{const a=t.filter((e=>!e.removed)).map((e=>e.value)).join(""),s=o.filter((e=>!e.removed)).map((e=>e.value)).join("");return[a,s,`${W()(a)}-${W()(s)}`,e]}))}catch(o){(0,n.z3)("Failed to compute and highlight diff",o),this.$data.confFilesOutput=Object.entries(e).map((([e,t])=>{const o=I()(e),a=I()(t);return[o,a,`${W()(o)}-${W()(a)}`,e]}))}this.$nextTick((()=>this.$data.confWatcherWaiting=!1))},splitColumnToggle(){this.$data.splitColumn=!this.$data.splitColumn,this.splitColumnEvent()},splitColumnEvent(e=!1){ae({category:"Split column",action:this.$data.splitColumn?"Enabled":"Disabled",nonInteraction:e})},languageSetEvent(e=!1){ae({category:"Language",action:"Set",label:this.$data.global.app.lang.computed,nonInteraction:e})},addSiteEvent(e,t=!1){ae({category:"Site",action:"Added",value:e,nonInteraction:t})},removeSiteEvent(e,t){ae({category:"Site",action:"Removed",label:t,value:e})},codeCopiedEvent(e){ae({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"}}}},wv=(0,ge.A)(Ev,[["render",O]]),Pv=wv;b().then((e=>{const t=(0,a.Ef)(Pv);t.use(e),t.mount("#app")}))},4555:(e,t,o)=>{"use strict";o.d(t,{R8:()=>s,pq:()=>a,z3:()=>l});const a=()=>{},s=console.warn.bind(console),l=console.error.bind(console)}},t={};function o(a){var s=t[a];if(void 0!==s)return s.exports;var l=t[a]={exports:{}};return e[a].call(l.exports,l,l.exports,o),l.exports}o.m=e,(()=>{o.amdO={}})(),(()=>{var e=[];o.O=(t,a,s,l)=>{if(!a){var i=1/0;for(p=0;p<e.length;p++){for(var[a,s,l]=e[p],n=!0,d=0;d<a.length;d++)(!1&l||i>=l)&&Object.keys(o.O).every((e=>o.O[e](a[d])))?a.splice(d--,1):(n=!1,l<i&&(i=l));if(n){e.splice(p--,1);var r=s();void 0!==r&&(t=r)}}return t}l=l||0;for(var p=e.length;p>0&&e[p-1][2]>l;p--)e[p]=e[p-1];e[p]=[a,s,l]}})(),(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,a)=>(o.f[a](e,t),t)),[]))})(),(()=>{o.u=e=>"js/"+e+".js"})(),(()=>{o.miniCssF=e=>"css/app.css"})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e={},t="nginxconfig.io:";o.l=(a,s,l,i)=>{if(e[a])e[a].push(s);else{var n,d;if(void 0!==l)for(var r=document.getElementsByTagName("script"),p=0;p<r.length;p++){var c=r[p];if(c.getAttribute("src")==a||c.getAttribute("data-webpack")==t+l){n=c;break}}n||(d=!0,n=document.createElement("script"),n.charset="utf-8",n.timeout=120,o.nc&&n.setAttribute("nonce",o.nc),n.setAttribute("data-webpack",t+l),n.src=a),e[a]=[s];var u=(t,o)=>{n.onerror=n.onload=null,clearTimeout(h);var s=e[a];if(delete e[a],n.parentNode&&n.parentNode.removeChild(n),s&&s.forEach((e=>e(o))),t)return t(o)},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),d&&document.head.appendChild(n)}}})(),(()=>{o.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{o.p=""})(),"undefined"!==typeof o&&Object.defineProperty(o,"p",{get:function(){try{if("function"!==typeof __webpackDynamicImportURL)throw new Error("WebpackRequireFrom: '__webpackDynamicImportURL' is not a function or not available at runtime. See https://github.com/agoldis/webpack-require-from#troubleshooting");return __webpackDynamicImportURL()}catch(e){return""}},set:function(e){console.warn("WebpackRequireFrom: something is trying to override webpack public path. Ignoring the new value"+e+".")}}),(()=>{var e={524:0};o.f.j=(t,a)=>{var s=o.o(e,t)?e[t]:void 0;if(0!==s)if(s)a.push(s[2]);else{var l=new Promise(((o,a)=>s=e[t]=[o,a]));a.push(s[2]=l);var i=o.p+o.u(t),n=new Error,d=a=>{if(o.o(e,t)&&(s=e[t],0!==s&&(e[t]=void 0),s)){var l=a&&("load"===a.type?"missing":a.type),i=a&&a.target&&a.target.src;n.message="Loading chunk "+t+" failed.\n("+l+": "+i+")",n.name="ChunkLoadError",n.type=l,n.request=i,s[1](n)}};o.l(i,d,"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,a)=>{var s,l,[i,n,d]=a,r=0;if(i.some((t=>0!==e[t]))){for(s in n)o.o(n,s)&&(o.m[s]=n[s]);if(d)var p=d(o)}for(t&&t(a);r<i.length;r++)l=i[r],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(p)},a=self["webpackChunknginxconfig_io"]=self["webpackChunknginxconfig_io"]||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})(),o.O(void 0,[504],(()=>o(8884)));var a=o.O(void 0,[504],(()=>o(7775)));a=o.O(a)})();