1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4843],{98456:function(k,g,a){"use strict";a.d(g,{Z:function(){return D}});var l=a(63366),m=a(87462),h=a(67294),n=a(86010),o=a(94780),c=a(70917),p=a(98216),q=a(54502),b=a(42151),r=a(34867),i=a(1588);function s(a){return(0,r.Z)("MuiCircularProgress",a)}(0,i.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var t=a(85893);let u=["className","color","disableShrink","size","style","thickness","value","variant"],d=a=>a,e,f,v,w,x=(0,c.F4)(e||(e=d` 2 0% { 3 transform: rotate(0deg); 4 } 5 6 100% { 7 transform: rotate(360deg); 8 } 9`)),y=(0,c.F4)(f||(f=d` 10 0% { 11 stroke-dasharray: 1px, 200px; 12 stroke-dashoffset: 0; 13 } 14 15 50% { 16 stroke-dasharray: 100px, 200px; 17 stroke-dashoffset: -15px; 18 } 19 20 100% { 21 stroke-dasharray: 100px, 200px; 22 stroke-dashoffset: -125px; 23 } 24`)),z=b=>{let{classes:c,variant:a,color:d,disableShrink:e}=b,f={root:["root",a,`color${(0,p.Z)(d)}`],svg:["svg"],circle:["circle",`circle${(0,p.Z)(a)}`,e&&"circleDisableShrink"]};return(0,o.Z)(f,s,c)},A=(0,b.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver(c,a){let{ownerState:b}=c;return[a.root,a[b.variant],a[`color${(0,p.Z)(b.color)}`]]}})(({ownerState:a,theme:b})=>(0,m.Z)({display:"inline-block"},"determinate"===a.variant&&{transition:b.transitions.create("transform")},"inherit"!==a.color&&{color:(b.vars||b).palette[a.color].main}),({ownerState:a})=>"indeterminate"===a.variant&&(0,c.iv)(v||(v=d` 25 animation: ${0} 1.4s linear infinite; 26 `),x)),B=(0,b.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(b,a)=>a.svg})({display:"block"}),C=(0,b.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver(c,a){let{ownerState:b}=c;return[a.circle,a[`circle${(0,p.Z)(b.variant)}`],b.disableShrink&&a.circleDisableShrink]}})(({ownerState:a,theme:b})=>(0,m.Z)({stroke:"currentColor"},"determinate"===a.variant&&{transition:b.transitions.create("stroke-dashoffset")},"indeterminate"===a.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:a})=>"indeterminate"===a.variant&&!a.disableShrink&&(0,c.iv)(w||(w=d` 27 animation: ${0} 1.4s ease-in-out infinite; 28 `),y)),j=h.forwardRef(function(o,p){let c=(0,q.Z)({props:o,name:"MuiCircularProgress"}),{className:r,color:s="primary",disableShrink:v=!1,size:d=40,style:w,thickness:a=3.6,value:e=0,variant:h="indeterminate"}=c,x=(0,l.Z)(c,u),b=(0,m.Z)({},c,{color:s,disableShrink:v,size:d,thickness:a,value:e,variant:h}),f=z(b),g={},i={},j={};if("determinate"===h){let k=2*Math.PI*((44-a)/2);g.strokeDasharray=k.toFixed(3),j["aria-valuenow"]=Math.round(e),g.strokeDashoffset=`${((100-e)/100*k).toFixed(3)}px`,i.transform="rotate(-90deg)"}return(0,t.jsx)(A,(0,m.Z)({className:(0,n.Z)(f.root,r),style:(0,m.Z)({width:d,height:d},i,w),ownerState:b,ref:p,role:"progressbar"},j,x,{children:(0,t.jsx)(B,{className:f.svg,ownerState:b,viewBox:"22 22 44 44",children:(0,t.jsx)(C,{className:f.circle,style:g,ownerState:b,cx:44,cy:44,r:(44-a)/2,fill:"none",strokeWidth:a})})}))});var D=j},53212:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/migrate",function(){return c(88450)}])},88450:function(e,b,a){"use strict";a.r(b),a.d(b,{"__N_SSP":function(){return r}});var f=a(47568),g=a(828),c=a(34051),h=a.n(c),i=a(85893),j=a(67294),k=a(75554),l=a(26793),d=a(50396),m=a.n(d),n=a(89770),o=a(98456),p=a(76798),q=a(21737),r=!0;
28b.default=function(z){var a=z.baseUrl,d=(0,j.useState)(""),b=d[0],A=d[1],e=(0,j.useState)(""),c=e[0],B=e[1],r=(0,g.Z)((0,l.$)(),2);r[0],r[1];var s=(0,j.useState)(!1),C=s[0],D=s[1],t=(0,j.useState)(!1),E=t[0],F=t[1],u=(0,j.useState)([]),G=u[0],v=u[1],w=(0,j.useState)([]),H=w[0],x=w[1],y=(0,j.useState)(!1),I=y[0],J=y[1];(0,j.useEffect)(function(){if(!b){v([]);return}(0,f.Z)(h().mark(function c(){var d,e;return h().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,d=new n.L(a),c.next=4,d.getInvoicesFor(b);case 4:v((e=c.sent).invoices||[]),c.next=11;break;case 8:c.prev=8,c.t0=c.catch(0),v([]);case 11:case"end":return c.stop()}},c,null,[[0,8]])}))()},[b,v,a]),(0,j.useEffect)(function(){if(!c){x([]);return}(0,f.Z)(h().mark(function b(){var d,e;return h().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.prev=0,d=new n.L(a),b.next=4,d.getInvoicesFor(c);case 4:x((e=b.sent).invoices||[]),b.next=11;break;case 8:b.prev=8,b.t0=b.catch(0),x([]);case 11:case"end":return b.stop()}},b,null,[[0,8]])}))()},[c,x,a]);var K=(0,j.useCallback)(function(){b&&c&&(J(!0),(0,f.Z)(h().mark(function d(){var e,f,i,j;return h().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,e=new n.L(a),d.next=4,e.migrateUser(b,c);case 4:return d.t0=g.Z,d.next=7,Promise.all([e.getInvoicesFor(b),e.getInvoicesFor(c),]);case 7:d.t1=d.sent,i=(f=(0,d.t0)(d.t1,2))[0],j=f[1],v(i.invoices||[]),x(j.invoices||[]),D(!0),d.next=20;break;case 16:d.prev=16,d.t2=d.catch(0),console.info(d.t2),F(!0);case 20:J(!1);case 21:case"end":return d.stop()}},d,null,[[0,16]])}))())},[b,c,a,F,D,v,x,J]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{children:[(0,i.jsx)(k.G,{value:b,onChange:A,hint:"From UUID",smallHint:"From UUID"}),(0,i.jsx)(k.G,{value:c,onChange:B,hint:"Dst UID",smallHint:"Dst UID"}),(0,i.jsxs)("div",{children:[(0,i.jsx)("button",{className:m().button,onClick:K,children:"Migrate"}),I?(0,i.jsx)(o.Z,{}):(0,i.jsx)(i.Fragment,{})]}),(0,i.jsxs)("div",{className:m().invoicesBox,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{style:{color:"white"},children:"User from invoices"}),G.map(function(a){return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{style:{marginTop:"4px"},children:[(0,i.jsx)("a",{className:m().a,href:"https://doclyinvoice.com/v/".concat(a.xid,"?notification=false"),target:"_blank",rel:"noreferrer",children:"https://doclyinvoice.com/v/".concat(a.xid)}),(0,i.jsx)("br",{})]})})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{style:{color:"white"},children:"Destination user invoices"}),H.map(function(a){return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{style:{marginTop:"4px"},children:[(0,i.jsx)("a",{className:m().a,href:"https://doclyinvoice.com/v/".concat(a.xid,"?notification=false"),target:"_blank",rel:"noreferrer",children:"https://doclyinvoice.com/v/".concat(a.xid)}),(0,i.jsx)("br",{})]})})})]})]}),(0,i.jsx)(p.Z,{open:C,autoHideDuration:5e3,onClose:function(){return D(!1)},action:function(){D(!1)},children:(0,i.jsx)(q.Z,{severity:"success",children:"Successfully sent"})}),(0,i.jsx)(p.Z,{open:E,autoHideDuration:5e3,onClose:function(){return F(!1)},action:function(){F(!1)},children:(0,i.jsx)(q.Z,{severity:"error",children:"Failed to sent"})})]})})}}},function(a){a.O(0,[3714,2678,4885,9669,7357,9901,1935,1737,6798,4699,2906,9774,2888,179],function(){var b;return a(a.s=53212)}),_N_E=a.O()}])
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.