@adoptaunabuelo/react-components 0.3.155 → 0.3.158
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/dist/esm/index.js
CHANGED
|
@@ -690,7 +690,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
690
690
|
display: flex;
|
|
691
691
|
justify-content: flex-end;
|
|
692
692
|
padding: 0 16px;
|
|
693
|
-
`;const jn=e=>{const
|
|
693
|
+
`;const jn=u((e,r)=>{const a=window.innerWidth<=768,l=x(null),d=x(null),s=x(null),h=x(null),[u,f]=c(""),[y,b]=c(),[k,v]=c(),[C,$]=c(!1),[L,_]=c(!1),[F,M]=c(!1);g(r,()=>({triggerCrop:()=>{B()},cancelCrop:()=>{O()}})),p(()=>{const e=setTimeout(()=>{P.apply([k])},100);return()=>clearTimeout(e)},[k]),p(()=>{var t;if(!e.hideCrop){const n=""!==u;null===(t=e.onCropStateChange)||void 0===t||t.call(e,n)}},[u,e.hideCrop]);const P=()=>t(void 0,void 0,void 0,function*(){const e=h.current,t=s.current,n=k;if((null==n?void 0:n.width)&&(null==n?void 0:n.height)&&e&&t){const i=t.getContext("2d");if(!i)throw new Error("No 2d context");const o=e.naturalWidth/e.width,r=e.naturalHeight/e.height,a=window.devicePixelRatio;t.width=Math.floor(n.width*o*a),t.height=Math.floor(n.height*r*a),i.scale(a,a),i.imageSmoothingQuality="high";const l=n.x*o,d=n.y*r,s=e.naturalWidth/2,c=e.naturalHeight/2;i.save(),i.translate(-l,-d),i.translate(s,c),i.translate(-s,-c),i.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),i.restore()}}),j=e=>new Promise((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=e=>n(e)}),B=()=>{var e;$(!0),null===(e=s.current)||void 0===e||e.toBlob(e=>{e?E(e):$(!1)},"image/webp")},E=n=>{new Q(n,{quality:1,maxHeight:e.maxHeight,maxWidth:e.maxWidth,success:n=>t(void 0,void 0,void 0,function*(){f("");const t=yield j(n);e.onChange&&e.onChange(t),$(!1)})})},O=()=>{f("")},A=e=>{var t;"camera"===e?M(!0):"library"===e&&(_(!1),null===(t=d.current)||void 0===t||t.click())},H=m(()=>{var t;const n=null===(t=l.current)||void 0===t?void 0:t.getScreenshot();n&&(_(!1),M(!1),f(n),e.hideCrop&&e.onChange&&e.onChange(n))},[l]);return i(Ln,{style:e.style,children:[i($n,{isVisible:L,type:a?"full-screen":"default",hideClose:!0,hideHeader:!0,style:{width:a?"100%":400},contentStyle:{padding:"16px 0px",backgroundColor:F?"black":"white"},buttonProps:F?{children:n(zn,{style:{position:"relative",justifyContent:"center",alignItems:"center",width:"100%",padding:"0 32px"},children:n(Mn,{onClick:H})}),style:{backgroundColor:"transparent",width:"100%",marginTop:12,marginBottom:12,paddingBottom:"calc(env(safe-area-inset-bottom, 0) + 8px)"}}:void 0,onClose:()=>_(!1),children:[F&&n(ut,{design:"image",icon:n(w,{}),onClick:()=>{M(!1),_(!1)},style:{position:"absolute",top:12,right:12,backgroundColor:"rgba(0, 0, 0, 0.4)",color:"white",border:"none",padding:8,borderRadius:"50%",cursor:"pointer",zIndex:10}}),F?n(o,{children:n(ie,{ref:l,height:"100%",width:"100%",videoConstraints:{facingMode:"environment"}})}):i(o,{children:[n(Pn,{children:n(w,{style:{cursor:"pointer"},onClick:()=>{M(!1),_(!1)}})}),i(Dn,{onClick:()=>A("camera"),children:[n(S,{}),n(Re,{type:"p",children:"Cámara"})]}),i(Dn,{onClick:()=>A("library"),children:[n(D,{}),n(Re,{type:"p",children:"Imagen de librería"})]})]})]}),n(ut,{role:"button",onClick:()=>{var t;e.options&&e.options.length>1?_(!0):null===(t=d.current)||void 0===t||t.click()},style:Object.assign({height:32,padding:"0px 12px",fontSize:14,fontWeight:500},e.buttonStyle),icon:e.icon,design:"secondary",children:e.buttonText?e.buttonText:"Subir foto"}),n("input",{name:"image",accept:"image/*",onChange:n=>t(void 0,void 0,void 0,function*(){if(n&&n.target&&n.target.files&&n.target.files[0]){const t=n.target.files[0];if(e.hideCrop){const e=new Blob([t],{type:"image/webp"});E(e)}else{b(void 0);const e=yield j(t);f("string"==typeof e?e:""),d.current&&(d.current.value="")}}}),hidden:!0,type:"file",ref:d}),u&&!e.hideCrop&&i(_n,{children:[!e.hideToolbar&&i(Fn,{children:[n(ut,{design:"primary",size:"small",loading:C,icon:n(z,{}),onClick:B,children:"Recortar"}),n(ut,{style:{marginLeft:12},design:"image",icon:n(w,{}),onClick:O})]}),n(ee,{style:{height:"-webkit-fill-available"},crop:y,onChange:(e,t)=>b(t),onComplete:e=>v(e),aspect:1,children:n("img",{ref:h,alt:"Crop me",src:u,style:{maxWidth:"100%",maxHeight:"100%"},onLoad:e=>{{const{width:t,height:n}=e.currentTarget;b(function(e,t,n){return te(ne({unit:"%",width:60},n,e,t),e,t)}(t,n,1))}}})}),k&&n(Sn,{ref:s,style:e.previewStyle})]})]})}),Bn=r.div`
|
|
694
694
|
position: relative;
|
|
695
695
|
display: flex;
|
|
696
696
|
`,En=r.div`
|
|
@@ -908,6 +908,8 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
908
908
|
`,li=r.div`
|
|
909
909
|
display: flex;
|
|
910
910
|
flex-direction: row;
|
|
911
|
+
align-items: baseline;
|
|
912
|
+
gap: 2px;
|
|
911
913
|
`,di=r.div`
|
|
912
914
|
display: flex;
|
|
913
915
|
flex-direction: row;
|
|
@@ -929,10 +931,11 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
929
931
|
box-sizing: border-box;
|
|
930
932
|
border-radius: 16px;
|
|
931
933
|
box-shadow: ${e=>e.$selected?`inset 0 0 0 2px ${De.border.primary}`:`inset 0 0 0 1px ${De.border.neutralSoft}`};
|
|
934
|
+
background-color: ${e=>e.$selected?De.surface.primarySoft:"transparent"};
|
|
932
935
|
cursor: pointer;
|
|
933
936
|
|
|
934
937
|
&:hover {
|
|
935
|
-
background-color: ${De.surface.neutralSoft};
|
|
938
|
+
background-color: ${e=>e.$selected?De.surface.primarySoft:De.surface.neutralSoft};
|
|
936
939
|
}
|
|
937
940
|
`,ci=r.input`
|
|
938
941
|
font-family: Poppins;
|
|
@@ -961,18 +964,23 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
961
964
|
justify-content: center;
|
|
962
965
|
height: 64px;
|
|
963
966
|
box-sizing: border-box;
|
|
964
|
-
box-shadow: ${e=>e.$
|
|
967
|
+
box-shadow: ${e=>e.$error?`inset 0 0 0 2px ${De.border.red}`:e.$focus||e.$isSelected?`inset 0 0 0 2px ${De.border.primary}`:`inset 0 0 0 1px ${De.border.neutralSoft}`};
|
|
965
968
|
border-radius: 16px;
|
|
966
969
|
padding: 14px 16px;
|
|
967
|
-
background-color: ${e=>e.$isSelected
|
|
970
|
+
background-color: ${e=>e.$error||!e.$isSelected&&!e.$focus?"transparent":De.surface.primarySoft};
|
|
968
971
|
cursor: pointer;
|
|
969
972
|
&:hover {
|
|
970
973
|
background-color: ${De.border.neutralSoft};
|
|
971
974
|
}
|
|
972
975
|
`,hi=r.div`
|
|
976
|
+
display: flex;
|
|
977
|
+
align-items: center;
|
|
978
|
+
justify-content: center;
|
|
979
|
+
min-height: 20px;
|
|
980
|
+
`,ui=r.div`
|
|
973
981
|
display: flex;
|
|
974
982
|
margin-bottom: 6px;
|
|
975
|
-
`,
|
|
983
|
+
`,xi=r(Re)`
|
|
976
984
|
position: relative;
|
|
977
985
|
padding: 8px 12px;
|
|
978
986
|
background-color: ${De.surface.neutralSoft};
|
|
@@ -983,7 +991,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
983
991
|
${d.lessThan("small")`
|
|
984
992
|
max-width: 100%;
|
|
985
993
|
`}
|
|
986
|
-
`,
|
|
994
|
+
`,gi=r.span`
|
|
987
995
|
&::before {
|
|
988
996
|
content: "";
|
|
989
997
|
position: absolute;
|
|
@@ -997,9 +1005,9 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
997
1005
|
margin-left: -8px;
|
|
998
1006
|
margin-top: -1px;
|
|
999
1007
|
}
|
|
1000
|
-
`,
|
|
1008
|
+
`,mi=e=>{const t=k,r=x(null),a=x([]),l=x(null),[d,s]=c(void 0),[h,u]=c(""),[g,m]=c(!1),[f,y]=c(""),[b,v]=c(24),w=e.options[0].price,C=e=>{const t=parseInt(e);return isNaN(t)||t<w};p(()=>{s(e.defaultOption)},[e.defaultOption]),p(()=>{if(!e.onErrorChange)return;const t=h.length>0&&C(h);e.onErrorChange(t)},[h,e.options]),p(()=>{if(e.options.length>0){const t=e.options[e.options.length-1].price.toString().length;t>5?v(16):t>4?v(18):t>3&&v(21)}},[e.options]),p(()=>{const t=e.options.findIndex(e=>e.price===d);if(-1!==t&&a.current[t]&&r.current){const e=r.current,n=a.current[t],i=e.offsetWidth,o=n.offsetWidth,l=n.offsetLeft-(i/2-o/2);e.scrollTo({left:l,behavior:"smooth"})}},[d]);return i(ai,{style:e.style,ref:r,children:[e.label&&e.labelValueConversion&&!e.options[0].data&&n(ui,{style:{justifyContent:d?0===e.options.findIndex(e=>e.price===d)?"flex-start":1===e.options.findIndex(e=>e.price===d)?"center":"flex-end":"center"},children:i(xi,{type:"c1",children:[e.label.replace("{{value}}",(e.labelValueConversion*(d||(h?parseInt(h):0))).toFixed(0)),d&&n(gi,{$position:0===e.options.findIndex(e=>e.price===d)?"left":1===e.options.findIndex(e=>e.price===d)?"center":"right"})]})}),n(di,{style:e.containerStyle,children:e.options.map((o,r)=>{const l=d===o.price&&0===h.length;return i(si,{ref:e=>{a.current[r]=e},$selected:l,$data:!!o.data,onClick:()=>(t=>{u(""),y(""),s(t),e.onChange&&e.onChange(t)})(o.price),children:[i(Re,{type:"h3",weight:"medium",style:{fontSize:b},children:[o.price.toLocaleString("es-ES",{useGrouping:!0}),n("span",{style:{fontSize:b-6,marginLeft:2},children:e.currency})]}),o.data&&o.data.length>0&&n("div",{style:{display:"flex",flexDirection:"column",gap:3,marginTop:12,paddingTop:12,borderTop:"1px solid "+De.border.neutralSoft},children:o.data.map((e,o)=>{const a=e.icon?t[e.icon]:t.Check;return i("div",{style:{display:"flex",gap:8},children:[n(a,{height:16,width:16,color:De.text.primary}),n(Re,{type:"c1",style:{flex:1},children:e.title})]},`column-${r}-data-${o}`)})})]},"price-option-"+r)})}),!e.hideCustomAmount&&i(o,{children:[i(pi,{$focus:g,$isSelected:h.length>0,$error:f.length>0,onClick:()=>{var e;return null===(e=l.current)||void 0===e?void 0:e.focus()},children:[i(li,{$data:!!e.options[0].data,children:[n(ci,{ref:l,style:{fontSize:b,width:h.length>0?h.length+"ch":"unset"},type:"number",value:h,placeholder:"Otra cantidad",onKeyDown:e=>{[".",",","e","E","+","-"].includes(e.key)&&e.preventDefault()},onChange:e=>{u(e.target.value)},onFocus:e=>{m(!0),y(""),s(void 0),u("")},onBlur:t=>{m(!1),C(t.target.value)?y(`La donación mínima es de ${w}${e.currency}`):(y(""),e.onChange&&e.onChange(t.target.value.length>0?parseInt(t.target.value):d||0))}}),h.length>0&&n(Re,{type:"h6",weight:"medium",style:{fontSize:18},children:e.currency})]}),e.customAmountData&&n("div",{style:{marginTop:12,paddingTop:12,borderTop:"1px solid "+De.border.neutralSoft},children:e.customAmountData})]}),n(hi,{children:f&&n(Re,{type:"p2",weight:"medium",style:{color:De.text.red,textAlign:"center"},children:f})})]})]})},fi=r.div`
|
|
1001
1009
|
position: relative;
|
|
1002
|
-
`,
|
|
1010
|
+
`,yi=r.div`
|
|
1003
1011
|
display: flex;
|
|
1004
1012
|
flex-direction: row;
|
|
1005
1013
|
align-items: center;
|
|
@@ -1010,7 +1018,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1010
1018
|
cursor: pointer;
|
|
1011
1019
|
background-color: white;
|
|
1012
1020
|
gap: 8px;
|
|
1013
|
-
`,
|
|
1021
|
+
`,bi=r.div`
|
|
1014
1022
|
position: absolute;
|
|
1015
1023
|
top: 42px;
|
|
1016
1024
|
z-index: 1000;
|
|
@@ -1022,7 +1030,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1022
1030
|
max-height: 220px;
|
|
1023
1031
|
overflow: scroll;
|
|
1024
1032
|
width: 100%;
|
|
1025
|
-
`,
|
|
1033
|
+
`,ki=r.div`
|
|
1026
1034
|
display: flex;
|
|
1027
1035
|
flex-direction: row;
|
|
1028
1036
|
align-items: center;
|
|
@@ -1032,12 +1040,12 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1032
1040
|
&:hover {
|
|
1033
1041
|
background-color: ${Le.background.soft};
|
|
1034
1042
|
}
|
|
1035
|
-
`,
|
|
1043
|
+
`,vi=e=>{const[t,o]=c(!1),[r,a]=c(e.options&&e.options[0]);p(()=>(window.addEventListener("click",e=>l(e)),window.removeEventListener("click",()=>{})),[]),p(()=>{e.selectedItem&&a(e.selectedItem)},[e.selectedItem]);const l=t=>{const n=document.getElementById(e.id);null!==n&&(n.contains(t.target)||o(!1))};return i(fi,{children:[i(yi,{role:"select",id:e.id,style:e.style,onClick:e=>{e.stopPropagation(),o(!t)},children:[null==r?void 0:r.icon,!e.hideTitle&&n(Re,{type:"p",style:{flex:1,fontSize:14,color:e.style?e.style.color:Le.text.full},children:null==r?void 0:r.label}),n(t?M:P,{height:20,width:20})]}),t&&n(bi,{role:"menu",style:e.optionStyle,children:e.options.map((t,r)=>i(ki,{role:"cell-"+r,onClick:n=>((t,n)=>{n.stopPropagation(),a(t),o(!1),e.onChange&&e.onChange(t)})(t,n),children:[t.icon,n(Re,{type:"p",children:t.label})]},e.id+"-cell-"+r))})]})},wi=r.div`
|
|
1036
1044
|
display: flex;
|
|
1037
1045
|
align-items: center;
|
|
1038
1046
|
padding: 0px;
|
|
1039
1047
|
height: auto;
|
|
1040
|
-
`,
|
|
1048
|
+
`,Ci=r.input`
|
|
1041
1049
|
height: 38px;
|
|
1042
1050
|
border-radius: 100px;
|
|
1043
1051
|
border: none;
|
|
@@ -1057,12 +1065,12 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1057
1065
|
background: white;
|
|
1058
1066
|
cursor: text;
|
|
1059
1067
|
}
|
|
1060
|
-
|
|
1068
|
+
`,$i=r.div`
|
|
1061
1069
|
position: absolute;
|
|
1062
1070
|
display: flex;
|
|
1063
1071
|
align-items: center;
|
|
1064
1072
|
margin-left: ${e=>"secondary"===e.$design?"0px;":"16px;"};
|
|
1065
|
-
|
|
1073
|
+
`,Li=t=>{const{id:o,style:r,design:a}=t,l=e(t,["id","style","design"]);return"big"===t.type?i(wi,{id:o,role:"search-bar",style:r,children:[n($i,{$design:a,style:{height:24,width:24},children:n(j,{stroke:Le.text.high})}),n(Ci,Object.assign({role:"input",style:{height:"48px",paddingLeft:"secondary"===a?"36px":"46px"}},l,{$design:a}))]}):i(wi,{id:o,role:"search-bar",style:r,children:[n($i,{$design:a,style:{height:22,width:22},children:n(j,{stroke:Le.text.high})}),n(Ci,Object.assign({role:"input",style:{fontSize:16,paddingLeft:"secondary"===a?"36px":"46px"},$design:a},l))]})},_i=r.div`
|
|
1066
1074
|
display: flex;
|
|
1067
1075
|
flex-direction: row;
|
|
1068
1076
|
justify-content: center;
|
|
@@ -1071,7 +1079,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1071
1079
|
width: fit-content;
|
|
1072
1080
|
height: 28px;
|
|
1073
1081
|
border-radius: 3px;
|
|
1074
|
-
`,
|
|
1082
|
+
`,Fi=r.div`
|
|
1075
1083
|
display: flex;
|
|
1076
1084
|
flex-direction: column;
|
|
1077
1085
|
justify-content: center;
|
|
@@ -1080,7 +1088,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1080
1088
|
width: 30px;
|
|
1081
1089
|
border-radius: 50%;
|
|
1082
1090
|
background-color: ${e=>e.disabled?Le.background.soft:Le.background.primaryLow};
|
|
1083
|
-
`,
|
|
1091
|
+
`,Si=r.div`
|
|
1084
1092
|
display: flex;
|
|
1085
1093
|
flex-direction: row;
|
|
1086
1094
|
justify-content: center;
|
|
@@ -1091,7 +1099,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1091
1099
|
top: 1082px;
|
|
1092
1100
|
border-radius: 555px;
|
|
1093
1101
|
background-color: ${e=>e.disabled?Le.background.soft:Le.background.primaryLow};
|
|
1094
|
-
`,
|
|
1102
|
+
`,Di=r.div`
|
|
1095
1103
|
display: flex;
|
|
1096
1104
|
flex-direction: row;
|
|
1097
1105
|
justify-content: center;
|
|
@@ -1103,7 +1111,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1103
1111
|
opacity: ${e=>e.disabled?.6:1};
|
|
1104
1112
|
box-sizing: border-box;
|
|
1105
1113
|
border-radius: 555px;
|
|
1106
|
-
`,
|
|
1114
|
+
`,zi=t=>{var r;const a=e(t,["text"]),[l,d]=c(void 0);p(()=>{d(s())},[t.text]);const s=()=>{switch(t.text){case"inRegister":return{color:"#2D7FD9",backgroundColor:"#E5F1FC",text:"Registro simple"};case"registered":return{color:"#2D7FD9",backgroundColor:"#E5F1FC",text:"Registrado"};case"waiting":return{color:"#2D7FD9",backgroundColor:"#E5F1FC",text:"Pendiente de match"};case"training":return{color:"#2D7FD9",backgroundColor:"#E5F1FC",text:"Onboarding en proceso"};case"match":return{color:"#59C183",backgroundColor:"#E7F6ED",text:"Match"};case"shutdown":return{color:"#FF5A5A",backgroundColor:"#FCEDF1",text:"Baja"};case"banned":return{color:"#FF5A5A",backgroundColor:"#FCEDF1",text:"Bloqueado"};case"exVolunteer":return{color:"#FF5A5A",backgroundColor:"#FCEDF1",text:"Ex-voluntario"};case"paused":return{color:"#828282",backgroundColor:"#F2F2F2",text:"Pausa"};case"inProgress":case"En proceso":return{color:"#FF8854",backgroundColor:"#FFF6E5",text:"En proceso"};case"pending_remittance":return{color:"#0000008F",backgroundColor:"#F2F2F2",text:"Pendiente remesa"};case"pending":case"Pendiente":return{color:"#0000008F",backgroundColor:"#F2F2F2",text:"Pendiente"};case"canceled":return{color:Le.text.red,backgroundColor:Le.background.redLow,text:"Cancelado"};case"failed":return{color:Le.text.red,backgroundColor:Le.background.redLow,text:"Fallido"};case"cancel":return{color:Le.text.red,backgroundColor:Le.background.redLow,text:"Cancelada"};case"No resuelto":return{color:Le.text.red,backgroundColor:Le.background.redLow,text:"No resuelto"};case"done":case"Resuelto":return{color:"#448B6D",backgroundColor:"#E4F8EE",text:"Resuelto"};case"active":return{color:"#448B6D",backgroundColor:"#E4F8EE",text:"Activa"};case"paid":return{color:"#448B6D",backgroundColor:"#E4F8EE",text:"Pagado"}}};return"chip"===t.type?"big"===t.size?n(Si,Object.assign({role:"chip"},a,{children:n(Re,{type:"p2",weight:"medium",style:{color:t.disabled?Le.text.high:Le.text.primary},children:t.text.slice(0,1).toLocaleUpperCase()+t.text.slice(1,t.text.length).toLocaleLowerCase()})})):"selector"===t.size?n(Di,Object.assign({role:"chip"},a,{children:n(Re,{type:"p2",weight:"medium",children:t.text})})):n(Fi,{role:"chip",style:Object.assign(Object.assign({},t.style),{background:t.disabled?Le.background.soft:Le.background.primaryLow}),children:n(Re,{type:"p2",weight:"medium",style:{color:t.disabled?Le.text.high:Le.text.primary},children:t.text.slice(0,1).toLocaleUpperCase()+t.text.slice(1,2)})}):n(_i,Object.assign({role:"label",id:"Label"},a,{style:Object.assign({background:t.backgroundColor?t.backgroundColor:l?l.backgroundColor:Le.background.soft},t.style),children:i(o,{children:[t.icon&&n("span",{style:{display:"flex",alignItems:"center",marginRight:4},children:t.icon}),n(Re,{type:"p",style:{fontSize:(null===(r=t.style)||void 0===r?void 0:r.fontSize)?t.style.fontSize:14,fontWeight:500,color:t.color?t.color:l?l.color:Le.text.full},children:(null==l?void 0:l.text)?l.text:t.text})]})}))},Mi=r.div`
|
|
1107
1115
|
width: 50px;
|
|
1108
1116
|
height: 50px;
|
|
1109
1117
|
display: flex;
|
|
@@ -1113,7 +1121,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1113
1121
|
border-radius: 50%;
|
|
1114
1122
|
background-color: ${Le.background.primaryLow};
|
|
1115
1123
|
cursor: ${e=>e.$editable||e.$clickable?"pointer":"default"};
|
|
1116
|
-
`,
|
|
1124
|
+
`,Pi=r.p`
|
|
1117
1125
|
font-family: Poppins;
|
|
1118
1126
|
font-style: normal;
|
|
1119
1127
|
font-weight: 500;
|
|
@@ -1121,19 +1129,19 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1121
1129
|
line-height: 40px;
|
|
1122
1130
|
color: ${Le.text.primary};
|
|
1123
1131
|
text-align: center;
|
|
1124
|
-
`,
|
|
1132
|
+
`,ji=r.img`
|
|
1125
1133
|
height: 100%;
|
|
1126
1134
|
width: 100%;
|
|
1127
1135
|
object-fit: cover;
|
|
1128
1136
|
border-radius: 50%;
|
|
1129
|
-
`,
|
|
1137
|
+
`,Bi=r.img`
|
|
1130
1138
|
width: 100%;
|
|
1131
1139
|
height: 100%;
|
|
1132
1140
|
object-fit: cover;
|
|
1133
|
-
`,
|
|
1141
|
+
`,Ei=e=>{var r,a,l;const d=x(null),[s,p]=c(!1),h=e=>new Promise((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=e=>n(e)});return i(o,{children:[n($n,{isVisible:s,onClose:()=>p(!1),contentStyle:{padding:0,backgroundColor:"black"},hideHeader:!0,children:n(Bi,{src:e.icon})}),i(Mi,{role:"avatar",style:e.style,$editable:e.editable,$clickable:e.clickable,onClick:()=>{var t;e.editable?null===(t=d.current)||void 0===t||t.click():e.clickable&&p(!0)},children:[n("input",{ref:d,id:"file",type:"file",accept:"image/x-png,image/gif,image/jpeg",style:{display:"none"},onChange:n=>t(void 0,void 0,void 0,function*(){if(n.target&&n.target.files&&n.target.files[0])if(n.target.files[0].name.match(/\.(jpg|jpeg|png|gif)$/)){const t=yield h(n.target.files[0]);e.onChange&&e.onChange(t)}else alert("Debes seleccionar una imagen")})}),e.icon?n(ji,{src:e.icon}):e.name?n(Pi,{style:{color:(null===(r=e.style)||void 0===r?void 0:r.color)?null===(a=e.style)||void 0===a?void 0:a.color:Le.text.primary,fontSize:(null===(l=e.style)||void 0===l?void 0:l.fontSize)?e.style.fontSize:24,fontWeight:600},children:e.name.substring(0,1).toLocaleUpperCase()}):null]})]})},Oi=r.div`
|
|
1134
1142
|
position: relative;
|
|
1135
1143
|
width: fit-content;
|
|
1136
|
-
`,
|
|
1144
|
+
`,Ai=r.button`
|
|
1137
1145
|
position: relative;
|
|
1138
1146
|
display: flex;
|
|
1139
1147
|
flex-direction: row;
|
|
@@ -1149,7 +1157,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1149
1157
|
&:hover {
|
|
1150
1158
|
background-color: ${De.surface.neutralSoft};
|
|
1151
1159
|
}
|
|
1152
|
-
`,
|
|
1160
|
+
`,Hi=r.div`
|
|
1153
1161
|
position: absolute;
|
|
1154
1162
|
display: flex;
|
|
1155
1163
|
flex-direction: column;
|
|
@@ -1179,11 +1187,11 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1179
1187
|
${d.lessThan("small")`
|
|
1180
1188
|
display: none;
|
|
1181
1189
|
`}
|
|
1182
|
-
`,
|
|
1190
|
+
`,Vi=r.div`
|
|
1183
1191
|
position: sticky;
|
|
1184
1192
|
bottom: 0;
|
|
1185
1193
|
z-index: 5;
|
|
1186
|
-
`,
|
|
1194
|
+
`,Ti=r.div`
|
|
1187
1195
|
display: flex;
|
|
1188
1196
|
flex-direction: row;
|
|
1189
1197
|
align-items: center;
|
|
@@ -1195,20 +1203,20 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1195
1203
|
${d.lessThan("small")`
|
|
1196
1204
|
padding: 16px 0px;
|
|
1197
1205
|
`}
|
|
1198
|
-
`,
|
|
1206
|
+
`,Ii=r.hr`
|
|
1199
1207
|
margin-top: 8px;
|
|
1200
1208
|
margin-bottom: 0px;
|
|
1201
1209
|
width: calc(100% + 2 * 24px);
|
|
1202
1210
|
margin-left: -25px;
|
|
1203
1211
|
margin-right: -16px;
|
|
1204
1212
|
border-top: 0px solid var(--border-clear-neutral-soft, rgba(0, 29, 61, 0.1));
|
|
1205
|
-
`,
|
|
1213
|
+
`,Ni=r.div`
|
|
1206
1214
|
display: flex;
|
|
1207
1215
|
flex: 1;
|
|
1208
1216
|
padding-right: 2px;
|
|
1209
1217
|
|
|
1210
1218
|
overflow-y: auto;
|
|
1211
|
-
`,
|
|
1219
|
+
`,Zi=r.div`
|
|
1212
1220
|
position: sticky;
|
|
1213
1221
|
top: 0;
|
|
1214
1222
|
display: flex;
|
|
@@ -1220,13 +1228,13 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1220
1228
|
z-index: 5;
|
|
1221
1229
|
gap: 8px;
|
|
1222
1230
|
background-color: white;
|
|
1223
|
-
`,
|
|
1231
|
+
`,Ri=r.div`
|
|
1224
1232
|
display: flex;
|
|
1225
1233
|
align-items: center;
|
|
1226
1234
|
justify-content: center;
|
|
1227
1235
|
height: 18px;
|
|
1228
1236
|
width: 18px;
|
|
1229
|
-
`,
|
|
1237
|
+
`,Gi=e=>{const t=window.innerWidth<=450,[r,a]=c(!1),[l,d]=c(void 0),s=x(null),h=x(null);p(()=>{const e=()=>{a(!1)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),p(()=>{const e=e=>{(r&&s.current&&!h.current&&!s.current.contains(e.target)||r&&h.current&&!h.current.contains(e.target))&&a(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),p(()=>{r||e.onClose&&e.onClose()},[r]);const u=t=>{const n=t.target.value;d(n),e.onSearchChange&&e.onSearchChange(n)},g=()=>n(o,{children:i(Vi,{children:[n(Ii,{}),i(Ti,{children:[e.childrenBottomBar,n(ut,{design:"call-to-action",size:t?"normal":"small",onClick:()=>{a(!1),e.onRemove&&e.onRemove()},children:"Borrar"}),n(ut,{design:"primary",size:t?"normal":"small",onClick:()=>{a(!1),e.onSave&&e.onSave()},children:"Aplicar"})]})]})});return i(Oi,{id:e.id,role:"filter",style:e.style,children:[i(Ai,{role:"filter-button",$selected:!!e.label,disabled:e.disabled,style:e.buttonStyle,onClick:()=>{a(!0)},children:[n(Re,{type:"b2",weight:"medium",style:{fontWeight:500,whiteSpace:"nowrap",overflow:"hidden",overflowWrap:"break-word",textOverflow:"ellipsis"},children:e.label?e.label:e.placeholder}),e.label?n(Ri,{onClick:t=>{t.stopPropagation(),e.onRemove&&e.onRemove()},children:n(w,{height:18,width:18,color:e.disabled?Le.text.low:"black"})}):n(Ri,{children:n(P,{height:18,width:18,color:e.disabled?Le.text.low:Le.text.high})})]}),n($n,{type:"full-screen",isVisible:r&&t,onClose:()=>{a(!1)},hideClose:!0,children:i("div",{ref:h,children:[i(Zi,{$hideSearchBar:!!e.hideSearchBar&&e.hideSearchBar,children:[!e.hideSearchBar&&n(Li,{defaultValue:l,style:{flex:1},placeholder:"Buscar",design:"primary",onChange:u}),n(ut,{design:"call-to-action",size:"small",style:{color:De.text.neutralHard},onClick:()=>{a(!1)},children:"Cancelar"})]}),n(Ni,{style:{flex:1,overflowY:"auto"},children:e.children}),g()]})}),!t&&r&&i(Hi,{style:e.menuStyle,ref:s,$position:e.position,children:[!e.hideSearchBar&&n(Li,{defaultValue:l,style:{borderBottom:"1px solid "+De.border.neutralSoft,marginBottom:8},placeholder:"Buscar",design:"secondary",onChange:u}),n(Ni,{children:e.children}),g()]})]})},Wi=r.button`
|
|
1230
1238
|
display: flex;
|
|
1231
1239
|
align-items: center;
|
|
1232
1240
|
flex-direction: row;
|
|
@@ -1238,7 +1246,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1238
1246
|
opacity: ${e=>e.disabled?.5:1};
|
|
1239
1247
|
width: 100%;
|
|
1240
1248
|
gap: 12px;
|
|
1241
|
-
`,
|
|
1249
|
+
`,Yi=r.div`
|
|
1242
1250
|
display: flex;
|
|
1243
1251
|
align-items: center;
|
|
1244
1252
|
justify-content: center;
|
|
@@ -1266,13 +1274,13 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1266
1274
|
background-color: ${e=>e.$selected?e.$error?Le.status.color.error:Le.background.primary:e.$error?Le.status.color.errorDefault:"#FFFFFF"};
|
|
1267
1275
|
border: ${e=>e.$selected?"1px solid "+(e.$error?Le.status.color.error:Le.background.primary):"1px solid rgba(0, 29, 61, 0.24)"};
|
|
1268
1276
|
}
|
|
1269
|
-
`,
|
|
1277
|
+
`,Ui=r.div`
|
|
1270
1278
|
display: flex;
|
|
1271
1279
|
align-items: center;
|
|
1272
1280
|
flex-grow: 1;
|
|
1273
1281
|
line-height: 24px;
|
|
1274
1282
|
text-align: left;
|
|
1275
|
-
`,
|
|
1283
|
+
`,qi=t=>{var{position:o="left",error:r,sublabel:a,selected:l=!1,avatarEnabled:d,shape:s="square"}=t,h=e(t,["position","error","sublabel","selected","avatarEnabled","shape"]);const[u,x]=c(l);p(()=>{x(l)},[l]);return i(Wi,Object.assign({"data-testid":"checkbox",onClick:e=>{x(!u),h.onClick&&h.onClick(e)}},h,{children:["left"===o&&n(Yi,{$shape:s,$selected:l,$error:r,$height:h.height,$width:h.width,children:l&&n(q,{style:{height:18,width:18},autoplay:!0,loop:!1,keepLastFrame:!0,src:Xe,onEvent:e=>{}})}),i(Ui,{children:[d&&n(Ei,{name:h.label||"",style:{height:32,width:32,marginRight:8,fontSize:15}}),i("div",{children:[h.children&&h.children,h.label&&n(Re,{type:"p",children:h.label}),a&&n(Re,{type:"p",style:{fontSize:12},children:a})]})]}),"right"===o&&n(Yi,{$shape:s,$selected:l,$error:r,$height:h.height,$width:h.width,children:l&&n(q,{style:{height:18,width:18},autoplay:!0,loop:!1,keepLastFrame:!0,src:Xe,onEvent:e=>{}})})]}))},Xi=r.div``,Ki=e=>{const[t,i]=c([]),[o,r]=c(!1),[a,l]=c(window.innerWidth<768);p(()=>{e.selectedOptions&&i(e.selectedOptions);const t=()=>{l(window.innerWidth<768)};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e.selectedOptions]);return n(Xi,{role:"checkboxlist",style:e.style,children:n("div",{style:{paddingBottom:"2px"},children:e.options.map((l,d)=>{const s=t.some(e=>e.id===l.id);return n(qi,{role:"checkbox-"+d,style:Object.assign({marginRight:"16px",marginBottom:"16px",padding:a?"4px 1px":"0px"},e.elementStyle),label:l.label,sublabel:l.sublabel,error:l.error,selected:s,height:e.height,shape:e.shape,width:e.width,position:e.position,avatarEnabled:e.avatarEnabled,onClick:()=>(n=>{const a=t.findIndex(e=>n.id===e.id),l="single"===e.type?[n]:-1===a?[...t,n]:t.filter((e,t)=>t!==a);i(l),r(!o),e.onChange&&e.onChange(l)})(l),children:l.Element},l.id)})})})},Ji=u((t,i)=>{var{type:o,options:r,selectedOptions:a,onChange:l}=t,d=e(t,["type","options","selectedOptions","onChange"]);const s=window.innerWidth<=450,[h,u]=c([]),[x,m]=c(r),[f,y]=c(void 0),[b,k]=c(void 0);g(i,()=>({clean(){w()}})),p(()=>{y(new de(r,{keys:["label","id"]})),m(r)},[r]),p(()=>{u(a||[]),v(a||[])},[a]);const v=e=>{if("single"===o&&e.length>0){const t=e[0];if(t.label)k(t.label);else{const e=r.find(e=>e.id===t.id);k(e?e.label:"1 seleccionado")}}else"multiple"===o&&e.length>0&&k(`${e.length} seleccionados`)},w=()=>{k(void 0),u([]),l&&l([])};return n(Gi,Object.assign({},d,{label:b,childrenBottomBar:"multiple"===o&&!s&&n(ut,{design:"call-to-action",size:s?"normal":"small",onClick:()=>{u(r)},children:"Seleccionar todo"}),onSave:()=>{v(h),l&&l(h)},onRemove:w,onSearchChange:e=>{if(e&&f){const t=f.search(e).map(e=>e.item);m(t)}else m(r)},onClose:()=>{m(r)},children:n(Ki,{style:{width:"100%"},options:x,selectedOptions:h,type:o,shape:d.shape,height:s?22:18,width:s?22:18,position:s?"right":"left",onChange:e=>{u(e)}})}))});dn(".DayPicker{\n border-radius: 0px;\n box-shadow: none;\n font-family: Poppins;\n overflow: hidden;\n}\n\n.DayPicker__horizontal,\n.DayPicker_focusRegion,\n.DayPicker_weekHeaders,\n.DayPicker_transitionContainer,\n.CalendarMonthGrid,\n.CalendarMonthGrid__horizontal,\n.CalendarMonthGrid_month__horizontal {\n overflow: hidden !important;\n}\n\n.DayPicker_weekHeaders {\n margin-left: 9px !important;\n}\n\n.DayPicker_transitionContainer__horizontal {\n height: 320px !important;\n}\n\n.DayPickerNavigation__horizontal {\n height: 0;\n}\n\n.CalendarMonthGrid__horizontal {\n left: 9px !important;\n}\n\n.CalendarMonthGrid_month__horizontal {\n padding: 0 12px 0 0;\n}\n\n.CalendarMonthGrid_month__horizontal:last-child {\n padding-right: 0;\n}\n\n.DayPickerNavigation_leftButton__horizontalDefault {\n left: 0px !important;\n}\n\n.DayPickerNavigation_rightButton__horizontalDefault {\n right: 0px !important;\n}\n\n.DayPickerNavigation_button__horizontalDefault {\n width: 28px;\n height: 28px;\n border: 1px solid #d7dee7;\n border-radius: 8px;\n background: #ffffff;\n box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 2px;\n}\n\n.DayPickerNavigation_button__default:focus,\n.DayPickerNavigation_button__default:hover {\n border: 1px solid #cdd8e5;\n background: #f8fbff;\n}\n\n.DayPickerNavigation_svg__horizontal {\n width: 20px;\n height: 20px;\n fill: #6b7280;\n}\n\n.CalendarMonth_caption {\n padding-top: 24px;\n padding-bottom: 28px;\n padding-left: 59px;\n padding-right: 84px;\n}\n\n.DayPickerKeyboardShortcuts_show__bottomRight{\n display: none;\n}\n\n.CalendarMonth{\n padding: 0px !important;\n}\n\n.filter-date__month-selector {\n display: flex;\n gap: 6px;\n align-items: center;\n justify-content: center;\n width: fit-content;\n margin: 0 auto;\n padding: 0;\n transform: translateX(-8px);\n}\n\n.filter-date__select {\n height: 34px;\n min-width: 84px;\n padding: 0 10px;\n border: 1px solid #d7dee7;\n border-radius: 10px;\n background-color: #ffffff;\n color: #202938;\n font-family: Poppins;\n font-size: 14px;\n font-weight: 500;\n box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);\n appearance: none;\n -webkit-appearance: none;\n background-image:\n linear-gradient(45deg, transparent 50%, #4b5563 50%),\n linear-gradient(135deg, #4b5563 50%, transparent 50%);\n background-position:\n calc(100% - 18px) calc(50% - 2px),\n calc(100% - 12px) calc(50% - 2px);\n background-size: 6px 6px, 6px 6px;\n background-repeat: no-repeat;\n cursor: pointer;\n margin-top: -4px;\n}\n\n.filter-date__select--month {\n width: 110px;\n}\n\n.filter-date__select:focus {\n outline: none;\n border-color: #1e88f7;\n box-shadow: 0 0 0 3px rgba(30, 136, 247, 0.15);\n}\n\n@media (max-width: 450px) {\n .DayPickerNavigation_leftButton__horizontalDefault {\n left: 8px !important;\n }\n\n .DayPickerNavigation_rightButton__horizontalDefault {\n right: 8px !important;\n }\n\n .CalendarMonth_caption {\n padding-left: 64px;\n padding-right: 64px;\n }\n\n .filter-date__month-selector {\n width: fit-content;\n transform: translateX(-4px);\n }\n\n .CalendarMonthGrid_month__horizontal {\n padding-right: 0;\n }\n}\n");const Qi=Array.from({length:201},(e,t)=>String(1900+t)),eo=X.months().map((e,t)=>({label:e,value:String(t)})),to=u((t,o)=>{var{position:r,selectedOptions:a,onChange:l}=t,d=e(t,["position","selectedOptions","onChange"]);const s=window.innerWidth<=450,h=window.innerWidth<=400,[u,m]=c(void 0),[f,y]=c(null),[b,k]=c(null),[v,w]=c("startDate"),C=x(!0),$=e=>{if(e)return y(e.startDate),k(e.endDate),void L(e.startDate||void 0,e.endDate||void 0);y(null),k(null),m("")};g(o,()=>({clean(){_()}})),p(()=>{$(a),C.current=!0},[a]);const L=(e,t)=>{let n="";e&&(n=e.format("D MMM YY")),t&&(n+=` - ${t.format("D MMM YY")}`),m(n)},_=()=>{k(null),y(null),w("startDate"),m(void 0),l&&l({startDate:null,endDate:null})};return n(Gi,Object.assign({},d,{label:u,hideSearchBar:!0,buttonStyle:{maxWidth:280},menuStyle:{width:"fit-content",maxHeight:"unset"},position:r,onClose:()=>{C.current&&$(a)},onSave:()=>{C.current=!1;const e={startDate:f?f.startOf("date"):null,endDate:b?b.endOf("date"):null};console.log("FilterDate onChange",e),L(f||void 0,b||void 0),l&&l(e)},onRemove:_,children:n(J,{startDate:f,endDate:b,onDatesChange:({startDate:e,endDate:t})=>{y(e),k(t),L(e||void 0,t||void 0),!e||t?e||w("startDate"):w("endDate")},daySize:h?35:s?48:void 0,focusedInput:v,numberOfMonths:1,noBorder:!0,onFocusChange:e=>w(e),initialVisibleMonth:()=>{var e,t;return null!==(t=null!==(e=null==f?void 0:f.clone())&&void 0!==e?e:null==b?void 0:b.clone())&&void 0!==t?t:X()},renderMonthElement:({month:e,onMonthSelect:t,onYearSelect:o})=>i("div",{className:"filter-date__month-selector",children:[n("select",{"aria-label":"Seleccionar mes",className:"filter-date__select filter-date__select--month",value:String(e.month()),onChange:n=>t(e,n.target.value),children:eo.map(e=>n("option",{value:e.value,children:e.label},e.value))}),n("select",{"aria-label":"Seleccionar año",className:"filter-date__select",value:String(e.year()),onChange:t=>o(e,t.target.value),children:Qi.map(e=>n("option",{value:e,children:e},e))})]})})}))}),no=u((t,i)=>{var{selectedOptions:o,min:r,max:a,unit:l,onChange:d}=t,s=e(t,["selectedOptions","min","max","unit","onChange"]);const h=window.innerWidth<=450,[u,x]=c(void 0),[m,f]=c(0),[y,b]=c(void 0);g(i,()=>({clean(){k()}})),p(()=>{o?(f(o),x(`${o.toString()} ${l||""}`)):(f(0),x(void 0))},[o]);const k=()=>{f(0),b(void 0),x(void 0),d&&d(void 0)};return n(Gi,Object.assign({},s,{label:u,hideSearchBar:!0,onSave:()=>{y&&(x(`${y.toString()} ${l||""}`),f(y),d&&d(y))},onRemove:k,children:n(ri,{style:{width:"100%",margin:h?"20px 0px":20,marginTop:40},min:r,max:a,unit:l,defaultValue:m,onChange:e=>{const t=e.target.value?Number(e.target.value):void 0;b(t)}})}))}),io=u((e,t)=>"date"===e.type?n(to,Object.assign({ref:t},e)):"ratio"===e.type?n(no,Object.assign({ref:t},e)):n(Ji,Object.assign({ref:t},e))),oo=r.div`
|
|
1276
1284
|
display: flex;
|
|
1277
1285
|
flex: 1;
|
|
1278
1286
|
flex-direction: row;
|
|
@@ -1283,12 +1291,12 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1283
1291
|
background: ${Le.background.soft};
|
|
1284
1292
|
border-radius: 6px;
|
|
1285
1293
|
position: relative;
|
|
1286
|
-
`,
|
|
1294
|
+
`,ro=r.div`
|
|
1287
1295
|
display: flex;
|
|
1288
1296
|
flex: 1;
|
|
1289
1297
|
justify-content: space-between;
|
|
1290
1298
|
cursor: pointer;
|
|
1291
|
-
`,
|
|
1299
|
+
`,ao=r.div`
|
|
1292
1300
|
display: flex;
|
|
1293
1301
|
flex-direction: column;
|
|
1294
1302
|
align-items: flex-start;
|
|
@@ -1306,7 +1314,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1306
1314
|
overflow: hidden;
|
|
1307
1315
|
overflow-y: auto;
|
|
1308
1316
|
z-index: 2;
|
|
1309
|
-
`,
|
|
1317
|
+
`,lo=r.div`
|
|
1310
1318
|
display: flex;
|
|
1311
1319
|
flex-direction: row;
|
|
1312
1320
|
align-items: center;
|
|
@@ -1323,10 +1331,10 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1323
1331
|
&:hover {
|
|
1324
1332
|
background-color: ${Le.status.neutral.hover};
|
|
1325
1333
|
}
|
|
1326
|
-
`,
|
|
1334
|
+
`,so=r.div`
|
|
1327
1335
|
height: 16px;
|
|
1328
1336
|
width: 16px;
|
|
1329
|
-
`,
|
|
1337
|
+
`,co=r.div`
|
|
1330
1338
|
display: flex;
|
|
1331
1339
|
align-items: center;
|
|
1332
1340
|
justify-content: center;
|
|
@@ -1337,7 +1345,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1337
1345
|
background-color: ${e=>e.$selected?Le.background.primary:Le.background.primaryLow};
|
|
1338
1346
|
border: ${e=>e.$selected?"1px solid "+Le.background.primary:"1px solid "+Le.line.primarySoft};
|
|
1339
1347
|
border-radius: 4px;
|
|
1340
|
-
`,
|
|
1348
|
+
`,po=e=>{const[t,o]=c(!1),[r,a]=c(e.selectedOptions||[]),[l,d]=c(!1);p(()=>{if(Array.isArray(e.selectedOptions)&&e.selectedOptions.length>0){const t=[];e.options.forEach(n=>{e.selectedOptions&&e.selectedOptions.some(e=>e.id===n.id)&&t.push(n)}),a(t)}else a([])},[e.selectedOptions,e.options]),p(()=>{const n=n=>{const i=document.getElementById(e.id);null!==i&&!i.contains(n.target)&&t&&s(n)};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[t,e.id]);const s=e=>{e.stopPropagation(),o(!1)};return i(oo,{role:"dropdown",style:e.style,id:e.id,children:[i(ro,{onClick:()=>o(!t),children:[n(Re,{type:"p",style:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",color:r.length>0?De.text.neutralHard:De.text.neutralMedium},children:r.length>0?r.map((e,t)=>0===t?e.title:", "+e.title):e.placeholder}),n(t?M:P,{style:{stroke:Le.text.high}})]}),t&&i(ao,{"data-testid":"menu",$position:e.menuPosition,style:e.menuStyle,children:[e.onSearchChange&&n(Li,{style:{marginBottom:8},type:"small",placeholder:"Buscar",onChange:t=>{e.onSearchChange&&e.onSearchChange(t.target.value)}}),e.options.map(s=>{const c=r.some(e=>e.id===s.id);return i(lo,{style:e.optionStyle,onClick:()=>(n=>{if("single"===e.type)a([n]),o(!t),e.onChange&&e.onChange([n]);else{const t=r.findIndex(e=>n.id===e.id);let i=[...r];-1===t?i.push(n):i.splice(t,1),a(i),d(!l),e.onChange&&e.onChange(i)}})(s),children:[n(so,{children:"single"===e.type?c&&n(v,{height:16,width:16}):n(co,{$selected:c,children:c&&n(v,{height:16,width:16,color:"white"})})}),s.icon,n(Re,{type:"p",style:{color:`${Le.text.full}`},children:s.title})]},s.id)})]})]})},ho=r.div``,uo=r.textarea`
|
|
1341
1349
|
display: flex;
|
|
1342
1350
|
flex-direction: row;
|
|
1343
1351
|
align-items: flex-start;
|
|
@@ -1392,25 +1400,25 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1392
1400
|
border-radius: 9999px;
|
|
1393
1401
|
background-color: #e0e0e0;
|
|
1394
1402
|
}
|
|
1395
|
-
`,
|
|
1403
|
+
`,xo=e=>{const[t,o]=c(e.maxLength?e.maxLength:0);p(()=>{e.maxLength&&o(e.maxLength)},[e.maxLength]);return i(ho,{role:"text-area",children:[n(uo,{defaultValue:e.defaultValue,name:e.name,maxLength:e.maxLength,onKeyDown:t=>{e.maxLength&&t.currentTarget.value.length>=e.maxLength&&"Backspace"!==t.key&&"Delete"!==t.key&&t.preventDefault()},onChange:(t,n)=>{let i;if(t)i=t;else if(n){const t=ce(se(n.getCurrentContent()));i={target:{name:e.name,value:t}}}i&&(e.maxLength&&i.target.value.length>e.maxLength||(e.maxLength&&o(i.target.value.length),e.onChange&&e.onChange(i)))},"data-testid":"text_area",style:e.style,$design:e.design,placeholder:e.placeholder}),e.maxLength&&i(Re,{type:"h3",weight:"semibold",style:{color:"var(--text-clear-neutral-medium, rgba(0, 29, 61, 0.56)",fontFeatureSettings:"'liga' off, 'clig' off",fontFamily:"Poppins",fontSize:"13px",fontStyle:"normal",fontWeight:400,textAlign:"right",lineHeight:"20px",marginLeft:"16px",marginTop:"8px"},children:[t,"/",e.maxLength," caracteres"]})]})};dn('/* Basic editor styles */\n.tiptap {\n\tfont-family: "Poppins", sans-serif;\n\tfont-size: 15px;\n\tbackground-color: white;\n\tborder: 0px;\n\toutline: 0px;\n\tpadding: 16px 24px;\n\n\t:focus {\n\t\toutline: none !important;\n\t}\n\t:first-child {\n\t\tmargin-top: 0;\n\t}\n\n\t/* Heading styles */\n\th1 {\n\t\tfont-size: 1.4rem;\n\t}\n\n\th2 {\n\t\tfont-size: 1.2rem;\n\t}\n\n\th3 {\n\t\tfont-size: 1.1rem;\n\t}\n}\n\n.toolbar {\n\t.is-active {\n\t\tbackground-color: #f0f3f6;\n\t}\n}\n');const go=r.div`
|
|
1396
1404
|
position: relative;
|
|
1397
1405
|
border-radius: 12px;
|
|
1398
1406
|
overflow: hidden;
|
|
1399
|
-
`,
|
|
1407
|
+
`,mo=r.div`
|
|
1400
1408
|
overflow: scroll;
|
|
1401
1409
|
height: calc(100% - 63px);
|
|
1402
1410
|
cursor: text;
|
|
1403
|
-
`,
|
|
1411
|
+
`,fo=r.div`
|
|
1404
1412
|
padding: 16px 18px 8px;
|
|
1405
1413
|
border-bottom: 1px solid ${De.border.neutralSoft};
|
|
1406
1414
|
background-color: white;
|
|
1407
|
-
`,
|
|
1415
|
+
`,yo=r.div`
|
|
1408
1416
|
display: flex;
|
|
1409
1417
|
flex-direction: row;
|
|
1410
1418
|
gap: 8px;
|
|
1411
|
-
`,yo=r.div`
|
|
1412
|
-
position: relative;
|
|
1413
1419
|
`,bo=r.div`
|
|
1420
|
+
position: relative;
|
|
1421
|
+
`,ko=r.div`
|
|
1414
1422
|
display: flex;
|
|
1415
1423
|
align-items: center;
|
|
1416
1424
|
justify-content: center;
|
|
@@ -1419,7 +1427,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1419
1427
|
right: 16px;
|
|
1420
1428
|
z-index: 10;
|
|
1421
1429
|
height: 100%;
|
|
1422
|
-
`,
|
|
1430
|
+
`,vo=r.button`
|
|
1423
1431
|
cursor: pointer;
|
|
1424
1432
|
background: none;
|
|
1425
1433
|
border: none;
|
|
@@ -1429,13 +1437,13 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1429
1437
|
&:hover {
|
|
1430
1438
|
background-color: ${De.surface.neutralSoft};
|
|
1431
1439
|
}
|
|
1432
|
-
`;function
|
|
1440
|
+
`;function wo({editor:e}){const t=xe({editor:e,selector:e=>{var t,n,i,o,r,a,l,d,s,c,p,h,u;return{isBold:null!==(t=e.editor.isActive("bold"))&&void 0!==t&&t,canBold:null!==(n=e.editor.can().chain().toggleBold().run())&&void 0!==n&&n,isItalic:null!==(i=e.editor.isActive("italic"))&&void 0!==i&&i,canItalic:null!==(o=e.editor.can().chain().toggleItalic().run())&&void 0!==o&&o,isUnderline:null!==(r=e.editor.isActive("underline"))&&void 0!==r&&r,canUnderline:null!==(a=e.editor.can().chain().toggleUnderline().run())&&void 0!==a&&a,canClearMarks:null!==(l=e.editor.can().chain().unsetAllMarks().run())&&void 0!==l&&l,isParagraph:null!==(d=e.editor.isActive("paragraph"))&&void 0!==d&&d,isHeading1:null!==(s=e.editor.isActive("heading",{level:1}))&&void 0!==s&&s,isHeading2:null!==(c=e.editor.isActive("heading",{level:2}))&&void 0!==c&&c,isAlignLeft:null!==(p=e.editor.isActive({textAlign:"left"}))&&void 0!==p&&p,isAlignCenter:null!==(h=e.editor.isActive({textAlign:"center"}))&&void 0!==h&&h,isAlignRight:null!==(u=e.editor.isActive({textAlign:"right"}))&&void 0!==u&&u}}});return n(fo,{children:i(yo,{className:"toolbar",children:[n(vi,{id:"select-text-type",selectedItem:{icon:t.isHeading1?n(B,{}):t.isHeading2?n(E,{}):n(O,{}),label:t.isHeading1?"Título":t.isHeading2?"Subtítlo":"Párrafo"},options:[{icon:n(B,{}),label:"Título"},{icon:n(E,{}),label:"Subtítlo"},{icon:n(O,{}),label:"Párrafo"}],onChange:t=>{"Título"===t.label?e.chain().focus().toggleHeading({level:1}).run():"Subtítlo"===t.label?e.chain().focus().toggleHeading({level:2}).run():e.chain().focus().setParagraph().run()}}),n(vo,{onClick:()=>e.chain().focus().toggleBold().run(),disabled:!t.canBold,className:t.isBold?"is-active":"",children:n(A,{height:20,width:20,color:De.text.neutralHard})}),n(vo,{onClick:()=>e.chain().focus().toggleItalic().run(),disabled:!t.canItalic,className:t.isItalic?"is-active":"",children:n(H,{height:20,width:20,color:De.text.neutralHard})}),n(vo,{onClick:()=>e.chain().focus().toggleUnderline().run(),disabled:!t.canUnderline,className:t.isUnderline?"is-active":"",children:n(V,{height:20,width:20,color:De.text.neutralHard})}),n(vo,{onClick:()=>e.chain().setTextAlign("left").run(),className:t.isAlignLeft?"is-active":"",children:n(T,{height:20,width:20,color:De.text.neutralHard})}),n(vo,{onClick:()=>e.chain().setTextAlign("center").run(),className:t.isAlignCenter?"is-active":"",children:n(I,{height:20,width:20,color:De.text.neutralHard})}),n(vo,{onClick:()=>e.chain().setTextAlign("right").run(),className:t.isAlignRight?"is-active":"",children:n(N,{height:20,width:20,color:De.text.neutralHard})})]})})}const Co=e=>{const t=he({extensions:[pe,me,ge.configure({types:["heading","paragraph"]}),fe.configure({placeholder:e.placeholder})],content:e.value||"",onUpdate:({editor:t})=>{e.onChange&&e.onChange(t.getHTML())}});return i(go,{role:"text-area",style:e.style,children:[i(bo,{children:[e.ToolbarButton&&n(ko,{children:e.ToolbarButton}),n(wo,{editor:t})]}),n(mo,{onClick:()=>t.commands.focus(),children:n(ue,{editor:t})})]})},$o=e=>"default"===e.type?n(xo,Object.assign({},e)):"edit"===e.type?n(Co,Object.assign({},e)):null,Lo=r.div`
|
|
1433
1441
|
margin: 24px 0;
|
|
1434
1442
|
display: flex;
|
|
1435
1443
|
cursor: pointer;
|
|
1436
1444
|
user-select: none;
|
|
1437
1445
|
align-items: center;
|
|
1438
|
-
`,
|
|
1446
|
+
`,_o=r.div`
|
|
1439
1447
|
width: 18px;
|
|
1440
1448
|
height: 18px;
|
|
1441
1449
|
min-width: 18px;
|
|
@@ -1446,24 +1454,24 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1446
1454
|
align-items: center;
|
|
1447
1455
|
margin-right: 12px;
|
|
1448
1456
|
transition: all 0.1s linear;
|
|
1449
|
-
`,
|
|
1457
|
+
`,Fo=r.div`
|
|
1450
1458
|
width: 10px;
|
|
1451
1459
|
height: 10px;
|
|
1452
1460
|
border-radius: 50%;
|
|
1453
1461
|
transition: all 0.1s linear;
|
|
1454
|
-
`,
|
|
1462
|
+
`,So=e=>{const[t,o]=c(e.selected);p(()=>{o(e.selected)},[e.selected]);return i(Lo,{role:e.id,style:e.style,onClick:n=>{o(!t),e.onClick&&e.onClick(n)},children:[n(_o,{style:{border:e.disabled?`2px solid ${Le.line.soft}`:` 2px solid ${Le.background.primary}`},children:n(Fo,{style:{background:t?`${Le.background.primary}`:"white"}})}),n(Re,{type:"p",style:{color:`${Le.text.high}`},children:e.children})]})},Do=r.div``,zo=e=>{const[t,i]=c(e.options.filter(e=>e.selected)),[o,r]=c(!1);return n(Do,{style:e.style,role:"radiobuttonlist",children:e.options.map((a,l)=>{const d=t.some(e=>e.id===a.id);return n(So,{id:a.id,style:e.cellStyle,children:a.children,selected:d,onClick:()=>(n=>{const a=t.findIndex(e=>n.id===e.id);let l=t;"single"===e.type?l=[n]:-1===a?l.push(n):l.splice(a,1),i(l),r(!o),e.onChange&&e.onChange(l)})(a)},a.id+"-"+l)})})},Mo=r.div`
|
|
1455
1463
|
display: flex;
|
|
1456
1464
|
flex: 1;
|
|
1457
1465
|
flex-wrap: wrap;
|
|
1458
1466
|
justify-content: space-around;
|
|
1459
|
-
`,
|
|
1467
|
+
`,Po=r.div`
|
|
1460
1468
|
display: flex;
|
|
1461
1469
|
flex-direction: column;
|
|
1462
1470
|
width: 100px;
|
|
1463
1471
|
padding: 0px;
|
|
1464
1472
|
align-items: center;
|
|
1465
1473
|
cursor: ${e=>e.$disabled?"default":"pointer"};
|
|
1466
|
-
`,
|
|
1474
|
+
`,jo=r.div`
|
|
1467
1475
|
display: flex;
|
|
1468
1476
|
flex-direction: column;
|
|
1469
1477
|
align-items: center;
|
|
@@ -1487,30 +1495,30 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1487
1495
|
transform: ${e=>e.$disabled?"none":"scale(0.95)"};
|
|
1488
1496
|
transition: background-color 1.2s ease-out;
|
|
1489
1497
|
}
|
|
1490
|
-
`,
|
|
1498
|
+
`,Bo=r.div`
|
|
1491
1499
|
display: flex;
|
|
1492
1500
|
flex: 1;
|
|
1493
1501
|
flex-direction: column;
|
|
1494
1502
|
margin-top: 4px;
|
|
1495
|
-
`,
|
|
1503
|
+
`,Eo=e=>{const[t,o]=c(e.selectedOptions?e.selectedOptions:[]);p(()=>{o(e.selectedOptions?e.selectedOptions:[])},[e.selectedOptions]);return n(Mo,{style:e.style,role:"container",children:e.options.map((r,a)=>{const l=!!t&&t.some(e=>r.id===e.id);return i(Po,{role:"cell"+a,onClick:()=>{r.disabled||(n=>{if("multiple"===e.type){const i=t.findIndex(e=>e.id===n.id),r=[...t];-1===i?r.push(n):r.splice(i,1),o(r),e.onClick&&e.onClick(n),e.onChange&&e.onChange(r)}else o([n]),e.onClick&&e.onClick(n),e.onChange&&e.onChange([n])})(r)},$disabled:r.disabled,children:[i(jo,{$selected:l,style:e.cellStyle,$disabled:r.disabled,$design:e.design||"design1",children:[r.icon,n(Re,{type:"p2",weight:"medium",style:{color:"var(--text-clear-neutral-hard, rgba(0, 29, 61, 0.92)",fontFeatureSettings:"'liga' off, 'clig' off",fontFamily:"Poppins",fontSize:"14px",fontStyle:"normal",fontWeight:500,lineHeight:"22px",textAlign:"center"},children:r.title})]}),n(Bo,{children:r.subtitle&&n(Re,{type:"p",style:{fontSize:14,marginTop:2,textAlign:"center"},children:r.subtitle})})]},"cell"+a)})})},Oo=r.div`
|
|
1496
1504
|
display: flex;
|
|
1497
1505
|
flex-direction: row;
|
|
1498
1506
|
height: 36px;
|
|
1499
1507
|
width: fit-content;
|
|
1500
1508
|
gap: 16px;
|
|
1501
|
-
`,
|
|
1509
|
+
`,Ao=r.div`
|
|
1502
1510
|
display: flex;
|
|
1503
1511
|
flex: 1;
|
|
1504
1512
|
align-items: center;
|
|
1505
1513
|
justify-content: center;
|
|
1506
1514
|
cursor: pointer;
|
|
1507
1515
|
border-bottom: ${e=>e.$selected?"2px solid "+(e.color?e.color:Le.line.primary):"0px"};
|
|
1508
|
-
`,
|
|
1516
|
+
`,Ho=r.div`
|
|
1509
1517
|
display: flex;
|
|
1510
1518
|
flex-direction: row;
|
|
1511
1519
|
width: fit-content;
|
|
1512
1520
|
gap: 4px;
|
|
1513
|
-
`,
|
|
1521
|
+
`,Vo=r.div`
|
|
1514
1522
|
position: relative;
|
|
1515
1523
|
display: flex;
|
|
1516
1524
|
flex-direction: row;
|
|
@@ -1522,7 +1530,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1522
1530
|
border-radius: 999px;
|
|
1523
1531
|
box-shadow: inset 0 0 0 1px ${Le.line.soft};
|
|
1524
1532
|
background-color: ${Le.background.neutral};
|
|
1525
|
-
`,
|
|
1533
|
+
`,To=r.div`
|
|
1526
1534
|
position: absolute;
|
|
1527
1535
|
top: 3px;
|
|
1528
1536
|
bottom: 3px;
|
|
@@ -1533,7 +1541,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1533
1541
|
transform 0.28s ease,
|
|
1534
1542
|
width 0.28s ease;
|
|
1535
1543
|
pointer-events: none;
|
|
1536
|
-
`,
|
|
1544
|
+
`,Io=r.div`
|
|
1537
1545
|
display: flex;
|
|
1538
1546
|
flex: 1;
|
|
1539
1547
|
align-items: center;
|
|
@@ -1551,7 +1559,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1551
1559
|
background-color: ${e.color?e.color:Le.status.neutral.hover};
|
|
1552
1560
|
}
|
|
1553
1561
|
`}
|
|
1554
|
-
`,
|
|
1562
|
+
`,No=r.div`
|
|
1555
1563
|
display: flex;
|
|
1556
1564
|
flex: 1;
|
|
1557
1565
|
align-items: center;
|
|
@@ -1565,7 +1573,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1565
1573
|
border-radius: 32px;
|
|
1566
1574
|
white-space: nowrap;
|
|
1567
1575
|
text-align: center;
|
|
1568
|
-
`,
|
|
1576
|
+
`,Zo=r(Re)`
|
|
1569
1577
|
display: flex;
|
|
1570
1578
|
align-items: center;
|
|
1571
1579
|
justify-content: center;
|
|
@@ -1573,18 +1581,18 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1573
1581
|
line-height: 1;
|
|
1574
1582
|
color: ${e=>e.$selected?e.textColor?e.textColor:Le.text.deepBlue:Le.text.high};
|
|
1575
1583
|
transition: color 0.2s ease;
|
|
1576
|
-
`,
|
|
1584
|
+
`,Ro=r(Re)`
|
|
1577
1585
|
font-size: 14px;
|
|
1578
1586
|
color: ${e=>e.$selected?e.textColor?e.textColor:Le.text.primary:Le.text.high};
|
|
1579
1587
|
width: max-content;
|
|
1580
1588
|
transition: color 0.15s ease-in;
|
|
1581
|
-
`,
|
|
1589
|
+
`,Go=e=>{var t;const[o,r]=c(e.selectedOption?e.selectedOption:e.options[0]),a=x({}),[l,d]=c({width:0,left:0}),[s,h]=c(void 0);p(()=>{e.selectedOption&&r(e.selectedOption)},[e.selectedOption]),p(()=>{if("third"!==e.design||!o)return;const t=()=>{const t=e.options.map(e=>a.current[e.id]).filter(e=>Boolean(e)),n=e.options.findIndex(e=>e.id===o.id);if(0===t.length||-1===n)return;const i=Math.max(...t.map(e=>e.getBoundingClientRect().width));h(i),d({width:i,left:n*i})};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e.design,e.options,o]);const u=t=>{r(t),e.onChange&&e.onChange(t)};return"secondary"===e.design?n(Ho,{role:"container",style:Object.assign({backgroundColor:e.backgroundColor},e.style),children:e.options.map(t=>{const i=o.id===t.id;return n(Io,{role:t.id,$selected:i,onClick:()=>u(t),style:e.cellStyle,color:e.cellColor,children:n(Re,{type:"p",weight:"medium",style:Object.assign({fontSize:14,color:i?e.textColor?e.textColor:Le.text.primary:Le.text.high,width:"max-content"},e.textStyle),children:t.title})},t.id)})}):"third"===e.design?i(Vo,{role:"container",style:Object.assign({backgroundColor:e.backgroundColor},e.style),children:[n(To,{style:{width:l.width,transform:`translateX(${l.left}px)`,backgroundColor:null!==(t=e.cellColor)&&void 0!==t?t:Le.background.soft}}),e.options.map(t=>{const i=o.id===t.id;return n(No,{role:t.id,ref:e=>{a.current[t.id]=e},onClick:()=>u(t),style:Object.assign({width:s,minWidth:s,boxSizing:"border-box"},e.cellStyle),children:n(Zo,{type:"p",weight:"medium",$selected:i,textColor:e.textColor,style:Object.assign({fontSize:14,width:"100%"},e.textStyle),children:t.title})},t.id)})]}):n(Oo,{role:"container",style:Object.assign({backgroundColor:e.backgroundColor},e.style),children:e.options.map(t=>{const i=o.id===t.id;return n(Ao,{role:t.id,$selected:i,onClick:()=>u(t),style:e.cellStyle,color:e.cellColor,children:n(Ro,{type:"p",weight:"medium",textColor:e.textColor,$selected:i,style:e.textStyle,children:t.title})},t.id)})})},Wo=r.div`
|
|
1582
1590
|
box-shadow: 0 0 0
|
|
1583
1591
|
${e=>e.$focus?"secondary"===e.$design?"2px "+De.border.neutralMedium:"1px "+De.border.neutralHard:"secondary"===e.$design?"1px "+De.border.neutralSoft:"none"};
|
|
1584
1592
|
background-color: ${e=>e.$focus||"secondary"===e.$design?"white":e.$error?De.surface.redSoft:De.surface.neutralSoft};
|
|
1585
1593
|
border-radius: ${e=>"secondary"===e.$design?"12px":"6px"};
|
|
1586
1594
|
padding: ${e=>"secondary"===e.$design?"19px 16px":"10px 16px"};
|
|
1587
|
-
`,
|
|
1595
|
+
`,Yo=r.div`
|
|
1588
1596
|
margin: 0px 8px;
|
|
1589
1597
|
font-style: normal;
|
|
1590
1598
|
font-weight: 500;
|
|
@@ -1592,7 +1600,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1592
1600
|
line-height: 12px;
|
|
1593
1601
|
display: flex;
|
|
1594
1602
|
color: ${De.text.red};
|
|
1595
|
-
`,
|
|
1603
|
+
`,Uo=u((e,o)=>{var r;const[a,l]=c(void 0),[d,s]=c(void 0),[h,u]=c(void 0),[x,m]=c(void 0),[f,y]=c(void 0),[b,k]=c(!1),[v,w]=c(void 0),C=ye(),$=be();p(()=>{e.userData&&e.userData.email?s(e.userData.email):s(void 0)},[e.userData]),g(o,()=>({getPaymentMethod(){return t(this,void 0,void 0,function*(){return yield _()})}}));const L=e=>t(void 0,void 0,void 0,function*(){y(void 0),e.complete?w(e):w(void 0)}),_=()=>t(void 0,void 0,void 0,function*(){if(!($&&C&&v&&a))return a||u("Debes añadir el nombre del titular"),v||y("Debes añadir un método de pago válido"),void(d||m("Debes añadir un email válido"));if("iban"===v.elementType){e.onLoading&&e.onLoading(!0);const t=$.getElement(ke);if(t&&d){const{error:n,paymentMethod:i}=yield C.createPaymentMethod({type:"sepa_debit",sepa_debit:t,billing_details:{name:a,email:d}});return n?void(e.onLoading&&e.onLoading(!1)):(e.onLoading&&e.onLoading(!1),i)}return void(d||m("Debes añadir un email válido"))}{e.onLoading&&e.onLoading(!0);const t=$.getElement(ve);if(t){const{error:n,paymentMethod:i}=yield C.createPaymentMethod({type:"card",card:t,billing_details:{name:a}});return n?void(e.onLoading&&e.onLoading(!1)):(e.onLoading&&e.onLoading(!1),i)}}}),F=()=>{k(!0)},S=()=>{k(!1)};return i("div",{style:e.style,children:[n(Tt,{type:"text",title:e.placeholderName?e.placeholderName:"Nombre del titular",placeholder:e.placeholderName?e.placeholderName:"Nombre del titular",containerStyle:{marginBottom:8},design:e.design,onChange:e=>{return e&&(t=e.target.value,u(void 0),void l(t));var t},error:h}),"sepa_debit"===e.option&&!(null===(r=e.userData)||void 0===r?void 0:r.email)&&n(Tt,{title:e.placeholderEmail?e.placeholderEmail:"Email",placeholder:e.placeholderEmail?e.placeholderEmail:"Email",containerStyle:{marginBottom:8},type:"email",design:e.design,onChange:e=>{return e&&(t=e.target.value,m(void 0),void s(t));var t},error:x}),n(Wo,{$error:!!f,$focus:b,$design:e.design,children:"card"===e.option?n(ve,{options:{style:{base:{fontFamily:"Poppins",fontSize:"secondary"===e.design?"15px":"14px","::placeholder":{color:De.text.neutralMedium}}},hidePostalCode:!0},onChange:L,onFocus:F,onBlur:S}):n(ke,{options:{supportedCountries:["SEPA"],style:{base:{fontFamily:"Poppins",fontSize:"secondary"===e.design?"15px":"14px","::placeholder":{color:De.text.neutralMedium}}}},onChange:L,onFocus:F,onBlur:S})}),f&&n(Yo,{children:n(Re,{type:"p",weight:"medium",style:{color:De.text.red,marginTop:4,fontSize:14},children:f})})]})}),qo=r.div``,Xo=u((e,o)=>{const r=x(null),a=x(null),[l,d]=c(()=>Ce(e.stripeKey)),[s,h]=c(!1);g(o,()=>({getPaymentMethod(){return t(this,void 0,void 0,function*(){var e;return yield null===(e=a.current)||void 0===e?void 0:e.getPaymentMethod()})}})),p(()=>{e.stripeConfirmUrl?h(!0):u()},[e.stripeConfirmUrl]),window.addEventListener("message",function(e){"3DS-authentication-complete"===e.data&&s&&u()},!1);const u=()=>{r.current&&r.current.close()};return i(qo,{style:e.style,role:"container",children:[n($n,{ref:r,type:"web",isVisible:s,hideClose:!0,url:e.stripeConfirmUrl,style:{width:600,height:400,padding:0},onClose:()=>{h(!1),e.onSetupConfirmed&&e.onSetupConfirmed()}}),n(we,{stripe:l,options:{fonts:[{cssSrc:"https://fonts.googleapis.com/css2?family=Poppins&display=swap"}]},children:n(Uo,{ref:a,option:e.paymentOption,style:e.cardStyle,onLoading:t=>{e.onLoading&&e.onLoading(t)},error:e.error,userData:e.userData,design:e.design,placeholderEmail:e.placeholderEmail,placeholderName:e.placeholderName})})]})}),Ko=r.div`
|
|
1596
1604
|
display: flex;
|
|
1597
1605
|
flex-direction: row;
|
|
1598
1606
|
border: 1px solid ${De.border.neutralSoft};
|
|
@@ -1601,7 +1609,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1601
1609
|
overflow: hidden;
|
|
1602
1610
|
padding: 2px;
|
|
1603
1611
|
background-color: ${De.surface.invert};
|
|
1604
|
-
`,
|
|
1612
|
+
`,Jo=r.div`
|
|
1605
1613
|
display: flex;
|
|
1606
1614
|
padding: 8px;
|
|
1607
1615
|
cursor: pointer;
|
|
@@ -1609,10 +1617,10 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1609
1617
|
border-radius: 100px;
|
|
1610
1618
|
align-items: center;
|
|
1611
1619
|
justify-content: center;
|
|
1612
|
-
`,
|
|
1620
|
+
`,Qo=e=>{const[t,i]=c(e.options[0]);return n(Ko,{role:"container",style:e.style,children:e.options.map(o=>{const r=o.id===t.id;return n(Jo,{role:o.id,$selected:r,onClick:()=>{i(o),e.onChange&&e.onChange(o)},children:s.cloneElement(o.icon,Object.assign({color:r?De.border.primary:De.border.neutralMedium,height:20,width:20},o.icon.props))},"switch"+o.id)})})},er=r.div`
|
|
1613
1621
|
display: flex;
|
|
1614
1622
|
align-items: center;
|
|
1615
|
-
`,
|
|
1623
|
+
`,tr=r.div`
|
|
1616
1624
|
display: flex;
|
|
1617
1625
|
flex-direction: column;
|
|
1618
1626
|
justify-content: center;
|
|
@@ -1623,13 +1631,13 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1623
1631
|
&:hover {
|
|
1624
1632
|
background-color: ${Le.background.soft};
|
|
1625
1633
|
}
|
|
1626
|
-
`,
|
|
1634
|
+
`,nr=e=>{const[t,o]=c(0),[r,a]=c(0);p(()=>{a(Math.ceil(e.length/e.rowsPerPage))},[e.length,e.rowsPerPage]),p(()=>{e.start&&e.start<r&&o(e.start)},[e.start]);return i(er,{role:"pagination",style:e.style,children:[n(tr,{role:"first-arrow",onClick:()=>{t>0&&(o(0),e.onChange&&e.onChange(0))},style:{cursor:0===t?"auto":"pointer"},children:n(Z,{style:{stroke:0===t?Le.text.low:Le.text.full}})}),n(tr,{role:"left-arrow",onClick:()=>{if(t>0){const n=t-1;o(n),e.onChange&&e.onChange(n)}},style:{cursor:0===t?"auto":"pointer"},children:n(R,{style:{stroke:0===t?Le.text.low:Le.text.full}})}),i(Re,{type:"p",style:{color:Le.text.full,margin:"0px 12px"},children:[n("span",{style:{fontWeight:700},children:t+1})," de"," ",n("span",{style:{fontWeight:700},children:r})]}),n(tr,{role:"right-arrow",onClick:()=>{if(t<r-1){const n=t+1;o(n),e.onChange&&e.onChange(n)}},style:{cursor:t===r-1?"auto":"pointer"},children:n(G,{style:{stroke:t===r-1?Le.text.low:Le.text.full}})}),n(tr,{role:"last-arrow",onClick:()=>{t<r-1&&(o(r-1),e.onChange&&e.onChange(r-1))},style:{cursor:t===r-1?"auto":"pointer"},children:n(W,{style:{stroke:t===r-1?Le.text.low:Le.text.full}})})]})},ir=r.div`
|
|
1627
1635
|
display: flex;
|
|
1628
1636
|
flex-direction: row;
|
|
1629
1637
|
padding: 10px 16px;
|
|
1630
1638
|
border-radius: 6px;
|
|
1631
1639
|
width: fit-content;
|
|
1632
|
-
`,
|
|
1640
|
+
`,or=t=>{var o;X.locale("es");const{toDate:r,textColor:a,color:l}=t,d=e(t,["toDate","textColor","color"]),[s,h]=c(0),[u,x]=c(""),[g,m]=c(!1);p(()=>{r&&f()},[r]);const f=()=>{const e=X(r),t=X(),n=X.duration(e.diff(t)),i=n.asDays(),o=n.asHours();m(i<1&&o<2),n.locale("es"),h(n.asDays()),x(n.humanize())};return i(ir,Object.assign({role:"container"},d,{style:Object.assign({backgroundColor:g?Le.status.color.error:l||(null===(o=d.style)||void 0===o?void 0:o.backgroundColor)},d.style),children:[n(Y,{height:20,width:20,color:g?"white":a||Le.text.full,style:{marginRight:8}}),i(Re,{type:"p2",weight:"medium",style:{color:g?"white":a||Le.text.full},children:[u," ",s<0?"de retraso":"restantes"]})]}))},rr=r.div`
|
|
1633
1641
|
display: flex;
|
|
1634
1642
|
flex-direction: column;
|
|
1635
1643
|
align-items: center;
|
|
@@ -1652,7 +1660,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1652
1660
|
width: auto;
|
|
1653
1661
|
max-width: none;
|
|
1654
1662
|
`}
|
|
1655
|
-
`,
|
|
1663
|
+
`,ar=r(Re)`
|
|
1656
1664
|
color: var(--text-clear-neutral-hard, rgba(0, 29, 61, 0.92));
|
|
1657
1665
|
font-feature-settings:
|
|
1658
1666
|
"liga" off,
|
|
@@ -1661,7 +1669,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1661
1669
|
font-weight: 500;
|
|
1662
1670
|
font-size: 14px !important;
|
|
1663
1671
|
text-align: center;
|
|
1664
|
-
`,
|
|
1672
|
+
`,lr=e=>n(rr,{role:e.role,style:e.style,$selected:e.selected,$onlyVisual:e.onlyVisual||!1,$design:e.design||"design1",onClick:()=>{e.onlyVisual||e.onClick&&e.onClick()},children:n(ar,{type:"p",children:e.title})}),dr=r.div`
|
|
1665
1673
|
display: flex;
|
|
1666
1674
|
flex-direction: column;
|
|
1667
1675
|
align-items: center;
|
|
@@ -1685,14 +1693,14 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1685
1693
|
width: auto;
|
|
1686
1694
|
max-width: none;
|
|
1687
1695
|
`}
|
|
1688
|
-
`,
|
|
1696
|
+
`,sr=r(Re)`
|
|
1689
1697
|
color: var(--text-clear-neutral-hard, rgba(0, 29, 61, 0.92));
|
|
1690
1698
|
font-feature-settings: "liga" off, "clig" off;
|
|
1691
1699
|
font-style: normal;
|
|
1692
1700
|
font-weight: 500;
|
|
1693
1701
|
font-size: 14px !important;
|
|
1694
1702
|
text-align: center;
|
|
1695
|
-
`,
|
|
1703
|
+
`,cr=r(Re)`
|
|
1696
1704
|
color: var(--text-clear-neutral-medium, rgba(0, 29, 61, 0.56));
|
|
1697
1705
|
text-align: center;
|
|
1698
1706
|
font-family: Poppins;
|
|
@@ -1700,11 +1708,11 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1700
1708
|
font-style: normal;
|
|
1701
1709
|
font-weight: 400;
|
|
1702
1710
|
line-height: 20px;
|
|
1703
|
-
`,
|
|
1711
|
+
`,pr=e=>i(dr,{role:e.role,style:e.style,$selected:e.selected,$onlyVisual:e.onlyVisual||!1,$design:e.design||"design1",onClick:()=>{e.onlyVisual||e.onClick&&e.onClick()},children:[n(sr,{type:"p",children:e.title}),n(cr,{type:"p",children:e.subtitle})]}),hr=r.div`
|
|
1704
1712
|
display: flex;
|
|
1705
1713
|
flex-direction: row;
|
|
1706
1714
|
flex-wrap: wrap;
|
|
1707
|
-
`,
|
|
1715
|
+
`,ur=e=>{const[t,i]=c(e.optionsSelected?e.optionsSelected:[]);p(()=>{e.optionsSelected&&i(e.optionsSelected)},[e.optionsSelected]);const o=n=>{if("single"===e.type){t.findIndex(e=>e.id===n.id)>-1?(i([]),e.onChange&&e.onChange([])):(i([n]),e.onChange&&e.onChange([n]))}else if("multiple"===e.type){const o=[...t],r=o.findIndex(e=>e.id===n.id);r>-1?o.splice(r,1):o.push(n),i(o),e.onChange&&e.onChange(o)}};return n(hr,{role:"container",style:e.style,children:e.options.map((i,r)=>{const a=t.some(e=>e.id===i.id);return i.subtitle?n(pr,{role:i.id,title:i.title,subtitle:i.subtitle,selected:a,onlyVisual:e.onlyVisual,design:e.design,onClick:()=>o(i)},i.id):n(lr,{role:i.id,title:i.title,selected:a,onlyVisual:e.onlyVisual,design:e.design,onClick:()=>o(i)},i.id)})})},xr=r.div``,gr=r.div`
|
|
1708
1716
|
display: flex;
|
|
1709
1717
|
flex-direction: row;
|
|
1710
1718
|
margin-bottom: 24px;
|
|
@@ -1712,10 +1720,10 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1712
1720
|
&:hover {
|
|
1713
1721
|
text-decoration: ${e=>e.$selected?"none":"underline"};
|
|
1714
1722
|
}
|
|
1715
|
-
`,
|
|
1723
|
+
`,mr=r.div`
|
|
1716
1724
|
display: flex;
|
|
1717
1725
|
flex-direction: column;
|
|
1718
|
-
`,
|
|
1726
|
+
`,fr=e=>{const[t,o]=c(0);return n(xr,{role:"container",style:e.style,children:e.options.map((r,a)=>{const l=t===a;return i(gr,{role:r.id,$selected:l,onClick:()=>(n=>{o(n===t?void 0:n),e.onClick&&e.onClick(n)})(a),children:[n(mr,{children:n(l?M:P,{width:20,height:20,color:Le.text.high,style:{marginTop:3}})}),i(mr,{style:{marginLeft:12},children:[n(Re,{type:"p",weight:"medium",children:r.title}),n(Re,{type:"p2",style:{display:l?"flex":"none",marginTop:8,color:De.text.neutralMedium},children:r.description})]})]},r.id+a)})})};var yr="styles-module_fcc__container__zadQu",br="styles-module_fcc__digit_block_container__PpRXT",kr="styles-module_fcc__digit_block__BTDZJ",vr="styles-module_fcc__current_below__HQtVT",wr="styles-module_fcc__next_above__V8I1M",Cr="styles-module_fcc__card__TY7mL",$r="styles-module_fcc__flipped__yL0nE",Lr="styles-module_fcc__card_face__qnzxT",_r="styles-module_fcc__card_face_front__RD6TB",Fr="styles-module_fcc__card_face_back__VzEYT";function Sr(e){const{current:t,next:o,className:r}=e,[a,l]=s.useState({current:t,next:o}),[d,c]=s.useState(!1);s.useEffect(()=>{a.current!==t?(a.current===a.next&&l(Object.assign(Object.assign({},a),{next:o})),c(!0)):c(!1)},[t,o]);return i("div",{className:$e(kr,r),children:[n("div",{className:wr,children:a.next}),n("div",{className:vr,children:a.current}),i("div",{className:$e(Cr,{[$r]:d}),onTransitionEnd:()=>{l({current:t,next:o}),c(!1)},children:[n("div",{className:$e(Lr,_r),children:a.current}),n("div",{className:$e(Lr,Fr),children:a.next})]})]})}function Dr(e){const[t,i]=c(e.amount>0?e.amount-10:0),o=x(t);o.current=t;const r=x(0);function a(){window.clearInterval(r.current)}function l(){i(o.current+1),o.current+1>=e.amount&&a()}p(()=>(a(),i(e.amount>0?e.amount-(e.amount>=10?10:e.amount):0),r.current=window.setInterval(l,400),()=>a()),[e.amount]);const d=y(()=>[function(t){const n=e.amount.toString().length,i=t.toString().split(""),o=(t+1).toString().split("");for(var r=0;r<n&&n-i.length-r!==0;r++);return{current:i,next:o}}(t)],[t]),s=y(()=>({"--fcc-digit-color":e.color,"--fcc-background":e.backgroundColor,"--fcc-digit-block-width":e.width&&e.width+"px","--fcc-digit-block-height":e.height&&e.height+"px","--fcc-digit-font-size":e.fontSize&&e.fontSize+"px","--fcc-divider-color":e.borderColor}),[e]);return n("div",{className:yr,"data-testid":"fcc-container",style:s,children:d.map((e,t)=>n(b,{children:n("div",{className:br,children:e.current.map((t,i)=>n(Sr,{current:e.current[i],next:e.next[i]},i))})},`digit-block-${t}`))})}dn('.styles-module_fcc__container__zadQu {\n\t--fcc-flip-duration: 0.3s;\n\t--fcc-digit-block-width: 24px;\n\t--fcc-digit-block-height: 36px;\n\t--fcc-digit-font-size: 28px;\n\t--fcc-background: white;\n\t--fcc-digit-color: #008ff5;\n\t--fcc-divider-color: #f9f6f3;\n\t--fcc-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.08);\n}\n\n.styles-module_fcc__container__zadQu {\n\tfont-family: "Poppins";\n\tfont-size: var(--fcc-digit-font-size);\n\tcolor: var(--fcc-digit-color);\n\tline-height: 0;\n\tfont-weight: 500;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\tuser-select: none;\n\tcursor: default;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.styles-module_fcc__digit_block_container__PpRXT .styles-module_fcc__digit_block__BTDZJ:not(:last-child) {\n\tmargin-right: 2px;\n}\n\n.styles-module_fcc__digit_block_container__PpRXT {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.styles-module_fcc__digit_block__BTDZJ {\n\tperspective: 200px;\n\tposition: relative;\n\twidth: var(--fcc-digit-block-width);\n\theight: var(--fcc-digit-block-height);\n\tbox-shadow: var(--fcc-shadow);\n\tborder-radius: 6px;\n border: 1px solid var(--fcc-divider-color);\n}\n\n.styles-module_fcc__current_below__HQtVT,\n.styles-module_fcc__next_above__V8I1M {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 50%;\n\toverflow: hidden;\n\tdisplay: flex;\n\tjustify-content: center;\n\tbackground: var(--fcc-background);\n}\n\n.styles-module_fcc__next_above__V8I1M {\n\talign-items: flex-end;\n\ttop: 0;\n\tborder-top-left-radius: 6px;\n\tborder-top-right-radius: 6px;\n\tborder-bottom: 1px solid var(--fcc-divider-color);\n}\n\n.styles-module_fcc__current_below__HQtVT {\n\talign-items: flex-start;\n\tbottom: 0;\n\tborder-bottom-left-radius: 6px;\n\tborder-bottom-right-radius: 6px;\n}\n\n.styles-module_fcc__card__TY7mL {\n\tposition: relative;\n\tz-index: 2;\n\twidth: 100%;\n\theight: 50%;\n\ttransform-style: preserve-3d;\n\ttransform-origin: bottom;\n\ttransform: rotateX(0);\n}\n\n.styles-module_fcc__card__TY7mL.styles-module_fcc__flipped__yL0nE {\n\ttransition: transform var(--fcc-flip-duration) ease-in-out;\n\ttransform: rotateX(-180deg);\n}\n\n.styles-module_fcc__card_face__qnzxT {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: flex;\n\tjustify-content: center;\n\toverflow: hidden;\n\tbackface-visibility: hidden;\n\tbackground: var(--fcc-background);\n}\n\n.styles-module_fcc__card_face_front__RD6TB {\n\talign-items: flex-end;\n\tborder-top-left-radius: 6px;\n\tborder-top-right-radius: 6px;\n\tborder-bottom: 1px solid var(--fcc-divider-color);\n}\n\n.styles-module_fcc__card_face_back__VzEYT {\n\talign-items: flex-start;\n\ttransform: rotateX(-180deg);\n\tborder-bottom-left-radius: 6px;\n\tborder-bottom-right-radius: 6px;\n\tbox-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.2);\n}\n');const zr=r.div`
|
|
1719
1727
|
position: relative;
|
|
1720
1728
|
width: fit-content;
|
|
1721
1729
|
width: 108px;
|
|
@@ -1724,7 +1732,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1724
1732
|
height: 120px;
|
|
1725
1733
|
width: 96px;
|
|
1726
1734
|
`}
|
|
1727
|
-
`,
|
|
1735
|
+
`,Mr=r.div`
|
|
1728
1736
|
display: flex;
|
|
1729
1737
|
align-items: center;
|
|
1730
1738
|
justify-content: center;
|
|
@@ -1737,20 +1745,20 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1737
1745
|
height: 84px;
|
|
1738
1746
|
width: 84px;
|
|
1739
1747
|
`}
|
|
1740
|
-
`,
|
|
1748
|
+
`,Pr=r.div`
|
|
1741
1749
|
position: absolute;
|
|
1742
1750
|
top: 0px;
|
|
1743
1751
|
bottom: 0px;
|
|
1744
1752
|
left: 0px;
|
|
1745
1753
|
right: 0px;
|
|
1746
|
-
`,
|
|
1754
|
+
`,jr=r.div`
|
|
1747
1755
|
display: flex;
|
|
1748
1756
|
flex-direction: column;
|
|
1749
1757
|
align-items: center;
|
|
1750
1758
|
z-index: 1;
|
|
1751
1759
|
position: relative;
|
|
1752
1760
|
height: 100%;
|
|
1753
|
-
`,jr=e=>e.isMobile?i("svg",{width:"102",height:"126",viewBox:"0 0 102 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("g",{filter:"url(#filter0_d_13051_9213)",children:[n("rect",{x:"10",y:"9",width:"82",height:"82",fill:"white"}),n("rect",{x:"10",y:"9",width:"82",height:"82",stroke:"white","stroke-width":"2"}),n("rect",{width:"84",height:"24",transform:"translate(9 92)",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 6C5.20914 6 7 4.20914 7 2H9V8H3V6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 6C17.2091 6 19 4.20914 19 2H21V8H9V2H11C11 4.20914 12.7909 6 15 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27 6C29.2091 6 31 4.20914 31 2H33V8H21V2H23C23 4.20914 24.7909 6 27 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39 6C41.2091 6 43 4.20914 43 2H45V8H33V2H35C35 4.20914 36.7909 6 39 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M51 6C53.2091 6 55 4.20914 55 2H57V8H45V2H47C47 4.20914 48.7909 6 51 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63 6C65.2091 6 67 4.20914 67 2H69V8H57V2H59C59 4.20914 60.7909 6 63 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M75 6C77.2091 6 79 4.20914 79 2H81V8H69V2H71C71 4.20914 72.7909 6 75 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M87 6C89.2091 6 91 4.20914 91 2H93V8H81V2H83C83 4.20914 84.7909 6 87 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 2C95 4.20914 96.7909 6 99 6L99 8L93 8L93 2L95 2Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 14C95 16.2091 96.7909 18 99 18L99 20L93 20L93 8L99 8L99 10C96.7909 10 95 11.7909 95 14Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 26C95 28.2091 96.7909 30 99 30L99 32L93 32L93 20L99 20L99 22C96.7909 22 95 23.7909 95 26Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 38C95 40.2091 96.7909 42 99 42L99 44L93 44L93 32L99 32L99 34C96.7909 34 95 35.7909 95 38Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 50C95 52.2091 96.7909 54 99 54L99 56L93 56L93 44L99 44L99 46C96.7909 46 95 47.7909 95 50Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 62C95 64.2091 96.7909 66 99 66L99 68L93 68L93 56L99 56L99 58C96.7909 58 95 59.7909 95 62Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 74C95 76.2091 96.7909 78 99 78L99 80L93 80L93 68L99 68L99 70C96.7909 70 95 71.7909 95 74Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 86C95 88.2091 96.7909 90 99 90L99 92L93 92L93 80L99 80L99 82C96.7909 82 95 83.7909 95 86Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 98C95 100.209 96.7909 102 99 102L99 104L93 104L93 92L99 92L99 94C96.7909 94 95 95.7909 95 98Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 110C95 112.209 96.7909 114 99 114L99 116L93 116L93 104L99 104L99 106C96.7909 106 95 107.791 95 110Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M99 118C96.7909 118 95 119.791 95 122L93 122L93 116L99 116L99 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M87 118C84.7909 118 83 119.791 83 122L81 122L81 116L93 116L93 122L91 122C91 119.791 89.2091 118 87 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M75 118C72.7909 118 71 119.791 71 122L69 122L69 116L81 116L81 122L79 122C79 119.791 77.2091 118 75 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63 118C60.7909 118 59 119.791 59 122L57 122L57 116L69 116L69 122L67 122C67 119.791 65.2091 118 63 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M51 118C48.7909 118 47 119.791 47 122L45 122L45 116L57 116L57 122L55 122C55 119.791 53.2091 118 51 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39 118C36.7909 118 35 119.791 35 122L33 122L33 116L45 116L45 122L43 122C43 119.791 41.2091 118 39 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27 118C24.7909 118 23 119.791 23 122L21 122L21 116L33 116L33 122L31 122C31 119.791 29.2091 118 27 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 118C12.7909 118 11 119.791 11 122L9 122L9 116L21 116L21 122L19 122C19 119.791 17.2091 118 15 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 122C7 119.791 5.20914 118 3 118L3 116L9 116L9 122L7 122Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 110C7 107.791 5.20914 106 3 106L3 104L9 104L9 116L3 116L3 114C5.20914 114 7 112.209 7 110Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 98C7 95.7909 5.20914 94 3 94L3 92L9 92L9 104L3 104L3 102C5.20914 102 7 100.209 7 98Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 86C7 83.7909 5.20914 82 3 82L3 80L9 80L9 92L3 92L3 90C5.20914 90 7 88.2091 7 86Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 74C7 71.7909 5.20914 70 3 70L3 68L9 68L9 80L3 80L3 78C5.20914 78 7 76.2091 7 74Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 62C7 59.7909 5.20914 58 3 58L3 56L9 56L9 68L3 68L3 66C5.20914 66 7 64.2091 7 62Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 50C7 47.7909 5.20914 46 3 46L3 44L9 44L9 56L3 56L3 54C5.20914 54 7 52.2091 7 50Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 38C7 35.7909 5.20914 34 3 34L3 32L9 32L9 44L3 44L3 42C5.20914 42 7 40.2091 7 38Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 26C7 23.7909 5.20914 22 3 22L3 20L9 20L9 32L3 32L3 30C5.20914 30 7 28.2091 7 26Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14C7 11.7909 5.20914 10 3 10L3 8L9 8L9 20L3 20L3 18C5.20914 18 7 16.2091 7 14Z",fill:"white"})]}),n("defs",{children:i("filter",{id:"filter0_d_13051_9213",x:"0",y:"0",width:"102",height:"126",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[n("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),n("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n("feOffset",{dy:"1"}),n("feGaussianBlur",{stdDeviation:"1.5"}),n("feComposite",{in2:"hardAlpha",operator:"out"}),n("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.24 0"}),n("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_13051_9213"}),n("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_13051_9213",result:"shape"})]})})]}):i("svg",{width:"114",height:"138",viewBox:"0 0 114 138",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("g",{filter:"url(#filter0_d_13052_9519)",children:[n("rect",{x:"10",y:"9",width:"94",height:"94",fill:"white"}),n("rect",{x:"10",y:"9",width:"94",height:"94",stroke:"white","stroke-width":"2"}),n("rect",{width:"96",height:"24",transform:"translate(9 104)",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 6C5.20914 6 7 4.20914 7 2H9V8H3V6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 6C17.2091 6 19 4.20914 19 2H21V8H9V2H11C11 4.20914 12.7909 6 15 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27 6C29.2091 6 31 4.20914 31 2H33V8H21V2H23C23 4.20914 24.7909 6 27 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39 6C41.2091 6 43 4.20914 43 2H45V8H33V2H35C35 4.20914 36.7909 6 39 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M51 6C53.2091 6 55 4.20914 55 2H57V8H45V2H47C47 4.20914 48.7909 6 51 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63 6C65.2091 6 67 4.20914 67 2H69V8H57V2H59C59 4.20914 60.7909 6 63 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M75 6C77.2091 6 79 4.20914 79 2H81V8H69V2H71C71 4.20914 72.7909 6 75 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M87 6C89.2091 6 91 4.20914 91 2H93V8H81V2H83C83 4.20914 84.7909 6 87 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M99 6C101.209 6 103 4.20914 103 2H105V8H93V2H95C95 4.20914 96.7909 6 99 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 2C107 4.20914 108.791 6 111 6L111 8L105 8L105 2L107 2Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 14C107 16.2091 108.791 18 111 18L111 20L105 20L105 8L111 8L111 10C108.791 10 107 11.7909 107 14Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 26C107 28.2091 108.791 30 111 30L111 32L105 32L105 20L111 20L111 22C108.791 22 107 23.7909 107 26Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 38C107 40.2091 108.791 42 111 42L111 44L105 44L105 32L111 32L111 34C108.791 34 107 35.7909 107 38Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 50C107 52.2091 108.791 54 111 54L111 56L105 56L105 44L111 44L111 46C108.791 46 107 47.7909 107 50Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 62C107 64.2091 108.791 66 111 66L111 68L105 68L105 56L111 56L111 58C108.791 58 107 59.7909 107 62Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 74C107 76.2091 108.791 78 111 78L111 80L105 80L105 68L111 68L111 70C108.791 70 107 71.7909 107 74Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 86C107 88.2091 108.791 90 111 90L111 92L105 92L105 80L111 80L111 82C108.791 82 107 83.7909 107 86Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 98C107 100.209 108.791 102 111 102L111 104L105 104L105 92L111 92L111 94C108.791 94 107 95.7909 107 98Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 110C107 112.209 108.791 114 111 114L111 116L105 116L105 104L111 104L111 106C108.791 106 107 107.791 107 110Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 122C107 124.209 108.791 126 111 126L111 128L105 128L105 116L111 116L111 118C108.791 118 107 119.791 107 122Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M111 130C108.791 130 107 131.791 107 134L105 134L105 128L111 128L111 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M99 130C96.7909 130 95 131.791 95 134L93 134L93 128L105 128L105 134L103 134C103 131.791 101.209 130 99 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M87 130C84.7909 130 83 131.791 83 134L81 134L81 128L93 128L93 134L91 134C91 131.791 89.2091 130 87 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M75 130C72.7909 130 71 131.791 71 134L69 134L69 128L81 128L81 134L79 134C79 131.791 77.2091 130 75 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63 130C60.7909 130 59 131.791 59 134L57 134L57 128L69 128L69 134L67 134C67 131.791 65.2091 130 63 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M51 130C48.7909 130 47 131.791 47 134L45 134L45 128L57 128L57 134L55 134C55 131.791 53.2091 130 51 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39 130C36.7909 130 35 131.791 35 134L33 134L33 128L45 128L45 134L43 134C43 131.791 41.2091 130 39 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27 130C24.7909 130 23 131.791 23 134L21 134L21 128L33 128L33 134L31 134C31 131.791 29.2091 130 27 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 130C12.7909 130 11 131.791 11 134L9 134L9 128L21 128L21 134L19 134C19 131.791 17.2091 130 15 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 134C7 131.791 5.20914 130 3 130L3 128L9 128L9 134L7 134Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 122C7 119.791 5.20914 118 3 118L3 116L9 116L9 128L3 128L3 126C5.20914 126 7 124.209 7 122Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 110C7 107.791 5.20914 106 3 106L3 104L9 104L9 116L3 116L3 114C5.20914 114 7 112.209 7 110Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 98C7 95.7909 5.20914 94 3 94L3 92L9 92L9 104L3 104L3 102C5.20914 102 7 100.209 7 98Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 86C7 83.7909 5.20914 82 3 82L3 80L9 80L9 92L3 92L3 90C5.20914 90 7 88.2091 7 86Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 74C7 71.7909 5.20914 70 3 70L3 68L9 68L9 80L3 80L3 78C5.20914 78 7 76.2091 7 74Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 62C7 59.7909 5.20914 58 3 58L3 56L9 56L9 68L3 68L3 66C5.20914 66 7 64.2091 7 62Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 50C7 47.7909 5.20914 46 3 46L3 44L9 44L9 56L3 56L3 54C5.20914 54 7 52.2091 7 50Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 38C7 35.7909 5.20914 34 3 34L3 32L9 32L9 44L3 44L3 42C5.20914 42 7 40.2091 7 38Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 26C7 23.7909 5.20914 22 3 22L3 20L9 20L9 32L3 32L3 30C5.20914 30 7 28.2091 7 26Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14C7 11.7909 5.20914 10 3 10L3 8L9 8L9 20L3 20L3 18C5.20914 18 7 16.2091 7 14Z",fill:"white"})]}),n("defs",{children:i("filter",{id:"filter0_d_13052_9519",x:"0",y:"0",width:"114",height:"138",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[n("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),n("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n("feOffset",{dy:"1"}),n("feGaussianBlur",{stdDeviation:"1.5"}),n("feComposite",{in2:"hardAlpha",operator:"out"}),n("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.24 0"}),n("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_13052_9519"}),n("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_13052_9519",result:"shape"})]})})]}),Br=e=>{const t=window.innerWidth<=450;return i(Dr,{role:"stamp",style:e.style,children:[n(Mr,{children:n(jr,{isMobile:t})}),i(Pr,{children:[n(zr,{$backgroundColor:e.backgroundColor,children:n(Re,{type:"d1",children:e.icon})}),n(Re,{type:"p",style:{maxWidth:"-webkit-fill-available",margin:"4px 3px 0px 9px",width:"100%",fontFamily:"DM Mono",fontSize:13,maxHeight:24,textAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.title})]})]})},Er=r.div`
|
|
1761
|
+
`,Br=e=>e.isMobile?i("svg",{width:"102",height:"126",viewBox:"0 0 102 126",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("g",{filter:"url(#filter0_d_13051_9213)",children:[n("rect",{x:"10",y:"9",width:"82",height:"82",fill:"white"}),n("rect",{x:"10",y:"9",width:"82",height:"82",stroke:"white","stroke-width":"2"}),n("rect",{width:"84",height:"24",transform:"translate(9 92)",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 6C5.20914 6 7 4.20914 7 2H9V8H3V6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 6C17.2091 6 19 4.20914 19 2H21V8H9V2H11C11 4.20914 12.7909 6 15 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27 6C29.2091 6 31 4.20914 31 2H33V8H21V2H23C23 4.20914 24.7909 6 27 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39 6C41.2091 6 43 4.20914 43 2H45V8H33V2H35C35 4.20914 36.7909 6 39 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M51 6C53.2091 6 55 4.20914 55 2H57V8H45V2H47C47 4.20914 48.7909 6 51 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63 6C65.2091 6 67 4.20914 67 2H69V8H57V2H59C59 4.20914 60.7909 6 63 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M75 6C77.2091 6 79 4.20914 79 2H81V8H69V2H71C71 4.20914 72.7909 6 75 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M87 6C89.2091 6 91 4.20914 91 2H93V8H81V2H83C83 4.20914 84.7909 6 87 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 2C95 4.20914 96.7909 6 99 6L99 8L93 8L93 2L95 2Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 14C95 16.2091 96.7909 18 99 18L99 20L93 20L93 8L99 8L99 10C96.7909 10 95 11.7909 95 14Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 26C95 28.2091 96.7909 30 99 30L99 32L93 32L93 20L99 20L99 22C96.7909 22 95 23.7909 95 26Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 38C95 40.2091 96.7909 42 99 42L99 44L93 44L93 32L99 32L99 34C96.7909 34 95 35.7909 95 38Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 50C95 52.2091 96.7909 54 99 54L99 56L93 56L93 44L99 44L99 46C96.7909 46 95 47.7909 95 50Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 62C95 64.2091 96.7909 66 99 66L99 68L93 68L93 56L99 56L99 58C96.7909 58 95 59.7909 95 62Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 74C95 76.2091 96.7909 78 99 78L99 80L93 80L93 68L99 68L99 70C96.7909 70 95 71.7909 95 74Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 86C95 88.2091 96.7909 90 99 90L99 92L93 92L93 80L99 80L99 82C96.7909 82 95 83.7909 95 86Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 98C95 100.209 96.7909 102 99 102L99 104L93 104L93 92L99 92L99 94C96.7909 94 95 95.7909 95 98Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M95 110C95 112.209 96.7909 114 99 114L99 116L93 116L93 104L99 104L99 106C96.7909 106 95 107.791 95 110Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M99 118C96.7909 118 95 119.791 95 122L93 122L93 116L99 116L99 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M87 118C84.7909 118 83 119.791 83 122L81 122L81 116L93 116L93 122L91 122C91 119.791 89.2091 118 87 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M75 118C72.7909 118 71 119.791 71 122L69 122L69 116L81 116L81 122L79 122C79 119.791 77.2091 118 75 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63 118C60.7909 118 59 119.791 59 122L57 122L57 116L69 116L69 122L67 122C67 119.791 65.2091 118 63 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M51 118C48.7909 118 47 119.791 47 122L45 122L45 116L57 116L57 122L55 122C55 119.791 53.2091 118 51 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39 118C36.7909 118 35 119.791 35 122L33 122L33 116L45 116L45 122L43 122C43 119.791 41.2091 118 39 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27 118C24.7909 118 23 119.791 23 122L21 122L21 116L33 116L33 122L31 122C31 119.791 29.2091 118 27 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 118C12.7909 118 11 119.791 11 122L9 122L9 116L21 116L21 122L19 122C19 119.791 17.2091 118 15 118Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 122C7 119.791 5.20914 118 3 118L3 116L9 116L9 122L7 122Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 110C7 107.791 5.20914 106 3 106L3 104L9 104L9 116L3 116L3 114C5.20914 114 7 112.209 7 110Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 98C7 95.7909 5.20914 94 3 94L3 92L9 92L9 104L3 104L3 102C5.20914 102 7 100.209 7 98Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 86C7 83.7909 5.20914 82 3 82L3 80L9 80L9 92L3 92L3 90C5.20914 90 7 88.2091 7 86Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 74C7 71.7909 5.20914 70 3 70L3 68L9 68L9 80L3 80L3 78C5.20914 78 7 76.2091 7 74Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 62C7 59.7909 5.20914 58 3 58L3 56L9 56L9 68L3 68L3 66C5.20914 66 7 64.2091 7 62Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 50C7 47.7909 5.20914 46 3 46L3 44L9 44L9 56L3 56L3 54C5.20914 54 7 52.2091 7 50Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 38C7 35.7909 5.20914 34 3 34L3 32L9 32L9 44L3 44L3 42C5.20914 42 7 40.2091 7 38Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 26C7 23.7909 5.20914 22 3 22L3 20L9 20L9 32L3 32L3 30C5.20914 30 7 28.2091 7 26Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14C7 11.7909 5.20914 10 3 10L3 8L9 8L9 20L3 20L3 18C5.20914 18 7 16.2091 7 14Z",fill:"white"})]}),n("defs",{children:i("filter",{id:"filter0_d_13051_9213",x:"0",y:"0",width:"102",height:"126",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[n("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),n("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n("feOffset",{dy:"1"}),n("feGaussianBlur",{stdDeviation:"1.5"}),n("feComposite",{in2:"hardAlpha",operator:"out"}),n("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.24 0"}),n("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_13051_9213"}),n("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_13051_9213",result:"shape"})]})})]}):i("svg",{width:"114",height:"138",viewBox:"0 0 114 138",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("g",{filter:"url(#filter0_d_13052_9519)",children:[n("rect",{x:"10",y:"9",width:"94",height:"94",fill:"white"}),n("rect",{x:"10",y:"9",width:"94",height:"94",stroke:"white","stroke-width":"2"}),n("rect",{width:"96",height:"24",transform:"translate(9 104)",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 6C5.20914 6 7 4.20914 7 2H9V8H3V6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 6C17.2091 6 19 4.20914 19 2H21V8H9V2H11C11 4.20914 12.7909 6 15 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27 6C29.2091 6 31 4.20914 31 2H33V8H21V2H23C23 4.20914 24.7909 6 27 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39 6C41.2091 6 43 4.20914 43 2H45V8H33V2H35C35 4.20914 36.7909 6 39 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M51 6C53.2091 6 55 4.20914 55 2H57V8H45V2H47C47 4.20914 48.7909 6 51 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63 6C65.2091 6 67 4.20914 67 2H69V8H57V2H59C59 4.20914 60.7909 6 63 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M75 6C77.2091 6 79 4.20914 79 2H81V8H69V2H71C71 4.20914 72.7909 6 75 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M87 6C89.2091 6 91 4.20914 91 2H93V8H81V2H83C83 4.20914 84.7909 6 87 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M99 6C101.209 6 103 4.20914 103 2H105V8H93V2H95C95 4.20914 96.7909 6 99 6Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 2C107 4.20914 108.791 6 111 6L111 8L105 8L105 2L107 2Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 14C107 16.2091 108.791 18 111 18L111 20L105 20L105 8L111 8L111 10C108.791 10 107 11.7909 107 14Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 26C107 28.2091 108.791 30 111 30L111 32L105 32L105 20L111 20L111 22C108.791 22 107 23.7909 107 26Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 38C107 40.2091 108.791 42 111 42L111 44L105 44L105 32L111 32L111 34C108.791 34 107 35.7909 107 38Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 50C107 52.2091 108.791 54 111 54L111 56L105 56L105 44L111 44L111 46C108.791 46 107 47.7909 107 50Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 62C107 64.2091 108.791 66 111 66L111 68L105 68L105 56L111 56L111 58C108.791 58 107 59.7909 107 62Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 74C107 76.2091 108.791 78 111 78L111 80L105 80L105 68L111 68L111 70C108.791 70 107 71.7909 107 74Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 86C107 88.2091 108.791 90 111 90L111 92L105 92L105 80L111 80L111 82C108.791 82 107 83.7909 107 86Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 98C107 100.209 108.791 102 111 102L111 104L105 104L105 92L111 92L111 94C108.791 94 107 95.7909 107 98Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 110C107 112.209 108.791 114 111 114L111 116L105 116L105 104L111 104L111 106C108.791 106 107 107.791 107 110Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M107 122C107 124.209 108.791 126 111 126L111 128L105 128L105 116L111 116L111 118C108.791 118 107 119.791 107 122Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M111 130C108.791 130 107 131.791 107 134L105 134L105 128L111 128L111 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M99 130C96.7909 130 95 131.791 95 134L93 134L93 128L105 128L105 134L103 134C103 131.791 101.209 130 99 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M87 130C84.7909 130 83 131.791 83 134L81 134L81 128L93 128L93 134L91 134C91 131.791 89.2091 130 87 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M75 130C72.7909 130 71 131.791 71 134L69 134L69 128L81 128L81 134L79 134C79 131.791 77.2091 130 75 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M63 130C60.7909 130 59 131.791 59 134L57 134L57 128L69 128L69 134L67 134C67 131.791 65.2091 130 63 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M51 130C48.7909 130 47 131.791 47 134L45 134L45 128L57 128L57 134L55 134C55 131.791 53.2091 130 51 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39 130C36.7909 130 35 131.791 35 134L33 134L33 128L45 128L45 134L43 134C43 131.791 41.2091 130 39 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M27 130C24.7909 130 23 131.791 23 134L21 134L21 128L33 128L33 134L31 134C31 131.791 29.2091 130 27 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15 130C12.7909 130 11 131.791 11 134L9 134L9 128L21 128L21 134L19 134C19 131.791 17.2091 130 15 130Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 134C7 131.791 5.20914 130 3 130L3 128L9 128L9 134L7 134Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 122C7 119.791 5.20914 118 3 118L3 116L9 116L9 128L3 128L3 126C5.20914 126 7 124.209 7 122Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 110C7 107.791 5.20914 106 3 106L3 104L9 104L9 116L3 116L3 114C5.20914 114 7 112.209 7 110Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 98C7 95.7909 5.20914 94 3 94L3 92L9 92L9 104L3 104L3 102C5.20914 102 7 100.209 7 98Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 86C7 83.7909 5.20914 82 3 82L3 80L9 80L9 92L3 92L3 90C5.20914 90 7 88.2091 7 86Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 74C7 71.7909 5.20914 70 3 70L3 68L9 68L9 80L3 80L3 78C5.20914 78 7 76.2091 7 74Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 62C7 59.7909 5.20914 58 3 58L3 56L9 56L9 68L3 68L3 66C5.20914 66 7 64.2091 7 62Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 50C7 47.7909 5.20914 46 3 46L3 44L9 44L9 56L3 56L3 54C5.20914 54 7 52.2091 7 50Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 38C7 35.7909 5.20914 34 3 34L3 32L9 32L9 44L3 44L3 42C5.20914 42 7 40.2091 7 38Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 26C7 23.7909 5.20914 22 3 22L3 20L9 20L9 32L3 32L3 30C5.20914 30 7 28.2091 7 26Z",fill:"white"}),n("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14C7 11.7909 5.20914 10 3 10L3 8L9 8L9 20L3 20L3 18C5.20914 18 7 16.2091 7 14Z",fill:"white"})]}),n("defs",{children:i("filter",{id:"filter0_d_13052_9519",x:"0",y:"0",width:"114",height:"138",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[n("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),n("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n("feOffset",{dy:"1"}),n("feGaussianBlur",{stdDeviation:"1.5"}),n("feComposite",{in2:"hardAlpha",operator:"out"}),n("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.24 0"}),n("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_13052_9519"}),n("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_13052_9519",result:"shape"})]})})]}),Er=e=>{const t=window.innerWidth<=450;return i(zr,{role:"stamp",style:e.style,children:[n(Pr,{children:n(Br,{isMobile:t})}),i(jr,{children:[n(Mr,{$backgroundColor:e.backgroundColor,children:n(Re,{type:"d1",children:e.icon})}),n(Re,{type:"p",style:{maxWidth:"-webkit-fill-available",margin:"4px 3px 0px 9px",width:"100%",fontFamily:"DM Mono",fontSize:13,maxHeight:24,textAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.title})]})]})},Or=r.div`
|
|
1754
1762
|
position: relative;
|
|
1755
1763
|
display: flex;
|
|
1756
1764
|
width: 48px;
|
|
@@ -1762,7 +1770,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1762
1770
|
background: ${e=>e.$active?e.$color?e.$color:De.surface.primary:De.surface.neutralLow};
|
|
1763
1771
|
cursor: pointer;
|
|
1764
1772
|
transition: background 0.3s;
|
|
1765
|
-
`,
|
|
1773
|
+
`,Ar=r.div`
|
|
1766
1774
|
position: absolute;
|
|
1767
1775
|
display: flex;
|
|
1768
1776
|
align-items: center;
|
|
@@ -1774,9 +1782,9 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1774
1782
|
top: 2px;
|
|
1775
1783
|
left: ${e=>e.$active?"22px":"2px"};
|
|
1776
1784
|
transition: left 0.3s;
|
|
1777
|
-
`,
|
|
1785
|
+
`,Hr=e=>{const[t,i]=c(!1);return p(()=>{e.active?i(e.active):i(!1)},[e.active]),n(Or,{role:"container",$active:t,$color:e.color,onClick:()=>{e.onChange&&e.onChange(!t),i(!t)},children:n(Ar,{role:"tag",$active:t,children:t&&n(v,{color:e.color?e.color:De.text.primary,strokeWidth:3,height:18,width:18})})})};dn('.bubble-container {\n\tdisplay: flex;\n\tflex: 1;\n\tfont-family: "Poppins";\n\tfont-size: 13px;\n\tfont-style: normal;\n\tfont-weight: 400;\n\tline-height: 20px;\n\talign-items: flex-end;\n\tmargin-top: 2px;\n}\n\n.bubble-direction-reverse {\n\tflex-direction: row-reverse;\n}\n\n.bubble {\n\tbackground-color: #f2f2f2;\n\tborder-radius: 6px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\tvertical-align: top;\n\tword-wrap: break-word;\n\tcolor: rgba(0, 29, 61, 0.92);\n\tmax-width: 350px;\n}\n\n.me {\n\tbackground-color: #F0F3F6;\n\tmargin-left: 12px;\n\tmargin-right: 40%;\n}\n\n.you {\n\tbackground-color: #008FF5;\n\tmargin-left: 40%;\n\tmargin-right: 12px;\n\tcolor: white;\n}\n\n@media only screen and (max-width: 450px) {\n\t.me {\n\t\tmargin-right: 40px;\n\t}\n\t.you {\n\t\tmargin-right: 12px;\n\t}\n}\n');dn(".you--audio::-webkit-media-controls-panel {\n\tbackground-color: #008FF5;\n\tpadding: 4px 4px 0px;\n}\n\n.me--audio::-webkit-media-controls-panel {\n\tbackground-color: #f2f2f2;\n\tpadding: 4px 4px 0px;\n\tcolor: white;\n}\n\naudio::-webkit-media-controls-mute-button {\n\tdisplay: none !important;\n}\n\naudio::-webkit-media-controls-volume-slider {\n\tdisplay: none !important;\n}");const Vr=r.div`
|
|
1778
1786
|
padding: 6px 8px 2px;
|
|
1779
|
-
`,
|
|
1787
|
+
`,Tr=r.div`
|
|
1780
1788
|
display: flex;
|
|
1781
1789
|
justify-content: flex-end;
|
|
1782
1790
|
align-items: center;
|
|
@@ -1784,15 +1792,15 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1784
1792
|
font-size: 10px;
|
|
1785
1793
|
color: ${De.text.neutralMedium};
|
|
1786
1794
|
padding: 0px 6px;
|
|
1787
|
-
`,
|
|
1795
|
+
`,Ir=r.div``,Nr=r.img`
|
|
1788
1796
|
max-width: 100%;
|
|
1789
1797
|
width: auto;
|
|
1790
1798
|
height: auto;
|
|
1791
1799
|
border-radius: 6px;
|
|
1792
1800
|
object-fit: cover;
|
|
1793
|
-
`,
|
|
1801
|
+
`,Zr=r.audio`
|
|
1794
1802
|
height: 30px;
|
|
1795
|
-
`,
|
|
1803
|
+
`,Rr=e=>{const[t,o]=c(void 0);return p(()=>{o(k["delivered"===e.message.state?"CheckCheck":"failed"===e.message.state?"X":"read"===e.message.state?"CheckCheck":"sent"===e.message.state?"Check":"Clock"])},[]),n("div",{role:e.message.role,className:`bubble-container ${"sender"===e.message.type?"bubble-direction-reverse":""} `,children:i("div",{className:"bubble "+("sender"===e.message.type?"you":"me"),children:[e.message.media&&e.message.media.length>0&&i(Ir,{children:[e.message.media[0].content_type.startsWith("image")&&n(Nr,{src:e.message.media[0].base64?e.message.media[0].base64:e.message.media[0].url}),e.message.media[0].content_type.startsWith("audio")&&i(Zr,{className:"sender"===e.message.type?"you--audio":"me--audio",controls:!0,controlsList:"nodownload",children:[n("source",{src:e.message.media[0].base64?e.message.media[0].base64:e.message.media[0].url,type:e.message.media[0].content_type}),"Your browser does not support the audio element."]})]}),e.message.text&&n(Vr,{children:e.message.text}),i(Tr,{children:[X(e.message.createdAt).format("HH:mm"),t&&n(t,{height:14,width:14,color:"read"===e.message.state?De.text.primary:De.text.neutralMedium})]})]})},e.message.key)},Gr=r.div`
|
|
1796
1804
|
position: relative;
|
|
1797
1805
|
padding: 8px 12px;
|
|
1798
1806
|
margin-bottom: 2px;
|
|
@@ -1802,7 +1810,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1802
1810
|
&:hover {
|
|
1803
1811
|
background-color: ${De.surface.neutralSoft};
|
|
1804
1812
|
}
|
|
1805
|
-
`,
|
|
1813
|
+
`,Wr=e=>{const[t,o]=c(void 0);return n($n,{isVisible:e.isVisible,title:"Enviar plantilla",subtitle:"Envía un mensaje predeterminado de WhatsApp para iniciar o retomar una conversación.",buttonProps:{children:"Enviar",disabled:!t,onClick:()=>{e.onSend({template:t}),e.onClose()}},contentStyle:{paddingBottom:24},onClose:e.onClose,children:e.templates.map((e,r)=>{const a=t===e.id;return i(Gr,{title:e.description,$isSelected:a,onClick:()=>o(e.id),children:[n(Re,{type:"p",children:e.title}),n(Re,{type:"p2",style:{color:De.text.neutralMedium},children:e.subtitle})]},"template-"+r)})})},Yr=r.div`
|
|
1806
1814
|
display: flex;
|
|
1807
1815
|
flex-direction: column;
|
|
1808
1816
|
justify-content: flex-end;
|
|
@@ -1811,51 +1819,51 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1811
1819
|
height: 100vh;
|
|
1812
1820
|
background-color: "white";
|
|
1813
1821
|
overflow: hidden;
|
|
1814
|
-
`,
|
|
1822
|
+
`,Ur=r.div`
|
|
1815
1823
|
overflow: scroll;
|
|
1816
1824
|
padding: 24px 16px 32px;
|
|
1817
1825
|
${d.lessThan("small")`
|
|
1818
1826
|
padding: 16px 16px 32px;
|
|
1819
1827
|
`}
|
|
1820
|
-
`,
|
|
1828
|
+
`,qr=r.div`
|
|
1821
1829
|
position: sticky;
|
|
1822
1830
|
bottom: 0px;
|
|
1823
1831
|
padding: 8px 24px 24px;
|
|
1824
1832
|
${d.lessThan("small")`
|
|
1825
1833
|
padding: 8px 16px 24px;
|
|
1826
1834
|
`}
|
|
1827
|
-
`,
|
|
1835
|
+
`,Xr=r.div`
|
|
1828
1836
|
display: flex;
|
|
1829
1837
|
flex: 1;
|
|
1830
1838
|
justify-content: center;
|
|
1831
1839
|
align-items: center;
|
|
1832
1840
|
padding: 16px 8px;
|
|
1833
|
-
`,
|
|
1841
|
+
`,Kr=r(Re)`
|
|
1834
1842
|
padding: 0px 8px;
|
|
1835
|
-
`,
|
|
1843
|
+
`,Jr=r.div`
|
|
1836
1844
|
display: flex;
|
|
1837
1845
|
flex: 1;
|
|
1838
1846
|
border-top: 1px solid ${De.border.neutralSoft};
|
|
1839
1847
|
height: 1px;
|
|
1840
|
-
`,
|
|
1848
|
+
`,Qr=r.div`
|
|
1841
1849
|
display: flex;
|
|
1842
1850
|
background-color: ${De.surface.secondary};
|
|
1843
1851
|
margin: 0 18px;
|
|
1844
1852
|
padding: 2px 8px;
|
|
1845
1853
|
border-radius: 6px 6px 0px 0px;
|
|
1846
|
-
`,
|
|
1854
|
+
`,ea=e=>{const t=x(null),[o,r]=c({}),[a,l]=c(!1),[d,s]=c(!1);p(()=>{h(e.messages);const n=e.messages.slice().reverse().find(e=>"recipient"===e.type);if(n){X().diff(X(n.createdAt),"hours")>=24&&l(!0)}else l(!0);t.current&&t.current.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})},[e.messages]);const h=e=>{const t=e.reduce((e,t)=>{const n=X(new Date(t.createdAt)).format("YYYY-MM-DD");return e[n]||(e[n]=[]),e[n].push(t),e},{});r(t)};return i(Yr,{role:"container",style:e.style,children:[n(Wr,{isVisible:d,templates:e.templates,onSend:e.onSend,onClose:()=>s(!1)}),n(Ur,{ref:t,children:Object.keys(o).map(e=>i(b,{children:[i(Xr,{children:[n(Jr,{}),n(Kr,{type:"c1",children:X(e).format("ddd DD MMM")}),n(Jr,{})]}),o[e].map((e,t)=>n(Rr,{message:e},e.key))]},e))}),i(qr,{children:[a&&n(Qr,{children:n(Re,{type:"c2",children:"El último mensaje es de hace más de 24 horas. Continuar la conversación usando plantillas."})}),n(tn,{loading:e.loading,disabled:a,placeholder:e.placeholder,options:[{id:"template",label:"Plantillas",icon:n(U,{})},{id:"image",label:"Fotos",icon:n(D,{})}],onOptionClick:t=>{if("template"===t)s(!0);else if("image"===t){const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=t=>{var n;const i=null===(n=t.target.files)||void 0===n?void 0:n[0];if(i){const t=new FileReader;t.onloadend=()=>{const n=t.result;e.onSend({media:{base64:n,contentType:"image/*"}})},t.readAsDataURL(i)}},t.click()}},onSend:t=>e.onSend(t)})]})]})},ta=r.div`
|
|
1847
1855
|
display: flex;
|
|
1848
1856
|
flex-direction: column;
|
|
1849
1857
|
gap: 8px;
|
|
1850
|
-
`,
|
|
1858
|
+
`,na=r.div`
|
|
1851
1859
|
display: flex;
|
|
1852
1860
|
flex-direction: row;
|
|
1853
1861
|
gap: 8px;
|
|
1854
|
-
`,
|
|
1862
|
+
`,ia=r.div`
|
|
1855
1863
|
display: ${e=>e.visible?"flex":"none"};
|
|
1856
1864
|
flex-direction: column;
|
|
1857
1865
|
gap: 8px;
|
|
1858
|
-
`,
|
|
1866
|
+
`,oa=o=>{var r;const[a,l]=c(o.defaultLocation),[d,s]=c(void 0),[,h]=c(!1);p(()=>{l(o.defaultLocation)},[o.defaultLocation]);let u="";return i(ta,{style:o.style,children:[n(Hn,{design:o.design,isLoaded:o.isLoaded,placeholder:o.placeholder?o.placeholder:"Nombre y número de la calle",defaultValue:a&&a.route?`${a.route} ${a.routeNumber}`:void 0,isForm:!0,error:d,onLocationChange:n=>t(void 0,void 0,void 0,function*(){var t,i,r,d;if(s(void 0),n.route&&n.routeNumber){const t=`${n.route} ${n.routeNumber}, ${n.zipCode}, ${n.city}, ${n.province}, ${n.country}`,i=e(null!=a?a:{},["routeInfo"]),r=Object.assign(Object.assign(Object.assign({},i),n),{address:t});l(r),o.onSubmit({data:r})}else{u=n.route&&n.routeNumber?`${n.route} ${n.routeNumber}, ${(null==a?void 0:a.routeInfo)?a.routeInfo+", ":""}${null!==(t=n.zipCode)&&void 0!==t?t:""}, ${null!==(i=n.city)&&void 0!==i?i:""}, ${null!==(r=n.province)&&void 0!==r?r:""}, ${null!==(d=n.country)&&void 0!==d?d:""}`:"",l(Object.assign(Object.assign({},a),{route:n.route,routeNumber:n.routeNumber?n.routeNumber:"",address:u,routeInfo:null==a?void 0:a.routeInfo}));const e="Añade la dirección completa, incluyendo el número de la calle",c=e+".";h(t=>{const n=!t,i=n?e:c;return s(i),o.onSubmit({error:i}),n})}})}),i(ia,{visible:!!(null==a?void 0:a.route),children:[n(Tt,{containerStyle:{flex:1},type:"text",placeholder:"Apartamento, suite, unidad, edificio o piso",design:o.design,value:null!==(r=null==a?void 0:a.routeInfo)&&void 0!==r?r:"",onChange:e=>{if(a){const t=`${a.route} ${a.routeNumber}, ${e.target.value}, ${a.zipCode}, ${a.city}, ${a.province}, ${a.country}`,n=Object.assign(Object.assign({},a),{address:t,routeInfo:e.target.value});l(n),o.onSubmit({data:n})}}}),i(na,{children:[n(Tt,{containerStyle:{flex:3},type:"text",placeholder:"Ciudad",design:o.design,value:null==a?void 0:a.city,disabled:!0}),n(Tt,{containerStyle:{flex:2},type:"text",placeholder:"Código postal",design:o.design,value:null==a?void 0:a.zipCode,disabled:!0})]}),n(Tt,{type:"text",placeholder:"Provincia",design:o.design,value:null==a?void 0:a.province,disabled:!0})]})]})},ra=e=>"location"===e.type?n(oa,Object.assign({},e)):null,aa=r.div`
|
|
1859
1867
|
display: flex;
|
|
1860
1868
|
width: fit-content;
|
|
1861
1869
|
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.24);
|
|
@@ -1866,7 +1874,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1866
1874
|
&:hover {
|
|
1867
1875
|
background-color: ${De.surface.neutralSoft};
|
|
1868
1876
|
}
|
|
1869
|
-
`,
|
|
1877
|
+
`,la=r.div`
|
|
1870
1878
|
display: flex;
|
|
1871
1879
|
align-items: center;
|
|
1872
1880
|
padding: 8px;
|
|
@@ -1883,7 +1891,7 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1883
1891
|
border-bottom: 1px solid ${De.border.neutralSoft};
|
|
1884
1892
|
border-radius: 0px;
|
|
1885
1893
|
`}
|
|
1886
|
-
`,
|
|
1894
|
+
`,da=r.div`
|
|
1887
1895
|
display: flex;
|
|
1888
1896
|
align-items: center;
|
|
1889
1897
|
justify-content: center;
|
|
@@ -1891,18 +1899,18 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1891
1899
|
width: 24px;
|
|
1892
1900
|
border-radius: 24px;
|
|
1893
1901
|
background-color: ${De.surface.primary};
|
|
1894
|
-
`,
|
|
1902
|
+
`,sa=e=>{const t=window.innerWidth<=450,[r,a]=c(e.selectedOption||e.options[0]),[l,d]=c(!1);p(()=>{e.selectedOption?a(e.selectedOption):e.options.length>0&&a(e.options[0])},[e.selectedOption,e.options]);return i(o,{children:[i($n,{isVisible:l,type:t?"full-screen":"default",hideHeader:!0,contentStyle:{paddingBottom:12},onClose:()=>d(!1),children:[n(Re,{type:"p",weight:"medium",style:{marginBottom:8},children:"Selecciona una divisa"}),e.options.map((o,l)=>{const s=r.currency===o.currency;return i(la,{$isSelected:s,onClick:()=>(t=>{var n;a(t),d(!1),null===(n=e.onChange)||void 0===n||n.call(e,t)})(o),children:[!t&&s&&n(v,{height:16,width:16,color:De.text.primary}),i(Re,{type:"p2",style:{flex:1},children:[o.name," (",o.symbol,")"]}),t&&s&&n(da,{children:n(v,{height:16,width:16,color:"white"})})]},l)})]}),n(aa,{style:e.style,onClick:()=>d(!0),children:i(Re,{type:"b2",children:[r.symbol," ",r.currency]})})]})},ca=l`
|
|
1895
1903
|
0% { opacity: 0; transform: translateY(10px); }
|
|
1896
1904
|
20% { opacity: 1; transform: translateY(0); }
|
|
1897
1905
|
80% { opacity: 1; transform: translateY(0); }
|
|
1898
1906
|
100% { opacity: 0; transform: translateY(-10px); }
|
|
1899
|
-
`,
|
|
1907
|
+
`,pa=r.span`
|
|
1900
1908
|
display: inline-block;
|
|
1901
|
-
animation: ${
|
|
1902
|
-
`,
|
|
1909
|
+
animation: ${ca} 2.5s ease-in-out infinite;
|
|
1910
|
+
`,ha=t=>{var{children:o}=t,r=e(t,["children"]);const[a,l]=c(0);p(()=>{const e=setInterval(()=>{l(e=>(e+1)%r.options.length)},r.interval?r.interval:2500);return()=>clearInterval(e)},[r.options.length]);const[d,s]=null==o?void 0:o.split("{{data}}");return i(Re,Object.assign({},r,{children:[d,n(pa,{children:r.options[a]},r.options[a]),s]}))},ua=r.div`
|
|
1903
1911
|
position: relative;
|
|
1904
1912
|
display: inline-block;
|
|
1905
|
-
`,
|
|
1913
|
+
`,xa=r.div`
|
|
1906
1914
|
display: none;
|
|
1907
1915
|
position: absolute;
|
|
1908
1916
|
top: 100%;
|
|
@@ -1913,8 +1921,8 @@ import{__rest as e,__awaiter as t}from"tslib";import{jsx as n,jsxs as i,Fragment
|
|
|
1913
1921
|
z-index: 10;
|
|
1914
1922
|
border-radius: 24px;
|
|
1915
1923
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
1916
|
-
${
|
|
1924
|
+
${ua}:hover & {
|
|
1917
1925
|
display: block;
|
|
1918
1926
|
}
|
|
1919
|
-
`,
|
|
1927
|
+
`,ga=t=>{var{children:o,modalProps:r}=t,a=e(t,["children","modalProps"]);return i(ua,Object.assign({},a,{children:[o,n(xa,Object.assign({},r))]}))};export{Ei as Avatar,Se as BreadCrumb,ut as Button,Eo as CellSelector,ea as Chat,Ki as Checkbox,Le as Color,De as ColorV2,or as Countdown,Dr as Counter,sa as CurrencySelector,po as Dropdown,fr as FAQs,yt as Feedback,io as Filter,ra as Form,ga as Hover,Tt as Input,Gt as InputBirthday,tn as InputChat,ln as InputCode,hn as InputDateRange,jn as InputImage,Hn as InputLocation,Yn as InputPhone,mi as InputPrice,ri as InputRange,zi as Label,Kt as Menu,$n as Modal,nr as Pagination,Xo as Payout,qe as ProgressBar,zo as RadioButton,Li as SearchBar,vi as Select,Er as Stamp,Hr as Switch,Qo as SwitchTag,Go as Tabs,ur as TagSelector,Re as Text,ha as TextAnimated,$o as TextArea};
|
|
1920
1928
|
//# sourceMappingURL=index.js.map
|