@proprioo/salatim 30.1.2 → 30.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/index.js +19 -17
- package/lib/index.js.map +1 -1
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.js +1 -1
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.js.map +1 -1
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.styles.d.ts +1 -0
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.styles.js +4 -1
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.styles.js.map +1 -1
- package/lib/ui/index.d.ts +14 -8
- package/lib/ui/index.js +2 -1
- package/lib/ui/index.js.map +1 -1
- package/lib/ui/src/accordion/Accordion.d.ts +0 -1
- package/lib/ui/src/accordion/Accordion.interfaces.d.ts +1 -1
- package/lib/ui/src/accordion/Accordion.interfaces.js.map +1 -1
- package/lib/ui/src/accordion/Accordion.js.map +1 -1
- package/lib/ui/src/accordion/AccordionContextProvider.d.ts +3 -3
- package/lib/ui/src/accordion/AccordionContextProvider.js.map +1 -1
- package/lib/ui/src/accordion/AccordionStore.d.ts +1 -1
- package/lib/ui/src/accordion/ItemContextProvider.d.ts +3 -3
- package/lib/ui/src/accordion/ItemContextProvider.js.map +1 -1
- package/lib/ui/src/block/Block.d.ts +1 -5
- package/lib/ui/src/block/Block.interfaces.d.ts +5 -0
- package/lib/ui/src/block/Block.interfaces.js +3 -0
- package/lib/ui/src/block/Block.interfaces.js.map +1 -0
- package/lib/ui/src/block/Block.js.map +1 -1
- package/lib/ui/src/block/Block.styles.d.ts +1 -1
- package/lib/ui/src/burger/Burger.d.ts +1 -6
- package/lib/ui/src/burger/Burger.interfaces.d.ts +6 -0
- package/lib/ui/src/burger/Burger.interfaces.js +3 -0
- package/lib/ui/src/burger/Burger.interfaces.js.map +1 -0
- package/lib/ui/src/burger/Burger.js.map +1 -1
- package/lib/ui/src/burger/Burger.styles.d.ts +1 -1
- package/lib/ui/src/burger/Burger.test.js.map +1 -1
- package/lib/ui/src/button/Button.d.ts +2 -15
- package/lib/ui/src/button/Button.interfaces.d.ts +14 -0
- package/lib/ui/src/button/Button.interfaces.js.map +1 -1
- package/lib/ui/src/button/Button.js.map +1 -1
- package/lib/ui/src/button/Button.styles.d.ts +1 -1
- package/lib/ui/src/button/Button.styles.js.map +1 -1
- package/lib/ui/src/button/Button.test.js.map +1 -1
- package/lib/ui/src/card/Card.d.ts +2 -22
- package/lib/ui/src/card/Card.interfaces.d.ts +22 -0
- package/lib/ui/src/card/Card.interfaces.js +9 -0
- package/lib/ui/src/card/Card.interfaces.js.map +1 -0
- package/lib/ui/src/card/Card.js +2 -7
- package/lib/ui/src/card/Card.js.map +1 -1
- package/lib/ui/src/card/Card.stories.js.map +1 -1
- package/lib/ui/src/card/Card.styles.d.ts +1 -1
- package/lib/ui/src/card/Card.test.js.map +1 -1
- package/lib/ui/src/input/Input.d.ts +3 -3
- package/lib/ui/src/inputBase/InputBase.d.ts +2 -17
- package/lib/ui/src/inputBase/InputBase.interfaces.d.ts +17 -0
- package/lib/ui/src/inputBase/InputBase.interfaces.js +3 -0
- package/lib/ui/src/inputBase/InputBase.interfaces.js.map +1 -0
- package/lib/ui/src/inputBase/InputBase.js.map +1 -1
- package/lib/ui/src/loader/Loader.d.ts +1 -6
- package/lib/ui/src/loader/Loader.interfaces.d.ts +6 -0
- package/lib/ui/src/loader/Loader.interfaces.js +3 -0
- package/lib/ui/src/loader/Loader.interfaces.js.map +1 -0
- package/lib/ui/src/loader/Loader.js.map +1 -1
- package/lib/ui/src/loader/Loader.styles.d.ts +1 -1
- package/lib/ui/src/modal/Modal.d.ts +1 -25
- package/lib/ui/src/modal/Modal.interfaces.d.ts +38 -0
- package/lib/ui/src/modal/Modal.interfaces.js +19 -0
- package/lib/ui/src/modal/Modal.interfaces.js.map +1 -0
- package/lib/ui/src/modal/Modal.js +3 -2
- package/lib/ui/src/modal/Modal.js.map +1 -1
- package/lib/ui/src/modal/Modal.reducer.d.ts +1 -13
- package/lib/ui/src/modal/Modal.reducer.js +18 -32
- package/lib/ui/src/modal/Modal.reducer.js.map +1 -1
- package/lib/ui/src/modal/Modal.styles.d.ts +1 -2
- package/lib/ui/src/modal/Modal.styles.js +2 -2
- package/lib/ui/src/modal/Modal.styles.js.map +1 -1
- package/lib/ui/src/textarea/Textarea.d.ts +1 -20
- package/lib/ui/src/textarea/Textarea.interfaces.d.ts +20 -0
- package/lib/ui/src/textarea/Textarea.interfaces.js +3 -0
- package/lib/ui/src/textarea/Textarea.interfaces.js.map +1 -0
- package/lib/ui/src/textarea/Textarea.js.map +1 -1
- package/lib/ui/src/textarea/Textarea.styles.d.ts +2 -3
- package/lib/ui/src/textarea/Textarea.styles.js.map +1 -1
- package/lib/ui/src/textarea/Textarea.test.js.map +1 -1
- package/lib/ui/src/title/H1.d.ts +1 -1
- package/lib/ui/src/title/H1.js.map +1 -1
- package/lib/ui/src/title/H1.styles.d.ts +1 -1
- package/lib/ui/src/title/H1.styles.js.map +1 -1
- package/lib/ui/src/title/H2.d.ts +1 -1
- package/lib/ui/src/title/H2.js.map +1 -1
- package/lib/ui/src/title/H2.styles.d.ts +1 -1
- package/lib/ui/src/title/H2.styles.js.map +1 -1
- package/lib/ui/src/title/H3.d.ts +1 -1
- package/lib/ui/src/title/H3.js.map +1 -1
- package/lib/ui/src/title/H3.styles.d.ts +1 -1
- package/lib/ui/src/title/H3.styles.js.map +1 -1
- package/lib/ui/src/title/H4.d.ts +1 -1
- package/lib/ui/src/title/H4.js.map +1 -1
- package/lib/ui/src/title/H4.styles.d.ts +1 -1
- package/lib/ui/src/title/H4.styles.js.map +1 -1
- package/lib/ui/src/title/H5.d.ts +1 -1
- package/lib/ui/src/title/H5.js.map +1 -1
- package/lib/ui/src/title/H5.styles.d.ts +1 -1
- package/lib/ui/src/title/H5.styles.js.map +1 -1
- package/lib/ui/src/title/H6.d.ts +1 -1
- package/lib/ui/src/title/H6.js.map +1 -1
- package/lib/ui/src/title/H6.styles.d.ts +1 -1
- package/lib/ui/src/title/H6.styles.js.map +1 -1
- package/lib/ui/src/title/Title.d.ts +6 -12
- package/lib/ui/src/title/Title.interfaces.d.ts +6 -0
- package/lib/ui/src/title/Title.interfaces.js +3 -0
- package/lib/ui/src/title/Title.interfaces.js.map +1 -0
- package/lib/ui/src/title/Title.js.map +1 -1
- package/lib/ui/src/title/Title.styles.d.ts +1 -1
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -1819,7 +1819,7 @@ object-assign
|
|
|
1819
1819
|
}
|
|
1820
1820
|
`,fP=p.default.span`
|
|
1821
1821
|
display: inline-block;
|
|
1822
|
-
`,pP=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),hP=({isArrowHidden:t,isFollowingCursor:n,usePortal:o=pP,children:a,tooltip:i,trigger:s=(q()?"click":"hover"),maxWidth:u="300px",delayHide:c,delayShow:d,placement:f="auto",interactive:p=!1,isVisible:h=!0})=>{const{getTooltipProps:y,getArrowProps:b,setTooltipRef:g,setTriggerRef:v,visible:m}=cP({trigger:s,followCursor:n,delayHide:c,delayShow:d,placement:f,offset:[0,0],interactive:p}),x=e.jsx(dP,{children:e.jsxs("div",Object.assign({},y({className:"tooltip-container",style:{maxWidth:u}}),{ref:g,children:[!t&&e.jsx("div",Object.assign({},b({className:"tooltip-arrow"}),{"data-popper-arrow":!0})),i]}))}),w=pP?document.body:null;return e.jsxs(fP,{ref:v,"data-test":"tooltip-wrapped-component",children:[a,h&&m&&e.jsx(r.Fragment,{children:o&&w?l.createPortal(x,w):x})]})},yP=p.default.div`
|
|
1822
|
+
`,pP=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),hP=({isArrowHidden:t,isFollowingCursor:n,usePortal:o=pP,children:a,tooltip:i,trigger:s=(q()?"click":"hover"),maxWidth:u="300px",delayHide:c,delayShow:d,placement:f="auto",interactive:p=!1,isVisible:h=!0})=>{const{getTooltipProps:y,getArrowProps:b,setTooltipRef:g,setTriggerRef:v,visible:m}=cP({trigger:s,followCursor:n,delayHide:c,delayShow:d,placement:f,offset:[0,0],interactive:p}),x=e.jsx(dP,{children:e.jsxs("div",Object.assign({},y({className:"tooltip-container",style:{maxWidth:u}}),{ref:g,children:[!t&&e.jsx("div",Object.assign({},b({className:"tooltip-arrow"}),{"data-popper-arrow":!0})),i]}))}),w=pP?document.body:null;return e.jsxs(fP,{ref:v,"data-test":"tooltip-wrapped-component",children:[a,h&&m&&e.jsx(r.Fragment,{children:o&&w?l.createPortal(x,w):x})]})};var yP;exports.CardHeaderIconSize=void 0,(yP=exports.CardHeaderIconSize||(exports.CardHeaderIconSize={}))[yP.MEDIUM=32]="MEDIUM",yP[yP.SMALL=18]="SMALL";const bP=p.default.div`
|
|
1823
1823
|
background: white;
|
|
1824
1824
|
border: ${w(1)} solid ${x.grey.base40};
|
|
1825
1825
|
box-shadow: ${z.level1};
|
|
@@ -1835,7 +1835,7 @@ object-assign
|
|
|
1835
1835
|
background: ${x.background};
|
|
1836
1836
|
color: ${x.dark.base40};
|
|
1837
1837
|
`}
|
|
1838
|
-
`,
|
|
1838
|
+
`,gP=p.default.div`
|
|
1839
1839
|
${R.body2}
|
|
1840
1840
|
display: flex;
|
|
1841
1841
|
align-items: center;
|
|
@@ -1846,11 +1846,11 @@ object-assign
|
|
|
1846
1846
|
${({hasToggle:e,disabled:t})=>e&&!t&&o.css`
|
|
1847
1847
|
cursor: pointer;
|
|
1848
1848
|
`}
|
|
1849
|
-
`,gP=p.default.span`
|
|
1850
|
-
display: flex;
|
|
1851
1849
|
`,vP=p.default.span`
|
|
1850
|
+
display: flex;
|
|
1851
|
+
`,mP=p.default.span`
|
|
1852
1852
|
margin-left: ${w(8)};
|
|
1853
|
-
`,
|
|
1853
|
+
`,xP=p.default.div`
|
|
1854
1854
|
position: relative;
|
|
1855
1855
|
display: flex;
|
|
1856
1856
|
|
|
@@ -1861,7 +1861,7 @@ object-assign
|
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
1863
|
}
|
|
1864
|
-
`,
|
|
1864
|
+
`,wP=p.default.div`
|
|
1865
1865
|
margin: 0 ${w(8)} 0 ${w(-8)};
|
|
1866
1866
|
|
|
1867
1867
|
> svg {
|
|
@@ -1873,21 +1873,21 @@ object-assign
|
|
|
1873
1873
|
fill: ${({headerIconColor:e})=>e};
|
|
1874
1874
|
}
|
|
1875
1875
|
}
|
|
1876
|
-
`,wP=p.default.div`
|
|
1877
|
-
display: flex;
|
|
1878
|
-
align-items: center;
|
|
1879
1876
|
`,OP=p.default.div`
|
|
1880
1877
|
display: flex;
|
|
1878
|
+
align-items: center;
|
|
1881
1879
|
`,$P=p.default.div`
|
|
1880
|
+
display: flex;
|
|
1881
|
+
`,_P=p.default.div`
|
|
1882
1882
|
${({noPadding:e})=>!e&&o.css`
|
|
1883
1883
|
padding: ${w(24)};
|
|
1884
1884
|
`}
|
|
1885
1885
|
|
|
1886
|
-
${
|
|
1886
|
+
${gP} + &,
|
|
1887
1887
|
& + & {
|
|
1888
1888
|
border-top: ${w(1)} solid ${x.grey.base40};
|
|
1889
1889
|
}
|
|
1890
|
-
`,
|
|
1890
|
+
`,SP=p.default.div`
|
|
1891
1891
|
display: flex;
|
|
1892
1892
|
align-items: center;
|
|
1893
1893
|
`;p.default.div`
|
|
@@ -1899,7 +1899,7 @@ object-assign
|
|
|
1899
1899
|
height: 100%;
|
|
1900
1900
|
transform: scale(1.4);
|
|
1901
1901
|
}
|
|
1902
|
-
`;const
|
|
1902
|
+
`;const PP=w(8),kP=p.default.button`
|
|
1903
1903
|
${G};
|
|
1904
1904
|
position: relative;
|
|
1905
1905
|
min-width: ${w(32)};
|
|
@@ -1912,9 +1912,9 @@ object-assign
|
|
|
1912
1912
|
left: ${w(8)};
|
|
1913
1913
|
width: 0;
|
|
1914
1914
|
height: 0;
|
|
1915
|
-
border-left: ${
|
|
1916
|
-
border-right: ${
|
|
1917
|
-
border-top: ${
|
|
1915
|
+
border-left: ${PP} solid transparent;
|
|
1916
|
+
border-right: ${PP} solid transparent;
|
|
1917
|
+
border-top: ${PP} solid ${x.dark.base80};
|
|
1918
1918
|
transition: all 0.2s ease-out;
|
|
1919
1919
|
}
|
|
1920
1920
|
|
|
@@ -1926,7 +1926,7 @@ object-assign
|
|
|
1926
1926
|
&:not(:first-child) {
|
|
1927
1927
|
margin-left: ${w(8)};
|
|
1928
1928
|
}
|
|
1929
|
-
`;var
|
|
1929
|
+
`;var CP;exports.CheckboxSize=void 0,(CP=exports.CheckboxSize||(exports.CheckboxSize={})).BIG="big",CP.SMALL="small";const EP=p.default.div`
|
|
1930
1930
|
display: flex;
|
|
1931
1931
|
align-items: center;
|
|
1932
1932
|
position: relative;
|
|
@@ -2753,5 +2753,7 @@ object-assign
|
|
|
2753
2753
|
`,AC=p.default.span`
|
|
2754
2754
|
${_};
|
|
2755
2755
|
color: ${({color:e})=>e};
|
|
2756
|
-
`;exports.Accordion=({children:t,preExpanded:r,allowMultipleExpanded:n})=>e.jsx(o$,{preExpanded:r,allowMultipleExpanded:n,children:t}),exports.AccordionHeader=({isAlternative:t,basic:r,children:n})=>e.jsx(_$,{children:({expanded:o,toggleExpanded:a})=>e.jsxs(y$,{onClick:()=>a(),"data-test":"accordion-header",children:[e.jsx(b$,{isAlternative:t,basic:r,children:n}),e.jsx(g$,{isOpen:o,children:e.jsx(P$,{})})]})}),exports.AccordionItem=S$,exports.AccordionPanel=({children:t,unmountOnCollapse:n})=>e.jsx(_$,{children:({expanded:o})=>e.jsx(v$,{isOpen:o,children:!n||o?e.jsx("div",{"data-test":"panel-content",children:t}):e.jsx(r.Fragment,{})})}),exports.AgentBanner=({children:t,agent:{image_agent:r,name:n,zone:o,fonction:a},rounded:i=!0})=>e.jsxs(E$,{"data-test":"agent-card",rounded:i,children:[e.jsxs(A$,{children:[n&&e.jsx(C$,{title:n,color:x.green.base}),a&&e.jsx(I$,{"data-test":"agent-fonction",children:a}),o&&e.jsx(I$,{"data-test":"agent-zone",children:o}),t]}),e.jsx(j$,{children:e.jsx(T$,{children:e.jsx(D$,{"data-test":"agent-image",src:r,loading:"lazy"})})})]}),exports.AgentCard=U$,exports.Autocomplete=t=>{var{list:o,native:a=!1,option:i,onSelect:l}=t,s=Ux(t,["list","native","option","onSelect"]);const[{hasFullList:u,internalValue:c,isFocused:d},f]=r.useReducer(((e,t)=>Object.assign(Object.assign({},e),t)),{hasFullList:!1,internalValue:(null==i?void 0:i.label)||"",isFocused:!1}),p=o.filter((({label:e})=>n.normalizeString(e).includes(n.normalizeString(c)))),h=Boolean(c.length>1&&!u)?p:o,y=(e="")=>{e||l(null),f({hasFullList:!1,internalValue:e})};return r.useEffect((()=>{(null==i?void 0:i.label)?y(i.label):f({internalValue:""})}),[i]),e.jsx(d_,Object.assign({focused:d,isAutocomplete:!0,native:a,option:i,options:a?o:h,onBlur:()=>f({hasFullList:!1,isFocused:!1}),onChange:y,onFocus:()=>{f({hasFullList:!0,isFocused:!0})},onSelect:e=>l(e),value:c},s))},exports.BagossFont=$,exports.Block=({children:t,picture:r,isCompact:n,isRounded:o})=>e.jsxs(h_,{isRounded:o,"data-test":"block",children:[r&&e.jsx(p_,{picture:r,"data-test":"picture"}),e.jsx(f_,{isCompact:n,children:t})]}),exports.BlockCheckIcon=({onClick:t,image:r,checked:n,name:o,text:a,dataTest:i})=>{const l=`checkbox-input-label-${a}`;return e.jsxs(R_,{checked:n,"data-test":i||`checkbox-button-${a}`,children:[e.jsx(M_,{"aria-labelledby":l,checked:n,name:o,onChange:({target:e})=>t(e.checked),type:"checkbox"}),e.jsx(F_,{children:r}),e.jsx("span",{id:l,children:a})]})},exports.BlockIcon=function({onClick:t,image:r,text:n,name:o,selectedValue:a,dataTest:i,value:l,isContentCentered:s=!1}){const u=a===l,c=`radio-input-label-${n}`;return e.jsxs(N_,{"data-test":i||`radio-button-${n}`,isActive:u,isContentCentered:s,children:[e.jsx(M_,{"aria-labelledby":c,checked:u,name:o,onChange:()=>t(l),type:"radio"}),e.jsx("span",{id:c,children:n}),r]})},exports.Burger=({isOpen:t,isSmall:r=!1,onClick:n,color:o})=>e.jsxs(g_,{"data-test":"burger",onClick:n,isOpen:t,isSmall:r,color:o,children:[e.jsx(b_,{}),e.jsx(b_,{}),e.jsx(b_,{})]}),exports.Button=t=>{var{appearance:n=exports.ButtonAppearance.PRIMARY,icon:o,iconPosition:a=exports.IconPosition.RIGHT,label:i,rounded:l=!1,size:s=exports.ButtonSizes.LARGE,theme:u=exports.ButtonTheme.BLACK}=t,c=Ux(t,["appearance","icon","iconPosition","label","rounded","size","theme"]);return e.jsxs(D_,Object.assign({appearance:n,"aria-label":i,icon:o,iconPosition:a,rounded:l,size:s,theme:u},c,{children:[o&&e.jsx(E_,{appearance:n,iconPosition:a,size:s,theme:u,children:r.isValidElement(o)?r.cloneElement(o,{"aria-hidden":!0,focusable:!1}):o}),!l&&e.jsx(C_,{"data-test":"label",children:i})]}))},exports.ButtonRadio=A_,exports.ButtonRadioGroup=({label:t,name:r,onChange:n,options:o,value:a})=>e.jsx(I_,{role:"radiogroup","aria-label":t,children:o.map((t=>e.jsx(A_,{isChecked:a===t.value,name:r,option:t,onClick:()=>n(t)},`radio-option-${t.value}`)))}),exports.Card=({children:t,after:n,dataTest:o="card-layout",disabled:a=!1,label:i,labelAfter:l,noPadding:s,hasToggle:u=!1,headerIcon:c,headerIconColor:d=x.dark.base,headerIconSize:f=exports.CardHeaderIconSize.MEDIUM,isOpen:p,toggleLabel:h,tooltip:y,onOpen:b,onClose:g})=>{const v=void 0!==p,[m,w]=r.useState(p||!1),O=v&&u&&!g,$=v&&u&&!b,_=W();return r.useEffect((()=>{v&&w(p)}),[p,v]),e.jsxs(yP,{"data-test":o,disabled:a,id:i,children:[e.jsxs(bP,{onClick:u&&!a?()=>m?(v&&!O||w(!1),void(g&&g())):(v&&!$||w(!0),void(b&&b())):void 0,hasToggle:u,disabled:a,children:[e.jsxs(wP,{"data-test":"title-container",children:[c&&e.jsx(xP,{headerIconColor:d,headerIconSize:f,children:c}),e.jsx("div",{"data-test":`title-${o}`,dangerouslySetInnerHTML:{__html:i}}),l&&e.jsx(vP,{children:l}),y&&e.jsx(gP,{onClick:e=>e.stopPropagation(),children:e.jsx(hP,{tooltip:y,placement:"auto",children:e.jsx(mP,{children:e.jsx(L_,{fill:x.grey.base})})})})]}),(n||u)&&e.jsxs(OP,{children:[n&&e.jsx(gP,{onClick:e=>e.stopPropagation(),children:n}),u&&e.jsxs(_P,{children:[!_&&h&&e.jsx("span",{"data-test":"toggle-label",children:h}),e.jsx(PP,{"aria-expanded":m,"aria-label":m?"Cacher le contenu":h||"Afficher le contenu","aria-controls":i})]})]})]}),(!u&&t||u&&m)&&e.jsx($P,{noPadding:s,"data-test":"body-card",children:t})]})},exports.Checkbox=({checkboxSize:t=exports.CheckboxSize.SMALL,checked:r,children:o,dataTest:a,disabled:i,id:l,indeterminate:s=!1,label:u,name:c,onChange:d})=>{const f=`${l}-${c}`;return e.jsxs(EP,{checkboxSize:t,"data-test":a||`checkbox-${c}`,children:[e.jsx(TP,Object.assign({},Boolean(o)&&{"aria-label":u},{checkboxSize:t,checked:r,"data-test":a?`checkbox-${a}`:"checkbox-input",disabled:i,id:f,indeterminate:s,name:c,onChange:({target:e})=>d(e.checked),type:"checkbox"})),e.jsx(DP,{checkboxSize:t,"data-test":a?`checkbox-label-${a}`:"checkbox-label",hasLabel:n.isNotEmpty(u),htmlFor:f,children:o||e.jsx(jP,{dangerouslySetInnerHTML:{__html:u}})})]})},exports.Container=O,exports.DateInput=IP,exports.DatePicker=({date:t,dataTest:n,disabled:o,error:a,focused:i=!1,formatter:l,isDayBlocked:s,label:u,onDateChange:d,zIndex:f})=>{const p=r.useRef(null),[h,y]=r.useState(!1),[b,g]=r.useState(!1),v=r.useCallback((e=>{const{current:t}=p;y(!!(null==t?void 0:t.contains(e.target)))}),[p]);return r.useEffect((()=>(h?document.addEventListener("click",v,{passive:!0}):document.removeEventListener("click",v,!0),()=>document.removeEventListener("click",v,!0))),[h,v]),e.jsx(Uh,{ref:p,"data-test":n||"date-picker-wrapper",isOpen:h,onClick:()=>!o&&y(!0),children:e.jsx(le,{value:t&&Wh(c.default(t),l),disabled:o,label:u,error:a,zIndex:f,focused:b,field:h?e.jsx(Hh,{date:t,hasFocus:i,isDayBlocked:s,onDateChange:e=>{e&&(d(e),y(!1))},onFocusChange:e=>g(!!e)}):e.jsx(r.Fragment,{})})})},exports.EmailInput=tw,exports.Energy=({carbonFootprint:t,consumption:r,diagnosticDate:n})=>{const{consumptionLevel:o,carbonFootprintLevel:a,EPCLevel:i}=ry(t,r,n),l=1===i?0:25*(i-1)+10*(i-2),s={blankEPC:"Diagnostic de performance énergétique vierge",EPCTitle:"Diagnostic de performance énergétique",EPCLegend:`Diagnostic de performance énergétique : niveau ${exports.EnergyLevel[i]}`,consumptionTitle:"Consommation",consumptionUnit:"kWhEP/m²/an",consumptionLegend:`Consommation d'électricité : ${r} kWhEP/m²/an, niveau : ${exports.EnergyLevel[o]}`,carbonFootprintTitle:"Émission",carbonFootprintUnit:"kgeqCO2/m²/an",carbonFootprintLegend:`Émission de gaz à effet de serre : ${t} kgeqCO2/m²/an, niveau: ${exports.EnergyLevel[a]}`};return t&&r?e.jsxs("div",{children:[e.jsx(ay,{children:s.EPCTitle}),e.jsxs(oy,{role:"document","aria-label":s.EPCTitle,children:[e.jsx("div",{role:"group",tabIndex:0,"aria-label":s.EPCLegend,children:e.jsx(ly,{arrowSize:25,children:e.jsx(sy,{background:Jh(i),pos:l,isMainScore:!0,letterSize:25,children:exports.EnergyLevel[i]})})}),e.jsxs(fy,{children:[e.jsxs(dy,{role:"group",tabIndex:0,"aria-label":s.consumptionLegend,children:[e.jsx(uy,{children:s.consumptionTitle}),e.jsxs(cy,{children:[e.jsx(py,{children:r}),e.jsx(sy,{background:Jh(o),children:exports.EnergyLevel[o]})]}),e.jsx(hy,{children:s.consumptionUnit})]}),e.jsxs(dy,{role:"group",tabIndex:0,"aria-label":s.carbonFootprintLegend,children:[e.jsx(uy,{children:s.carbonFootprintTitle}),e.jsxs(cy,{children:[e.jsx(py,{children:t}),e.jsx(sy,{background:Qh(a),children:exports.EnergyLevel[a]})]}),e.jsx(hy,{children:s.carbonFootprintUnit})]})]})]})]}):e.jsx(iy,{children:s.blankEPC})},exports.ErrorLayout=by,exports.Fieldset=({label:t,active:r=!1,error:n=!1,children:o})=>e.jsxs(MP,{"data-test":"fieldset-layout",active:r,error:n,children:[e.jsx(NP,{"data-test":"fieldset-label",children:t}),e.jsx(re,{isVisible:!0,children:e.jsx("span",{dangerouslySetInnerHTML:{__html:t}})}),e.jsx(FP,{children:o})]}),exports.GmapsAutocomplete=GP,exports.GmapsGeocode=KP,exports.H1=$k,exports.H2=Sk,exports.H3=kk,exports.H4=Ek,exports.H5=C$,exports.H6=jk,exports.Input=le,exports.InputLoading=()=>e.jsx(hk,{"data-test":"input-loading"}),exports.InterFont=_,exports.Line=P,exports.Loader=ZP,exports.Logo=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 178 41",children:e.jsx("g",{fill:"currentColor",children:e.jsx("path",{d:"M146.119.062 145.337 0l-.68.02a.538.538 0 0 0-.098.012.403.403 0 0 1-.067.01c-.535.04-1.071.082-1.606.164-2.636.474-4.902 1.668-6.693 3.625-2.657 2.883-3.707 6.302-3.151 10.173a11.458 11.458 0 0 0 3.645 6.94c2.904 2.699 6.364 3.749 10.297 3.152a11.458 11.458 0 0 0 6.797-3.584c2.903-3.089 3.933-6.775 3.109-10.915-.576-2.78-1.997-5.066-4.201-6.858a11.906 11.906 0 0 0-6.57-2.677zm5.087 12.192c-.062 3.357-2.842 6.096-6.219 6.075h-.124c-3.439-.082-6.158-2.924-6.075-6.343.082-3.44 2.924-6.158 6.343-6.075 3.439.082 6.158 2.924 6.075 6.343zM3.671 1.274l-3.32.003V24.59h6.301v-5.87H6.9c.722 0 1.441.003 2.16.005 1.434.005 2.866.01 4.307-.004 1.38 0 2.76-.206 4.057-.639 2.471-.824 4.16-2.45 4.881-4.984.577-2.018.577-4.14.02-6.158-.617-2.224-1.997-3.789-4.118-4.716a11.63 11.63 0 0 0-4.572-.927c-3.321-.03-6.642-.027-9.963-.023zM6.837 13.49h-.185V6.487H12.645c.577 0 1.153.103 1.71.31 1.256.473 1.894 1.4 2.038 2.718.083.7-.02 1.441-.309 2.1-.432.948-1.194 1.463-2.183 1.71a5.297 5.297 0 0 1-1.277.165c-1.29.013-2.57.009-3.854.004-.643-.002-1.287-.004-1.933-.004zM166.2 0c.268.02.536.041.783.062a11.863 11.863 0 0 1 7.002 3.068c2.08 1.875 3.398 4.222 3.831 6.982.597 3.748-.33 7.105-2.822 9.988a11.59 11.59 0 0 1-6.775 3.934c-4.058.762-7.621-.288-10.689-3.048a1.715 1.715 0 0 1-.188-.183h-.001v-.001a7.661 7.661 0 0 0-.099-.104 14.88 14.88 0 0 0 1.73-3.295 15.86 15.86 0 0 0 .864-3.605c.557 1.792 1.648 3.13 3.337 3.934a6.011 6.011 0 0 0 5.148.082c3.131-1.359 4.573-5.025 3.193-8.155a6.2 6.2 0 0 0-4.778-3.645c-3.213-.495-6.24 1.606-6.961 4.572a14.7 14.7 0 0 0-2.636-6.961c.206-.206.411-.412.638-.598 1.874-1.585 4.098-2.595 6.487-2.903a19.9 19.9 0 0 1 1.077-.08l.056-.003c.019 0 .037-.004.057-.009a.379.379 0 0 1 .087-.011zM47.677 24.57l-4.408-7.888c.007-.007.014-.012.019-.015l.005-.004c0-.002-.007-.002-.024-.002l.124-.082c1.792-1.133 2.924-2.719 3.398-4.778a10.168 10.168 0 0 0-.02-4.387c-.515-2.492-1.957-4.263-4.325-5.252-1.524-.638-3.151-.885-4.778-.885-2.856-.014-5.712-.01-8.568-.005-1.428.003-2.856.005-4.283.005h-.186v23.251h6.261v-6.384c0-.165.041-.227.227-.227h6.57a.276.276 0 0 1 .288.165c1.153 2.1 2.286 4.202 3.418 6.323.041.123.144.185.247.165h5.829zM31.077 13.2h-.144l-.02-.206V6.714c0-.165.04-.227.226-.227h5.931c.618 0 1.236.103 1.813.33 1.153.453 1.73 1.318 1.874 2.512.082.598.02 1.216-.165 1.792-.33 1.03-1.112 1.648-2.142 1.895a5.036 5.036 0 0 1-1.359.185c-1.333.014-2.674.01-4.013.005-.668-.002-1.336-.005-2-.005zM99.781 1.277h13.016c1.73.02 3.398.268 5.005.968 2.286 1.009 3.645 2.78 4.139 5.21.33 1.483.33 3.007-.02 4.49-.474 1.977-1.607 3.501-3.296 4.613l-.226.144 4.428 7.909h-6.014c-.123.02-.226-.062-.268-.165l-.002-.005a1758.215 1758.215 0 0 1-3.396-6.318c-.041-.103-.144-.164-.267-.164h-6.591c-.165 0-.206.04-.206.206v6.425h-6.26zm6.282 11.924h.185c.659 0 1.318.003 1.977.005 1.318.004 2.636.009 3.954-.005.474 0 .948-.062 1.401-.185.947-.227 1.668-.742 2.08-1.648.268-.638.35-1.338.247-2.039-.124-1.07-.597-1.894-1.586-2.389a4.656 4.656 0 0 0-2.1-.453h-5.952c-.165 0-.206.042-.206.227v6.281zm-32.87-.72c0-6.838-5.519-12.378-12.356-12.399C54.06.062 48.542 5.5 48.439 12.274v.165c0 6.838 5.52 12.378 12.357 12.398 6.837 0 12.398-5.52 12.398-12.357zm-12.418 6.343a6.324 6.324 0 0 1-6.281-6.364v-.062c.02-3.48 2.883-6.281 6.363-6.26 3.48 0 6.302 2.862 6.282 6.404a6.324 6.324 0 0 1-6.364 6.282zm20.986-.103v5.849h-6.26V1.277h12.933c1.647 0 3.254.247 4.778.885 2.368 1.01 3.81 2.801 4.345 5.314.391 1.75.37 3.583-.082 5.334-.66 2.574-2.266 4.284-4.758 5.19a10.28 10.28 0 0 1-3.418.659c-1.607.041-3.193.041-4.799.041h-2.533zm0-8.733v3.296c0 .185.041.226.227.226 1.894 0 3.789 0 5.684-.02.473 0 .926-.062 1.38-.165 1.132-.289 1.977-.948 2.327-2.1.247-.825.247-1.69 0-2.513s-.824-1.483-1.607-1.813a5 5 0 0 0-1.977-.412h-5.807c-.186 0-.206.062-.206.227-.021 1.091-.021 2.183-.021 3.274zm49.036-8.711h-6.261V24.57h6.261zM14.54 32.766h1.277a3.277 3.277 0 0 0-.371-1.174 3.156 3.156 0 0 0-.762-.885 3.213 3.213 0 0 0-1.05-.556 4.12 4.12 0 0 0-1.257-.186c-.72 0-1.359.165-1.936.515-.556.35-1.009.844-1.338 1.483-.33.638-.494 1.421-.494 2.307 0 .885.164 1.668.494 2.306.33.639.762 1.133 1.338 1.483.557.35 1.216.515 1.936.515.453 0 .886-.062 1.277-.206s.742-.33 1.05-.577c.289-.247.557-.535.742-.885.185-.35.33-.721.391-1.133H14.56a1.934 1.934 0 0 1-.288.7c-.144.206-.288.37-.494.515a2.472 2.472 0 0 1-.66.33 3.09 3.09 0 0 1-.761.103c-.494 0-.906-.124-1.298-.371-.39-.247-.68-.597-.906-1.071-.226-.474-.33-1.05-.33-1.73 0-.68.104-1.256.33-1.73.227-.474.536-.824.906-1.07.392-.248.824-.372 1.298-.372.268 0 .515.021.762.103.247.083.453.186.659.33.206.144.37.33.494.535.124.206.227.453.268.721zM1.05 38.347c.31.144.68.227 1.071.227.35 0 .639-.062.906-.165a2.27 2.27 0 0 0 .618-.391c.144-.165.268-.31.35-.474h.042v.865H5.23v-4.18c0-.454-.062-.824-.226-1.113a1.907 1.907 0 0 0-.618-.659 2.288 2.288 0 0 0-.804-.33 3.798 3.798 0 0 0-1.894.083 2.65 2.65 0 0 0-.906.515c-.268.226-.453.535-.598.927l1.154.267c.103-.206.267-.411.494-.597.226-.185.556-.268.968-.268s.7.103.906.289c.206.185.309.473.309.824v.02c0 .165-.062.268-.165.33s-.288.123-.515.144c-.134.012-.298.032-.486.054l-.42.049a6.117 6.117 0 0 0-.885.165c-.289.082-.556.185-.783.308s-.412.289-.556.536c-.144.247-.206.535-.206.885 0 .412.082.763.288 1.05.186.269.453.495.762.64zm2.204-.968c-.227.144-.536.206-.865.206-.35 0-.618-.103-.844-.247-.227-.144-.33-.37-.33-.68 0-.226.041-.411.165-.535.123-.144.288-.247.474-.309.185-.062.411-.123.638-.144.088 0 .19-.015.309-.032l.062-.01c.144-.02.288-.04.453-.061a5 5 0 0 1 .185-.042c.09-.019.172-.036.247-.06a.67.67 0 0 0 .247-.125v.804c0 .247-.061.473-.185.7s-.309.412-.556.535zm15.24 1.195c-.391 0-.762-.083-1.07-.227s-.578-.37-.763-.638a1.906 1.906 0 0 1-.288-1.05c0-.35.062-.639.206-.886s.33-.412.556-.536c.226-.123.494-.226.782-.308s.577-.124.886-.165l.42-.049c.188-.022.351-.042.486-.054.227-.02.412-.083.515-.144s.165-.165.165-.33v-.02c0-.35-.103-.639-.31-.824-.205-.186-.493-.289-.885-.289s-.741.083-.968.268a1.63 1.63 0 0 0-.494.597l-1.153-.267c.144-.392.33-.7.597-.927a2.65 2.65 0 0 1 .906-.515 3.798 3.798 0 0 1 1.895-.082c.288.062.556.165.803.33.247.164.453.37.597.658.144.289.247.66.247 1.112v4.181H20.43v-.865h-.041c-.083.165-.206.309-.35.474-.165.144-.371.288-.618.391a2.65 2.65 0 0 1-.927.165zm.268-.989c.33 0 .638-.062.865-.206.247-.123.432-.309.556-.535s.185-.453.185-.7v-.804a.67.67 0 0 1-.247.124c-.075.025-.157.042-.247.061-.059.013-.12.026-.185.042-.165.02-.31.041-.453.062l-.062.009c-.118.017-.221.032-.31.032-.246.02-.452.082-.658.144-.186.062-.35.165-.474.31-.123.123-.165.308-.165.535 0 .309.103.535.33.68.226.143.515.246.865.246zm7.496-3.727 1.112-.186c-.123-.494-.37-.885-.782-1.174-.391-.288-.927-.432-1.607-.432-.473 0-.885.062-1.256.226-.37.165-.659.371-.865.66a1.555 1.555 0 0 0-.309.967c0 .453.144.824.412 1.113.268.288.72.514 1.298.638l1.07.226c.289.083.515.186.66.31.164.123.226.288.226.494 0 .247-.123.453-.37.618-.248.164-.577.247-.969.247-.35 0-.659-.062-.885-.227-.227-.165-.37-.391-.453-.7l-1.195.185c.103.536.371.968.824 1.277.453.31 1.03.453 1.73.453.494 0 .947-.082 1.339-.247.391-.185.68-.412.906-.7.226-.288.33-.639.33-1.01 0-.452-.145-.802-.433-1.09-.288-.29-.721-.495-1.298-.619l-.988-.226c-.35-.083-.597-.186-.762-.31a.702.702 0 0 1-.227-.514c0-.247.124-.432.35-.597.227-.144.515-.227.865-.227.268 0 .453.041.639.124.185.082.309.185.412.309.103.144.185.267.226.412zm3.83 4.716c-.39 0-.761-.083-1.07-.227a1.926 1.926 0 0 1-.762-.638 1.906 1.906 0 0 1-.288-1.05c0-.35.061-.639.206-.886.144-.247.33-.412.556-.536.226-.123.494-.226.782-.308s.577-.124.886-.165l.42-.049c.188-.022.351-.042.486-.054a1.29 1.29 0 0 0 .515-.144c.103-.062.165-.165.165-.33v-.02c0-.35-.103-.639-.31-.824-.205-.186-.494-.289-.906-.289s-.74.083-.968.268a1.863 1.863 0 0 0-.494.597l-1.153-.267c.144-.392.33-.7.597-.927.268-.227.577-.412.906-.515s.7-.165 1.092-.165c.247 0 .515.02.803.083s.556.165.803.33c.247.164.453.37.597.658.145.289.227.66.227 1.112v4.181h-1.194v-.865h-.042c-.082.165-.206.309-.35.474a2.27 2.27 0 0 1-.618.391 2.264 2.264 0 0 1-.885.165zm.269-.989c.33 0 .638-.062.865-.206.247-.123.432-.309.556-.535.123-.227.185-.453.185-.7v-.804a.671.671 0 0 1-.247.124c-.075.025-.157.042-.247.061-.059.013-.12.026-.186.042-.164.02-.309.041-.453.062l-.061.009a2.288 2.288 0 0 1-.31.032c-.226.02-.452.082-.638.144-.185.062-.35.165-.474.31-.123.123-.185.308-.185.535 0 .309.103.535.33.68.226.164.514.246.865.246zm6.755.845 2.286-6.302H38.08l-1.586 4.84h-.062l-1.586-4.84h-1.318l2.266 6.302zm5.293.123c-.598 0-1.113-.144-1.545-.412a2.751 2.751 0 0 1-1.03-1.132c-.247-.495-.37-1.05-.37-1.71s.123-1.215.37-1.71c.247-.493.577-.864 1.03-1.132.432-.268.947-.412 1.545-.412.597 0 1.112.144 1.544.412.433.268.783.639 1.03 1.133s.37 1.05.37 1.71-.123 1.214-.37 1.709c-.247.494-.577.865-1.03 1.132a2.932 2.932 0 0 1-1.544.412zm0-1.03c.39 0 .7-.103.947-.308a1.88 1.88 0 0 0 .556-.804c.124-.33.185-.7.185-1.112s-.061-.762-.185-1.112a1.764 1.764 0 0 0-.556-.803c-.247-.206-.577-.309-.947-.309s-.7.103-.948.309c-.247.206-.432.474-.556.803s-.185.7-.185 1.112.062.783.185 1.112.309.598.556.804c.247.205.556.308.948.308zm7.29.618c.433.268.947.412 1.565.412a3.76 3.76 0 0 0 1.318-.226c.371-.186.68-.433.886-.762.206-.33.35-.68.391-1.092h-1.194a1.356 1.356 0 0 1-.268.577 1.191 1.191 0 0 1-.474.37 1.68 1.68 0 0 1-.638.124c-.35 0-.66-.082-.906-.268-.268-.185-.453-.453-.598-.782-.144-.35-.206-.742-.206-1.195s.062-.844.206-1.174c.145-.33.35-.576.598-.762.267-.185.556-.267.906-.267.391 0 .7.123.927.33.247.205.39.473.453.761h1.194a2.202 2.202 0 0 0-.412-1.112 2.479 2.479 0 0 0-.906-.741c-.37-.186-.803-.268-1.277-.268-.597 0-1.112.124-1.544.412-.433.288-.762.659-1.01 1.153-.247.494-.37 1.071-.37 1.689s.123 1.174.35 1.668c.226.494.577.886 1.01 1.153zm7.538.412c-.598 0-1.112-.144-1.545-.412a2.751 2.751 0 0 1-1.03-1.132c-.247-.495-.37-1.05-.37-1.71s.123-1.215.37-1.71c.247-.493.577-.864 1.03-1.132.433-.268.947-.412 1.545-.412.597 0 1.112.144 1.544.412.433.268.783.639 1.03 1.133s.37 1.05.37 1.71-.123 1.214-.37 1.709c-.247.494-.577.865-1.03 1.132a2.985 2.985 0 0 1-1.544.412zm0-1.03c.391 0 .7-.103.947-.308.247-.206.432-.474.556-.804s.186-.7.186-1.112-.062-.762-.186-1.112-.309-.597-.556-.803c-.247-.206-.577-.309-.947-.309s-.7.103-.948.309a1.88 1.88 0 0 0-.556.803c-.123.33-.185.7-.185 1.112s.062.783.185 1.112c.124.33.31.598.556.804.248.205.556.308.948.308zm3.707-5.395v6.302l1.235.02v-3.872c0-.267.062-.514.186-.74.123-.228.268-.392.473-.516.186-.123.412-.185.639-.185.33 0 .618.103.824.309.206.206.309.473.309.824v4.18h1.215v-4.016c0-.391.103-.7.33-.947.226-.247.535-.37.926-.37.309 0 .597.102.824.288.226.185.35.494.35.926v4.099h1.235v-4.222c0-.721-.164-1.277-.535-1.627s-.824-.536-1.4-.536c-.454 0-.845.103-1.174.31a1.8 1.8 0 0 0-.721.802h-.062a1.885 1.885 0 0 0-.638-.803c-.268-.185-.639-.288-1.05-.288s-.783.103-1.072.288a1.558 1.558 0 0 0-.638.803h-.082v-1.03zm9.618 8.65v-8.65h1.194v1.009h.103c.062-.124.165-.289.309-.453.123-.165.309-.33.556-.453.226-.124.556-.186.947-.186.515 0 .968.124 1.36.392.39.267.72.618.947 1.112.226.494.35 1.07.35 1.75s-.103 1.257-.33 1.75c-.226.495-.535.866-.926 1.113a2.504 2.504 0 0 1-1.36.391c-.39 0-.7-.061-.926-.185a2.164 2.164 0 0 1-.577-.453 2.217 2.217 0 0 1-.309-.453h-.082v3.315zm1.194-5.5c0 .433.062.824.185 1.154s.31.597.556.783c.248.185.536.288.886.288s.68-.103.927-.288.432-.454.556-.804c.123-.33.185-.72.185-1.132s-.062-.783-.185-1.112c-.124-.33-.31-.598-.556-.783-.247-.185-.556-.288-.927-.288s-.66.082-.906.267a1.638 1.638 0 0 0-.556.762c-.103.33-.165.721-.165 1.154zm6.096 3.07c.309.143.68.226 1.07.226.351 0 .66-.062.948-.165a2.27 2.27 0 0 0 .618-.391c.144-.165.268-.31.35-.474h.041v.865h1.195v-4.18c0-.454-.062-.824-.227-1.113a1.906 1.906 0 0 0-.617-.659c-.248-.165-.515-.268-.804-.33a3.79 3.79 0 0 0-1.894.083 2.65 2.65 0 0 0-.907.515c-.267.226-.453.535-.597.927l1.154.267c.102-.206.267-.411.494-.597.226-.185.576-.268.968-.268s.68.083.885.289c.206.185.31.473.31.824v.02c0 .165-.063.268-.166.33a1.29 1.29 0 0 1-.514.144c-.16.013-.345.035-.556.06l-.371.043c-.31.041-.597.103-.886.165a3.876 3.876 0 0 0-.782.308 1.385 1.385 0 0 0-.556.536c-.145.247-.206.535-.206.885 0 .412.103.783.288 1.05.185.269.453.495.762.64zm2.204-.969c-.247.144-.536.206-.865.206a1.59 1.59 0 0 1-.865-.247c-.227-.144-.33-.37-.33-.68 0-.226.062-.411.186-.535a.954.954 0 0 1 .473-.309c.186-.062.412-.123.639-.144.088 0 .19-.015.309-.032l.061-.01c.145-.02.289-.04.453-.061.065-.016.127-.03.186-.042.09-.019.172-.036.247-.06a.671.671 0 0 0 .247-.125v.804c0 .247-.062.473-.185.7a1.272 1.272 0 0 1-.556.535zm4.263-2.698v3.728h-1.236v-6.281h1.174v1.03h.082c.144-.33.371-.598.68-.804.309-.206.7-.309 1.174-.309.432 0 .803.083 1.133.268.329.185.576.453.74.803.186.35.269.783.269 1.298v3.995h-1.236v-3.851c0-.453-.124-.803-.35-1.071-.227-.247-.556-.391-.989-.391-.288 0-.535.061-.762.185a1.291 1.291 0 0 0-.515.535c-.123.227-.164.536-.164.865zm5.128 6.055c.144.02.309.041.494.041.35.021.639 0 .886-.123.247-.124.473-.268.659-.515.185-.247.33-.515.453-.844l2.595-7.126h-1.318l-1.586 4.88h-.062l-1.586-4.88H88.66l2.307 6.364-.144.412c-.103.267-.206.473-.35.597-.145.103-.289.185-.474.185-.186 0-.37-.02-.597-.082l-.289 1.009c.062.02.186.062.33.082z"})})}),exports.NumberInput=t=>{var{focused:n,isFloat:o=!1,onBlur:a,onChange:i,onFocus:l,value:s}=t,u=Ux(t,["focused","isFloat","onBlur","onChange","onFocus","value"]);const[c,d]=r.useState(Boolean(n)),[f,p]=r.useState(s?s.toString():"");return r.useEffect((()=>{if(null===s)return p("");const e=null==s?void 0:s.toString();e&&e!==f&&p(e)}),[s]),e.jsx(le,Object.assign({},u,{onFocus:()=>{d(!0),l&&l()},onBlur:()=>{d(!1),p(((e,t)=>{const r=yk(e),n=t?parseFloat(r):parseInt(r,10);return isNaN(n)?"":n.toString()})(f,o)),a&&a()},onChange:e=>{const t=yk(e,!0),r=t.endsWith(".");if(o&&gk.test(t)||!o&&vk.test(t)){if(p(t),r)return;if(""===t)return i(null);const e=o?parseFloat(t):parseInt(t,10);isNaN(e)||s===e||i(e)}},value:c?f:bk(f,o)}))},exports.OfferSignatoryForm=({offerSignatoryInfo:t,errors:o,customErrorMessages:a={},updateOfferSignatory:i})=>{const{dateOfBirth:l,placeOfBirth:s,street:u,streetNumber:c,city:d,postCode:f,maritalStatus:p}=t,[h,y]=r.useState(n.listToString([c,u,f,d])),b=!!o.street||!!o.city||!!o.postCode,g=Object.assign(Object.assign({},CC),a);return e.jsxs("div",{children:[e.jsxs(P,{children:[e.jsx(KP,{dataTest:"offer-signatory-address",disabled:!1,label:PC,value:h,onChange:e=>{y(e),e||i(Object.assign(Object.assign({},t),{city:"",postCode:"",street:"",streetNumber:""}))},onSelect:e=>{const{city:r,postalCode:o,street:a,streetNumber:l}=n.getFormattedAddressComponent(e);i(Object.assign(Object.assign({},t),{city:(null==r?void 0:r.long_name)||"",postCode:(null==o?void 0:o.long_name)||"",street:(null==a?void 0:a.long_name)||"",streetNumber:(null==l?void 0:l.long_name)||""}))},error:b,country:""}),b&&e.jsx(by,{dataTest:"address",children:g.address})]}),e.jsx(P,{children:e.jsxs(B,{children:[e.jsxs("div",{children:[e.jsx(IP,{dataTest:"offer-signatory-birth-date",label:_C,disabled:!1,error:!!o.dateOfBirth,onChange:e=>e&&i(Object.assign(Object.assign({},t),{dateOfBirth:new Date(e)})),value:l?l.toISOString():""}),o.dateOfBirth&&e.jsx(by,{dataTest:"dateOfBirth",children:g.dateOfBirth})]}),e.jsxs("div",{children:[e.jsx(le,{dataTest:"offer-signatory-birth-place",label:SC,error:!!o.placeOfBirth,disabled:!1,onChange:e=>i(Object.assign(Object.assign({},t),{placeOfBirth:e})),value:s}),o.placeOfBirth&&e.jsx(by,{dataTest:"placeOfBirth",children:g.placeOfBirth})]})]})}),e.jsx(P,{children:e.jsxs(B,{children:[e.jsxs("div",{children:[e.jsx(d_,{dataTest:"offer-signatory-marital-status",disabled:!1,error:!!o.maritalStatus,label:kC,onSelect:({value:e})=>i(Object.assign(Object.assign({},t),{maritalStatus:e})),option:EC.find((({value:e})=>e===p))||null,options:EC}),o.maritalStatus&&e.jsx(by,{dataTest:"maritalStatus",children:g.maritalStatus})]}),e.jsx("div",{})]})})]})},exports.OfferSignatoryFormSchema=DC,exports.Option=Q$,exports.Phone=Hx,exports.PhoneAndFlag=({phone:t,color:n=x.dark.base,errorMessage:o})=>{const a=t?xO(t):null;return e.jsx(jC,{children:a&&"FR"===(null==a?void 0:a.country)?e.jsx(AC,{"data-test":"french-phone",color:n,children:vO(a.number)}):a?e.jsxs(r.Fragment,{children:[e.jsx(TC,{"data-test":"flag",alt:a.country,src:`https://cdn.proprioo.fr/assets/flags/${a.country}.svg`}),e.jsx(AC,{"data-test":"phone",color:n,children:vO(a.number)})]}):e.jsx("span",{"data-test":"incorrect-phone",children:o})})},exports.PhoneInput=({label:t,value:r,onChange:n,dataTest:o,disabled:a=!1,error:i=!1,phoneWithFlags:l=!1,required:s=!1})=>e.jsx(le,{dataTest:o||"customer-phone",name:"phone",type:exports.InputType.TEL,disabled:a,error:i,label:t,value:r,onChange:n,inputElement:Hx,phoneWithFlags:l,required:s}),exports.PlacesAutocomplete=e$,exports.Radio=({name:t,label:r,id:n,isChecked:o,onChange:a,value:i,dataTest:l})=>{const s=`${n}-${t}`;return e.jsxs(mk,{"data-test":l||`radio-${t}`,children:[e.jsx(wk,{type:"radio",id:s,name:t,value:i,onChange:e=>a(e),checked:o}),e.jsx(xk,{htmlFor:s,children:r})]})},exports.Row=B,exports.Select=d_,exports.SingleMonth=({date:t,daySize:r=50,dayBlockedInFuture:n=!1,onDateChange:o})=>e.jsx(qh,{children:e.jsx(Lh,{date:c.default(t),onFocusChange:()=>({}),onDateChange:e=>{o(c.default(e).toDate())},daySize:r,verticalHeight:40,focused:!1,weekDayFormat:"ddd",isDayBlocked:e=>n&&e.isAfter(Gh,"days"),enableOutsideDays:!0})}),exports.Subtitle=({text:t,color:r=x.dark.base})=>e.jsx(Qk,{"data-test":"subtitle",children:e.jsx(eC,{color:r,"data-test":"subtitle-label",children:t})}),exports.Tag=hC,exports.TagBase=aC,exports.TextToggle=({text:t,dataTest:n="text-toggle",isComment:o=!1,maxLength:a=300,showLessLabel:i="Lire moins",showMoreLabel:l="Lire plus",title:s})=>{const u=(e=>e.split($C).filter(Boolean).join(" "))(t),c=u.length>a,[d,f]=r.useState(c),p=((e,t)=>{if(e.length<=t||t<0)return e;if(" "===e.charAt(t))return e.slice(0,t).concat("…");const r=e.slice(0,t),[n]=e.slice(t,e.length).split(" ");return r.concat(n).concat("…")})(u,a);return e.jsxs(mC,{"data-test":n,children:[s&&e.jsx(wC,{"data-test":"text-toggle-title",children:`${s} : `}),e.jsx(OC,{isComment:o,children:d?p:u}),c&&e.jsx(xC,{isComment:o,hasTitle:Boolean(s),onClick:()=>f(!d),children:d?l:i})]})},exports.Textarea=gC,exports.Toggle=({label:t,id:r,checked:n=!1,disabled:o=!1,name:a,dataTest:i,onChange:l})=>e.jsxs(Jk,{children:[e.jsx(Zk,{checked:n,onChange:e=>{l(e.target.checked)},icons:!1,name:a,id:r,disabled:o,"data-test":i||`toggle-${a}`}),e.jsx(Xk,{htmlFor:r,disabled:o,"data-test":"toggle-label",children:t})]}),exports.Tooltip=hP,exports.UserForm=({user:t,errors:r,updateUser:n,disabledFields:o={},emailSuggestionI18nLabels:a,errorMessages:i={},isEmailSuggestionEnabled:l=!0,labels:s=rw,phoneWithFlags:u=!1})=>{const{firstName:c,lastName:d,email:f,phone:p}=t,h=Object.assign(Object.assign({},nw),i);return e.jsxs("div",{children:[e.jsx(P,{children:e.jsxs(B,{children:[e.jsxs("div",{children:[e.jsx(le,{dataTest:"customer-firstName",name:"first-name",type:exports.InputType.TEXT,disabled:o.firstName,error:!!r.firstName,label:s.firstName,value:c,onChange:e=>n(Object.assign(Object.assign({},t),{firstName:e}),"user.firstName")}),r.firstName&&e.jsx(by,{dataTest:"invalid-firstName",children:h.firstName})]}),e.jsxs("div",{children:[e.jsx(le,{dataTest:"customer-lastName",name:"last-name",type:exports.InputType.TEXT,disabled:o.lastName,error:!!r.lastName,label:s.lastName,value:d,onChange:e=>n(Object.assign(Object.assign({},t),{lastName:e}),"user.lastName")}),r.lastName&&e.jsx(by,{dataTest:"invalid-lastName",children:h.lastName})]})]})}),e.jsx(P,{children:e.jsxs(B,{children:[e.jsxs("div",{children:[e.jsx(tw,{dataTest:"customer-email",name:"email",disabled:o.email,error:!!r.email,label:s.email,isSuggestionEnabled:l,i18nLabels:a,value:f,onChange:e=>n(Object.assign(Object.assign({},t),{email:ow(e)}),"user.email")}),r.email&&e.jsx(by,{dataTest:"invalid-email",children:h.email})]}),e.jsxs("div",{children:[e.jsx(le,{dataTest:"customer-phone",name:"phone",type:exports.InputType.TEL,disabled:o.phone,error:!!r.phone,label:s.phone,value:p,onChange:e=>n(Object.assign(Object.assign({},t),{phone:e||null}),"user.phone"),inputElement:Hx,phoneWithFlags:u}),r.phone&&e.jsx(by,{dataTest:"invalid-phone",children:h.phone})]})]})})]})},exports.UserSchema=OO,exports.breakpoints=b,exports.colors=x,exports.convertPxToRem=w,exports.createAction=H,exports.fonts=S,exports.formatInternationalPhone=vO,exports.formatPhoneNumber=e=>Rx(e,Lx),exports.getCarbonFootprintLevel=ty,exports.getConsumptionLevel=ey,exports.getGeoSearchSuggestions=Y,exports.isTouchDevice=q,exports.isValidDate=AP,exports.isValidPhoneNumber=mO,exports.paragraphs=R,exports.parsePhoneNumber=xO,exports.radius=L,exports.resetCssButton=G,exports.scrollbar=V,exports.shadows=z,exports.titles=h$,exports.useDebounce=Kx,exports.useEmailSuggestion=Xx,exports.useMobileDevice=()=>U(`(max-width: ${b.base-1}px)`),exports.useModal=({onAbort:t,onOpen:n,onClose:o}={})=>{const[{isAborting:a,fade:i,isLoading:l,isOpen:s},u]=r.useReducer(ek,{isAborting:!1,fade:XP.IN,isOpen:!1,isLoading:!1}),c=(()=>{const e=r.useRef(!0);return r.useEffect((()=>{e.current=!1}),[]),e.current})(),d=r.useCallback((()=>{s&&u(QP.toggleLoad())}),[s]),f=r.useCallback((()=>{n&&n(),u(QP.open())}),[n]),p=r.useCallback((()=>{!l&&s&&u(QP.close())}),[l,s]),h=r.useCallback((()=>{!l&&s&&u(QP.abort())}),[l,s]),y=r.useCallback((()=>u(QP.animationEnd())),[]),b=r.useCallback((()=>{a&&t&&t(),o&&o(),u(QP.reset())}),[a,t,o]);r.useEffect((()=>{s||c||b()}),[s]);return{closeModal:p,createModal:({children:t,icon:n,isAlternative:o=!1,isClosable:a=!0,isFullScreen:u,noPadding:c,text:d,title:f})=>s?e.jsx(pk,{abortModal:h,fade:i,icon:n,isAlternative:o,isClosable:a,isFullScreen:u,isLoading:l,noPadding:c,onAnimationEnd:y,text:d,title:f,children:t}):e.jsx(r.Fragment,{}),openModal:f,toggleLoader:d}},exports.useOnClickOutside=W$,exports.useSmallSmartphoneDevice=()=>U(`(max-width: ${b.smallest-1}px)`),exports.useSmartphoneDevice=W;
|
|
2756
|
+
`,IC=p.default.span`
|
|
2757
|
+
color: ${x.red.base};
|
|
2758
|
+
`;exports.Accordion=({children:t,preExpanded:r,allowMultipleExpanded:n})=>e.jsx(o$,{preExpanded:r,allowMultipleExpanded:n,children:t}),exports.AccordionHeader=({isAlternative:t,basic:r,children:n})=>e.jsx(_$,{children:({expanded:o,toggleExpanded:a})=>e.jsxs(y$,{onClick:()=>a(),"data-test":"accordion-header",children:[e.jsx(b$,{isAlternative:t,basic:r,children:n}),e.jsx(g$,{isOpen:o,children:e.jsx(P$,{})})]})}),exports.AccordionItem=S$,exports.AccordionPanel=({children:t,unmountOnCollapse:n})=>e.jsx(_$,{children:({expanded:o})=>e.jsx(v$,{isOpen:o,children:!n||o?e.jsx("div",{"data-test":"panel-content",children:t}):e.jsx(r.Fragment,{})})}),exports.AgentBanner=({children:t,agent:{image_agent:r,name:n,zone:o,fonction:a},rounded:i=!0})=>e.jsxs(E$,{"data-test":"agent-card",rounded:i,children:[e.jsxs(A$,{children:[n&&e.jsx(C$,{title:n,color:x.green.base}),a&&e.jsx(I$,{"data-test":"agent-fonction",children:a}),o&&e.jsx(I$,{"data-test":"agent-zone",children:o}),t]}),e.jsx(j$,{children:e.jsx(T$,{children:e.jsx(D$,{"data-test":"agent-image",src:r,loading:"lazy"})})})]}),exports.AgentCard=U$,exports.Autocomplete=t=>{var{list:o,native:a=!1,option:i,onSelect:l}=t,s=Ux(t,["list","native","option","onSelect"]);const[{hasFullList:u,internalValue:c,isFocused:d},f]=r.useReducer(((e,t)=>Object.assign(Object.assign({},e),t)),{hasFullList:!1,internalValue:(null==i?void 0:i.label)||"",isFocused:!1}),p=o.filter((({label:e})=>n.normalizeString(e).includes(n.normalizeString(c)))),h=Boolean(c.length>1&&!u)?p:o,y=(e="")=>{e||l(null),f({hasFullList:!1,internalValue:e})};return r.useEffect((()=>{(null==i?void 0:i.label)?y(i.label):f({internalValue:""})}),[i]),e.jsx(d_,Object.assign({focused:d,isAutocomplete:!0,native:a,option:i,options:a?o:h,onBlur:()=>f({hasFullList:!1,isFocused:!1}),onChange:y,onFocus:()=>{f({hasFullList:!0,isFocused:!0})},onSelect:e=>l(e),value:c},s))},exports.BagossFont=$,exports.Block=({children:t,picture:r,isCompact:n,isRounded:o})=>e.jsxs(h_,{isRounded:o,"data-test":"block",children:[r&&e.jsx(p_,{picture:r,"data-test":"picture"}),e.jsx(f_,{isCompact:n,children:t})]}),exports.BlockCheckIcon=({onClick:t,image:r,checked:n,name:o,text:a,dataTest:i})=>{const l=`checkbox-input-label-${a}`;return e.jsxs(R_,{checked:n,"data-test":i||`checkbox-button-${a}`,children:[e.jsx(M_,{"aria-labelledby":l,checked:n,name:o,onChange:({target:e})=>t(e.checked),type:"checkbox"}),e.jsx(F_,{children:r}),e.jsx("span",{id:l,children:a})]})},exports.BlockIcon=function({onClick:t,image:r,text:n,name:o,selectedValue:a,dataTest:i,value:l,isContentCentered:s=!1}){const u=a===l,c=`radio-input-label-${n}`;return e.jsxs(N_,{"data-test":i||`radio-button-${n}`,isActive:u,isContentCentered:s,children:[e.jsx(M_,{"aria-labelledby":c,checked:u,name:o,onChange:()=>t(l),type:"radio"}),e.jsx("span",{id:c,children:n}),r]})},exports.Burger=({isOpen:t,isSmall:r=!1,onClick:n,color:o})=>e.jsxs(g_,{"data-test":"burger",onClick:n,isOpen:t,isSmall:r,color:o,children:[e.jsx(b_,{}),e.jsx(b_,{}),e.jsx(b_,{})]}),exports.Button=t=>{var{appearance:n=exports.ButtonAppearance.PRIMARY,icon:o,iconPosition:a=exports.IconPosition.RIGHT,label:i,rounded:l=!1,size:s=exports.ButtonSizes.LARGE,theme:u=exports.ButtonTheme.BLACK}=t,c=Ux(t,["appearance","icon","iconPosition","label","rounded","size","theme"]);return e.jsxs(D_,Object.assign({appearance:n,"aria-label":i,icon:o,iconPosition:a,rounded:l,size:s,theme:u},c,{children:[o&&e.jsx(E_,{appearance:n,iconPosition:a,size:s,theme:u,children:r.isValidElement(o)?r.cloneElement(o,{"aria-hidden":!0,focusable:!1}):o}),!l&&e.jsx(C_,{"data-test":"label",children:i})]}))},exports.ButtonRadio=A_,exports.ButtonRadioGroup=({label:t,name:r,onChange:n,options:o,value:a})=>e.jsx(I_,{role:"radiogroup","aria-label":t,children:o.map((t=>e.jsx(A_,{isChecked:a===t.value,name:r,option:t,onClick:()=>n(t)},`radio-option-${t.value}`)))}),exports.Card=({children:t,after:n,dataTest:o="card-layout",disabled:a=!1,label:i,labelAfter:l,noPadding:s,hasToggle:u=!1,headerIcon:c,headerIconColor:d=x.dark.base,headerIconSize:f=exports.CardHeaderIconSize.MEDIUM,isOpen:p,toggleLabel:h,tooltip:y,onOpen:b,onClose:g})=>{const v=void 0!==p,[m,w]=r.useState(p||!1),O=v&&u&&!g,$=v&&u&&!b,_=W();return r.useEffect((()=>{v&&w(p)}),[p,v]),e.jsxs(bP,{"data-test":o,disabled:a,id:i,children:[e.jsxs(gP,{onClick:u&&!a?()=>m?(v&&!O||w(!1),void(g&&g())):(v&&!$||w(!0),void(b&&b())):void 0,hasToggle:u,disabled:a,children:[e.jsxs(OP,{"data-test":"title-container",children:[c&&e.jsx(wP,{headerIconColor:d,headerIconSize:f,children:c}),e.jsx("div",{"data-test":`title-${o}`,dangerouslySetInnerHTML:{__html:i}}),l&&e.jsx(mP,{children:l}),y&&e.jsx(vP,{onClick:e=>e.stopPropagation(),children:e.jsx(hP,{tooltip:y,placement:"auto",children:e.jsx(xP,{children:e.jsx(L_,{fill:x.grey.base})})})})]}),(n||u)&&e.jsxs($P,{children:[n&&e.jsx(vP,{onClick:e=>e.stopPropagation(),children:n}),u&&e.jsxs(SP,{children:[!_&&h&&e.jsx("span",{"data-test":"toggle-label",children:h}),e.jsx(kP,{"aria-expanded":m,"aria-label":m?"Cacher le contenu":h||"Afficher le contenu","aria-controls":i})]})]})]}),(!u&&t||u&&m)&&e.jsx(_P,{noPadding:s,"data-test":"body-card",children:t})]})},exports.Checkbox=({checkboxSize:t=exports.CheckboxSize.SMALL,checked:r,children:o,dataTest:a,disabled:i,id:l,indeterminate:s=!1,label:u,name:c,onChange:d})=>{const f=`${l}-${c}`;return e.jsxs(EP,{checkboxSize:t,"data-test":a||`checkbox-${c}`,children:[e.jsx(TP,Object.assign({},Boolean(o)&&{"aria-label":u},{checkboxSize:t,checked:r,"data-test":a?`checkbox-${a}`:"checkbox-input",disabled:i,id:f,indeterminate:s,name:c,onChange:({target:e})=>d(e.checked),type:"checkbox"})),e.jsx(DP,{checkboxSize:t,"data-test":a?`checkbox-label-${a}`:"checkbox-label",hasLabel:n.isNotEmpty(u),htmlFor:f,children:o||e.jsx(jP,{dangerouslySetInnerHTML:{__html:u}})})]})},exports.Container=O,exports.DateInput=IP,exports.DatePicker=({date:t,dataTest:n,disabled:o,error:a,focused:i=!1,formatter:l,isDayBlocked:s,label:u,onDateChange:d,zIndex:f})=>{const p=r.useRef(null),[h,y]=r.useState(!1),[b,g]=r.useState(!1),v=r.useCallback((e=>{const{current:t}=p;y(!!(null==t?void 0:t.contains(e.target)))}),[p]);return r.useEffect((()=>(h?document.addEventListener("click",v,{passive:!0}):document.removeEventListener("click",v,!0),()=>document.removeEventListener("click",v,!0))),[h,v]),e.jsx(Uh,{ref:p,"data-test":n||"date-picker-wrapper",isOpen:h,onClick:()=>!o&&y(!0),children:e.jsx(le,{value:t&&Wh(c.default(t),l),disabled:o,label:u,error:a,zIndex:f,focused:b,field:h?e.jsx(Hh,{date:t,hasFocus:i,isDayBlocked:s,onDateChange:e=>{e&&(d(e),y(!1))},onFocusChange:e=>g(!!e)}):e.jsx(r.Fragment,{})})})},exports.EmailInput=tw,exports.Energy=({carbonFootprint:t,consumption:r,diagnosticDate:n})=>{const{consumptionLevel:o,carbonFootprintLevel:a,EPCLevel:i}=ry(t,r,n),l=1===i?0:25*(i-1)+10*(i-2),s={blankEPC:"Diagnostic de performance énergétique vierge",EPCTitle:"Diagnostic de performance énergétique",EPCLegend:`Diagnostic de performance énergétique : niveau ${exports.EnergyLevel[i]}`,consumptionTitle:"Consommation",consumptionUnit:"kWhEP/m²/an",consumptionLegend:`Consommation d'électricité : ${r} kWhEP/m²/an, niveau : ${exports.EnergyLevel[o]}`,carbonFootprintTitle:"Émission",carbonFootprintUnit:"kgeqCO2/m²/an",carbonFootprintLegend:`Émission de gaz à effet de serre : ${t} kgeqCO2/m²/an, niveau: ${exports.EnergyLevel[a]}`};return t&&r?e.jsxs("div",{children:[e.jsx(ay,{children:s.EPCTitle}),e.jsxs(oy,{role:"document","aria-label":s.EPCTitle,children:[e.jsx("div",{role:"group",tabIndex:0,"aria-label":s.EPCLegend,children:e.jsx(ly,{arrowSize:25,children:e.jsx(sy,{background:Jh(i),pos:l,isMainScore:!0,letterSize:25,children:exports.EnergyLevel[i]})})}),e.jsxs(fy,{children:[e.jsxs(dy,{role:"group",tabIndex:0,"aria-label":s.consumptionLegend,children:[e.jsx(uy,{children:s.consumptionTitle}),e.jsxs(cy,{children:[e.jsx(py,{children:r}),e.jsx(sy,{background:Jh(o),children:exports.EnergyLevel[o]})]}),e.jsx(hy,{children:s.consumptionUnit})]}),e.jsxs(dy,{role:"group",tabIndex:0,"aria-label":s.carbonFootprintLegend,children:[e.jsx(uy,{children:s.carbonFootprintTitle}),e.jsxs(cy,{children:[e.jsx(py,{children:t}),e.jsx(sy,{background:Qh(a),children:exports.EnergyLevel[a]})]}),e.jsx(hy,{children:s.carbonFootprintUnit})]})]})]})]}):e.jsx(iy,{children:s.blankEPC})},exports.ErrorLayout=by,exports.Fieldset=({label:t,active:r=!1,error:n=!1,children:o})=>e.jsxs(MP,{"data-test":"fieldset-layout",active:r,error:n,children:[e.jsx(NP,{"data-test":"fieldset-label",children:t}),e.jsx(re,{isVisible:!0,children:e.jsx("span",{dangerouslySetInnerHTML:{__html:t}})}),e.jsx(FP,{children:o})]}),exports.GmapsAutocomplete=GP,exports.GmapsGeocode=KP,exports.H1=$k,exports.H2=Sk,exports.H3=kk,exports.H4=Ek,exports.H5=C$,exports.H6=jk,exports.Input=le,exports.InputLoading=()=>e.jsx(hk,{"data-test":"input-loading"}),exports.InterFont=_,exports.Line=P,exports.Loader=ZP,exports.Logo=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 178 41",children:e.jsx("g",{fill:"currentColor",children:e.jsx("path",{d:"M146.119.062 145.337 0l-.68.02a.538.538 0 0 0-.098.012.403.403 0 0 1-.067.01c-.535.04-1.071.082-1.606.164-2.636.474-4.902 1.668-6.693 3.625-2.657 2.883-3.707 6.302-3.151 10.173a11.458 11.458 0 0 0 3.645 6.94c2.904 2.699 6.364 3.749 10.297 3.152a11.458 11.458 0 0 0 6.797-3.584c2.903-3.089 3.933-6.775 3.109-10.915-.576-2.78-1.997-5.066-4.201-6.858a11.906 11.906 0 0 0-6.57-2.677zm5.087 12.192c-.062 3.357-2.842 6.096-6.219 6.075h-.124c-3.439-.082-6.158-2.924-6.075-6.343.082-3.44 2.924-6.158 6.343-6.075 3.439.082 6.158 2.924 6.075 6.343zM3.671 1.274l-3.32.003V24.59h6.301v-5.87H6.9c.722 0 1.441.003 2.16.005 1.434.005 2.866.01 4.307-.004 1.38 0 2.76-.206 4.057-.639 2.471-.824 4.16-2.45 4.881-4.984.577-2.018.577-4.14.02-6.158-.617-2.224-1.997-3.789-4.118-4.716a11.63 11.63 0 0 0-4.572-.927c-3.321-.03-6.642-.027-9.963-.023zM6.837 13.49h-.185V6.487H12.645c.577 0 1.153.103 1.71.31 1.256.473 1.894 1.4 2.038 2.718.083.7-.02 1.441-.309 2.1-.432.948-1.194 1.463-2.183 1.71a5.297 5.297 0 0 1-1.277.165c-1.29.013-2.57.009-3.854.004-.643-.002-1.287-.004-1.933-.004zM166.2 0c.268.02.536.041.783.062a11.863 11.863 0 0 1 7.002 3.068c2.08 1.875 3.398 4.222 3.831 6.982.597 3.748-.33 7.105-2.822 9.988a11.59 11.59 0 0 1-6.775 3.934c-4.058.762-7.621-.288-10.689-3.048a1.715 1.715 0 0 1-.188-.183h-.001v-.001a7.661 7.661 0 0 0-.099-.104 14.88 14.88 0 0 0 1.73-3.295 15.86 15.86 0 0 0 .864-3.605c.557 1.792 1.648 3.13 3.337 3.934a6.011 6.011 0 0 0 5.148.082c3.131-1.359 4.573-5.025 3.193-8.155a6.2 6.2 0 0 0-4.778-3.645c-3.213-.495-6.24 1.606-6.961 4.572a14.7 14.7 0 0 0-2.636-6.961c.206-.206.411-.412.638-.598 1.874-1.585 4.098-2.595 6.487-2.903a19.9 19.9 0 0 1 1.077-.08l.056-.003c.019 0 .037-.004.057-.009a.379.379 0 0 1 .087-.011zM47.677 24.57l-4.408-7.888c.007-.007.014-.012.019-.015l.005-.004c0-.002-.007-.002-.024-.002l.124-.082c1.792-1.133 2.924-2.719 3.398-4.778a10.168 10.168 0 0 0-.02-4.387c-.515-2.492-1.957-4.263-4.325-5.252-1.524-.638-3.151-.885-4.778-.885-2.856-.014-5.712-.01-8.568-.005-1.428.003-2.856.005-4.283.005h-.186v23.251h6.261v-6.384c0-.165.041-.227.227-.227h6.57a.276.276 0 0 1 .288.165c1.153 2.1 2.286 4.202 3.418 6.323.041.123.144.185.247.165h5.829zM31.077 13.2h-.144l-.02-.206V6.714c0-.165.04-.227.226-.227h5.931c.618 0 1.236.103 1.813.33 1.153.453 1.73 1.318 1.874 2.512.082.598.02 1.216-.165 1.792-.33 1.03-1.112 1.648-2.142 1.895a5.036 5.036 0 0 1-1.359.185c-1.333.014-2.674.01-4.013.005-.668-.002-1.336-.005-2-.005zM99.781 1.277h13.016c1.73.02 3.398.268 5.005.968 2.286 1.009 3.645 2.78 4.139 5.21.33 1.483.33 3.007-.02 4.49-.474 1.977-1.607 3.501-3.296 4.613l-.226.144 4.428 7.909h-6.014c-.123.02-.226-.062-.268-.165l-.002-.005a1758.215 1758.215 0 0 1-3.396-6.318c-.041-.103-.144-.164-.267-.164h-6.591c-.165 0-.206.04-.206.206v6.425h-6.26zm6.282 11.924h.185c.659 0 1.318.003 1.977.005 1.318.004 2.636.009 3.954-.005.474 0 .948-.062 1.401-.185.947-.227 1.668-.742 2.08-1.648.268-.638.35-1.338.247-2.039-.124-1.07-.597-1.894-1.586-2.389a4.656 4.656 0 0 0-2.1-.453h-5.952c-.165 0-.206.042-.206.227v6.281zm-32.87-.72c0-6.838-5.519-12.378-12.356-12.399C54.06.062 48.542 5.5 48.439 12.274v.165c0 6.838 5.52 12.378 12.357 12.398 6.837 0 12.398-5.52 12.398-12.357zm-12.418 6.343a6.324 6.324 0 0 1-6.281-6.364v-.062c.02-3.48 2.883-6.281 6.363-6.26 3.48 0 6.302 2.862 6.282 6.404a6.324 6.324 0 0 1-6.364 6.282zm20.986-.103v5.849h-6.26V1.277h12.933c1.647 0 3.254.247 4.778.885 2.368 1.01 3.81 2.801 4.345 5.314.391 1.75.37 3.583-.082 5.334-.66 2.574-2.266 4.284-4.758 5.19a10.28 10.28 0 0 1-3.418.659c-1.607.041-3.193.041-4.799.041h-2.533zm0-8.733v3.296c0 .185.041.226.227.226 1.894 0 3.789 0 5.684-.02.473 0 .926-.062 1.38-.165 1.132-.289 1.977-.948 2.327-2.1.247-.825.247-1.69 0-2.513s-.824-1.483-1.607-1.813a5 5 0 0 0-1.977-.412h-5.807c-.186 0-.206.062-.206.227-.021 1.091-.021 2.183-.021 3.274zm49.036-8.711h-6.261V24.57h6.261zM14.54 32.766h1.277a3.277 3.277 0 0 0-.371-1.174 3.156 3.156 0 0 0-.762-.885 3.213 3.213 0 0 0-1.05-.556 4.12 4.12 0 0 0-1.257-.186c-.72 0-1.359.165-1.936.515-.556.35-1.009.844-1.338 1.483-.33.638-.494 1.421-.494 2.307 0 .885.164 1.668.494 2.306.33.639.762 1.133 1.338 1.483.557.35 1.216.515 1.936.515.453 0 .886-.062 1.277-.206s.742-.33 1.05-.577c.289-.247.557-.535.742-.885.185-.35.33-.721.391-1.133H14.56a1.934 1.934 0 0 1-.288.7c-.144.206-.288.37-.494.515a2.472 2.472 0 0 1-.66.33 3.09 3.09 0 0 1-.761.103c-.494 0-.906-.124-1.298-.371-.39-.247-.68-.597-.906-1.071-.226-.474-.33-1.05-.33-1.73 0-.68.104-1.256.33-1.73.227-.474.536-.824.906-1.07.392-.248.824-.372 1.298-.372.268 0 .515.021.762.103.247.083.453.186.659.33.206.144.37.33.494.535.124.206.227.453.268.721zM1.05 38.347c.31.144.68.227 1.071.227.35 0 .639-.062.906-.165a2.27 2.27 0 0 0 .618-.391c.144-.165.268-.31.35-.474h.042v.865H5.23v-4.18c0-.454-.062-.824-.226-1.113a1.907 1.907 0 0 0-.618-.659 2.288 2.288 0 0 0-.804-.33 3.798 3.798 0 0 0-1.894.083 2.65 2.65 0 0 0-.906.515c-.268.226-.453.535-.598.927l1.154.267c.103-.206.267-.411.494-.597.226-.185.556-.268.968-.268s.7.103.906.289c.206.185.309.473.309.824v.02c0 .165-.062.268-.165.33s-.288.123-.515.144c-.134.012-.298.032-.486.054l-.42.049a6.117 6.117 0 0 0-.885.165c-.289.082-.556.185-.783.308s-.412.289-.556.536c-.144.247-.206.535-.206.885 0 .412.082.763.288 1.05.186.269.453.495.762.64zm2.204-.968c-.227.144-.536.206-.865.206-.35 0-.618-.103-.844-.247-.227-.144-.33-.37-.33-.68 0-.226.041-.411.165-.535.123-.144.288-.247.474-.309.185-.062.411-.123.638-.144.088 0 .19-.015.309-.032l.062-.01c.144-.02.288-.04.453-.061a5 5 0 0 1 .185-.042c.09-.019.172-.036.247-.06a.67.67 0 0 0 .247-.125v.804c0 .247-.061.473-.185.7s-.309.412-.556.535zm15.24 1.195c-.391 0-.762-.083-1.07-.227s-.578-.37-.763-.638a1.906 1.906 0 0 1-.288-1.05c0-.35.062-.639.206-.886s.33-.412.556-.536c.226-.123.494-.226.782-.308s.577-.124.886-.165l.42-.049c.188-.022.351-.042.486-.054.227-.02.412-.083.515-.144s.165-.165.165-.33v-.02c0-.35-.103-.639-.31-.824-.205-.186-.493-.289-.885-.289s-.741.083-.968.268a1.63 1.63 0 0 0-.494.597l-1.153-.267c.144-.392.33-.7.597-.927a2.65 2.65 0 0 1 .906-.515 3.798 3.798 0 0 1 1.895-.082c.288.062.556.165.803.33.247.164.453.37.597.658.144.289.247.66.247 1.112v4.181H20.43v-.865h-.041c-.083.165-.206.309-.35.474-.165.144-.371.288-.618.391a2.65 2.65 0 0 1-.927.165zm.268-.989c.33 0 .638-.062.865-.206.247-.123.432-.309.556-.535s.185-.453.185-.7v-.804a.67.67 0 0 1-.247.124c-.075.025-.157.042-.247.061-.059.013-.12.026-.185.042-.165.02-.31.041-.453.062l-.062.009c-.118.017-.221.032-.31.032-.246.02-.452.082-.658.144-.186.062-.35.165-.474.31-.123.123-.165.308-.165.535 0 .309.103.535.33.68.226.143.515.246.865.246zm7.496-3.727 1.112-.186c-.123-.494-.37-.885-.782-1.174-.391-.288-.927-.432-1.607-.432-.473 0-.885.062-1.256.226-.37.165-.659.371-.865.66a1.555 1.555 0 0 0-.309.967c0 .453.144.824.412 1.113.268.288.72.514 1.298.638l1.07.226c.289.083.515.186.66.31.164.123.226.288.226.494 0 .247-.123.453-.37.618-.248.164-.577.247-.969.247-.35 0-.659-.062-.885-.227-.227-.165-.37-.391-.453-.7l-1.195.185c.103.536.371.968.824 1.277.453.31 1.03.453 1.73.453.494 0 .947-.082 1.339-.247.391-.185.68-.412.906-.7.226-.288.33-.639.33-1.01 0-.452-.145-.802-.433-1.09-.288-.29-.721-.495-1.298-.619l-.988-.226c-.35-.083-.597-.186-.762-.31a.702.702 0 0 1-.227-.514c0-.247.124-.432.35-.597.227-.144.515-.227.865-.227.268 0 .453.041.639.124.185.082.309.185.412.309.103.144.185.267.226.412zm3.83 4.716c-.39 0-.761-.083-1.07-.227a1.926 1.926 0 0 1-.762-.638 1.906 1.906 0 0 1-.288-1.05c0-.35.061-.639.206-.886.144-.247.33-.412.556-.536.226-.123.494-.226.782-.308s.577-.124.886-.165l.42-.049c.188-.022.351-.042.486-.054a1.29 1.29 0 0 0 .515-.144c.103-.062.165-.165.165-.33v-.02c0-.35-.103-.639-.31-.824-.205-.186-.494-.289-.906-.289s-.74.083-.968.268a1.863 1.863 0 0 0-.494.597l-1.153-.267c.144-.392.33-.7.597-.927.268-.227.577-.412.906-.515s.7-.165 1.092-.165c.247 0 .515.02.803.083s.556.165.803.33c.247.164.453.37.597.658.145.289.227.66.227 1.112v4.181h-1.194v-.865h-.042c-.082.165-.206.309-.35.474a2.27 2.27 0 0 1-.618.391 2.264 2.264 0 0 1-.885.165zm.269-.989c.33 0 .638-.062.865-.206.247-.123.432-.309.556-.535.123-.227.185-.453.185-.7v-.804a.671.671 0 0 1-.247.124c-.075.025-.157.042-.247.061-.059.013-.12.026-.186.042-.164.02-.309.041-.453.062l-.061.009a2.288 2.288 0 0 1-.31.032c-.226.02-.452.082-.638.144-.185.062-.35.165-.474.31-.123.123-.185.308-.185.535 0 .309.103.535.33.68.226.164.514.246.865.246zm6.755.845 2.286-6.302H38.08l-1.586 4.84h-.062l-1.586-4.84h-1.318l2.266 6.302zm5.293.123c-.598 0-1.113-.144-1.545-.412a2.751 2.751 0 0 1-1.03-1.132c-.247-.495-.37-1.05-.37-1.71s.123-1.215.37-1.71c.247-.493.577-.864 1.03-1.132.432-.268.947-.412 1.545-.412.597 0 1.112.144 1.544.412.433.268.783.639 1.03 1.133s.37 1.05.37 1.71-.123 1.214-.37 1.709c-.247.494-.577.865-1.03 1.132a2.932 2.932 0 0 1-1.544.412zm0-1.03c.39 0 .7-.103.947-.308a1.88 1.88 0 0 0 .556-.804c.124-.33.185-.7.185-1.112s-.061-.762-.185-1.112a1.764 1.764 0 0 0-.556-.803c-.247-.206-.577-.309-.947-.309s-.7.103-.948.309c-.247.206-.432.474-.556.803s-.185.7-.185 1.112.062.783.185 1.112.309.598.556.804c.247.205.556.308.948.308zm7.29.618c.433.268.947.412 1.565.412a3.76 3.76 0 0 0 1.318-.226c.371-.186.68-.433.886-.762.206-.33.35-.68.391-1.092h-1.194a1.356 1.356 0 0 1-.268.577 1.191 1.191 0 0 1-.474.37 1.68 1.68 0 0 1-.638.124c-.35 0-.66-.082-.906-.268-.268-.185-.453-.453-.598-.782-.144-.35-.206-.742-.206-1.195s.062-.844.206-1.174c.145-.33.35-.576.598-.762.267-.185.556-.267.906-.267.391 0 .7.123.927.33.247.205.39.473.453.761h1.194a2.202 2.202 0 0 0-.412-1.112 2.479 2.479 0 0 0-.906-.741c-.37-.186-.803-.268-1.277-.268-.597 0-1.112.124-1.544.412-.433.288-.762.659-1.01 1.153-.247.494-.37 1.071-.37 1.689s.123 1.174.35 1.668c.226.494.577.886 1.01 1.153zm7.538.412c-.598 0-1.112-.144-1.545-.412a2.751 2.751 0 0 1-1.03-1.132c-.247-.495-.37-1.05-.37-1.71s.123-1.215.37-1.71c.247-.493.577-.864 1.03-1.132.433-.268.947-.412 1.545-.412.597 0 1.112.144 1.544.412.433.268.783.639 1.03 1.133s.37 1.05.37 1.71-.123 1.214-.37 1.709c-.247.494-.577.865-1.03 1.132a2.985 2.985 0 0 1-1.544.412zm0-1.03c.391 0 .7-.103.947-.308.247-.206.432-.474.556-.804s.186-.7.186-1.112-.062-.762-.186-1.112-.309-.597-.556-.803c-.247-.206-.577-.309-.947-.309s-.7.103-.948.309a1.88 1.88 0 0 0-.556.803c-.123.33-.185.7-.185 1.112s.062.783.185 1.112c.124.33.31.598.556.804.248.205.556.308.948.308zm3.707-5.395v6.302l1.235.02v-3.872c0-.267.062-.514.186-.74.123-.228.268-.392.473-.516.186-.123.412-.185.639-.185.33 0 .618.103.824.309.206.206.309.473.309.824v4.18h1.215v-4.016c0-.391.103-.7.33-.947.226-.247.535-.37.926-.37.309 0 .597.102.824.288.226.185.35.494.35.926v4.099h1.235v-4.222c0-.721-.164-1.277-.535-1.627s-.824-.536-1.4-.536c-.454 0-.845.103-1.174.31a1.8 1.8 0 0 0-.721.802h-.062a1.885 1.885 0 0 0-.638-.803c-.268-.185-.639-.288-1.05-.288s-.783.103-1.072.288a1.558 1.558 0 0 0-.638.803h-.082v-1.03zm9.618 8.65v-8.65h1.194v1.009h.103c.062-.124.165-.289.309-.453.123-.165.309-.33.556-.453.226-.124.556-.186.947-.186.515 0 .968.124 1.36.392.39.267.72.618.947 1.112.226.494.35 1.07.35 1.75s-.103 1.257-.33 1.75c-.226.495-.535.866-.926 1.113a2.504 2.504 0 0 1-1.36.391c-.39 0-.7-.061-.926-.185a2.164 2.164 0 0 1-.577-.453 2.217 2.217 0 0 1-.309-.453h-.082v3.315zm1.194-5.5c0 .433.062.824.185 1.154s.31.597.556.783c.248.185.536.288.886.288s.68-.103.927-.288.432-.454.556-.804c.123-.33.185-.72.185-1.132s-.062-.783-.185-1.112c-.124-.33-.31-.598-.556-.783-.247-.185-.556-.288-.927-.288s-.66.082-.906.267a1.638 1.638 0 0 0-.556.762c-.103.33-.165.721-.165 1.154zm6.096 3.07c.309.143.68.226 1.07.226.351 0 .66-.062.948-.165a2.27 2.27 0 0 0 .618-.391c.144-.165.268-.31.35-.474h.041v.865h1.195v-4.18c0-.454-.062-.824-.227-1.113a1.906 1.906 0 0 0-.617-.659c-.248-.165-.515-.268-.804-.33a3.79 3.79 0 0 0-1.894.083 2.65 2.65 0 0 0-.907.515c-.267.226-.453.535-.597.927l1.154.267c.102-.206.267-.411.494-.597.226-.185.576-.268.968-.268s.68.083.885.289c.206.185.31.473.31.824v.02c0 .165-.063.268-.166.33a1.29 1.29 0 0 1-.514.144c-.16.013-.345.035-.556.06l-.371.043c-.31.041-.597.103-.886.165a3.876 3.876 0 0 0-.782.308 1.385 1.385 0 0 0-.556.536c-.145.247-.206.535-.206.885 0 .412.103.783.288 1.05.185.269.453.495.762.64zm2.204-.969c-.247.144-.536.206-.865.206a1.59 1.59 0 0 1-.865-.247c-.227-.144-.33-.37-.33-.68 0-.226.062-.411.186-.535a.954.954 0 0 1 .473-.309c.186-.062.412-.123.639-.144.088 0 .19-.015.309-.032l.061-.01c.145-.02.289-.04.453-.061.065-.016.127-.03.186-.042.09-.019.172-.036.247-.06a.671.671 0 0 0 .247-.125v.804c0 .247-.062.473-.185.7a1.272 1.272 0 0 1-.556.535zm4.263-2.698v3.728h-1.236v-6.281h1.174v1.03h.082c.144-.33.371-.598.68-.804.309-.206.7-.309 1.174-.309.432 0 .803.083 1.133.268.329.185.576.453.74.803.186.35.269.783.269 1.298v3.995h-1.236v-3.851c0-.453-.124-.803-.35-1.071-.227-.247-.556-.391-.989-.391-.288 0-.535.061-.762.185a1.291 1.291 0 0 0-.515.535c-.123.227-.164.536-.164.865zm5.128 6.055c.144.02.309.041.494.041.35.021.639 0 .886-.123.247-.124.473-.268.659-.515.185-.247.33-.515.453-.844l2.595-7.126h-1.318l-1.586 4.88h-.062l-1.586-4.88H88.66l2.307 6.364-.144.412c-.103.267-.206.473-.35.597-.145.103-.289.185-.474.185-.186 0-.37-.02-.597-.082l-.289 1.009c.062.02.186.062.33.082z"})})}),exports.NumberInput=t=>{var{focused:n,isFloat:o=!1,onBlur:a,onChange:i,onFocus:l,value:s}=t,u=Ux(t,["focused","isFloat","onBlur","onChange","onFocus","value"]);const[c,d]=r.useState(Boolean(n)),[f,p]=r.useState(s?s.toString():"");return r.useEffect((()=>{if(null===s)return p("");const e=null==s?void 0:s.toString();e&&e!==f&&p(e)}),[s]),e.jsx(le,Object.assign({},u,{onFocus:()=>{d(!0),l&&l()},onBlur:()=>{d(!1),p(((e,t)=>{const r=yk(e),n=t?parseFloat(r):parseInt(r,10);return isNaN(n)?"":n.toString()})(f,o)),a&&a()},onChange:e=>{const t=yk(e,!0),r=t.endsWith(".");if(o&&gk.test(t)||!o&&vk.test(t)){if(p(t),r)return;if(""===t)return i(null);const e=o?parseFloat(t):parseInt(t,10);isNaN(e)||s===e||i(e)}},value:c?f:bk(f,o)}))},exports.OfferSignatoryForm=({offerSignatoryInfo:t,errors:o,customErrorMessages:a={},updateOfferSignatory:i})=>{const{dateOfBirth:l,placeOfBirth:s,street:u,streetNumber:c,city:d,postCode:f,maritalStatus:p}=t,[h,y]=r.useState(n.listToString([c,u,f,d])),b=!!o.street||!!o.city||!!o.postCode,g=Object.assign(Object.assign({},CC),a);return e.jsxs("div",{children:[e.jsxs(P,{children:[e.jsx(KP,{dataTest:"offer-signatory-address",disabled:!1,label:PC,value:h,onChange:e=>{y(e),e||i(Object.assign(Object.assign({},t),{city:"",postCode:"",street:"",streetNumber:""}))},onSelect:e=>{const{city:r,postalCode:o,street:a,streetNumber:l}=n.getFormattedAddressComponent(e);i(Object.assign(Object.assign({},t),{city:(null==r?void 0:r.long_name)||"",postCode:(null==o?void 0:o.long_name)||"",street:(null==a?void 0:a.long_name)||"",streetNumber:(null==l?void 0:l.long_name)||""}))},error:b,country:""}),b&&e.jsx(by,{dataTest:"address",children:g.address})]}),e.jsx(P,{children:e.jsxs(B,{children:[e.jsxs("div",{children:[e.jsx(IP,{dataTest:"offer-signatory-birth-date",label:_C,disabled:!1,error:!!o.dateOfBirth,onChange:e=>e&&i(Object.assign(Object.assign({},t),{dateOfBirth:new Date(e)})),value:l?l.toISOString():""}),o.dateOfBirth&&e.jsx(by,{dataTest:"dateOfBirth",children:g.dateOfBirth})]}),e.jsxs("div",{children:[e.jsx(le,{dataTest:"offer-signatory-birth-place",label:SC,error:!!o.placeOfBirth,disabled:!1,onChange:e=>i(Object.assign(Object.assign({},t),{placeOfBirth:e})),value:s}),o.placeOfBirth&&e.jsx(by,{dataTest:"placeOfBirth",children:g.placeOfBirth})]})]})}),e.jsx(P,{children:e.jsxs(B,{children:[e.jsxs("div",{children:[e.jsx(d_,{dataTest:"offer-signatory-marital-status",disabled:!1,error:!!o.maritalStatus,label:kC,onSelect:({value:e})=>i(Object.assign(Object.assign({},t),{maritalStatus:e})),option:EC.find((({value:e})=>e===p))||null,options:EC}),o.maritalStatus&&e.jsx(by,{dataTest:"maritalStatus",children:g.maritalStatus})]}),e.jsx("div",{})]})})]})},exports.OfferSignatoryFormSchema=DC,exports.Option=Q$,exports.Phone=Hx,exports.PhoneAndFlag=({phone:t,color:n=x.dark.base,errorMessage:o})=>{const a=t?xO(t):null;return e.jsx(jC,{children:a&&"FR"===(null==a?void 0:a.country)?e.jsx(AC,{"data-test":"french-phone",color:n,children:vO(a.number)}):a?e.jsxs(r.Fragment,{children:[e.jsx(TC,{"data-test":"flag",alt:a.country,src:`https://cdn.proprioo.fr/assets/flags/${a.country}.svg`}),e.jsx(AC,{"data-test":"phone",color:n,children:vO(a.number)})]}):e.jsx(IC,{"data-test":"incorrect-phone",children:o})})},exports.PhoneInput=({label:t,value:r,onChange:n,dataTest:o,disabled:a=!1,error:i=!1,phoneWithFlags:l=!1,required:s=!1})=>e.jsx(le,{dataTest:o||"customer-phone",name:"phone",type:exports.InputType.TEL,disabled:a,error:i,label:t,value:r,onChange:n,inputElement:Hx,phoneWithFlags:l,required:s}),exports.PlacesAutocomplete=e$,exports.Radio=({name:t,label:r,id:n,isChecked:o,onChange:a,value:i,dataTest:l})=>{const s=`${n}-${t}`;return e.jsxs(mk,{"data-test":l||`radio-${t}`,children:[e.jsx(wk,{type:"radio",id:s,name:t,value:i,onChange:e=>a(e),checked:o}),e.jsx(xk,{htmlFor:s,children:r})]})},exports.Row=B,exports.Select=d_,exports.SingleMonth=({date:t,daySize:r=50,dayBlockedInFuture:n=!1,onDateChange:o})=>e.jsx(qh,{children:e.jsx(Lh,{date:c.default(t),onFocusChange:()=>({}),onDateChange:e=>{o(c.default(e).toDate())},daySize:r,verticalHeight:40,focused:!1,weekDayFormat:"ddd",isDayBlocked:e=>n&&e.isAfter(Gh,"days"),enableOutsideDays:!0})}),exports.Subtitle=({text:t,color:r=x.dark.base})=>e.jsx(Qk,{"data-test":"subtitle",children:e.jsx(eC,{color:r,"data-test":"subtitle-label",children:t})}),exports.Tag=hC,exports.TagBase=aC,exports.TextToggle=({text:t,dataTest:n="text-toggle",isComment:o=!1,maxLength:a=300,showLessLabel:i="Lire moins",showMoreLabel:l="Lire plus",title:s})=>{const u=(e=>e.split($C).filter(Boolean).join(" "))(t),c=u.length>a,[d,f]=r.useState(c),p=((e,t)=>{if(e.length<=t||t<0)return e;if(" "===e.charAt(t))return e.slice(0,t).concat("…");const r=e.slice(0,t),[n]=e.slice(t,e.length).split(" ");return r.concat(n).concat("…")})(u,a);return e.jsxs(mC,{"data-test":n,children:[s&&e.jsx(wC,{"data-test":"text-toggle-title",children:`${s} : `}),e.jsx(OC,{isComment:o,children:d?p:u}),c&&e.jsx(xC,{isComment:o,hasTitle:Boolean(s),onClick:()=>f(!d),children:d?l:i})]})},exports.Textarea=gC,exports.Toggle=({label:t,id:r,checked:n=!1,disabled:o=!1,name:a,dataTest:i,onChange:l})=>e.jsxs(Jk,{children:[e.jsx(Zk,{checked:n,onChange:e=>{l(e.target.checked)},icons:!1,name:a,id:r,disabled:o,"data-test":i||`toggle-${a}`}),e.jsx(Xk,{htmlFor:r,disabled:o,"data-test":"toggle-label",children:t})]}),exports.Tooltip=hP,exports.UserForm=({user:t,errors:r,updateUser:n,disabledFields:o={},emailSuggestionI18nLabels:a,errorMessages:i={},isEmailSuggestionEnabled:l=!0,labels:s=rw,phoneWithFlags:u=!1})=>{const{firstName:c,lastName:d,email:f,phone:p}=t,h=Object.assign(Object.assign({},nw),i);return e.jsxs("div",{children:[e.jsx(P,{children:e.jsxs(B,{children:[e.jsxs("div",{children:[e.jsx(le,{dataTest:"customer-firstName",name:"first-name",type:exports.InputType.TEXT,disabled:o.firstName,error:!!r.firstName,label:s.firstName,value:c,onChange:e=>n(Object.assign(Object.assign({},t),{firstName:e}),"user.firstName")}),r.firstName&&e.jsx(by,{dataTest:"invalid-firstName",children:h.firstName})]}),e.jsxs("div",{children:[e.jsx(le,{dataTest:"customer-lastName",name:"last-name",type:exports.InputType.TEXT,disabled:o.lastName,error:!!r.lastName,label:s.lastName,value:d,onChange:e=>n(Object.assign(Object.assign({},t),{lastName:e}),"user.lastName")}),r.lastName&&e.jsx(by,{dataTest:"invalid-lastName",children:h.lastName})]})]})}),e.jsx(P,{children:e.jsxs(B,{children:[e.jsxs("div",{children:[e.jsx(tw,{dataTest:"customer-email",name:"email",disabled:o.email,error:!!r.email,label:s.email,isSuggestionEnabled:l,i18nLabels:a,value:f,onChange:e=>n(Object.assign(Object.assign({},t),{email:ow(e)}),"user.email")}),r.email&&e.jsx(by,{dataTest:"invalid-email",children:h.email})]}),e.jsxs("div",{children:[e.jsx(le,{dataTest:"customer-phone",name:"phone",type:exports.InputType.TEL,disabled:o.phone,error:!!r.phone,label:s.phone,value:p,onChange:e=>n(Object.assign(Object.assign({},t),{phone:e||null}),"user.phone"),inputElement:Hx,phoneWithFlags:u}),r.phone&&e.jsx(by,{dataTest:"invalid-phone",children:h.phone})]})]})})]})},exports.UserSchema=OO,exports.breakpoints=b,exports.colors=x,exports.convertPxToRem=w,exports.createAction=H,exports.fonts=S,exports.formatInternationalPhone=vO,exports.formatPhoneNumber=e=>Rx(e,Lx),exports.getCarbonFootprintLevel=ty,exports.getConsumptionLevel=ey,exports.getGeoSearchSuggestions=Y,exports.isTouchDevice=q,exports.isValidDate=AP,exports.isValidPhoneNumber=mO,exports.paragraphs=R,exports.parsePhoneNumber=xO,exports.radius=L,exports.resetCssButton=G,exports.scrollbar=V,exports.shadows=z,exports.titles=h$,exports.useDebounce=Kx,exports.useEmailSuggestion=Xx,exports.useMobileDevice=()=>U(`(max-width: ${b.base-1}px)`),exports.useModal=({onAbort:t,onOpen:n,onClose:o}={})=>{const[{isAborting:a,fade:i,isLoading:l,isOpen:s},u]=r.useReducer(ek,{isAborting:!1,fade:XP.IN,isOpen:!1,isLoading:!1}),c=(()=>{const e=r.useRef(!0);return r.useEffect((()=>{e.current=!1}),[]),e.current})(),d=r.useCallback((()=>{s&&u(QP.toggleLoad())}),[s]),f=r.useCallback((()=>{n&&n(),u(QP.open())}),[n]),p=r.useCallback((()=>{!l&&s&&u(QP.close())}),[l,s]),h=r.useCallback((()=>{!l&&s&&u(QP.abort())}),[l,s]),y=r.useCallback((()=>u(QP.animationEnd())),[]),b=r.useCallback((()=>{a&&t&&t(),o&&o(),u(QP.reset())}),[a,t,o]);r.useEffect((()=>{s||c||b()}),[s]);return{closeModal:p,createModal:({children:t,icon:n,isAlternative:o=!1,isClosable:a=!0,isFullScreen:u,noPadding:c,text:d,title:f})=>s?e.jsx(pk,{abortModal:h,fade:i,icon:n,isAlternative:o,isClosable:a,isFullScreen:u,isLoading:l,noPadding:c,onAnimationEnd:y,text:d,title:f,children:t}):e.jsx(r.Fragment,{}),openModal:f,toggleLoader:d}},exports.useOnClickOutside=W$,exports.useSmallSmartphoneDevice=()=>U(`(max-width: ${b.smallest-1}px)`),exports.useSmartphoneDevice=W;
|
|
2757
2759
|
//# sourceMappingURL=index.js.map
|