1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6193],{21023:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack");t.Z=a},15498:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z"}),"BarChart");t.Z=a},86024:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"}),"Build");t.Z=a},54788:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"}),"Business");t.Z=a},25709:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard");t.Z=a},43800:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link");t.Z=a},50449:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"}),"LocalOffer");t.Z=a},76824:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}),"Message");t.Z=a},82341:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm.88 15.76V19h-1.75v-1.29c-.74-.18-2.39-.77-3.02-2.96l1.65-.67c.06.22.58 2.09 2.4 2.09.93 0 1.98-.48 1.98-1.61 0-.96-.7-1.46-2.28-2.03-1.1-.39-3.35-1.03-3.35-3.31 0-.1.01-2.4 2.62-2.96V5h1.75v1.24c1.84.32 2.51 1.79 2.66 2.23l-1.58.67c-.11-.35-.59-1.34-1.9-1.34-.7 0-1.81.37-1.81 1.39 0 .95.86 1.31 2.64 1.9 2.4.83 3.01 2.05 3.01 3.45 0 2.63-2.5 3.13-3.02 3.22z"}),"Paid");t.Z=a},48571:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"}),"People");t.Z=a},45275:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)([(0,i.jsx)("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43z"},"0"),(0,i.jsx)("path",{d:"M13 3C9.25 3 6.2 5.94 6.02 9.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v3h7v-4.68c2.36-1.12 4-3.53 4-6.32 0-3.87-3.13-7-7-7zm3 7c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39z"},"1")],"Psychology");t.Z=a},64017:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M1 21h22L12 2
11 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"ReportProblem");t.Z=a},42761:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.Z=a},61235:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"}),"Security");t.Z=a},12714:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3zM7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5zM16 17H8v-2h8v2zm-1-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13z"}),"SmartToy");t.Z=a},87785:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4-6-3.27v6.53L16 16z"}),"Subscriptions");t.Z=a},59748:function(e,t,n){"use strict";var r=n(64836);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)([(0,i.jsx)("path",{d:"M12 5.99 19.53 19H4.47L12 5.99M12 2 1 21h22L12 2z"},"0"),(0,i.jsx)("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")],"WarningAmber");t.Z=a},69368:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(63366),o=n(87462),i=n(67294),a=n(90512),s=n(94780),l=n(2101),c=n(21964),u=n(82066),d=n(85893),h=(0,u.Z)((0,d.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),p=(0,u.Z)((0,d.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),v=(0,u.Z)((0,d.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),f=n(98216),m=n(28628),x=n(90948),g=n(14136),b=n(1588),Z=n(34867);function y(e){return(0,Z.ZP)("MuiCheckbox",e)}let j=(0,b.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),z=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],w=e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,a={root:["root",n&&"indeterminate",`color${(0,f.Z)(r)}`,`size${(0,f.Z)(i)}`]},l=(0,s.Z)(a,y,t);return(0,o.Z)({},t,l)},S=(0,x.ZP)(c.Z,{shouldForwardProp:e=>(0,g.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,f.Z)(n.size)}`],"default"!==n.color&&t[`color${(0,f.Z)(n.color)}`]]}})(({theme:e,ownerState:t})=>(0,o.Z)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.Fq)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${j.checked}, &.${j.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${j.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),k=(0,d.jsx)(p,{}),C=(0,d.jsx)(h,{}),P=(0,d.jsx)(v,{}),L=i.forwardRef(function(e,t){var n,s;let l=(0,m.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:c=k,color:u="primary",icon:h=C,indeterminate:p=!1,indeterminateIcon:v=P,inputProps:f,size:x="medium",className:g}=l,b=(0,r.Z)(l,z),Z=p?v:h,y=p?v:c,j=(0,o.Z)({},l,{color:u,indeterminate:p,size:x}),L=w(j);
1return(0,d.jsx)(S,(0,o.Z)({type:"checkbox",inputProps:(0,o.Z)({"data-indeterminate":p},f),icon:i.cloneElement(Z,{fontSize:null!=(n=Z.props.fontSize)?n:x}),checkedIcon:i.cloneElement(y,{fontSize:null!=(s=y.props.fontSize)?s:x}),ownerState:j,ref:t,className:(0,a.Z)(L.root,g)},b,{classes:L}))});var M=L},5025:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/superadmin/organizations",function(){return n(94200)}])},94200:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return R}});var r=n(85893),o=n(67294),i=n(49195),a=n(63692),s=n(8871),l=n(33526),c=n(86501),u=n(49571),d=n(80822),h=n(50135),p=n(87109),v=n(8722),f=n(2734),m=n(15861),x=n(90629),g=n(78462),b=n(19294),Z=n(48885),y=n(59334),j=n(86886),z=n(25662),w=n(77986),S=n(97322),k=n(48135),C=n(56953),P=n(74251),L=n(246),M=n.n(L);function O(e,t){return e.filter(e=>-1===t.indexOf(e))}function E(e,t){return e.filter(e=>-1!==t.indexOf(e))}var H=e=>{let{organizations:t,allOrganizations:n,onAdd:i,onRemove:a,leftTitle:s,rightTitle:l,loadMore:c,hasMore:u,emptyMessage:d}=e,[h,p]=o.useState([]),[v,L]=o.useState([]),[H,T]=o.useState([]);o.useEffect(()=>{L(t)},[t]),o.useEffect(()=>{T(n.filter(e=>!t.some(t=>t.id===e.id)))},[n,t]);let _=E(h,v),R=E(h,H),V=e=>()=>{let t=h.indexOf(e),n=[...h];-1===t?n.push(e):n.splice(t,1),p(n)},I=(0,f.Z)(),W=I.palette.divider,A=(e,t)=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.Z,{sx:{margin:1},children:t?l:s}),(0,r.jsx)(x.Z,{variant:"outlined",sx:{width:300,height:"800px",overflow:"auto",border:"1px solid ".concat(W)},children:t?(0,r.jsx)(M(),{pageStart:0,loadMore:c,hasMore:u,loader:(0,r.jsx)("div",{children:"Cargando m\xe1s organizaciones..."},0),useWindow:!1,children:(0,r.jsx)(g.Z,{dense:!0,component:"div",role:"list",children:e.map(e=>{let t="transfer-list-item-".concat(e.id,"-label");return(0,r.jsxs)(b.ZP,{role:"listitem",button:!0,onClick:V(e),children:[(0,r.jsx)(Z.Z,{children:(0,r.jsx)(P.Z,{tabIndex:-1,disableRipple:!0,checked:-1!==h.indexOf(e),inputProps:{"aria-labelledby":t}})}),(0,r.jsx)(y.Z,{id:t,primary:e.name,secondary:e.customer_email})]},e.id)})})}):(0,r.jsx)(g.Z,{dense:!0,component:"div",role:"list",children:e.map(e=>{let t="transfer-list-item-".concat(e.id,"-label");return(0,r.jsxs)(b.ZP,{role:"listitem",button:!0,onClick:V(e),children:[(0,r.jsx)(Z.Z,{children:(0,r.jsx)(P.Z,{tabIndex:-1,disableRipple:!0,checked:-1!==h.indexOf(e),inputProps:{"aria-labelledby":t}})}),(0,r.jsx)(y.Z,{id:t,primary:e.name})]},e.id)})})})]});return(0,r.jsxs)(j.ZP,{container:!0,spacing:2,justifyContent:"center",alignItems:"center",children:[(0,r.jsx)(j.ZP,{item:!0,children:A(v,!1)}),(0,r.jsx)(j.ZP,{item:!0,children:(0,r.jsxs)(j.ZP,{container:!0,direction:"column",alignItems:"center",children:[(0,r.jsx)(z.Z,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{if(v.length>1){let e=v.slice(1);e.forEach(e=>a(e)),T(H.concat(e)),L(v.slice(0,1)),p(O(h,e))}},disabled:v.length<=1,"aria-label":"move all right",children:(0,r.jsx)(w.Z,{width:20,height:20})}),(0,r.jsx)(z.Z,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{v.length>_.length&&(_.forEach(e=>a(e)),T(H.concat(_)),L(O(v,_)),p(O(h,_)))},disabled:0===_.length||v.length===_.length,"aria-label":"move selected right",children:(0,r.jsx)(S.Z,{width:20,height:20})}),(0,r.jsx)(z.Z,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{R.forEach(e=>i(e)),L(v.concat(R)),T(O(H,R)),p(O(h,R))},disabled:0===R.length,"aria-label":"move selected left",children:(0,r.jsx)(k.Z,{width:20,height:20})}),(0,r.jsx)(z.Z,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{H.length>0&&(H.forEach(e=>i(e)),L(v.concat(H)),T([]),p(O(h,H)))},disabled:0===H.length,"aria-label":"move all left",children:(0,r.jsx)(C.Z,{width:20,height:20})})]})}),(0,r.jsx)(j.ZP,{item:!0,children:A(H,!0)})]})},T=n(42761),_=()=>{let{user:e,organizations:t,fetchOrganizations:n}=(0,s.Z)(),[i,a]=o.useState([]),[f,m]=o.useState(!1),[x,g]=o.useState(!0),[b,Z]=o.use
1State(0),[y,j]=o.useState(!0),[z,w]=o.useState(""),[S,k]=o.useState("");(0,o.useEffect)(()=>{let e=setTimeout(()=>{k(z),Z(0),a([]),j(!0)},500);return()=>clearTimeout(e)},[z]);let C=async()=>{if(y)try{var e,t;m(!0);let n=await (null===(e=l.auth.currentUser)||void 0===e?void 0:e.getIdToken()),r=new URLSearchParams({mode:"list",limit:String(20),offset:String(b),search:S?"%".concat(S,"%"):"%"}),o=await fetch("/api/superadmin/organizations?".concat(r),{cache:"no-store",headers:{Authorization:"Bearer ".concat(n)}});if(!o.ok)throw Error(String(o.status));let i=null!==(t=(await o.json()).organizations)&&void 0!==t?t:[];a(e=>[...e,...i]),Z(e=>e+20),i.length<20&&j(!1)}catch(e){console.error("error fetchAllOrganizations",e)}finally{m(!1),g(!1)}};(0,o.useEffect)(()=>{(null==e?void 0:e.uid)&&C()},[S]),(0,o.useEffect)(()=>((null==e?void 0:e.uid)&&C(),()=>{n()}),[e]);let P=async(e,t)=>{var n;let r=await (null===(n=l.auth.currentUser)||void 0===n?void 0:n.getIdToken()),o=await fetch("/api/superadmin/organization-membership",{method:t,cache:"no-store",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)},body:JSON.stringify({org_id:e.id})});if(!o.ok)throw Error(String(o.status))},L=async e=>{try{await P(e,"POST"),n()}catch(e){console.error("error handleOnAdd",e),c.ZP.error("Error al agregar organizaci\xf3n, por favor haga un refresh de la p\xe1gina")}},M=async e=>{try{await P(e,"DELETE"),n()}catch(e){console.error("error handleOnRemove",e),c.ZP.error("Error al eliminar organizaci\xf3n, por favor haga un refresh de la p\xe1gina")}};return(0,r.jsx)(u.Z,{children:0===t.length||x?(0,r.jsx)(d.Z,{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",children:(0,r.jsx)(v.Z,{color:"#00a0e3",size:50})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Z,{sx:{mb:2},children:(0,r.jsx)(h.Z,{fullWidth:!0,variant:"outlined",placeholder:"Buscar por nombre u email...",value:z,onChange:e=>w(e.target.value),InputProps:{startAdornment:(0,r.jsx)(p.Z,{position:"start",children:(0,r.jsx)(T.Z,{})})}})}),(0,r.jsx)(H,{leftTitle:"Tus Organizaciones actuales",rightTitle:(0,r.jsxs)(d.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,r.jsxs)("span",{children:["Organizaciones activas disponibles (",i.length,")"]}),f&&!x&&(0,r.jsx)(v.Z,{color:"#00a0e3",size:20})]}),organizations:t,allOrganizations:i,onAdd:L,onRemove:M,loadMore:()=>{!f&&y&&C()},hasMore:y,emptyMessage:S&&0===i.length?"No se encontraron organizaciones con ese criterio de b\xfasqueda":void 0})]})})},R=(0,a.Z)(()=>(0,r.jsx)(i.Z,{children:(0,r.jsx)(_,{})}),"Blank")},49571:function(e,t,n){"use strict";var r=n(85893);t.Z=function(e){let{children:t}=e;return(0,r.jsx)("div",{children:t})}},74251:function(e,t,n){"use strict";var r=n(85893);n(67294);var o=n(90948),i=n(69368);let a=(0,o.ZP)("span")(e=>{let{theme:t}=e;return{borderRadius:3,width:19,height:19,marginLeft:"4px",boxShadow:"dark"===t.palette.mode?"0 0 0 1px ".concat(t.palette.grey[200]):"inset 0 0 0 1px ".concat(t.palette.grey[300]),backgroundColor:"transparent",".Mui-focusVisible &":{outline:"dark"===t.palette.mode?"0px auto ".concat(t.palette.grey[200]):"0px auto ".concat(t.palette.grey[300]),outlineOffset:2},"input:hover ~ &":{backgroundColor:(t.palette.mode,t.palette.primary)},"input:disabled ~ &":{boxShadow:"none",background:t.palette.grey[100]}}}),s=(0,o.ZP)(a)({boxShadow:"none",width:19,height:19,"&:before":{display:"block",width:19,height:19,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}});t.Z=function(e){return(0,r.jsx)(i.Z,{disableRipple:!0,color:(null==e?void 0:e.color)||"default",checkedIcon:(0,r.jsx)(s,{sx:{backgroundColor:(null==e?void 0:e.color)?"".concat(null==e?void 0:e.color,".main"):"primary.main"}}),icon:(0,r.jsx)(a,{}),inputProps:{"aria-label":"Checkbox demo"},...e})}},49195:function(e,t,n){"use strict";var r=n(85893);n(67294);var o=n(10155),i=n(15861),a=n(67720),s=n(78462),l=n(19294),c=n(98619),u=n(48885),d=n(59334),h=n(80822),p=n(77533),v=n(11163),f=n(25709),m=n(87785),x=n(48571),g=n(15498),b=n(54788),Z=n(86024),y=n(82341),j=n(59748),z=n(61235),w=n(76824),S=n(64017),k=n(12714),C=n(50449),P=n(43800),L=n(45275),M=n(49571),O=n(21023),E=n(8871);let H=[{text:"Dashboard",icon:(0,r.jsx)(f.Z,{}
1),path:"/superadmin/dashboard"},{text:"Subscriptions",icon:(0,r.jsx)(m.Z,{}),path:"/superadmin/subscriptions"},{text:"Customers",icon:(0,r.jsx)(x.Z,{}),path:"/superadmin/customers"},{text:"Consumption",icon:(0,r.jsx)(g.Z,{}),path:"/superadmin/consumption"},{text:"AI Costs",icon:(0,r.jsx)(y.Z,{}),path:"/superadmin/ai-costs"},{text:"Organizations",icon:(0,r.jsx)(b.Z,{}),path:"/superadmin/organizations"},{text:"Spam Sessions",icon:(0,r.jsx)(j.Z,{}),path:"/superadmin/spam-sessions"},{text:"Prompts de seguridad",icon:(0,r.jsx)(z.Z,{}),path:"/superadmin/security-prompts"},{text:"Incidencias",icon:(0,r.jsx)(S.Z,{}),path:"/superadmin/incidents"},{text:"Feedback Access",icon:(0,r.jsx)(w.Z,{}),path:"/superadmin/feedback-access"},{text:"Agentes IA",icon:(0,r.jsx)(k.Z,{}),path:"/superadmin/agent-configs"},{text:"Tools",icon:(0,r.jsx)(Z.Z,{}),path:"/superadmin/tools"},{text:"Productos",icon:(0,r.jsx)(C.Z,{}),path:"/superadmin/checkout-products"},{text:"Redirects",icon:(0,r.jsx)(P.Z,{}),path:"/superadmin/promo-redirects"},{text:"Prompts onboarding",icon:(0,r.jsx)(L.Z,{}),path:"/superadmin/onboarding-prompts"},{text:"Volver a la app",icon:(0,r.jsx)(O.Z,{}),path:"/dashboard"}];t.Z=e=>{let{children:t}=e,n=(0,v.useRouter)(),f=(0,E.Z)(e=>{var t;return(null===(t=e.user)||void 0===t?void 0:t.admin)===!0}),m=H.filter(e=>"/superadmin/security-prompts"!==e.path||f),x=e=>{n.push(e)},g=(0,r.jsxs)("div",{children:[(0,r.jsx)(o.Z,{children:(0,r.jsx)(i.Z,{variant:"h6",noWrap:!0,children:"Super Admin"})}),(0,r.jsx)(a.Z,{}),(0,r.jsx)(s.Z,{children:m.map(e=>(0,r.jsx)(l.ZP,{disablePadding:!0,children:(0,r.jsxs)(c.Z,{onClick:()=>x(e.path),selected:n.pathname.startsWith(e.path),children:[(0,r.jsx)(u.Z,{children:e.icon}),(0,r.jsx)(d.Z,{primary:e.text})]})},e.text))})]});return(0,r.jsx)(M.Z,{children:(0,r.jsxs)(h.Z,{sx:{display:"flex",minHeight:"100vh",bgcolor:"background.default"},children:[(0,r.jsx)(p.ZP,{variant:"permanent",sx:{width:240,flexShrink:0,"& .MuiDrawer-paper":{width:240,boxSizing:"border-box",bgcolor:"background.paper"}},children:g}),(0,r.jsx)(h.Z,{component:"main",sx:{flexGrow:1,p:3,width:"calc(100% - ".concat(240,"px)"),color:"text.primary"},children:t})]})})}},92703:function(e,t,n){"use strict";
1var r=n(50414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},45697:function(e,t,n){e.exports=n(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},57761:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(67294),i=s(o),a=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){return this.props.useCapture,this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,i=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;r=this.props.isReverse?i:this.calculateOffset(e,i)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,o=t.hasMore,a=(t.initialLoad,t.isReverse),s=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var r in e)!(t.indexOf(r)>=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));
1c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return o&&(s?a?u.unshift(s):u.push(s):this.defaultLoader&&(a?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),i.default.createElement(r,c,u)}}]),t}(o.Component);l.propTypes={children:a.default.node.isRequired,element:a.default.node,hasMore:a.default.bool,initialLoad:a.default.bool,isReverse:a.default.bool,loader:a.default.node,loadMore:a.default.func.isRequired,pageStart:a.default.number,ref:a.default.func,getScrollParent:a.default.func,threshold:a.default.number,useCapture:a.default.bool,useWindow:a.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},246:function(e,t,n){e.exports=n(57761)},8722:function(e,t,n){"use strict";var r=n(67294),o=n(62045),i=n(32919),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},l=(0,i.i)("MoonLoader","100% {transform: rotate(360deg)}","moon");
1t.Z=function(e){var t=e.loading,n=e.color,i=void 0===n?"#000000":n,c=e.speedMultiplier,u=void 0===c?1:c,d=e.cssOverride,h=e.size,p=s(e,["loading","color","speedMultiplier","cssOverride","size"]),v=(0,o.h)(void 0===h?60:h),f=v.value,m=v.unit,x=f/7,g=a({display:"inherit",position:"relative",width:"".concat("".concat(f+2*x).concat(m)),height:"".concat("".concat(f+2*x).concat(m)),animation:"".concat(l," ").concat(.6/u,"s 0s infinite linear"),animationFillMode:"forwards"},void 0===d?{}:d),b=function(e){return{width:(0,o.E)(e),height:(0,o.E)(e),borderRadius:"100%"}},Z=a(a({},b(x)),{backgroundColor:"".concat(i),opacity:"0.8",position:"absolute",top:"".concat("".concat(f/2-x/2).concat(m)),animation:"".concat(l," ").concat(.6/u,"s 0s infinite linear"),animationFillMode:"forwards"}),y=a(a({},b(f)),{border:"".concat(x,"px solid ").concat(i),opacity:"0.1",boxSizing:"content-box",position:"absolute"});return void 0===t||t?r.createElement("span",a({style:g},p),r.createElement("span",{style:Z}),r.createElement("span",{style:y})):null}},32919:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});var r=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if("undefined"==typeof window||!window.document)return r;var o=document.createElement("style");document.head.appendChild(o);var i=o.sheet,a="\n @keyframes ".concat(r," {\n ").concat(t,"\n }\n ");return i&&i.insertRule(a,0),r}},62045:function(e,t,n){"use strict";n.d(t,{E:function(){return i},h:function(){return o}});var r={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function o(e){if("number"==typeof e)return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);var o=(e.match(/[^0-9]*$/)||"").toString();return r[o]?{value:t,unit:o}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function i(e){var t=o(e);return"".concat(t.value).concat(t.unit)}},56953:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(33733);let o=(0,r.Z)("outline","chevrons-left","ChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]])},77986:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(33733);let o=(0,r.Z)("outline","chevrons-right","ChevronsRight",[["path",{d:"M7 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M13 7l5 5l-5 5",key:"svg-1"}]])}},function(e){e.O(0,[6478,5662,4818,6697,6447,5675,6886,1664,6901,7918,3161,2147,2271,5759,6223,7182,8912,3692,9774,2888,179],function(){return e(e.s=5025)}),_N_E=e.O()}]); 2//# sourceMappingURL=organizations-b9bdae3745ed8ead.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.