1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6577],{94020:function(e,n,t){"use strict";var i=t(64836);n.Z=void 0,function(e,n){if((n||!e||!e.__esModule)&&null!==e&&("object"==typeof e||"function"==typeof e)){var t=o(n);if(t&&t.has(e))return t.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=r?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,t&&t.set(e,i)}}(t(67294));var r=i(t(64938)),a=t(85893);function o(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(o=function(e){return e?t:n})(e)}var s=(0,r.default)((0,a.jsx)("path",{d:"M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z"}),"Instagram");n.Z=s},31521:function(e,n,t){"use strict";var i=t(87462),r=t(67294),a=t(46901),o=t(85893);let s=!1;n.Z=r.forwardRef(function(e,n){return s||(console.warn("MUI: The Alert component was moved from the lab to the core.\n\nYou should use `import { Alert } from '@mui/material'`\nor `import Alert from '@mui/material/Alert'`"),s=!0),(0,o.jsx)(a.Z,(0,i.Z)({ref:n},e))})},35240:function(e,n,t){"use strict";var i=t(87462),r=t(67294),a=t(92401),o=t(85893);let s=!1;n.Z=r.forwardRef(function(e,n){return s||(console.warn("MUI: The AlertTitle component was moved from the lab to the core.\n\nYou should use `import { AlertTitle } from '@mui/material'`\nor `import AlertTitle from '@mui/material/AlertTitle'`"),s=!0),(0,o.jsx)(a.Z,(0,i.Z)({ref:n},e))})},31812:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var i=t(63366),r=t(87462),a=t(67294),o=t(98216),s=t(27909),l=t(94780),c=t(90948),d=t(28628),u=t(25662),p=t(98363),g=t(98456),f=t(35971),m=t(34867),x=t(1588);function h(e){return(0,m.ZP)("MuiLoadingButton",e)}let v=(0,x.Z)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var b=t(85893);let y=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],Z=e=>{let{loading:n,loadingPosition:t,classes:i}=e,a={root:["root",n&&"loading"],startIcon:[n&&`startIconLoading${(0,o.Z)(t)}`],endIcon:[n&&`endIconLoading${(0,o.Z)(t)}`],loadingIndicator:["loadingIndicator",n&&`loadingIndicator${(0,o.Z)(t)}`]},s=(0,l.Z)(a,h,i);return(0,r.Z)({},i,s)},_=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,w=(0,c.ZP)(u.Z,{shouldForwardProp:e=>_(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,n)=>[n.root,n.startIconLoadingStart&&{[`& .${v.startIconLoadingStart}`]:n.startIconLoadingStart},n.endIconLoadingEnd&&{[`& .${v.endIconLoadingEnd}`]:n.endIconLoadingEnd}]})(({ownerState:e,theme:n})=>(0,r.Z)({[`& .${v.startIconLoadingStart}, & .${v.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:n.transitions.create(["background-color","box-shadow","border-color"],{duration:n.transitions.duration.short}),[`&.${v.loading}`]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${v.startIconLoadingStart}, & .${v.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${v.startIconLoadingStart}, & .${v.endIconLoadingEnd}`]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginLeft:-8}})),I=(0,c.ZP)("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,n)=>{let{ownerState:t}=e;return[n.loadingIndicator,n[`loadingIndicator${(0,o.Z)(t.loadingPosition)}`]]}})(({theme:e,ownerState:n})=>(0,r.Z)({position:"absolute",visibility:"visible",display:"flex"},"start"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{left:"small"===n.size?10:14},"start"===n.loadingPosition&&"text"===n.variant&&{left:6},"center"===n.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},"end"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{right:"small"===n.size?10:14},"end"===n.loadingPosition&&"text"===n.variant&&{right:6},"start"===n.loadingPosition&&n.fullWidth&&{position:"relative",left:-10},"end"===n.loadingPosition&&n.fullWidth&&{position:"relative",right:-10})),j=a.forwardRef(function(e,n){let t=a.useContext(p.Z),o=(0,f.Z)(t,e),l=(0,d.i)({props:o,name:"MuiLoadingButton"}),{children:c,disabled:u=!1,id:m,loading:x=!1,loadingIndicator:h,loadingPosition:v="center",variant:_="text"}=l,j=(0,i.Z)(l,y),O=(0,s.Z)(m),C=null!=h?h:(0,b.jsx)(g.Z,{"aria-labelledby":O,color:"inherit",size:16}),P=(0,r.Z)({},l,{disabled:u,loading:x,loadingIndicator:C,loadingPosition:v,variant:_}),E=Z(P),S=x?(0,b.jsx)(I,{className:E.loadingIndicator,ownerState:P,children:C}):null;return(0,b.jsxs)(w,(0,r.Z)({disabled:u||x,id:O,ref:n},j,{variant:_,classes:E,ownerState:P,children:["end"===P.loadingPosition?c:S,"end"===P.loadingPosition?S:c]}))});var O=j},92401:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var i=t(87462),r=t(63366),a=t(67294),o=t(90512),s=t(94780),l=t(90948),c=t(28628),d=t(15861),u=t(1588),p=t(34867);function g(e){return(0,p.ZP)("MuiAlertTitle",e)}(0,u.Z)("MuiAlertTitle",["root"]);var f=t(85893);let m=["className"],x=e=>{let{classes:n}=e;return(0,s.Z)({root:["root"]},g,n)},h=(0,l.ZP)(d.Z,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,n)=>n.root})(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2})),v=a.forwardRef(function(e,n){let t=(0,c.i)({props:e,name:"MuiAlertTitle"}),{className:a}=t,s=(0,r.Z)(t,m),l=x(t);return(0,f.jsx)(h,(0,i.Z)({gutterBottom:!0,component:"div",ownerState:t,ref:n,className:(0,o.Z)(l.root,a)},s))});var b=v},19529:function(e,n,t){"use strict";t.d(n,{Z:function(){return I}});var i=t(87462),r=t(63366),a=t(67294),o=t(90512),s=t(44287),l=t(94780),c=t(25813),d=function(e){let{badgeContent:n,inv
1isible:t=!1,max:i=99,showZero:r=!1}=e,a=(0,s.Z)({badgeContent:n,max:i}),o=t;!1!==t||0!==n||r||(o=!0);let{badgeContent:l,max:c=i}=o?a:e,d=l&&Number(l)>c?`${c}+`:l;return{badgeContent:l,invisible:o,max:c,displayValue:d}},u=t(90948),p=t(28628),g=t(98216),f=t(1588),m=t(34867);function x(e){return(0,m.ZP)("MuiBadge",e)}let h=(0,f.Z)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);var v=t(85893);let b=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],y=e=>{let{color:n,anchorOrigin:t,invisible:i,overlap:r,variant:a,classes:o={}}=e,s={root:["root"],badge:["badge",a,i&&"invisible",`anchorOrigin${(0,g.Z)(t.vertical)}${(0,g.Z)(t.horizontal)}`,`anchorOrigin${(0,g.Z)(t.vertical)}${(0,g.Z)(t.horizontal)}${(0,g.Z)(r)}`,`overlap${(0,g.Z)(r)}`,"default"!==n&&`color${(0,g.Z)(n)}`]};return(0,l.Z)(s,x,o)},Z=(0,u.ZP)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,n)=>n.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),_=(0,u.ZP)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,n)=>{let{ownerState:t}=e;return[n.badge,n[t.variant],n[`anchorOrigin${(0,g.Z)(t.anchorOrigin.vertical)}${(0,g.Z)(t.anchorOrigin.horizontal)}${(0,g.Z)(t.overlap)}`],"default"!==t.color&&n[`color${(0,g.Z)(t.color)}`],t.invisible&&n.invisible]}})(({theme:e})=>{var n;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(n=e.vars)?n:e).palette).filter(n=>{var t,i;return(null!=(t=e.vars)?t:e).palette[n].main&&(null!=(i=e.vars)?i:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${h.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${h.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${h.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${h.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${h.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${h.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{to
1p:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${h.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${h.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),w=a.forwardRef(function(e,n){var t,a,l,u,g,f;let m=(0,p.i)({props:e,name:"MuiBadge"}),{anchorOrigin:x={vertical:"top",horizontal:"right"},className:h,component:w,components:I={},componentsProps:j={},children:O,overlap:C="rectangular",color:P="default",invisible:E=!1,max:S=99,badgeContent:R,slots:A,slotProps:z,showZero:k=!1,variant:M="standard"}=m,B=(0,r.Z)(m,b),{badgeContent:T,invisible:L,max:$,displayValue:N}=d({max:S,invisible:E,badgeContent:R,showZero:k}),W=(0,s.Z)({anchorOrigin:x,color:P,overlap:C,variant:M,badgeContent:R}),D=L||null==T&&"dot"!==M,{color:F=P,overlap:U=C,anchorOrigin:H=x,variant:G=M}=D?W:m,q="dot"!==G?N:void 0,X=(0,i.Z)({},m,{badgeContent:T,invisible:D,max:$,displayValue:q,showZero:k,anchorOrigin:H,color:F,overlap:U,variant:G}),Q=y(X),V=null!=(t=null!=(a=null==A?void 0:A.root)?a:I.Root)?t:Z,Y=null!=(l=null!=(u=null==A?void 0:A.badge)?u:I.Badge)?l:_,J=null!=(g=null==z?void 0:z.root)?g:j.root,K=null!=(f=null==z?void 0:z.badge)?f:j.badge,ee=(0,c.Z)({elementType:V,externalSlotProps:J,externalForwardedProps:B,additionalProps:{ref:n,as:w},ownerState:X,className:(0,o.Z)(null==J?void 0:J.className,Q.root,h)}),en=(0,c.Z)({elementType:Y,externalSlotProps:K,ownerState:X,className:(0,o.Z)(Q.badge,null==K?void 0:K.className)});return(0,v.jsxs)(V,(0,i.Z)({},ee,{children:[O,(0,v.jsx)(Y,(0,i.Z)({},en,{children:q}))]}))});var I=w},66242:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var i=t(87462),r=t(63366),a=t(67294),o=t(90512),s=t(94780),l=t(90948),c=t(28628),d=t(90629),u=t(1588),p=t(34867);function g(e){return(0,p.ZP)("MuiCard",e)}(0,u.Z)("MuiCard",["root"]);var f=t(85893);let m=["className","raised"],x=e=>{let{classes:n}=e;return(0,s.Z)({root:["root"]},g,n)},h=(0,l.ZP)(d.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,n)=>n.root})(()=>({overflow:"hidden"})),v=a.forwardRef(function(e,n){let t=(0,c.i)({props:e,name:"MuiCard"}),{className:a,raised:s=!1}=t,l=(0,r.Z)(t,m),d=(0,i.Z)({},t,{raised:s}),u=x(d);return(0,f.jsx)(h,(0,i.Z)({className:(0,o.Z)(u.root,a),elevation:s?8:void 0,ref:n,ownerState:d},l))});var b=v},44287:function(e,n,t){"use strict";var i=t(67294);n.Z=e=>{let n=i.useRef({});return i.useEffect(()=>{n.current=e}),n.current}},34941:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/bot/[id]/ig",function(){return t(6698)}])},6698:function(e,n,t){"use strict";t.r(n);var i=t(85893),r=t(80822),a=t(66242),o=t(67294),s=t(36529),l=t(49571),c=t(63692),d=t(14699),u=t(47698),p=t(54519),g=t(82274),f=t(56567),m=t(8871);n.default=(0,c.Z)(function(){let{user_profile:e,loading:n,fetchIGProfile:t}=(0,f.Z)(),{currentBot:c}=(0,m.Z)();return((0,o.useEffect)(()=>{(null==c?void 0:c.id)&&t(c.id)},[null==c?void 0:c.id]),n)?(0,i.jsx)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:"1rem",justifyContent:"center",alignItems:"center",minHeight:"calc(100vh - 227px)",width:"100%"},children:(0,i.jsx)(s.Z,{color:"#4F46E5",loading:!0})}):(0,i.jsx)(l.Z,{children:(0,i.jsxs)(a.Z,{sx:{minHeight:"calc(100vh - 90px)"},children:[(0,i.jsx)(r.Z,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:(0,i.jsx)(p.Z,{content:g,tabNumber:0,tabMapping:{0:"ig"}})}),e?(0,i.jsx)(u.Z,{username:e.username,accountType:e.account_type,profilePicture:e.profile_picture_url,posts:e.posts,followers:e.followers,following:e.following}):(0,i.jsx)(d.Z,{})]})})})},14699:function(e,n,t){"use strict";var i=t(85893),r=t(67294),a=t(80822),o=t(94020),s=t(31521),l=t(35240),c=t(31812),d=t(86501),u=t(67421),p=t(15861),g=t(8871),f=t(52081);n.Z=function(){let[e,n]=(0,r.useState)(!1),{t}=(0,u.$G)(),m=(0,g.Z)(e=>e.currentBot);
1return(0,i.jsxs)(a.Z,{component:"div",sx:{display:"flex",flexDirection:"column",height:"calc(100svh - 120px)",px:{xs:0,md:1}},children:[(0,i.jsx)(p.Z,{variant:"h2",sx:{mt:3,mb:2},children:t("ig_signup_title")}),(0,i.jsx)(p.Z,{variant:"body1",sx:{mb:3},color:"grey",children:t("ig_signup_description")}),(0,i.jsxs)(s.Z,{severity:"info",children:[(0,i.jsx)(l.Z,{children:t("ig_signup_info_title")}),t("ig_signup_info_description")]}),(0,i.jsxs)(s.Z,{severity:"warning",sx:{mt:2},children:[(0,i.jsx)(l.Z,{children:t("ig_signup_warning_title")}),t("ig_signup_warning_description")]}),(0,i.jsx)(c.Z,{sx:{alignSelf:"center",mt:"100px",background:"linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%)",color:"#fff",fontWeight:"bold"},size:"large",startIcon:(0,i.jsx)(o.Z,{}),variant:"contained",onClick:()=>{(null==m?void 0:m.id)&&f.Y.setIgSetupBotId(String(m.id)),n(!0);let e=(window.innerWidth-600)/2,i=(window.innerHeight-700)/2,r=window.open("https://www.instagram.com/oauth/authorize?force_reauth=true&client_id=551065467338453&redirect_uri=https://app.agentiza.ai/callback/instagram-setup&response_type=code&scope=instagram_business_basic%2Cinstagram_business_manage_messages","Instagram Login","width=".concat(600,",height=").concat(700,",left=").concat(e,",top=").concat(i)),a=setInterval(()=>{(!r||r.closed)&&(clearInterval(a),n(!1),r?d.Am.error(t("ig_signup_cancelled")):d.Am.error(t("ig_signup_popup_blocked")))},1e3);window.addEventListener("message",e=>{"https://app.agentiza.ai"===e.origin&&("INSTAGRAM_AUTH_SUCCESS"===e.data.type?(clearInterval(a),n(!1),null==r||r.close(),d.Am.success(t("ig_signup_success"))):"INSTAGRAM_AUTH_ERROR"===e.data.type&&(clearInterval(a),n(!1),null==r||r.close(),d.Am.error(t("ig_signup_error"))))})},loading:e,loadingIndicator:t("ig_signup_loading"),disabled:e,children:t("ig_signup_button")})]})}},47698:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var i=t(85893),r=t(86886),a=t(15861),o=t(80822),s=t(19529),l=t(69661),c=t(7906),d=t(295),u=t(53816),p=t(53252),g=t(25662),f=t(67294),m=t(86501),x=t(67421),h=t(86455),v=t.n(h),b=t(22814),y=t(56567),Z=t(8871),_=t(52081);function w(e){let{username:n,accountType:t,profilePicture:h,posts:w,followers:I,following:j}=e,O="https://www.instagram.com/oauth/authorize?force_reauth=true&client_id=551065467338453&redirect_uri=https://app.agentiza.ai/callback/instagram-setup&response_type=code&scope=instagram_business_basic%2Cinstagram_business_manage_messages",{t:C}=(0,x.$G)(),{currentBot:P}=(0,Z.Z)(),{clearProfile:E}=(0,y.Z)(),S=null==P?void 0:P.id,[R,A]=(0,f.useState)(!1),z=async()=>{A(!0);let e=await b.Z.delete("ig/webhook/".concat(S,"/unsubscribe"));200!==e.status?m.ZP.error("Error al eliminar la cuenta"):(m.ZP.success("Cuenta eliminada correctamente"),E()),A(!1)},k=async()=>{v().fire({title:"Confirmar eliminaci\xf3n",text:C("ig_delete_profile_description"),icon:"warning",showCancelButton:!0,confirmButtonText:"S\xed, eliminar",cancelButtonText:"Cancelar"}).then(e=>{e.isConfirmed&&z()})};return(0,i.jsxs)(r.ZP,{container:!0,spacing:2,justifyContent:"center",direction:"column",maxWidth:"md",mx:{xs:"",md:"auto"},sx:{padding:{xs:0,md:4}},children:[(0,i.jsx)(r.ZP,{item:!0,xs:12,children:(0,i.jsx)(a.Z,{variant:"h6",align:"center",sx:{backgroundColor:"success.main",color:"success.contrastText",padding:1,borderRadius:1,fontWeight:"bold",marginTop:0},children:C("ig_connected_to_instagram")})}),(0,i.jsx)(r.ZP,{item:!0,xs:12,md:6,lg:5,children:(0,i.jsxs)(o.Z,{display:"flex",alignItems:"center",flexDirection:{xs:"column",md:"row"},sx:{backgroundColor:"grey.100",padding:2,borderRadius:1,textAlign:{xs:"center",md:"left"}},children:[(0,i.jsx)(o.Z,{display:"flex",flexDirection:"column",alignItems:"center",sx:{marginRight:{xs:0,md:5},marginBottom:{xs:2,md:0}},children:(0,i.jsx)(s.Z,{badgeContent:"MEDIA_CREATOR"===t?"Creator":"Business",color:"MEDIA_CREATOR"===t?"info":"primary",anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiBadge-badge":{fontSize:"0.8rem",height:"22px",minWidth:"22px",borderRadius:"11px",right:14,bottom:14}},children:(0,i.jsx)(l.Z,{src:h,alt:n,sx:{width:80,height:80},children:!h&&n.substring(0,2).toUpperCase()})})}),(0,i.jsxs)(o.Z,{children:[(0,i.jsxs)(a.Z,{variant:"h5",component:"h2",sx:{fontSize:"1.25rem",marginBottom:1,fontWeight:{xs:500,md:700}},children:["@",n]}),(0,i.jsx)(o.Z,{display:"flex",gap:3,sx:{justifyContent:{xs:"center",md:"flex-start"}},children:[{value:w,label:C("ig_posts_label")}
1,{value:I,label:C("ig_followers_label")},{value:j,label:C("ig_following_label")}].map(e=>(0,i.jsxs)(o.Z,{sx:{textAlign:"center"},children:[(0,i.jsx)(a.Z,{variant:"h6",children:e.value}),(0,i.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:e.label})]},e.label))})]})]})}),(0,i.jsx)(r.ZP,{item:!0,xs:12,md:6,lg:5,children:(0,i.jsx)(o.Z,{display:"flex",flexDirection:"column",alignItems:"flex-start",sx:{backgroundColor:"grey.100",padding:2,borderRadius:1},children:(0,i.jsx)(c.Z,{sx:{width:"100%"},children:(0,i.jsxs)(d.Z,{children:[(0,i.jsxs)(u.Z,{children:[(0,i.jsxs)(p.Z,{align:"left",sx:{padding:{xs:1,md:2}},children:[(0,i.jsx)(a.Z,{variant:"h6",mb:1,children:C("ig_update_permissions_title")}),(0,i.jsx)(a.Z,{variant:"body1",color:"text.secondary",sx:{display:{xs:"block",md:"inline"},mt:{xs:1,md:0}},children:C("ig_update_permissions_description")})]}),(0,i.jsx)(p.Z,{align:"center",sx:{padding:{xs:1,md:2}},children:(0,i.jsx)(g.Z,{sx:{width:"100%",fontSize:{xs:"0.8rem",md:"1rem"}},variant:"contained",color:"secondary",onClick:()=>{if(!S){m.ZP.error("No se pudo obtener informacion del bot");return}if(!O){m.ZP.error("No se pudo iniciar la autenticacion con Instagram");return}_.Y.setIgSetupBotId(String(S)),window.open(O,"_blank","noopener,noreferrer")},children:C("ig_update_permissions_button")})})]}),(0,i.jsxs)(u.Z,{children:[(0,i.jsxs)(p.Z,{align:"left",sx:{padding:{xs:1,md:2}},children:[(0,i.jsx)(a.Z,{variant:"h6",mb:1,children:C("ig_delete_profile_title")}),(0,i.jsx)(a.Z,{variant:"body1",color:"text.secondary",sx:{display:{xs:"block",md:"inline"},mt:{xs:1,md:0}},children:C("ig_delete_profile_description")})]}),(0,i.jsx)(p.Z,{align:"center",sx:{padding:{xs:1,md:2}},children:(0,i.jsx)(g.Z,{sx:{width:"100%",fontSize:{xs:"0.8rem",md:"1rem"}},variant:"contained",color:"error",onClick:k,disabled:R,children:R?C("ig_deleting_profile_button"):C("ig_delete_profile_button")})})]})]})})})})]})}},54519:function(e,n,t){"use strict";var i=t(85893),r=t(67294),a=t(2734),o=t(61730),s=t(34386),l=t(93946),c=t(15861),d=t(77533),u=t(67720),p=t(23795),g=t(80822),f=t(71688),m=t(77373),x=t(29463),h=t(67421),v=t(41092);let b={xs:"90%",sm:"500px"};n.Z=function(e){let{content:n,tabNumber:t,tabMapping:y,hideText:Z=!1}=e,{t:_,i18n:w}=(0,h.$G)(),[I,j]=(0,r.useState)(!1),[O,C]=(0,r.useState)({}),P=(0,a.Z)(),[E,S]=(0,r.useState)(""),R=(0,o.Z)(P.breakpoints.down("sm"));return(0,r.useEffect)(()=>{var e;let i=(w.language||"es").split("-")[0],r=null==n?void 0:n[i],a=null!==(e=null==n?void 0:n.es)&&void 0!==e?e:{},o=y[t],s=(null==r?void 0:r[o])&&Object.keys(r[o]).length?r[o]:a[o];o&&s?(C(s),S(o)):(C({}),S(""))},[t,y,n,w.language]),(0,i.jsxs)("div",{children:[(0,i.jsx)(s.Z,{title:_("help"),children:(0,i.jsxs)(l.Z,{color:"primary",onClick:()=>j(!0),size:"small",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",padding:"0px 30px","@media (max-width: 600px)":{padding:"0px 10px"}},children:[(0,i.jsx)(f.Z,{stroke:1.5,size:20}),R||Z?null:(0,i.jsx)(c.Z,{variant:"body2",children:_("help")})]})}),(0,i.jsx)(d.ZP,{anchor:"right",open:I,onClose:()=>j(!1),PaperProps:{sx:{width:b}},children:(0,i.jsxs)(v.Z,{sx:{height:"calc(100vh - 5px)"},children:[(0,i.jsxs)(g.Z,{p:2,display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsx)(c.Z,{variant:"h4",children:_("help")}),(0,i.jsx)(l.Z,{color:"inherit",onClick:()=>j(!1),children:(0,i.jsx)(m.Z,{size:"1rem"})})]}),(0,i.jsx)(u.Z,{}),(0,i.jsx)(g.Z,{p:2,children:Object.keys(O).length>0?(0,i.jsx)(i.Fragment,{children:Object.keys(O).map(e=>(0,i.jsx)(g.Z,{mb:2,children:(0,i.jsx)(x.UG,{components:{a:e=>{let{node:n,ref:t,...r}=e;return(0,i.jsx)(p.Z,{...r,target:"_blank",rel:"noopener noreferrer"})}},children:O[e]})},e))}):(0,i.jsx)(c.Z,{variant:"body1",children:_("help_unavailable_for_section")})})]})})]})}},49571:function(e,n,t){"use strict";var i=t(85893);n.Z=function(e){let{children:n}=e;return(0,i.jsx)("div",{children:n})}},56567:function(e,n,t){"use strict";var i=t(73445),r=t(22814);let a=(0,i.Ue)(e=>({user_profile:null,loading:!1,fetchIGProfile:async n=>{var t;e({loading:!0});let i=await r.Z.get("ig/".concat(n,"/profile"));200!==i.status||(null==i?void 0:null===(t=i.data)||void 0===t?void 0:t.error)?e({user_profile:null}):e({user_profile:{id:i.data.id||"",username:i.data.username||"",profile_picture_url:i.data.profile_picture_url||"",account_type:i.data.account_type||"",posts:i.data.media_count||0,followers:i.data.followers_count||0,following:i.data.follows_count||0}}),e({loading:!1})}
1,setLoading:n=>{e({loading:n})},clearProfile:()=>{e({user_profile:null})}}));n.Z=a},36529:function(e,n,t){"use strict";var i=t(67294),r=t(62045),a=t(32919),o=function(){return(o=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},s=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>n.indexOf(i)&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)0>n.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]]);return t},l=(0,a.i)("BeatLoader","50% {transform: scale(0.75);opacity: 0.2} 100% {transform: scale(1);opacity: 1}","beat");n.Z=function(e){var n=e.loading,t=e.color,a=void 0===t?"#000000":t,c=e.speedMultiplier,d=void 0===c?1:c,u=e.cssOverride,p=e.size,g=void 0===p?15:p,f=e.margin,m=void 0===f?2:f,x=s(e,["loading","color","speedMultiplier","cssOverride","size","margin"]),h=o({display:"inherit"},void 0===u?{}:u),v=function(e){return{display:"inline-block",backgroundColor:a,width:(0,r.E)(g),height:(0,r.E)(g),margin:(0,r.E)(m),borderRadius:"100%",animation:"".concat(l," ").concat(.7/d,"s ").concat(e%2?"0s":"".concat(.35/d,"s")," infinite linear"),animationFillMode:"both"}};return void 0===n||n?i.createElement("span",o({style:h},x),i.createElement("span",{style:v(1)}),i.createElement("span",{style:v(2)}),i.createElement("span",{style:v(3)})):null}},8722:function(e,n,t){"use strict";var i=t(67294),r=t(62045),a=t(32919),o=function(){return(o=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},s=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>n.indexOf(i)&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)0>n.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]]);return t},l=(0,a.i)("MoonLoader","100% {transform: rotate(360deg)}","moon");n.Z=function(e){var n=e.loading,t=e.color,a=void 0===t?"#000000":t,c=e.speedMultiplier,d=void 0===c?1:c,u=e.cssOverride,p=e.size,g=s(e,["loading","color","speedMultiplier","cssOverride","size"]),f=(0,r.h)(void 0===p?60:p),m=f.value,x=f.unit,h=m/7,v=o({display:"inherit",position:"relative",width:"".concat("".concat(m+2*h).concat(x)),height:"".concat("".concat(m+2*h).concat(x)),animation:"".concat(l," ").concat(.6/d,"s 0s infinite linear"),animationFillMode:"forwards"},void 0===u?{}:u),b=function(e){return{width:(0,r.E)(e),height:(0,r.E)(e),borderRadius:"100%"}},y=o(o({},b(h)),{backgroundColor:"".concat(a),opacity:"0.8",position:"absolute",top:"".concat("".concat(m/2-h/2).concat(x)),animation:"".concat(l," ").concat(.6/d,"s 0s infinite linear"),animationFillMode:"forwards"}),Z=o(o({},b(m)),{border:"".concat(h,"px solid ").concat(a),opacity:"0.1",boxSizing:"content-box",position:"absolute"});return void 0===n||n?i.createElement("span",o({style:v},g),i.createElement("span",{style:y}),i.createElement("span",{style:Z})):null}},32919:function(e,n,t){"use strict";t.d(n,{i:function(){return i}});var i=function(e,n,t){var i="react-spinners-".concat(e,"-").concat(t);if("undefined"==typeof window||!window.document)return i;var r=document.createElement("style");document.head.appendChild(r);var a=r.sheet,o="\n @keyframes ".concat(i," {\n ").concat(n,"\n }\n ");return a&&a.insertRule(o,0),i}},62045:function(e,n,t){"use strict";t.d(n,{E:function(){return a},h:function(){return r}});var i={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 r(e){if("number"==typeof e)return{value:e,unit:"px"};var n,t=(e.match(/^[0-9.]*/)||"").toString();n=t.includes(".")?parseFloat(t):parseInt(t,10);var r=(e.match(/[^0-9]*$/)||"").toString();return i[r]?{value:n,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(n,"px.")),{value:n,unit:"px"})}function a(e){var n=r(e);return"".concat(n.value).concat(n.unit)}},82274:function(e){"use strict";e.exports=JSON.parse('{"es":{"ig":{"Descripci\xf3n general":"### Integraci\xf3n con Instagram\\nEsta secci\xf3n te permite conectar un perfil de Instagram con el agente para recibir y enviar mensajes directos (DMs). La integraci\xf3n es compatible exclusivamente con cuentas de Instagram Business o Instagram Professional. Una vez conectado, el agente podr\xe1 gestionar mensajes entrantes y responder autom\xe1ticamente a los usuarios, mejorando la interacci\xf3n y atenci\xf3n a tus clientes.","Conectar perfil":"### Conectar perfil\\nPara conectar un perfil de Instagram con el agente, sigue estos pasos:\\n\\n1. **Iniciar sesi\xf3n:** Haz clic en el bot\xf3n \'Iniciar sesi\xf3n con Instagram\'.\\n2. **Cuenta requerida:** Durante el proceso, aseg\xfarate de usar una cuenta de Instagram Business o Professional. Si no tienes una, se te pedir\xe1 crearla en este paso.\\n3. **Permisos:** Aseg\xfarate de otorgar todos los permisos necesarios para que el agente pueda gestionar mensajes directos y notificaciones.\\n\\n- **Notas importantes:**\\n - Una vez conectado, cada agente solo puede estar vinculado a un \xfanico perfil de Instagram.\\n - Los mensajes directos y las interacciones ser\xe1n gestionadas \xfanicamente por el agente vinculado a ese perfil.\\n\\n- **Tutorial:**\\n Mira este video tutorial para conocer los pasos detallados del proceso de integraci\xf3n: [C\xf3mo integrar Instagram con Agentiza](https://youtu.be/pixhCfWMX2s?si=XyEvbS7FCmsf4GfQ).","Perfil conectado":"### Perfil
1conectado\\nCuando el perfil de Instagram est\xe1 vinculado correctamente, ver\xe1s la informaci\xf3n del perfil conectada, incluyendo:\\n\\n- Nombre de usuario.\\n- N\xfamero de publicaciones, seguidores y seguidos.\\n\\nAdem\xe1s, tendr\xe1s las siguientes opciones:\\n\\n- **Actualizar permisos:**\\n Si en alg\xfan momento el acceso caduca o necesitas otorgar nuevos permisos, utiliza esta opci\xf3n para reconectar la integraci\xf3n.\\n\\n- **Eliminar perfil:**\\n Al eliminar el perfil, se desactivar\xe1 la integraci\xf3n con el agente, eliminando el acceso a la API y las notificaciones relacionadas.","Eliminar perfil":"### Eliminar perfil\\nSi decides desconectar el perfil de Instagram, haz clic en el bot\xf3n \'Eliminar\'. Esto eliminar\xe1 toda la configuraci\xf3n relacionada con el agente y el perfil. **Esta acci\xf3n no se puede deshacer.**\\n\\n- **\xbfC\xf3mo funciona?**\\n 1. Haz clic en \'Eliminar\'.\\n 2. Confirma la acci\xf3n en la ventana emergente para completar el proceso.","Errores comunes":"### Errores comunes\\nAlgunos problemas frecuentes al conectar o mantener un perfil de Instagram son:\\n\\n- **Acceso caducado:** Si el perfil pierde conexi\xf3n, utiliza la opci\xf3n \'Actualizar permisos\'.\\n- **Cuenta incorrecta:** Aseg\xfarate de usar una cuenta Business o Professional, ya que las cuentas personales no son compatibles.","Acceso r\xe1pido":"### Acceso r\xe1pido\\nPara m\xe1s informaci\xf3n sobre c\xf3mo configurar correctamente un perfil de Instagram Business, consulta el siguiente enlace de ayuda oficial de Meta:\\n[Meta - Configuraci\xf3n de Instagram Business](https://business.facebook.com)."}},"en":{"ig":{"Descripci\xf3n general":"### Instagram integration\\nThis section connects an Instagram profile to the agent so it can receive and send direct messages. It works with Instagram Business and Professional accounts only. Once connected, the agent handles incoming messages and answers on its own.","Conectar perfil":"### Connecting a profile\\nTo connect an Instagram profile to the agent:\\n\\n1. **Sign in:** click \'Sign in with Instagram\'.\\n2. **Account type:** use an Instagram Business or Professional account. If you do not have one, you will be asked to create it at this step.\\n3. **Permissions:** grant every permission the agent needs to handle direct messages and notifications.\\n\\n- **Worth knowing:**\\n - Each agent can be linked to one Instagram profile only.\\n - Direct messages are handled solely by the agent linked to that profile.\\n\\n- **Tutorial:**\\n This video walks through the whole integration: [Connecting Instagram to Agentiza](https://youtu.be/pixhCfWMX2s?si=XyEvbS7FCmsf4GfQ).","Perfil conectado":"### Connected profile\\nOnce the profile is linked you will see its details:\\n\\n- Username.\\n- Post, follower and following counts.\\n\\nAnd these options:\\n\\n- **Refresh permissions:**\\n Use this to reconnect the integration when access expires or new permissions are needed.\\n\\n- **Remove profile:**\\n Removing the profile switches the integration off, ending API access and the related notifications.","Eliminar perfil":"### Removing a profile\\nTo disconnect the Instagram profile, click \'Remove\'. This deletes every setting tying the agent to the profile. **It cannot be undone.**\\n\\n- **How it works**\\n 1. Click \'Remove\'.\\n 2. Confirm in the dialog to finish.","Errores comunes":"### Common problems\\n- **Expired access:** if the profile loses its connection, use \'Refresh permissions\'.\\n- **Wrong account type:** use a Business or Professional account â personal accounts are not supported.","Acceso r\xe1pido":"### Quick link\\nFor more on setting up an Instagram Business profile, see Meta\'s own help:\\n[Meta â Instagram Business setup](https://business.facebook.com)."}},"pt":{"ig":{"Descripci\xf3n general":"### Integra\xe7\xe3o com o Instagram\\nEsta se\xe7\xe3o conecta um perfil do Instagram ao agente para receber e enviar mensagens diretas. Funciona apenas com contas Instagram Business ou Professional. Uma vez conectado, o agente atende as mensagens recebidas e responde sozinho.","Conectar perfil":"### Conectar perfil\\nPara conectar um perfil do Instagram ao agente:\\n\\n1. **Entrar:** clique em \'Entrar c
1om o Instagram\'.\\n2. **Tipo de conta:** use uma conta Instagram Business ou Professional. Se n\xe3o tiver, ser\xe1 pedido que crie uma nesta etapa.\\n3. **Permiss\xf5es:** conceda todas as permiss\xf5es necess\xe1rias para o agente atender \xe0s mensagens diretas e \xe0s notifica\xe7\xf5es.\\n\\n- **Vale saber:**\\n - Cada agente pode ser vinculado a um \xfanico perfil do Instagram.\\n - As mensagens diretas s\xe3o atendidas apenas pelo agente vinculado a esse perfil.\\n\\n- **Tutorial:**\\n Este v\xeddeo mostra todo o processo de integra\xe7\xe3o: [Como integrar o Instagram \xe0 Agentiza](https://youtu.be/pixhCfWMX2s?si=XyEvbS7FCmsf4GfQ).","Perfil conectado":"### Perfil conectado\\nCom o perfil vinculado, voc\xea ver\xe1 os dados dele:\\n\\n- Nome de usu\xe1rio.\\n- N\xfamero de publica\xe7\xf5es, seguidores e seguindo.\\n\\nE estas op\xe7\xf5es:\\n\\n- **Atualizar permiss\xf5es:**\\n Use para reconectar a integra\xe7\xe3o quando o acesso expirar ou forem necess\xe1rias novas permiss\xf5es.\\n\\n- **Excluir perfil:**\\n Excluir o perfil desliga a integra\xe7\xe3o, encerrando o acesso \xe0 API e as notifica\xe7\xf5es relacionadas.","Eliminar perfil":"### Excluir perfil\\nPara desconectar o perfil do Instagram, clique em \'Excluir\'. Isso apaga todas as configura\xe7\xf5es que ligam o agente ao perfil. **N\xe3o \xe9 poss\xedvel desfazer.**\\n\\n- **Como funciona**\\n 1. Clique em \'Excluir\'.\\n 2. Confirme na janela para concluir.","Errores comunes":"### Problemas comuns\\n- **Acesso expirado:** se o perfil perder a conex\xe3o, use \'Atualizar permiss\xf5es\'.\\n- **Tipo de conta errado:** use uma conta Business ou Professional â contas pessoais n\xe3o s\xe3o compat\xedveis.","Acceso r\xe1pido":"### Link r\xe1pido\\nPara saber mais sobre como configurar um perfil Instagram Business, consulte a ajuda oficial da Meta:\\n[Meta â Configura\xe7\xe3o do Instagram Business](https://business.facebook.com)."}}}')}},function(e){e.O(0,[6478,5662,4818,6697,6447,5675,6886,1664,6901,7918,3161,2147,2271,5759,2453,8885,8912,3692,9774,2888,179],function(){return e(e.s=34941)}),_N_E=e.O()}]); 2//# sourceMappingURL=ig-67447424dd8b27d2.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.