1import{L as N}from"./LayoutAccount.11da5ddd.js";import{r as C,p as D,c as v,k as L,l as F,m as w,n as H,q as $,s as W,v as z,x as B,y as T,z as q,A as Y,K as G,D as J,_ as U,b as f,o as m,g as y,w as h,e as p,C as g,j as k,t as b,f as A,d as S,E as x,u as Q,a as X,F as Z,h as K,G as ee,H as te}from"./application.2feedf9e.js";import"./SectionHeading.0e35963e.js";var O=Symbol("LabelContext");function P(){var n=B(O,null);if(n===null){var e=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,P),e}return n}function ne(n){var e=n===void 0?{}:n,a=e.slot,t=a===void 0?{}:a,s=e.name,o=s===void 0?"Label":s,l=e.props,c=l===void 0?{}:l,r=C([]);function i(u){return r.value.push(u),function(){var d=r.value.indexOf(u);d!==-1&&r.value.splice(d,1)}}return D(O,{register:i,slot:t,name:o,props:c}),v(function(){return r.value.length>0?r.value.join(" "):void 0})}var ae=L({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1}},render:function(){var e=this.context,a=e.name,t=a===void 0?"Label":a,s=e.slot,o=s===void 0?{}:s,l=e.props,c=l===void 0?{}:l,r=this.$props,i=r.passive,u=F(r,["passive"]),d=w({},Object.entries(c).reduce(function(E,j){var _,M=j[0],I=j[1];return Object.assign(E,(_={},_[M]=H(I),_))},{}),{id:this.id}),V=w({},u,d);return i&&delete V.onClick,$({props:V,slot:o,attrs:this.$attrs,slots:this.$slots,name:t})},setup:function(){var e=P(),a="headlessui-label-"+T();return W(function(){return z(e.register(a))}),{id:a,context:e}}}),R=Symbol("GroupContext"),oe=L({name:"SwitchGroup",props:{as:{type:[Object,String],default:"template"}},setup:function(e,a){var t=a.slots,s=a.attrs,o=C(null),l=ne({name:"SwitchLabel",props:{onClick:function(){!o.value||(o.value.click(),o.value.focus({preventScroll:!0}))}}}),c=q({name:"SwitchDescription"}),r={switchRef:o,labelledby:l,describedby:c};return D(R,r),function(){return $({props:e,slot:{},slots:t,attrs:s,name:"SwitchGroup"})}}}),se=L({name:"Switch",emits:{"update:modelValue":function(e){return!0}},props:{as:{type:[Object,String],default:"button"},modelValue:{type:Boolean,default:!1}},render:function(){var e={checked:this.$props.modelValue},a={id:this.id,ref:"el",role:"switch",type:this.type,tabIndex:0,"aria-checked":this.$props.modelValue,"aria-labelledby":this.labelledby,"aria-describedby":this.describedby,onClick:this.handleClick,onKeyup:this.handleKeyUp,onKeypress:this.handleKeyPress};return $({props:w({},this.$props,a),slot:e,attrs:this.$attrs,slots:this.$slots,name:"Switch"})},setup:function(e,a){var t=a.emit,s=a.attrs,o=B(R,null),l="headlessui-switch-"+T();function c(){t("update:modelValue",!e.modelValue)}var r=C(null),i=o===null?r:o.switchRef;return{id:l,el:i,type:Y(v(function(){return{as:e.as,type:s.type}}),i),labelledby:o==null?void 0:o.labelledby,describedby:o==null?void 0:o.describedby,handleClick:function(d){d.preventDefault(),c()},handleKeyUp:function(d){d.key!==G.Tab&&d.preventDefault(),d.key===G.Space&&c()},handleKeyPress:function(d){d.preventDefault()}}}}),re=ae,ie=J;const le={props:{label:{type:String,default:null},description:{type:String,default:null},disabled:{type:Boolean,default:!1},modelValue:{}},emits:["update:modelValue"],components:{Switch:se,SwitchDescription:ie,SwitchGroup:oe,SwitchLabel:re},setup(n,{emit:e}){return{enabled:v({get(){return n.modelValue},set(t){e("update:modelValue",t)}})}}},ce={class:"flex flex-grow flex-col pr-8"},de={key:0,class:"bg-gray-400 relative inline-flex h-6 w-11 flex-shrink-0 rounded-full border-2 border-transparent"};function ue(n,e,a,t,s,o){const l=f("SwitchLabel"),c=f("SwitchDescription"),r=f("Switch"),i=f("SwitchGroup",!0);return m(),y(i,{as:"div",class:"flex items-center justify-between"},{default:h(()=>[p("span",ce,[g(l,{as:"span",class:"text-sm font-medium leading-6 text-gray-900",passive:""},{default:h(()=>[k(b(a.label),1)]),_:1}),a.description?(m(),y(c,{key:0,as:"span",class:"text-sm text-gray-500"},{default:h(()=>[k(b(a.description),1)]),_:1})):A("",!0)]),a.disabled?(m(),S("div",de,[...e[1]||(e[1]=[p("span",{"aria-hidden":"true",class:"translate-x-5 pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0"},null,-1)])])):(m(),y(r,{key:1,modelValue:t.enabled,"onUpdate:modelValue":e[0]||(e[0]=u=>t.enabled=u),class:x([t.enabled?"bg-deep-600":"bg-gray-200","relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-deep-600 focus:ring-offset-2"])},{default:h(()=>[p("span",{"aria-hidden":"true",class:x([t.enabled?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"])},null,2)]),_:1},8,["modelValue","class"]))]),_:1})}const pe=U(le,[["render",ue]]),fe=window.route,me={components:{SwitchGroup:pe,LayoutAccount:N},props:{cookies:Object,privacyStatementLink:String,generalConditionsLink:String},setup(n){const{t:e}=Q(),a=v(()=>
1{const c='<a class="font-medium text-gray-700 hover:text-gray-900" target="_blank" href="'+n.privacyStatementLink+'">'+e("shared.privacy_statement")+"</a>",r='<a class="font-medium text-gray-700 hover:text-gray-900" target="_blank" href="'+n.generalConditionsLink+'">'+e("shared.general_conditions")+"</a>";return e("account.tabs.cookies_description",{privacystatement:c,generalconditions:r})}),t=v(()=>n.cookies),s=X({functional:t.value.functional===1||!1,performance:t.value.performance===1||!1,marketing:t.value.marketing===1||!1,social:t.value.social===1||!1});function o(){s.post(fe("account.updateCookies"),{preserveScroll:!0})}function l(){s.functional=!0,s.performance=!0,s.marketing=!0,s.social=!0,o()}return{descriptionText:a,form:s,updateCookieSettings:o,checkAllAndUpdateCookieSettings:l}}},he={"data-cy":"cookies-page",class:"divide-y max-w-3xl mx-auto"},be={class:"py-8"},ve={class:"text-xl font-medium text-slate-900"},ye=["innerHTML"],ge={class:"py-8 sm:col-span-6 flex justify-end"},ke=["disabled"],xe={key:0,class:"fal mr-2 fa-spinner fa-pulse"};function _e(n,e,a,t,s,o){const l=f("SwitchGroup"),c=f("Button"),r=f("LayoutAccount");return m(),y(r,{"current-tab":"cookies"},{default:h(()=>[p("div",he,[p("div",be,[p("h2",ve,b(n.$t("account.tabs.cookies_title")),1),p("p",{class:"mt-1 text-sm text-slate-500",innerHTML:t.descriptionText},null,8,ye)]),p("form",{onKeydown:e[0]||(e[0]=Z(K(()=>{},["prevent"]),["enter"])),class:"py-8"},[g(l,{label:n.$t("account.cookies.form.essential.title"),description:n.$t("account.cookies.form.essential.description"),disabled:!0,"data-cy":"cookies-essential",class:"my-4"},null,8,["label","description"]),(m(),S(te,null,ee(["functional","performance","marketing","social"],(i,u)=>g(l,{key:u,label:n.$t("account.cookies.form."+i+".title"),description:n.$t("account.cookies.form."+i+".description"),modelValue:t.form[i],"onUpdate:modelValue":d=>t.form[i]=d,"data-cy":`cookies-${i}`,class:"my-4"},null,8,["label","description","modelValue","onUpdate:modelValue","data-cy"])),64))],32),p("div",ge,[p("button",{type:"button","data-cy":"cookies-save-selection",disabled:t.form.processing,class:x(["min-h-[44px] py-2 px-4 font-medium text-sm text-gray-500 hover:text-gray-900",{"text-gray-400 hover:text-gray-400":t.form.processing}]),onClick:e[1]||(e[1]=(...i)=>t.updateCookieSettings&&t.updateCookieSettings(...i))},[t.form.processing?(m(),S("i",xe)):A("",!0),k(b(n.$t("account.cookies.save")),1)],10,ke),g(c,{"data-cy":"cookies-save-all",class:"min-h-[44px]",onClick:K(t.checkAllAndUpdateCookieSettings,["prevent"]),disabled:t.form.processing},{default:h(()=>[p("i",{class:x(["fal mr-2",t.form.processing?"fa-spinner fa-pulse":"fa-check"])},null,2),k(b(n.$t("account.cookies.save_all")),1)]),_:1},8,["onClick","disabled"])])])]),_:1})}const Le=U(me,[["render",_e]]);export{Le as default};
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.