PageSourceSearch

https://cultures.fr/_nuxt/CL3kZDHV.js

js cultures.fr collected 2026-10-07 03:22:32 UTC 4,180 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="fa541b8e-90b9-4fb6-8be0-c0106943e677",e._sentryDebugIdIdentifier="sentry-dbid-fa541b8e-90b9-4fb6-8be0-c0106943e677")}catch(t){}}();import{aM as e,bL as a,bq as t,aN as s,aX as o,be as r,bJ as l,bX as n,bO as u,b3 as d,bw as i,aR as c,bc as m,b5 as b,aV as p,a_ as f,aT as y,bv as g,bz as v,a$ as _,aU as x,b6 as j,b2 as w,aZ as h,bh as N}from"./BHQfsFJU.js";import{_ as A}from"./BbH6t_9W.js";import{_ as K}from"./b1Exgjqz.js";import{u as C}from"./Dxnz10v7.js";import{u as E}from"./Dy0sXpGQ.js";import"./OtLa1jNQ.js";import"./B1Ibo9DT.js";import"./e6gChn7n.js";import"./4r2WcQBZ.js";import"./mxh80E5Z.js";const k={class:"max-w-2xl px-4"},M=["disabled","onClick"],O="/superadmin/contact/message",S=e({__name:"[[id]]",setup(e){const S={id:!0,status:!0,subject:!0,contactEmail:!0,contactName:!0,message:!0,updatedAt:!0,createdAt:!0},T={status:a.ContactMessageStatus.NEW,subject:a.ContactMessageSubject.OTHER},{fetch:I,getApiErrorMsg:$}=t(),D=C(),{notify:R}=E(),{t:V,tm:q,rt:P,locale:X}=s({useScope:"local",messages:{en:N}}),H=o(),U=r(),W=U.params.id?Number(U.params.id):void 0,Z=void 0===W,z=f(null),J=V(Z?"create":"edit")+" "+V("message"),L=H({name:"admin-index-contact-list"}),Y={fields:[{name:"status",sourceKey:"status",type:l.select,label:V("status"),options:Object.values(a.ContactMessageStatus).map(e=>({label:V(`ContactMessageStatus.${e}`),value:e}))},{name:"subject",sourceKey:"subject",type:l.text,label:V("subject"),readonly:!0},{name:"contactEmail",sourceKey:"contactEmail",type:l.text,label:V("email"),rules:n.fields.email,readonly:!0},{name:"contactName",sourceKey:"contactName",type:l.text,label:V("name"),readonly:!0},{name:"message",sourceKey:"message",type:l.textarea,label:V("message"),readonly:!0,rows:8}]};async function B(){Z?z.value=Object.assign({},T):await F()}async function F(){D.start();const e={where:{id:W},select:S},{error:a,data:t}=await I(`${O}?${i({query:e})}`);if(a.value)return console.error(a),R({group:"error",text:$(a.value)}),void D.stop();const s=t.value?.data?.[0]||null;s||R({group:"error",text:V("msg.not_found")}),z.value=s,D.stop()}async function G(e){D.start();const a=await e.validate();if(!a.valid||!z.value){let e;D.stop(),console.error(a.errors);try{e=Object.values(a?.errors||{})?.[0]}catch{}return void R({group:"error",text:e||V("msg.invalid_form")})}if(D.start(),await e.processPending(),Z){const e={data:{...z.value,id:void 0},select:S},{error:a,data:t}=await I(O,{method:"post",body:e});if(a.value)return console.error(a.value),R({group:"error",text:$(a.value)}),void D.stop();const s=t.value?.data[0]?.id;R({group:"info",text:V("msg.item_name_successfully_created",{name:s})}),h({name:U.name||"",params:{id:String(s||"")}})}else{const e={where:{id:W},data:z.value,select:S},{error:a,data:t}=await I(O,{method:"PATCH",body:e});if(a.value)return console.error(a.value),R({group:"error",text:$(a.value)}),void D.stop();R({group:"info",text:V("msg.item_name_successfully_updated",{name:W})}),z.value=t.value?.data[0]||null}D.stop()}return Z||(Y.fields.unshift({name:"id",sourceKey:"id",type:l.text,label:V("id"),readonly:!0,rules:u().required()}),Y.fields.push({name:"updatedAt",sourceKey:"updatedAt",type:l.datetime,label:V("updated_at"),readonly:!0}),Y.fields.push({name:"createdAt",sourceKey:"createdAt",type:l.datetime,label:V("created_at"),readonly:!0})),d(B),(e,a)=>(c(),m(K,{backRouteName:p(L),loading:p(D).loading.value},{title:b(()=>[w(x(J))]),default:b(()=>[y("div",k,[p(z)?(c(),m(A,{key:0,ref:"$form",class:"mb-4 w-full max-w-4xl flex-none",modelValue:p(z),"onUpdate:modelValue":a[0]||(a[0]=e=>g(z)?z.value=e:null),schema:Y},{footer:b(e=>[y("button",{class:_(["btn btn-primary mt-4 w-full",{loading:p(D).loading.value,"opacity-50":e.meta.touched&&!e.meta.valid}]),disabled:p(D).loading.value,onClick:v(a=>G(e),["prevent"])},[y("span",null,x(p(V)("save")),1)],10,M)]),_:1},8,["modelValue"])):j("",!0)])]),_:1},8,["backRouteName","loading"]))}});
1export{S 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.