PageSourceSearch

https://www.foussier.fr/_next/static/chunks/9862.dbe834d98268b2ce.js

js foussier.fr collected 2026-10-01 15:34:48 UTC 32,754 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9862],{2731:(e,t,a)=>{a.d(t,{l:()=>j});var r=a(95155),n=a(15151),i=a(87263),s=a(54915),l=a(23737),o=a(12115),d=a(75889),c=a(89747);let u=e=>{let{children:t,className:a,disableClosing:n,id:i,isOpen:s,onClose:l,onOpen:o,title:d,trigger:u}=e;return(0,r.jsx)(c._,{anchor:"bottom",className:a,disableClosing:n,id:i,isOpen:s,onClose:l,onOpen:o,title:d,trigger:u,children:t})};var p=a(14707),m=a(58905),h=a(57830),f=a(81729),x=a(81957);let b=e=>{let{children:t,disableClosing:a=!1,id:n,size:i}=e,{t:s}=(0,p.useTranslations)("commun");return(0,r.jsxs)("section",{className:"flex min-h-16 items-start justify-between gap-4 py-4 has-[button]:pr-2",children:[(0,r.jsx)(x.o,{as:"h2",className:(0,d.QP)("flex leading-6","sm"!==i&&"sm:text-xl sm:leading-[1.625rem]"),id:n,variant:"h3",children:t}),!a&&(0,r.jsx)(m.H,{render:(0,r.jsx)(f.K,{"aria-label":s("fermer"),className:"-mt-2 text-current",children:(0,r.jsx)(h.m6K,{})})})]})};var g=a(59082),v=a(93396),y=a(44622);let w={sizes:{sm:"w-[360px]",md:"w-[560px] sm:*:px-8 sm:[&>*:last-child]:pb-8",lg:"w-[960px] sm:*:px-8 sm:[&>*:last-child]:pb-8",xl:"w-[1440px] sm:*:px-8 sm:[&>*:last-child]:pb-8"}},j=e=>{let{id:t,children:a,className:c,contentClassName:p,disableClosing:m,disableRestoreFocus:h,isOpen:f,modal:x=!0,onClose:j,onOpen:E,displayOverlay:k=!0,size:C="md",title:N,trigger:P,dialogOnly:S=!1}=e,A="".concat(t,"_label"),T=(0,g.e)(),O=(0,o.useRef)(!1),[_,M]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!f)return void M(!1);let e=requestAnimationFrame(()=>{O.current=!0,M(!0)});return()=>cancelAnimationFrame(e)},[f]);let z=(e,t)=>{m||j(e,t)},{isMobile:R}=(0,y.Y)();return R&&!S?(0,r.jsx)(v.y,{above:null==T?void 0:T.above,isBackdropTransparent:null==T?void 0:T.isBackdropTransparent,isHidden:null==T?void 0:T.isHidden,onClosed:null==T?void 0:T.onClosed,children:(0,r.jsx)(u,{className:(0,d.QP)(c,p),disableClosing:m,id:t,isOpen:f,onClose:z,onOpen:E,title:N,trigger:P,children:a})}):(0,r.jsxs)(r.Fragment,{children:[!!P&&(0,o.cloneElement)(P,{"aria-controls":t,"aria-expanded":f,"aria-haspopup":"dialog",onClick:()=>{E&&E()}}),(0,r.jsxs)(n.D,{modal:x,onOpenChange:(e,t)=>
1{e||z(t.event,t.reason)},onOpenChangeComplete:e=>{var t;!e&&O.current&&(null==T||null==(t=T.onClosed)||t.call(T))},open:f&&_,children:[(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.X,{className:(0,d.QP)("fixed top-0 right-0 bottom-0 left-0 z-(--z-modal) bg-black/50 opacity-100 transition-opacity duration-[225ms]","data-ending-style:opacity-0 data-ending-style:duration-[195ms] data-starting-style:opacity-0",(null==T?void 0:T.isBackdropTransparent)&&"bg-transparent",!k&&"opacity-0!",c),forceRender:!0}),(0,r.jsxs)(l.h,{"aria-labelledby":A,className:(0,d.QP)("fixed top-1/2 left-1/2 z-(--z-modal) flex max-h-[calc(100%-32px)] max-w-[calc(100%-32px)] -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center rounded-sm bg-white opacity-100 shadow-[0px_2px_3px_0px_rgba(0,0,0,0.25)] outline-0 transition-[opacity,box-shadow,transform] duration-[225ms] sm:max-h-[calc(100%-64px)] sm:max-w-[calc(100%-64px)]","data-ending-style:opacity-0 data-ending-style:shadow-none data-ending-style:duration-[195ms] data-starting-style:opacity-0 data-starting-style:shadow-none",(null==T?void 0:T.isHidden)&&"invisible","*:w-full *:px-6 [&>*:last-child]:pb-6",w.sizes[C],c,p),finalFocus:!h&&void 0,id:t,tabIndex:-1,children:[(0,r.jsx)(b,{disableClosing:m,id:A,size:C,children:N}),o.Children.map(a,e=>(0,o.cloneElement)(e,{size:C}))]})]}),null==T?void 0:T.above]})]})}},9862:(e,t,a)=>{a.r(t),a.d(t,{ModificationTraitDeCoupeDialog:()=>T});var r,n,i=a(95155),s=a(14707),l=a(99776),o=a(80549),d=a(12115),c=a(13931),u=a(2731),p=a(88994),m=a(27707),h=a(97166),f=a(14217);function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(null,arguments)}let b=function(e){return d.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),r||(r=d.createElement("path",{d:"m16.6 14.6.7-.6-8.2-9.8C8.5 3.5 7.6 3 6.6 2.9c-1 0-1.9.2-2.7.8-.7.6-1.2 1.5-1.3 2.5s.2 1.9.8 2.7l8.2 9.8.7-.6 2.4 2.8 6.5-.7-4.7-5.6zM4.9 7.8c-.3-.4-.5-.8-.4-1.3 0-.5.3-.9.6-1.2s.8-.5 1.3-.4c.5 0 .9.3 1.2.6l7 8.4-2.8 2.3zm8.6 7 1.2-1z"})),n||(n=d.createElement("path",{d:"m5.846 6.223.159-.122a.8.8 0 0 1 1.122.148l.67.873a.8.8 0 0 1-.148 1.122l-.159.122a.8.8 0 0 1-1.122-.148l-.67-.873a.8.8 0 0 1 .148-1.122"})))};var g=a(85909),v=a(34095),y=a(11363),w=a(49731),j=a(55723),E=a(8134);let k=e=>{let{ariaLabel:t,max:a,min:r,onChange:n,value:s}=e,l=Array.isArray(s)?s:[s];return(0,i.jsx)(v.g,{className:"w-full",max:a,min:r,onValueChange:e=>{n(e)},thumbAlignment:"edge-client-only",value:s,children:(0,i.jsx)(y.X,{className:"flex h-3.5 w-full touch-none items-center select-none",children:(0,i.jsxs)(w.h,{className:"h-1 w-full rounded-full bg-gray-200",children:[(0,i.jsx)(j.X,{className:"bg-primary rounded-full"}),l.map((e,a)=>(0,i.jsx)(E.O,{"aria-label":Array.isArray(t)?t[a]:t,className:"bg-primary box-content block size-3 cursor-pointer rounded-full border-2 border-orange-300 ring-8 ring-transparent transition-shadow duration-150 hover:ring-orange-700/8 has-[input:focus-visible]:ring-blue-700/8",index:a},a))]})})})};var C=a(66195),N=a(81957),P=a(2551),S=a(94765),A=a(10995);let T=e=>{let{data:t,closeDialog:a,isOpen:r}=e,{t:n}=(0,s.useTranslations)("commun"),{t:x}=(0,s.useTranslations)("panier.page-panier.chantiers.ligne.article.trait-de-coupe-dialog"),{articleId:v,chantierId:y,traitCoupe:w}=t,j=w.maximum||1e4,E=w.minimum||0,T=Math.min(Math.max(w.valeur||0,E),j),[O,_]=(0,d.useState)(T),M=(0,l.useQueryClient)(),z=(0,o.useMutation)((0,S.L)({onSuccess:async(e,t)=>{let{chantierId:r,articleId:n,traitCoupe:i}=t;M.setQueryData([A.l],e=>e?[...e.map(e=>e.id===r?{...e,articles:e.articles.map(e=>e.id===n?{...e,traitCoupe:{...e.traitCoupe,valeur:i}}:e)}:e)]:e),setTimeout(()=>{a()},P.tq.boutonSuccess)},onError:()=>{C.oK.error(n("erreur-defaut"))}}));return w.valeur&&w.maximum&&w.minimum?(0,i.jsxs)(u.l,{id:h.t.ModificationTraitDeCoupeDialog,isOpen:r,onClose:a,title:x("titre"),children:[(0,i.jsxs)(p.R,{className:"space-y-6 md:space-y-8",children:[(0,i.jsxs)("section",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,i.jsxs)("section",{className:"space-y-2",children:[(0,i.jsx)(N.o,{className:"font-bold",children:x("cet-article-necessite-un-trait-de-coupe")}),(0,i.jsx)(N.o,{children:x("saisissez-un-trait-de-coupe",{min:E,max:j})})]}),(0,i.jsx)(g.Q,{className:"sm:w-28",defaultValue:O,disableInputChangeEvent:!0,endAdornment:"cm",max:j,min:E,onBlur:_,withButtons:!1,withDebounce:!1})]}),(0,i.jsxs)("section",{className:"mt-4 flex items-center gap-4",children:[(0,i.jsx)(f.I,{as:(0,i.jsx)(b,{})}),(0,i.jsx)(k,{ariaLabel:x("trait-de-coupe"),max:j,min:E,onChange:_,value:O})]})]}),(0,i.jsxs)(m.E,{children:[(0,i.jsx)(c.$,{isLoading:z.isPending,isSuccess:z.isSuccess,onClick:()=>
1{if(O===w.valeur)return a();z.mutate({articleId:v,chantierId:y,traitCoupe:O})},size:"lg",successLabel:n("valide"),successPosition:"end",type:"submit",children:n("valider")}),(0,i.jsx)(c.$,{color:"gray","data-type":"close",onClick:a,size:"lg",variant:"outlined",children:n("annuler")})]})]}):(0,i.jsx)(i.Fragment,{})}},10995:(e,t,a)=>{a.d(t,{T:()=>s,l:()=>i});var r=a(13024),n=a(94676);let i="GET_PANIER_CHANTIERS",s=function(){let{enabled:e=!0,select:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{queryKey:[i],queryFn:async()=>{let e=await r.I.getChantiers();if(!e.ok)throw e;return(0,n.x)(e.data)},enabled:e,select:t}}},12830:(e,t,a)=>{a.d(t,{X:()=>s});var r=a(95155),n=a(75889),i=a(90571);let s=e=>{let{children:t,disabled:a,error:s,labelEndAdornment:l,readOnly:o,required:d,size:c,success:u}=e;return(0,r.jsx)("fieldset",{"aria-hidden":"true",className:(0,n.QP)("pointer-events-none absolute right-0 bottom-0 left-0 min-w-0 overflow-hidden rounded-[inherit] border border-solid border-gray-200 px-2 text-left leading-snug transition-colors motion-reduce:transition-none",c===i.rk.Sm?"-top-[0.56rem] text-xs":"-top-[0.75rem] text-sm",s&&"border-error border-2",u&&"border-success border-2",a?"text-content-disabled border-gray-200":o?"border-gray":"peer-focus:border-primary peer-[.base--expanded]:border-primary group-hover/field-base:border-gray-700 peer-focus:border-2 peer-[.base--expanded]:border-2"),children:(0,r.jsx)("legend",{className:"invisible w-auto max-w-[0.01px] overflow-hidden whitespace-nowrap transition-[max-width] duration-[50ms] ease-out group-has-[*[name]:-webkit-autofill]/field:max-w-full group-has-[*[name]:autofill]/field:max-w-full group-has-[*[name]:focus]/field:max-w-full group-has-[.base--expanded]/field:max-w-full group-[.is-shrink]/field:max-w-full motion-reduce:transition-none",children:(0,r.jsxs)("span",{className:"visible inline-flex gap-1 pr-1.5 pl-2 opacity-0",children:[t,d&&(0,r.jsx)("span",{children:"*"}),l]})})})}},13024:(e,t,a)=>{a.d(t,{I:()=>s});var r=a(2551),n=a(85222),i=a(85419);let s={addArticle:(e,t)=>(0,i.a)("/api/panier/articles/".concat(e),{method:"PUT",params:{...t,quantite:(null==t?void 0:t.quantite)||1}}),addArticles:e=>(0,i.a)("/api/panier/articles",{method:"PUT",headers:r.eT,body:JSON.stringify(e)}),addChantier:e=>(0,i.a)("/api/panier/chantiers",{method:"POST",params:{libelle:e}}),addChantierArticle:e=>{let{chantierId:t,articleId:a,quantite:n=r.i$,traitCoupe:s,remise:l}=e;return(0,i.a)("/api/panier/chantiers/".concat(t,"/articles/").concat(a),{method:"PUT",params:{quantite:n,...s?{traitCoupe:s}:{},...l?{remise:l}:{}}})},addChantierArticles:e=>{let{chantierId:t,dto:a}=e;return(0,i.a)("/api/panier/chantiers/".concat(t,"/articles"),{method:"PUT",headers:r.eT,body:JSON.stringify(a)})},deleteChantier:e=>{let{chantierId:t}=e;return(0,i.a)("/api/panier/chantiers/".concat(t),{method:"DELETE"})},deleteChantierArticle:e=>{let{chantierId:t,articleId:a}=e;return(0,i.a)("/api/panier/chantiers/".concat(t,"/articles/").concat(a),{method:"DELETE"})},deleteChantierArticles:e=>{let{chantierId:t,articleIds:a}=e;return(0,i.a)("/api/panier/chantiers/".concat(t,"/articles"),{method:"DELETE",headers:r.eT,body:JSON.stringify(a)})},deleteChantierEnAttente:e=>(0,i.a)("/api/panier/chantiers-en-attente/".concat(e),{method:"DELETE"}),deleteChantierEnAttenteArticle:e=>{let{chantierId:t,articleId:a}=e;return(0,i.a)("/api/panier/chantiers-en-attente/".concat(t,"/articles/").concat(a),{method:"DELETE"})},deleteCouponReduction:()=>(0,i.a)("/api/panier/coupon-reduction",{method:"DELETE"}),deleteRapidoProjet:e=>(0,i.a)("/api/panier/rapido-projets/".concat(e),{method:"DELETE"}),get:()=>(0,i.a)("/api/panier"),getArticlesQuantite:()=>(0,i.a)("/api/panier/articles"),getChantierArticleEquivalents:e=>{let{articleId:t,chantierId:a}=e;return(0,i.a)("/api/panier/chantiers/".concat(a,"/articles/").concat(t,"/equivalents"))},getChantiers:()=>(0,i.a)("/api/panier/chantiers"),getChantiersEnAttente:()=>(0,i.a)("/api/panier/chantiers-en-attente"),getChantiersLibelles:()=>(0,i.a)("/api/panier/chantiers/libelles"),getExport:e=>(0,i.a)("/api/panier/export",{params:{...e,variante:e.variante||n.k.ParDefaut}}),getGoodies:()=>(0,i.a)("/api/panier/goodies"),getGoodiesVariantes:e=>(0,i.a)("/api/panier/goodies/".concat(e,"/variantes")),getTarif:()=>(0,i.a)("/api/panier/tarif"),headNbArticles:()=>(0,i.a)("/api/panier",{method:"HEAD"},!0),headRapidoProjet:e=>(0,i.a)("/api/panier/rapido-projets/".concat(e),{method:"HEAD"}),processChantierArticleMettreEnAttente:e=>{let{chantierId:t,articleId:a}=e;return(0,i.a)("/api/panier/chantiers/".concat(t,"/articles/").concat(a,"/mettre-en-attente"),{method:"POST"})},processChantierEnAttenteArticleMettreAuPanier:e=>{let{chantierId:t,articleId:a}=e;return(0,i.a)("/api/panier/chantiers-en-attente/".concat(t,"/articles/").concat(a,"/mettre-au-panier"),{method:"POST"})},processControler:()=>(0,i.a)("/api/panier/controler",{method:"POST"},!0),processControlerPromotionsPanier:()=>(0,i.a)("/api/panier/controler-promotions-panier",{method:"POST"}),processControlerCouponReduction:e=>(0,i.a)("/api/panier/controler-coupon-reduction",{method:"POST",params:{code:e}}),processGoodiesModifierVariante:(e,t)=>
1(0,i.a)("/api/panier/goodies/".concat(e,"/modifier-variante"),{method:"POST",params:t}),processImporter:(e,t)=>(0,i.a)("/api/panier/importer",{method:"POST",body:t,params:e}),processImporterBonCommande:e=>(0,i.a)("/api/panier/importer-bon-commande",{method:"POST",body:e}),processImporterListe:e=>{let{listeIdSource:t}=e;return(0,i.a)("/api/panier/importer-liste",{method:"POST",params:{listeId:t}})},processRapidoProjetEnAttenteMettreAuPanier:e=>(0,i.a)("/api/panier/rapido-projets-en-attente/".concat(e,"/mettre-au-panier"),{method:"POST"}),processRapidoProjetMettreEnAttente:e=>(0,i.a)("/api/panier/rapido-projets/".concat(e,"/mettre-en-attente"),{method:"POST"}),processTransformer:e=>(0,i.a)("/api/panier/transformer",{method:"POST",params:{type:e}}),processVider:()=>(0,i.a)("/api/panier/vider",{method:"POST"}),update:e=>(0,i.a)("/api/panier",{method:"PATCH",params:e}),updateArticle:(e,t)=>(0,i.a)("/api/panier/articles/".concat(e),{method:"PATCH",params:{...t,quantite:t.quantite||1}}),updateChantier:e=>{let{chantierId:t,codeServiceChorus:a,libelle:r,numeroEngagement:n,referenceCommande:s}=e;return(0,i.a)("/api/panier/chantiers/".concat(t),{method:"PATCH",params:{...void 0!==a?{codeServiceChorus:a}:{},...void 0!==r?{libelle:r}:{},...void 0!==n?{numeroEngagement:n}:{},...void 0!==s?{referenceCommande:s}:{}}})},updateChantierArticle:e=>{let{chantierId:t,articleId:a,quantite:r,traitCoupe:n}=e;return(0,i.a)("/api/panier/chantiers/".concat(t,"/articles/").concat(a),{method:"PATCH",params:{...r?{quantite:r}:{},...n?{traitCoupe:n}:{}}})}}},27707:(e,t,a)=>{a.d(t,{E:()=>i});var r=a(95155),n=a(75889);let i=e=>{let{children:t,className:a,size:i="md"}=e;return(0,r.jsx)("section",{className:(0,n.QP)("flex flex-col gap-4 pt-4","sm"!==i&&'sm:flex-row-reverse sm:flex-wrap sm:justify-between sm:[&>*[data-type="action2"]]:ml-auto','sm:[&>*:only-child]:mx-auto [&>*[data-type="close"]]:min-w-36 [&>button]:max-w-full [&>button]:min-w-40',a),children:t})}},31186:(e,t,a)=>{a.d(t,{F:()=>o,t:()=>d});let r=["confirmation","email","jeton","motDePasse","nouveauMotDePasse","password","pwd","userid","username"],n="&#\\s'\"<>()",i=RegExp("^(?:".concat(r.join("|"),")$"),"i"),s=RegExp("([?&](?:".concat(r.join("|"),")=)[^").concat(n,"]*"),"gi"),l=RegExp("(/(?:".concat("api/imports|api/paiements|jetons",")/)(?!").concat("%5B",")[^/?").concat(n,"]+"),"g"),o=e=>e.replace(s,"$1".concat("***")).replace(l,"$1".concat("***")),d=e=>"string"==typeof e?o(e):Array.isArray(e)?e.map(d):null===e||"object"!=typeof e?e:Object.fromEntries(Object.entries(e).map(e=>{let[t,a]=e;return[t,i.test(t)?"***":d(a)]}))},31621:(e,t,a)=>{a.d(t,{E1:()=>n,h6:()=>i,r2:()=>s});var r=a(25841);let n="authToken",i="BANDEAU_DELEGUE_IS_OPEN",s="SNACKBAR_CHANGEMENT_COMPTE_SUCCES";r.U.Delegue,r.U.Utilisateur},44622:(e,t,a)=>{a.d(t,{DeviceProvider:()=>s,Y:()=>l});var r=a(95155),n=a(12115);let i=(0,n.createContext)(void 0),s=e=>{let{children:t,isMobile:a}=e;return(0,r.jsx)(i.Provider,{value:{isMobile:a},children:t})},l=()=>{let e=(0,n.useContext)(i);if(!e)throw Error("useDevice doit \xeatre wrap par DeviceProvider");return e}},53010:(e,t,a)=>{a.r(t),a.d(t,{ScrollArea:()=>c});var r=a(95155),n=a(27322),i=a(48055),s=a(79070),l=a(17290),o=a(85718),d=a(75889);let c=e=>{let{children:t,className:a,contentClassName:c,disabledPadding:u,orientation:p="vertical"}=e;return(0,r.jsxs)(n.V,{className:(0,d.QP)("horizontal"===p?"w-full overflow-x-hidden":"h-full overflow-y-hidden",a),"data-base-ui-swipe-ignore":!0,children:[(0,r.jsx)(i.B,{className:(0,d.QP)("size-full","horizontal"===p?u?"pb-2":"data-[has-overflow-x]:pb-5":u?"pr-2":"data-[has-overflow-y]:pr-5",c),"data-scroll-area-viewport":"",children:(0,r.jsx)(s.q,{children:t})}),(0,r.jsx)(l.V,{className:(0,d.QP)("flex bg-gray-200 bg-clip-content transition-[padding] duration-150 motion-reduce:transition-none","horizontal"===p?"h-2 pt-1 hover:pt-0":"w-2 pl-1 hover:pl-0"),orientation:p,children:(0,r.jsx)(o.l,{className:(0,d.QP)("bg-primary rounded-full","vertical"===p&&"flex-1")})})]})}},66195:(e,t,a)=>{a.d(t,{oK:()=>v,qb:()=>g,td:()=>y});var r=a(95155),n=a(14707),i=a(20063),s=a(12115),l=a(44517),o=a(3366),d=a(57830),c=a(75889),u=a(13931),p=a(14217),m=a(81729),h=a(84518),f=a(26061),x=a(81479);let b={variants:{[h.X.Error]:"bg-error text-error-contrast",[h.X.Success]:"bg-success text-success-contrast",[h.X.Info]:"bg-gray-700 text-info-contrast"}},g=e=>{let{children:t,closeButton:a,id:o,isVisible:u,variant:g=h.X.Success}=e,{t:v}=(0,n.useTranslations)("commun"),y=(0,i.usePathname)(),[w,j]=(0,s.use
1State)(null),E=()=>{l.Ay.dismiss(o)};return(0,s.useEffect)(()=>{if(!w)return j(y);y!==w&&l.Ay.dismiss(o)},[y]),(0,s.useEffect)(()=>{!0===u&&g===h.X.Error&&(0,x.r)(f.rb.Snackbar)},[u,g]),(0,r.jsxs)("section",{className:(0,c.QP)("flex w-fit content-baseline items-center gap-x-4 gap-y-2 rounded-sm p-3 pr-2 text-base shadow-[0px_4px_12px_0px_rgba(0,_0,_0,_0.16)]",b.variants[g],u?"animate-slide-in-left opacity-1":"animate-slide-out-left opacity-0","info"===g&&!!a&&"max-sm:flex-col"),children:[(0,r.jsxs)("section",{className:"flex gap-2",children:[g===h.X.Error&&(0,r.jsx)(p.I,{as:(0,r.jsx)(d._Jm,{})}),g===h.X.Success&&(0,r.jsx)(p.I,{as:(0,r.jsx)(d.mU9,{})}),(0,r.jsx)("p",{className:"grow whitespace-pre-line",children:t})]}),g===h.X.Info&&a?(0,s.cloneElement)(a,{onClick:E}):(0,r.jsx)(m.K,{"aria-hidden":!0,"aria-label":v("fermer"),className:"text-inherit",onClick:E,children:(0,r.jsx)(d.m6K,{})})]})},v=l.Ay,y=e=>{let{boutonFermetureLabel:t,boutonHref:a,duration:n,id:i,message:s,variant:l}=e;v.custom(e=>(0,r.jsx)(g,{closeButton:t?(0,r.jsx)(u.$,{className:"mt-auto",color:"secondary",colorReversed:!0,size:"sm",variant:"outlined",children:t}):void 0,id:e.id,isVisible:e.visible,variant:l,children:(0,r.jsx)(o.x6,{components:a?{button:(0,r.jsx)(u.$,{className:"mt-2 flex w-fit",color:"secondary",colorReversed:!0,href:a,size:"sm",variant:"outlined"})}:void 0,children:s})}),{duration:n,id:i})}},74517:(e,t,a)=>{a.d(t,{d:()=>n});var r=a(12115);let n=e=>{let{value:t,delay:a}=e,[n,i]=(0,r.useState)(t);return(0,r.useEffect)(()=>{let e=setTimeout(()=>{i(t)},a);return()=>{clearTimeout(e)}},[t,a]),n}},76494:(e,t,a)=>{a.d(t,{g:()=>n});var r=a(12115);let n=()=>{let e=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{e.current=!1},[]),e.current}},78972:(e,t,a)=>{a.d(t,{R:()=>s,h:()=>o});var r=a(75889),n=a(90571);let i={[n.rk.Xs]:"px-3 py-1.5 h-8",[n.rk.Sm]:"px-4 py-[0.625rem] h-10",[n.rk.Md]:"px-4 py-[0.8125rem] h-12",[n.rk.Lg]:"px-4 py-[1.0625rem] h-14",[n.rk.Xl]:"px-4 py-[1.0625rem] h-14"},s={base:"group/field-base relative box-border inline-flex w-full rounded-sm items-center text-base text-content gap-2",input:"peer box-border w-full appearance-none border-0 bg-transparent text-left text-current outline-hidden placeholder:text-gray focus:outline-hidden [&::-ms-reveal]:hidden [&::-ms-clear]:hidden [:disabled]:placeholder:text-gray-200",variants:{[n.jj.Filled]:{base:"rounded-sm bg-gray-100",enabled:"hover:bg-gray-200 focus:bg-gray-100",readOnly:"",floating:{sizes:{[n.rk.Xs]:"px-3.5 pt-[0.875rem] pb-[0.375rem]",[n.rk.Sm]:"px-3.5 pt-[0.875rem] pb-[0.375rem]",[n.rk.Md]:"px-3.5 pt-[1.25rem] pb-[0.375rem]",[n.rk.Lg]:"px-3.5 pt-[1.625rem] pb-2",[n.rk.Xl]:"px-3.5 pt-[1.625rem] pb-2"}},noFloating:{sizes:i}},[n.jj.Outlined]:{base:"",enabled:"",readOnly:"bg-gray-100!",floating:{sizes:i},noFloating:{sizes:i}},[n.jj.Standard]:{base:'before:pointer-events-none before:absolute before:bottom-0 before:left-0 before:right-0 before:border-b before:border-solid before:border-gray-200 before:transition-[border-bottom-color] before:duration-200 before:content-[""] after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:right-0 after:scale-0 after:border-b-2 after:border-solid after:border-primary after:duration-200 after:ease-out',enabled:"hover:before:border-gray-700 focus-within:after:scale-100",readOnly:"before:border-gray",floating:{sizes:{[n.rk.Xs]:"pb-1.5 pt-px",[n.rk.Sm]:"pb-1.5 pt-px",[n.rk.Md]:"pb-1.5 pt-1",[n.rk.Lg]:"pb-2 pt-2.5",[n.rk.Xl]:"pb-2 pt-2.5"}},noFloating:{sizes:{[n.rk.Xs]:"py-1.5 h-8",[n.rk.Sm]:"py-[0.625rem] h-10",[n.rk.Md]:"py-[0.8125rem] h-12",[n.rk.Lg]:"py-[1.0625rem] h-14",[n.rk.Xl]:"py-[1.0625rem] h-14"}}}}},l={base:"rounded-sm ring-1 ring-inset ring-gray-200",baseReversed:"ring-gray text-white",disabled:"has-disabled:text-content-disabled",enabled:"hover:ring-gray-700 has-[.base--expanded]:ring-2 has-focus:ring-2 has-[.base--expanded]:ring-primary has-focus:ring-primary",enabledReversed:"hover:ring-white has-[.base--expanded]:ring-white has-focus:ring-white",readOnly:"ring-gray",error:"ring-2 ring-error!",success:"ring-2 ring-success!"},o=e=>{let{className:t,colorReversed:a,disabled:i,error:o,floatingLabel:d,readOnly:c,size:u,success:p,variant:m=n.jj.Outlined}=e,h=!i&&!c;return(0,r.QP)(s.base,s.variants[m].base,(u===n.rk.Sm||u===n.rk.Xs)&&"text-sm",h&&s.variants[m].enabled,d?m===n.jj.Standard&&"mt-4":m===n.jj.Outlined&&[l.base,a&&l.baseReversed,h&&[l.enabled,a&&l.enabledReversed],o&&l.error,p&&l.success,i?l.disabled:c&&l.readOnly],t,i?"cursor-default has-disabled:text-content-disabled":c&&["cursor-default",s.variants[m].readOnly])}},81479:(e,t,a)=>{a.d(t,{r:()=>n});var r=a(26061);let n=e=>{let t={event:r.Eh.AffichageErreur,erreurType:e};window.dataLayer=window.dataLayer||[],window.dataLayer.push(t)}},84518:(e,t,a)=>{a.d(t,{X:()=>r});let r={Error:"error",Success:"success",Info:"info"}},85222:(e,t,a)=>{a.d(t,{k:()=>r});let r={ParDefaut:0,PdfEtiquettes1:1,PdfEtiquettes2:2,PdfEtiquettes3:3}},85419:(e,t,a)=>{a.d(t,{a:()=>w,d:()=>v});var r=a(86437),n=a(20063),i=a(2551);a(31186);let s=e=>{let{baseUrl:t,body:a,method:r,params:n,result:i,url:s}=e},l=async e=>{try{return await JSON.parse(e)}catch(t){return"string"==typeof e?e:void 0}};var o=a(53931);let d="/token";var c=a(31621);let u=()=>{if("undefined"==typeof document)return null;try{let e=document.cookie.split("; ").find(e=>e.startsWith("".concat(c.E1,"=")));if(!e)return null;let t=decodeURIComponent(e.split("=").slice(1).join("="));if(!t||"null"===t)return null;return JSON.parse(t)}catch(e){return null}},p=async()=>(()=>{var e,t;return null!=(t=null==(e=u())?void 0:e.access_token)?t:null})(),m=e=>(null==e?void 0:e.expires_in)&&Date.now()>=e.expires_in-6e4,h=null,f=!1,x=async e=>{let t=u();if(!e&&t&&!m(t))return!0;let{rafraichissementTokenClient:r}=await a.e(35302).then(a.bind(a,12921));return(await r()).ok},b=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(h&&(f||!e))return h;let t=h;f=e;let a=(async()=>{t&&await t.catch(()=>void 0);try{if("undefined"!=typeof navigator&&"locks"in navigator)return await navigator.locks.request("foussier
1-auth-refresh",()=>x(e));return await x(e)}catch(e){return!1}})();return h=a,a.finally(()=>{h===a&&(h=null,f=!1)}),a},g="httpRequest error",v=e=>"object"==typeof e&&null!==e&&"ok"in e&&!1===e.ok,y=async(e,t,r,s)=>{var c,h;let f,x,v;try{let n,l=e===d;!l&&!s&&(()=>{let e=u();return!!e&&!!m(e)})()&&await b(),n=await p();let{params:o,baseUrl:h,headers:g,...w}=null!=t?t:{},j=(e=>{let{baseUrl:t,params:a,url:r}=e,n=new URL(r||"",t);return Object.entries(null!=a?a:{}).forEach(e=>{let[t,a]=e;return n.searchParams.set(t,(null!=a?a:"").toString())}),n})({baseUrl:h||i.JR,params:o,url:e});if((f=await fetch(j.toString(),{...w,headers:{...n&&{Authorization:"Bearer ".concat(n)},...g}})).ok){let e=null!=(c=f.headers.get("Content-Type"))?c:"";if(["application/pdf","application/octet-stream"].includes(e))return{ok:!0,data:await f.blob(),status:f.status||200,...r&&{headers:f.headers}};if(e.includes("text/html"))return{ok:!0,data:await f.text(),status:f.status||200,...r&&{headers:f.headers}};return v=(x=await f.text())?await JSON.parse(x):{},{ok:!0,data:v,status:f.status||200,...r&&{headers:f.headers}}}if(401===f.status&&!s&&!l){if(0){let{rafraichissementTokenServeur:n}=await a.e(37487).then(a.bind(a,37487)),i=await n();if(i){let a={...t,headers:{...null==t?void 0:t.headers,Authorization:"Bearer ".concat(i)}};return y(e,a,r,!0)}}else if(await b(!0))return y(e,t,r,!0)}if(401!==f.status)throw f}catch(t){if(!(t instanceof Response))return{ok:!1,status:0,message:(null==t?void 0:t.message)||g,data:{url:e}};try{let a=await t.text(),n=null!=(h=await l(a))?h:{};if("string"==typeof n)return{ok:!1,status:t.status||500,message:n,data:{url:e},...r&&{headers:t.headers}};return{ok:!1,status:t.status||500,message:t.statusText||g,data:{...n,url:e},...r&&{headers:t.headers}}}catch(a){return{ok:!1,status:t.status||500,message:g,data:{url:e},...r&&{headers:t.headers}}}}(0,n.redirect)((0,o.I)("connexion"))},w=async(e,t,a)=>{let n,i=Error(),l={baseUrl:null==t?void 0:t.baseUrl,body:e===d||null==t?void 0:t.body,method:null==t?void 0:t.method,params:null==t?void 0:t.params,url:e};try{n=await y(e,t,a,!1)}catch(t){let e=(0,r.isRedirectError)(t);throw s({...l,result:{ok:!1,status:401*!!e,message:e?"\xe9chec du rafra\xeechissement du token, redirection vers la page de connexion":(null==t?void 0:t.message)||g}}),t}return(s({...l,result:n}),n.ok||!i)?n:{...n,stack:i.stack}}},85909:(e,t,a)=>{a.d(t,{Q:()=>k});var r=a(95155),n=a(14707),i=a(61992),s=a(74696),l=a(54442),o=a(80128),d=a(12115),c=a(57830),u=a(75889),p=a(99265),m=a(12830),h=a(78972),f=a(90571),x=a(81729),b=a(74517),g=a(76494);let v={[f.rk.Xs]:p.Ni.Sm,[f.rk.Sm]:p.Ni.Sm,[f.rk.Md]:p.Ni.Md,[f.rk.Lg]:p.Ni.Lg,[f.rk.Xl]:p.Ni.Lg},y={maximumFractionDigits:0,useGrouping:!1},w=["input-change","input-clear","input-paste"],j=["End","Home"],E=e=>{let{max:t,min:a,step:r,value:n}=e,i=n%r,s=Math.sign(i);return Math.min(Math.max(Math.abs(i)>r/2?n+s*(r-Math.abs(i)):n-s*Math.abs(i),a),t)},k=(0,d.forwardRef)((e,t)=>{let{className:a,defaultValue:p,disabled:k,disableInputChangeEvent:C=!1,endAdornment:N,error:P,floatingLabel:S,id:A,inputClassName:T,inputMode:O,labelEndAdornment:_,max:M,min:z,name:R,onBlur:D,onChange:L,readOnly:X,required:I,size:Q=f.rk.Md,startAdornment:q,step:F,success:U,value:B,variant:H=f.jj.Outlined,withButtons:K=!0,withDebounce:V=!0,withInitialValue:J=!0,...$}=e,{i18n:G,t:Y}=(0,n.useTranslations)("ui.number-input"),W=(0,d.useRef)(!1),Z=(0,g.g)(),ee=void 0!==p?Number(p):void 0,et=!!L,ea=void 0!==B?Number(B):void 0,er=F?Number(F):1,en=z?Number(z):0;en&&1!==er&&en%er!=0&&(en=Math.ceil(en/er)*er);let ei=M?Number(M):1e4;ei&&1!==er&&ei%er!=0&&(ei=Math.floor(ei/er)*er);let es=(0,d.useMemo)(()=>{var e;return J?Math.min(Math.max(null!=(e=et?ea:ee)?e:1,en),ei):null},[et,ea,ee,en,ei,J]),[el,eo]=(0,d.useState)(es),ed=(0,b.d)({value:el,delay:500}),ec=K&&!k&&!X,eu=(0,h.h)({className:a,disabled:k,error:P,floatingLabel:!!S,readOnly:X,size:Q,success:U,variant:H}),ep={[f.rk.Xs]:"px-9 text-base",[f.rk.Sm]:"px-9 text-base",[f.rk.Md]:"px-11 text-lg",[f.rk.Lg]:"px-11 text-lg",[f.rk.Xl]:"px-11 text-lg"};return(0,d.useEffect)(()=>{eo(es)},[es]),(0,d.useEffect)(()=>{Z||W.current||!V||null===ed||null==L||L(ed)},[ed]),(0,d.useEffect)(()=>{Z||V||null===el||null==L||L(el)},[el]),(0,r.jsxs)("div",{className:eu,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,r.jsxs)(i.q,{className:(0,u.QP)("w-full",!K&&"flex items-baseline gap-2 px-4"),disabled:k,format:y,id:A,largeStep:10*er,locale:G.language,max:ei,min:en,onValueChange:(e,t)=>
1{if("input-blur"!==t.reason&&!(C&&w.includes(t.reason))){if(W.current=!1,"input-clear"===t.reason)return void eo(J?Math.min(Math.max(0,en),ei):null);if(null===e)return void eo(1);eo(w.includes(t.reason)?e:E({max:ei,min:en,step:er,value:e}))}},readOnly:X,required:I,smallStep:er,step:er,value:el,children:[ec&&(0,r.jsx)(s.X,{render:(0,r.jsx)(x.K,{"aria-label":Y("retirer"),className:"absolute top-0 bottom-0 left-2 my-auto h-fit min-w-fit p-1",color:"default",size:v[Q],children:(0,r.jsx)(c.ak5,{})})}),q,(0,r.jsx)(l.Y,{"aria-invalid":P,"aria-roledescription":Y("champ-numerique"),className:(0,u.QP)(h.R.input,h.R.variants[H][S?"floating":"noFloating"].sizes[Q],ep[Q],K&&!N&&!q&&"text-center",!K&&"px-0",T),name:R,onBlur:e=>{if(!J&&""===e.target.value)return;W.current=!0;let t=parseInt(e.target.value,10),a=E({max:ei,min:en,step:er,value:isNaN(t)?0:t});eo(a),ed!==a&&(null==L||L(a)),null==D||D(a)},onKeyDown:e=>{j.includes(e.key)&&e.preventBaseUIHandler()},ref:t,...$}),N,ec&&(0,r.jsx)(o.P,{render:(0,r.jsx)(x.K,{"aria-label":Y("ajouter"),className:"absolute top-0 right-2 bottom-0 my-auto h-fit min-w-fit p-1",color:"primary",size:v[Q],children:(0,r.jsx)(c.jgn,{})})})]}),S&&"outlined"===H&&(0,r.jsx)(m.X,{disabled:k,error:P,labelEndAdornment:_,readOnly:X,required:I,size:Q,success:U,children:S})]})});k.displayName="NumberInput"},88994:(e,t,a)=>{a.d(t,{R:()=>s});var r=a(95155),n=a(75889),i=a(53010);let s=e=>{let{children:t,className:a,disableScrollArea:s=!1,size:l="md"}=e;return(0,r.jsx)("section",{className:(0,n.QP)("flex-auto py-4","sm"!==l&&"sm:py-6",s?"overflow-y-auto":"flex overflow-hidden",a),children:s?t:(0,r.jsx)(i.ScrollArea,{className:"h-auto w-full",children:t})})}},89747:(e,t,a)=>{a.d(t,{_:()=>v});var r=a(95155),n=a(88963),i=a(49335),s=a(29751),l=a(43252),o=a(64831),d=a(12115),c=a(75889),u=a(14707),p=a(49655),m=a(57830),h=a(81729),f=a(81957);let x=e=>{let{children:t,disableClosing:a=!1,id:n,className:i}=e,{t:s}=(0,u.useTranslations)("commun");return(0,r.jsxs)("section",{className:(0,c.QP)("flex min-h-14 shrink-0 items-start justify-between gap-4 border-b border-gray-200 p-2 sm:px-4 sm:py-5",i),children:[(0,r.jsx)(f.o,{className:"px-2 py-1.5 leading-[1.625rem] sm:text-xl",id:n,variant:"h4",children:t}),!a&&(0,r.jsx)(p.c,{render:(0,r.jsx)(h.K,{"aria-label":s("fermer"),children:(0,r.jsx)(m.m6K,{})})})]})};var b=a(93396);let g={anchor:{bottom:"bottom-0 left-0 right-0 w-full max-h-full",left:"top-0 left-0 h-full max-w-full w-[29.25rem]",right:"top-0 right-0 h-full max-w-full w-[29.25rem]"},animation:{bottom:"translate-y-0 data-starting-style:translate-y-full data-ending-style:translate-y-full",left:"translate-x-0 data-starting-style:-translate-x-full data-ending-style:-translate-x-full",right:"translate-x-0 data-starting-style:translate-x-full data-ending-style:translate-x-full"},swipeDirection:{bottom:"down",left:"left",right:"right"}},v=e=>{let{anchor:t="left",children:a,className:u,contentClassName:p,disableClosing:m,disableContent:h,disableTitle:f,id:v,isOpen:y,onClose:w,onOpen:j,title:E,trigger:k,headerClassName:C}=e,N="".concat(v,"_label"),P=(0,b.L)(),S=(0,d.useRef)(!1),[A,T]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{if(!y)return void T(!1);let e=requestAnimationFrame(()=>{S.current=!0,T(!0)});return()=>cancelAnimationFrame(e)},[y]),(0,r.jsxs)(r.Fragment,{children:[!!k&&(0,d.cloneElement)(k,{onClick:j}),(0,r.jsxs)(n.K,{onOpenChange:(e,t)=>
1{var a,r;!e&&(a=t.event,r=t.reason,m||w(a,r))},onOpenChangeComplete:e=>{var t;!e&&S.current&&(null==P||null==(t=P.onClosed)||t.call(P))},open:y&&A,swipeDirection:g.swipeDirection[t],children:[(0,r.jsxs)(i.u,{children:[(0,r.jsx)(s.o,{className:(0,c.QP)("fixed top-0 right-0 bottom-0 left-0 z-(--z-modal) bg-black/50 opacity-100 transition-opacity duration-200","data-ending-style:opacity-0 data-starting-style:opacity-0",(null==P?void 0:P.isBackdropTransparent)&&"bg-transparent"),forceRender:!0}),(0,r.jsx)(l.U,{className:(0,c.QP)("fixed z-(--z-modal) flex",g.anchor[t],u),children:(0,r.jsx)(o.U,{"aria-labelledby":N,className:(0,c.QP)("flex h-auto w-full flex-col bg-white shadow-[0px_2px_3px_0px_rgba(0,_0,_0,_0.3)] transition-transform duration-200",(null==P?void 0:P.isHidden)&&"invisible",!h&&"*:w-full *:px-4 sm:*:px-6 [&>*:last-child]:pb-6",g.animation[t],p),id:v,tabIndex:-1,children:h?a:(0,r.jsxs)(r.Fragment,{children:[!f&&(0,r.jsx)(x,{className:C,disableClosing:m,id:N,children:E}),d.Children.map(a,e=>(0,d.cloneElement)(e,{anchor:t}))]})})})]}),null==P?void 0:P.above]})]})}},90571:(e,t,a)=>{a.d(t,{jj:()=>i,rk:()=>n,ug:()=>r});let r="input",n={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg",Xl:"xl"},i={Filled:"filled",Outlined:"outlined",Standard:"standard"}},93396:(e,t,a)=>{a.d(t,{L:()=>l,y:()=>s});var r=a(95155),n=a(12115);let i=(0,n.createContext)(void 0),s=e=>{let{above:t,children:a,isHidden:n,isBackdropTransparent:s,onClosed:l}=e;return(0,r.jsx)(i.Provider,{value:{above:t,isHidden:n,isBackdropTransparent:s,onClosed:l},children:a})},l=()=>(0,n.useContext)(i)},94676:(e,t,a)=>{a.d(t,{x:()=>r});let r=e=>[...e].sort((e,t)=>!!e.libelle-!!t.libelle)},94765:(e,t,a)=>{a.d(t,{L:()=>n});var r=a(13024);let n=function(){let{onSuccess:e,onError:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{mutationFn:async e=>{let t=await r.I.updateChantierArticle(e);if(!t.ok)throw t;return t.data},onSuccess:e,onError:t}}}}]);
2//# sourceMappingURL=9862.dbe834d98268b2ce.js.map

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.