2024-10-02
This commit is contained in:
parent
11960f633a
commit
93a452ec4a
42 changed files with 895 additions and 207 deletions
|
|
@ -1,2 +1,2 @@
|
|||
import{r as _,p as R,z as u,N as E}from"./index.Dxgx1GXj.js";import{x as t}from"./chunk-7BKSRZNG.F4GWJRq9.js";import{p as m}from"./index.C9ScFdVV.js";import{R as l}from"./api2.js";import{a as T,b as C,c as f,d as I,A as S}from"./dom.js";import{N,T as P}from"./messages3.js";import{a as d,r as O,b as h}from"./dom2.js";import{r as c,D as L,l as v,a as U,b as g,c as B,E as b,d as M}from"./erreurs.js";import{e as w,a as y}from"./gardes.js";import{v as D}from"./messages.js";import{p as W}from"./reseau.js";import{W as k}from"./cart-remove-item.js";import{W as j}from"./cart.js";import{i}from"./erreurs2.js";import{a as x,r as z}from"./utils.js";import{M as G,E as J}from"./Either.DDEPhGsy.js";import"./exports.dP04ITJc.js";import"./messages2.js";const X=_etats,q=t(x(T),d),F=t(z(C),O),Y=()=>{q.forEach(r=>{const o=G.fromNullable(r.getAttribute(f));h(r)(I).ifLeft(()=>t(new L(`L'entrée « ${o.orDefault("CLE_PANIER_INEXISTANTE")} » n'a pas de Bouton de suppression.`),c)).ifRight(s=>{s.addEventListener("click",()=>{const p=o.ifNothing(()=>{r.remove()}).orDefault("CLE_PANIER_INEXISTANTE");s.textContent="C= C= C= C= C=┌(;・ω・)┘",J.encase(()=>m(k,{key:p})).map(A=>{W({corps:JSON.stringify(A),nonce:X.nonce,route:l}).then(async e=>{w(e)&&v("500 Server Error"),t(await e.json(),n=>u(n).with({body:E.select(),status:400},i,U).with({body:E.select(),status:401},i,g).with({body:E.select(),status:404},i,B).with(E._,a=>m(j,a)).otherwise(a=>t(a,b,M)),R("items_count"),_(n=>{new BroadcastChannel(N).postMessage({donnees:n,type:P.MiseAJourPanier}),r.remove()}))}).catch(e=>{y(e)?(c(e),console.error(e)):console.error("e n'est pas une Erreur ?!",e)})})})})})},$=()=>{const r=new BroadcastChannel(N);r.onmessage=o=>{D(o).ifRight(s=>{F.setAttribute(S,String(s.donnees!==0))})}};document.addEventListener("DOMContentLoaded",()=>{Y(),$()});
|
||||
import{r as u,p as C,z as l,N as E}from"./index.Dxgx1GXj.js";import{x as t}from"./chunk-7BKSRZNG.F4GWJRq9.js";import{p as c}from"./index.C9ScFdVV.js";import{R as f}from"./api2.js";import{a as I,b as S,c as d,d as P,e as L,f as O,A as U}from"./dom.js";import{N as T,T as h}from"./messages3.js";import{a as v,r as _,b as i}from"./dom2.js";import{r as m,D as A,l as B,a as g,b as M,c as b,E as w,d as y}from"./erreurs.js";import{e as D,a as W}from"./gardes.js";import{v as k}from"./messages.js";import{p as j}from"./reseau.js";import{W as X}from"./cart-remove-item.js";import{W as x}from"./cart.js";import{i as N}from"./erreurs2.js";import{a as z,r as G}from"./utils.js";import{M as J,E as Q}from"./Either.DDEPhGsy.js";import"./exports.BNibT8R5.js";import"./messages2.js";const $=_etats,q=t(z(I),v),F=t(G(S),_),H=()=>{q.forEach(e=>{const s=J.fromNullable(e.getAttribute(d));i(e)(P).ifLeft(()=>t(new A(`L'entrée « ${s.orDefault("CLE_PANIER_INEXISTANTE")} » n'a pas de Bouton de suppression.`),m)).ifRight(o=>{o.addEventListener("click",()=>{const p=s.ifNothing(()=>{e.remove()}).orDefault("CLE_PANIER_INEXISTANTE");o.textContent="C= C= C= C= C=┌(;・ω・)┘",Q.encase(()=>c(X,{key:p})).map(R=>{j({corps:JSON.stringify(R),nonce:$.nonce,route:f}).then(async r=>{D(r)&&B("500 Server Error"),t(await r.json(),n=>l(n).with({body:E.select(),status:400},N,g).with({body:E.select(),status:401},N,M).with({body:E.select(),status:404},N,b).with(E._,a=>c(x,a)).otherwise(a=>t(a,w,y)),C("items_count"),u(n=>{new BroadcastChannel(T).postMessage({donnees:n,type:h.MiseAJourPanier}),e.remove()}))}).catch(r=>{W(r)?(m(r),console.error(r)):console.error("e n'est pas une Erreur ?!",r)})})})}),i(e)(L).ifLeft(()=>t(new A(`L'entrée « ${s.orDefault("CLE_PANIER_INEXISTANTE")} » n'a pas de Bouton de soustraction.`),m)).ifRight(o=>{o.addEventListener("click",()=>{t(i(e)(O),_)})})})},Y=()=>{const e=new BroadcastChannel(T);e.onmessage=s=>{k(s).ifRight(o=>{F.setAttribute(U,String(o.donnees!==0))})}};document.addEventListener("DOMContentLoaded",()=>{H(),Y()});
|
||||
//# sourceMappingURL=scripts-page-panier.js.map
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue