1(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/HotlinkProtectionPage"],{1795:(e,n,i)=>{"use strict";i.r(n),i.d(n,{HotlinkProtectionForm:()=>f});var t=i(242),o=i(244),a=i.n(o),s=i(762),r=i(728),d=i(243),l=i(927),c=i(775),m=i(90),u=i(679),p=i(1796),g=i.n(p);const k=m.Locale.getTranslate("components.pages.HotlinkProtection"),f=({domainId:e,hotlinkProtection:n})=>{const i=(0,r.useNavigate)(),o=`/smb/web/overview/id/${e}/type/domain`,[a,m]=(0,t.useState)(n),[p,{loading:f}]=(0,s.useMutation)(g());return(0,t.jsxs)(l.default,{values:a,mutation:p,onFieldChange:(e,n)=>{m((i=>(0,d.setIn)(i,e,n)))},onSubmit:({isEnabled:n,extensions:i,friends:t})=>({id:btoa(`Domain:${e}`),isEnabled:n,extensions:i.replace(/(\n|\s)+/g," ").trim(),friends:t.map((e=>e?.trim()||""))}),state:f?"loading":void 0,onSuccess:({updateHotlinkProtection:{domain:e}},n)=>{(0,u.addToast)({intent:"success",message:(0,t.jsx)(k,{content:"success"})}),m({...a,extensions:e.hosting.hotlinkProtection.extensions}),n||i(o)},applyButton:!1,cancelButton:{component:c.default,to:o},children:[(0,t.jsx)(d.FormFieldCheckbox,{label:(0,t.jsx)(k,{content:"enabledLabel"}),name:"isEnabled",checked:a.isEnabled}),(0,t.jsx)(d.FormFieldText,{label:(0,t.jsx)(k,{content:"extensionsLabel"}),multiline:!0,name:"extensions",size:"lg",inputProps:{maxLength:255},disabled:!a.isEnabled||f}),(0,t.jsx)(d.FormFieldText,{label:(0,t.jsx)(k,{content:"friendsLabel"}),multi:!0,name:"friends",size:"lg",disabled:!a.isEnabled||f})]})};f.propTypes={hotlinkProtection:a().shape({isEnabled:a().bool.isRequired,extensions:a().string.isRequired,friends:a().arrayOf(a().string).isRequired}).isRequired,domainId:a().string.isRequired}},1794:(e,n,i)=>{"use strict";i.r(n),i.d(n,{HotlinkProtectionPage:()=>g,default:()=>k});var t=i(244),o=i.n(t),a=i(243),s=i(90),r=i(739),d=i(290),l=i(1789),c=i(1795),m=i(242);const u=s.Locale.getSection("components.pages.HotlinkProtection"),p=s.Locale.getTranslate("components.pages.HotlinkProtection"),g=e=>e.domain.hosting?(0,m.jsx)(c.HotlinkProtectionForm,{domainId:e.params.domainId,hotlinkProtection:e.domain.hosting.hotlinkProtection}):(0,m.jsx)(a.StatusMessage,{intent:"info",children:(0,m.jsx)(p,{content:"virtualHostingRequired"})});g.propTypes={domain:o().shape({hosting:o().shape({hotlinkProtection:o().shape({isEnabled:o().bool.isRequired,extensions:o().string.isRequired,friends:o().arrayOf(o().string).isRequired}).isRequired})}).isRequired,params:o().shape({domainId:o().string.isRequired}).isRequired};const k=(0,r.withPageLayout)(g,(({domain:e,params:n})=>{const{showFrames:i,pageHeader:t,pageSidebar:o}=(0,d.default)(),a=e.baseDomain||e,s=u.lmsg("title",{domainName:`<b>${e.name}</b>`}),r=[...(0,l.getDomainPageCommonBreadcrumbs)({domain:e,baseDomain:a}),{title:s,href:`/cp/${n.domainId}/hotlink-protection`}];return{key:n.domainId,showFrames:i,pageHeader:{...t,helpMenu:{...t.helpMenu,helpContext:"client.domain.hosting.hotlink-protection"}},pageSidebar:o,pageContentHeader:{pageTitle:s,breadcrumbs:r}}}))},1793:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>t.default});var t=i(1794)},1789:(e,n,i)=>{"use strict";i.r(n),i.d(n,{getDomainPageCommonBreadcrumbs:()=>r});var t=i(90),o=i(290),a=i(1344),s=i(1343);const r=({baseDomain:e,domain:n})=>{const{pageSidebar:i}=(0,o.default)(),{isPowerUserPanel:r,navigationContext:d}=i,l=(0,a.getId)(n.id),c=(0,a.getId)(e.id);return[{title:t.Locale.getSection("admin.controllers.home.index").lmsg("title"),href:"/admin/home",show:!r},{title:t.Locale.getSection("admin.controllers.subscription.list").lmsg("title"),href:"/admin/subscription/list",show:!r&&"subscriptions"===d},{title:t.Locale.getSection("admin.controllers.subscription.overview").lmsg("title",{name:`<b>${e.name}</b>`}),href:`/admin/subscription/overview/id/${c}`,show:!r&&"subscriptions"===d},{title:t.Locale.getSection("admin.controllers.domain.list").lmsg("title"),href:"/admin/domain/list",show:!r&&"domains"===d},{title:t.Locale.getSection("smb.controllers.web.index").lmsg("title"),href:(0,s.getContextUrl)(c,"/smb/web/view"),show:r||"subscriptions"===d},{title:n.name,href:(0,s.getContextUrl)(c,`/smb/web/overview/id/${l}/type/domain`)}].filter((({show:e=!0})=>e))}},1343:(e,n,i)=>{"use strict";i.r(n),i.d(n,{getContextUrl:()=>o});var t=i(290);const o=(e,n)=>{const{pageSidebar:i}=(0,t.default)(),o=encodeURIComponent(n);return i?.isPowerUserPanel?`/smb/account/switch/id/${e}?hideNotice=1&returnUrl=${o}`:`/admin/subscription/login/id/${e}?pageUrl=${o}`}},1344:(e,n,i)=>{"use strict";i.r(n),i.d(n,{getId:()=>t});const t=e=>e?Number(atob(e).split(":")[1]):null},1796:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateHotlinkProtection"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateHotlinkProtectionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateHotlinkProtection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hosting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hotlinkProtection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extensions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"friends"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:362}};n.loc.source={body:"mutation UpdateHotlinkProtection($input: UpdateHotlinkProtectionInput!) {\r\n updateHotlinkProtection(input: $input) {\r\n domain {\r\n id\r\n hosting {\r\n hotlinkProtection {\r\n isEnabled\r\n extensions\r\n friends\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var t={};function o(e,n){for(var i=0;i<e.definitions.length;i++){var t=e.definitions[i];if(t.name&&t.name.value==n)return t}}n.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),t[e.name.value]=n}})),e.exports=n,e.exports.UpdateHotlinkProtection=function(e,n){var i={kind:e.kind,definitions:[o(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var a=t[n]||new Set,s=new Set,r=new Set;for(a.forEach((function(e){r.add(e)}));r.size>0;){var d=r;r=new Set,d.forEach((function(e){s.has(e)||(s.add(e),(t[e]||new Set).forEach((function(e){r.add(e)})))}))}return s.forEach((function(n){var t=o(e,n);t&&i.definitions.push(t)})),i}(n,"UpdateHotlinkProtection")}}]); 2//# sourceMappingURL=HotlinkProtectionPage.js.map?878b076293b79abc23dd
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.