PageSourceSearch

https://snippit.tech/_next/static/chunks/pages/account-26cee6ab9ab0f29b.js

js snippit.tech collected 2026-10-02 02:08:51 UTC 16,326 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9d8786ec-de39-4e5e-94f2-9051f1d45ea3",e._sentryDebugIdIdentifier="sentry-dbid-9d8786ec-de39-4e5e-94f2-9051f1d45ea3")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[966],{600682:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account",function(){return t(75282)}])},461878:function(e,n,t){"use strict";t.d(n,{v:function(){return l}});var i=t(785893),r=t(827993),s=t(121485),o=t(827398);function l(e){let{message:n,sx:t}=e;return(0,i.jsxs)(r.Z,{sx:{position:"fixed",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",pointerEvents:"none",zIndex:1,...t},children:[n?(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",sx:{mb:2},children:n}):null,(0,i.jsx)(o.Z,{})]})}},323e3:function(e,n,t){"use strict";t.d(n,{T3:function(){return P},$0:function(){return E}});var i=t(785893),r=t(827993),s=t(898426),o=t(121485),l=t(199294),a=t(414237),d=t(667294),u=t(513715),c=t(675896),p=t(307727),f=t(238444);t(811163);let m=(0,d.createContext)(void 0),x=(0,d.createContext)(void 0),h=e=>{e({type:"TOGGLE_CART"})},y=e=>{e({type:"OPEN_CART"})},v=(e,n)=>{e({type:"ADD_TO_CART",payload:{cartItem:n}})},j=(e,n)=>{e({type:"REMOVE_FROM_CART",payload:{cartItemIndex:n}})},g=(e,n,t)=>{e({type:"UPDATE_CART_ITEM",payload:{cartItemIndex:n,cartItem:t}})},b=e=>{e({type:"CLEAR_CART"})},Z=(e,n)=>{e({type:"SET_CHECKOUT_RESULT",payload:{checkoutResult:n}})},_=e=>{e({type:"CLEAR_CHECKOUT_RESULT"})};var C=()=>{let e=(0,d.useContext)(m),n=(0,d.useContext)(x);if(!e||!n)throw Error("useCart must be used within a CartProvider");return{...e,actions:{toggleCart:()=>h(n),openCart:()=>y(n),addToCart:e=>v(n,e),removeFromCart:e=>j(n,e),updateCartItem:(e,t)=>g(n,e,t),clearCart:()=>b(n),setCheckoutResult:e=>Z(n,e),clearCheckoutResult:()=>_(n)}}},S=()=>{let[e,n]=(0,d.useState)(!1),[t,r]=(0,d.useState)(""),s=(0,d.useRef)(()=>{}),o=null;try{let e=C();o=e.checkoutResult,s.current=e.actions.clearCheckoutResult}catch(e){}let l=(0,d.useCallback)(()=>{s.current()},[]),a=()=>{n(!1),l()};return(0,d.useEffect)(()=>{if(o){let e="";"success"===o?e="Successfully checked out, your cart has been cleared.":"canceled"===o&&(e="Checkout canceled, your cart has been saved."),r(e),n(!0);let t=setTimeout(()=>{n(!1),l()},5e3);return()=>clearTimeout(t)}},[o,l]),(0,i.jsx)(u.Z,{open:e,autoHideDuration:5e3,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"center"},children:(0,i.jsx)(c.Z,{onClose:a,severity:"success"===o?"success":"info",action:(0,i.jsx)(p.Z,{"aria-label":"close",color:"inherit",size:"small",onClick:a,children:(0,i.jsx)(f.Z,{fontSize:"inherit"})}),children:t})})},I=t(125054);let T="130px",w=e=>{let{stickToBottom:n=!0,fixed:t=!1}=e;return(0,i.jsx)(r.Z,{component:"footer",sx:{pt:"20px",pb:"20px",flexShrink:0,textAlign:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',...t?{position:"fixed",bottom:0,left:0,right:0,width:"100%",bgcolor:"background.paper",zIndex:10,mt:0}:{mt:n?"auto":0}},children:(0,i.jsxs)(s.Z,{maxWidth:"md",children:[(0,i.jsx)(r.Z,{component:"img",src:"/ctr-technologies-logo-black.svg",alt:"CTR Technologies",sx:{display:"block",mx:"auto",width:45,maxWidth:45,height:"auto",mb:1.5}}),(0,i.jsxs)(o.Z,{variant:"body1",color:"text.primary",align:"center",children:["Snipp-It is a product of"," ",(0,i.jsx)(l.Z,{href:"https://carterrobinson.substack.com/p/introducing-ctr-technologies?utm_source=spa-footer",target:"_blank",rel:"noopener noreferrer",color:"primary",underline:"always",children:"CTR Technologies, L.L.C."})]}),(0,i.jsxs)(o.Z,{variant:"body1",color:"text.primary",align:"center",children:[(0,i.jsx)(l.Z,{href:"/terms-of-service",children:"Terms of Service"})," - ",(0,i.jsx)(l.Z,{href:"/privacy",children:"Privacy Policy"}),(0,i.jsx)("br",{}),"Made in the Research Triangle of North Carolina"]})]})})},E=e=>{let{children:n,fadeWrapperStyle:t,sx:s,...o}=e;return(0,i.jsx)(I.Im,{fadeTimeInMilliseconds:500,style:{width:"100%",...t},children:(0,i.jsx)(r.Z,{component:"section",sx:{mb:4,...s},...o,children:n})})},P=e=>{let{children:n,fullWidth:t=!1,fixedFooter:o=!1,footerStickToBottom:l=!0}=e,d={flex:o?"0 1 auto":"1 1 auto",minHeight:o?void 0:0,width:"100%",display:"flex",flexDirection:"column",...o?{pb:T}:{}};return(0,i.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,minWidth:0,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:[(0,i.jsx)(a.ZP,{}),t?(0,i.jsx)(r.Z,{component:"main",sx:{...d,py:0,px:0,overflowX:"hidden",maxWidth:"100%"},children:n}):(0,i.jsx)(s.Z,{component:"main",maxWidth:"lg",sx:{...d,py:4,pb:o?T:{xs:2,sm:2}},children:n}),(0,i.jsx)(S,{}),(0,i.jsx)(w,{fixed:o,stickToBottom:l&&!o})]})}},75282:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return X}});var i=t(785893),r=t(121485),s=t(956912),o=t(898426),l=t(827398),a=t(675896),d=t(88100),u=t(323e3),c=t(461878),p=t(667294),f=t(287536),m=t(827993),x=t(430055),h=t(88747),y=t(689621),v=t
1(858202),j=t(78138),g=t(145399),b=t(208506),Z=t(821201),_=t(514959),C=function(){let[e,n]=(0,p.useState)(null);return(0,p.useEffect)(()=>{(async function(){let{countries:e}=await t.e(595).then(t.t.bind(t,921595,19));n(e)})()},[]),e},S=t(82729);function I(){let e=(0,S._)(["\n  query GetIndexedStripeProductsQuery {\n    products: getIndexedProductList {\n      items {\n        id\n        name\n        description\n        images\n        prices {\n          id\n          unitAmount: unit_amount\n          currency\n          recurring {\n            interval\n            intervalCount: interval_count\n          }\n        }\n      }\n    }\n  }\n"]);return I=function(){return e},e}function T(){let e=(0,S._)(["\n  query GetMyProfile {\n    profile: getMyProfile {\n      id\n      email\n      name\n      bio\n      avatar {\n        path\n      }\n      customer: stripeCustomer {\n        id\n        name\n        description\n        address {\n          line1\n          line2\n          city\n          state\n          postal_code\n          country\n        }\n      }\n    }\n  }\n"]);return T=function(){return e},e}function w(){let e=(0,S._)(["\n  mutation UpsertMyProfile($name: String, $bio: String, $avatarId: String) {\n    profile: upsertMyProfile(name: $name, bio: $bio, avatarId: $avatarId) {\n      id\n      email\n      name\n      bio\n      avatar {\n        path\n      }\n      customer: stripeCustomer {\n        id\n        name\n        description\n        address {\n          line1\n          line2\n          city\n          state\n          postal_code\n          country\n        }\n      }\n    }\n  }\n"]);return w=function(){return e},e}function E(){let e=(0,S._)(["\n  mutation UploadAssets($files: [TSFile]!) {\n    uploadAssets(files: $files) {\n      uploadUrl\n      asset {\n        _id\n        _version\n        filename\n      }\n    }\n  }\n"]);return E=function(){return e},e}function P(){let e=(0,S._)(["\n  mutation UpsertMyCustomer($name: String, $description: String, $address: Stripe_CustomerAddressPropertyInput) {\n    customer: upsertMyCustomer(name: $name, description: $description, address: $address) {\n      id\n      name\n      description\n      address {\n        line1\n        line2\n        city\n        state\n        postal_code\n        country\n      }\n    }\n  }\n"]);return P=function(){return e},e}function M(){let e=(0,S._)(["\n  mutation CreateMyCheckoutSession(\n    $redirectUrl: String!\n    $lineItems: [Stripe_CheckoutSessionLineItemsPropertyInput!]!\n    $mode: String\n  ) {\n    session: createMyCheckoutSession(lineItems: $lineItems, redirectUrl: $redirectUrl, mode: $mode) {\n      id\n    }\n  }\n"]);return M=function(){return e},e}function R(){let e=(0,S._)(['\n  query GetMySubscriptionsQuery {\n    subscriptions: getMySubscriptions(\n      expand: ["data.items", "data.plan.product", "data.latest_invoice.payment_intent"]\n    ) {\n      id\n      current_period_end\n      items {\n        data {\n          id\n          price {\n            currency\n            unitAmount: unit_amount\n            product {\n              id\n              name\n              description\n              images\n            }\n            recurring {\n              interval\n            }\n          }\n        }\n      }\n    }\n  }\n']);return R=function(){return e},e}function k(){let e=(0,S._)(["\n  mutation DeleteMySubscription($subscriptionId: String!) {\n    subscription: deleteMySubscription(subscriptionId: $subscriptionId) {\n      id\n      status\n    }\n  }\n"]);return k=function(){return e},e}function A(){let e=(0,S._)(['\n  query GetMyInvoicesQuery {\n    invoices: getMyInvoices(status: "paid") {\n      id\n      total\n      currency\n      invoicePdf: invoice_pdf\n      paid\n      created\n      lines {\n        data {\n          id\n          amount\n          currency\n          description\n          quantity\n        }\n      }\n    }\n  }\n']);return A=function(){return e},e}function $(){let e=(0,S._)(['\n  query GetMyPaymentsQuery {\n    payments: getMyPayments(limit: 50, expand: ["data.invoice"]) {\n      id\n      amount\n      currency\n      created\n      invoice {\n        ... on Stripe_Invoice {\n          id\n          paid\n          invoicePdf: invoice_pdf\n        }\n      }\n    }\n  }\n']);return $=function(){return e},e}let U=e=>"string"==typeof e?e:e.join("");U(I());let W=U(T()),N=U(w()),D=U(E()),L=U(P());U(M()),U(R()),U(k()),U(A()),U($());var O=t(793043);let Q=e=>{let{isSubmitting:n,text:t,...s}=e;return(0,i.jsx)(O.Z,{disabled:n,color:"primary",variant:"contained",...s,children:(0,i.jsxs)(m.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,i.jsx)(r.Z,{children:t}),n&&(0,i.jsx)(l.Z,{size:20,sx:{ml:1}})]})})},F=e=>({loading:!1,error:null,data:null,mutate:async e=>({data:{upsertMyCustomer:{id:"1"}}})}),q=e=>{var n,t,r,s;let{customer:o}=e,[l,{loading:a}]=F(L,{refetchQueries:[W],awaitRefetchQueries:!0}),{register:d,handleSubmit:u,watch:c,reset:Z}=(0,f.cI)();(0,p.useEffect)(()=>{Z(o)},[o,Z]);let _=C(),S=c("address.country",null==o?void 0:null===(n=o.address)||void 0===n?void 0:n.country),I=S&&(null==_?void 0:_.find(e=>e.iso2===S));return(0,i.jsx)(m.Z,{component:"form",onSubmit:u(e=>l({variables:e})),children:(0,i.jsxs)(x.Z,{spacing:3,children:[(0,i.jsx)(h.Z,{...d("id"),label:"ID",fullWidth:!0,disabled:!0,variant:"outlined"}),(0,i.jsx)(h.Z,{...d("name"),label:"Name",fullWidth:!0,disabled:!0,variant:"outlined"}),(0,i.jsxs)(y.Z,{fullWidth:!0,children:[(0,i.jsx)(v.Z,{children:"Country"}),(0,i.jsx)(j.Z,{...d("address.country"),label:"Country",defaultValue:(null==o?void 0:null===(t=o.address)||void 0===t?void 0:t.country)||"",children:null==_?void 0:_.map(e=>{let{name:n,iso2:t,iso3:r}=e;return(0,i.jsx)(g.Z,{value:t,children:n},r)})})]}),(0,i.jsx)(h.Z,{...d("address.line1"),label:"Address Line 1",fullWidth:!0,variant:"outlined"}),(0,i.jsx)(h.Z,{...d("address.line2"),label:"Address Line 2",fullWidth:!0,variant:"outlined"}),(0,i.jsxs)(b.ZP,{container:!0,spacing:2,children:[(0,i.jsx)(b.ZP,{item:!0,xs:12,sm:6,children:(0,i.jsx)(h.Z,{...d("address.city"),label:"City",fullWidth:!0,variant:"outlined"})}),(0,i.jsx)(b.ZP,{item:!0,xs:12,sm:6,children:(0,i.jsxs)(y.Z,{fullWidth:!0,children:[(0,i.jsx)(v.Z,{children:"State"}),(0,i.jsx)(j.Z,{...d("address.state"),label:"State",defaultValue:(null==o?void 0:null===(r=o.address)||void 0===r?void 0:r.state)||"",children:null==I?void 0:null===(s=I.states)||void 0===s?void 0:s.map(e=>{let{name:n,state_code:t}=e;return(0,i.jsx)(g.Z,{value:t,children:n},t)})})]})})]}),(0,i.jsx)(h.Z,{...d("address.postal_code"),label:"Postal Code",fullWidth:!0,variant:"outlined",sx:{width:"50%"}}),(0,i.jsx)(Q,{text:"Update",isSubmitting:a,type:"submit"})]})})},z=e=>{var n,t;let{profile:s}=e,[o,{data:l}]=F(D),[a,{loading:d}]=F(N,{refetchQueries:[W],awaitRefetchQueries:!0}),[{progress:u},c,f]=function(e,n){let[t,i]=(0,p.useState)(void 0),[r,s]=(0,p.useState)(void 0),[o,l]=(0,p.useState)(null),[a,d]=(0,p.useState)(null),[u,c]=(0,p.useState)(!1);return(0,p.useEffect)(()=>{void 0!==t&&void 0!==r&&function(){if(!t||!r)return;c(!0),d(null);let e=new XMLHttpRequest;l(0),e.upload.onprogress=e=>{e.lengthComputable&&l(e.loaded/e.total)},e.onreadystatechange=()=>{4===e.readyState&&(200===e.status?l(1):d(e.statusText),i(void 0),s(void 0),c(!1),setTimeout(()=>l(null),1e3))}
1,e.open("PUT",t),e.send(r)}()},[t,r]),[{error:a,progress:o,isLoading:u},i,s]}(),[h,y]=(0,p.useState)(null),[v,j]=(0,p.useState)(null),[g,b]=(0,p.useState)(!1);(0,p.useEffect)(()=>{h&&!g&&(b(!0),j(0),o({variables:{files:[{name:h.name,type:h.type}]}}))},[h,g,o]),(0,p.useEffect)(()=>{var e;h&&(null==l?void 0:null===(e=l.uploadAssets)||void 0===e?void 0:e[0])&&(c(l.uploadAssets[0].uploadUrl),f(h),j(.25))},[h,l,c,f]),(0,p.useEffect)(()=>{null!==u&&j(Math.min(u-.25,.25))},[u]),(0,p.useEffect)(()=>{var e;1===u&&(null==l?void 0:null===(e=l.uploadAssets)||void 0===e?void 0:e[0])&&(a({variables:{avatarId:l.uploadAssets[0].asset._id}}),j(1))},[u,l,a]),(0,p.useEffect)(()=>{!1===d&&(y(null),b(!1),j(null))},[d]);let C=async e=>{y(e.target.files[0])};return(0,i.jsxs)(x.Z,{spacing:2,alignItems:"center",children:[(0,i.jsx)(r.Z,{variant:"h5",children:"Avatar"}),(0,i.jsx)(m.Z,{sx:{textAlign:"center"},children:(null==s?void 0:s.avatar)?(0,i.jsx)(Z.Z,{src:(n=s.avatar,t={h:400,w:400},"https://images.takeshape.io/".concat(n.path,"?").concat(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).map(n=>n+"="+e[n]).join("&")}(t))),sx:{width:100,height:100,objectFit:"cover"}}):(0,i.jsx)(Z.Z,{sx:{width:100,height:100}})}),(0,i.jsxs)(m.Z,{component:"form",children:[(0,i.jsx)("input",{onChange:C,type:"file",disabled:g,accept:"image/*",style:{marginBottom:8}}),null!==v&&(0,i.jsxs)(m.Z,{sx:{width:"100%"},children:[(0,i.jsx)(_.Z,{variant:"determinate",value:100*v,sx:{height:8,borderRadius:4}}),(0,i.jsxs)(r.Z,{variant:"body2",color:"text.secondary",align:"center",children:[Math.round(100*v),"%"]})]})]})]})},B=e=>{let{profile:n}=e,[t,{loading:r}]=F(N,{refetchQueries:[W],awaitRefetchQueries:!0}),{register:s,handleSubmit:o,reset:l}=(0,f.cI)();return(0,p.useEffect)(()=>
1{l(n)},[n,l]),(0,i.jsx)(m.Z,{component:"form",onSubmit:o(e=>t({variables:e})),children:(0,i.jsxs)(x.Z,{spacing:3,children:[(0,i.jsx)(h.Z,{...s("firstName"),label:"First Name",fullWidth:!0,variant:"outlined"}),(0,i.jsx)(h.Z,{...s("lastName"),label:"Last Name",fullWidth:!0,variant:"outlined"}),(0,i.jsx)(h.Z,{...s("bio"),label:"Bio",fullWidth:!0,multiline:!0,rows:4,variant:"outlined"}),(0,i.jsx)(Q,{text:"Update",isSubmitting:r,type:"submit"})]})})},G=e=>{let{profile:n}=e;return(0,i.jsxs)(b.ZP,{container:!0,spacing:4,children:[(0,i.jsx)(b.ZP,{item:!0,xs:12,md:6,children:(0,i.jsx)(B,{profile:n})}),(0,i.jsx)(b.ZP,{item:!0,xs:12,md:6,children:(0,i.jsx)(z,{profile:n})})]})};var H=t(125054),X=(0,d.u3)(function(){var e;let n={profile:{id:"1"}},t=void 0;return(0,i.jsxs)(u.T3,{children:[(0,i.jsxs)(H.Im,{fadeTimeInMilliseconds:500,children:[(0,i.jsx)(r.Z,{variant:"h1",gutterBottom:!0,children:"Snipps"}),(0,i.jsx)(s.Z,{sx:{mb:3}})]}),(0,i.jsxs)(u.$0,{children:[(0,i.jsx)(r.Z,{variant:"h2",gutterBottom:!0,children:"Profile"}),(0,i.jsx)(s.Z,{sx:{mb:2}}),!n&&(0,i.jsx)(o.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,i.jsx)(l.Z,{})}),n&&(0,i.jsx)(G,{profile:n.profile})]}),(0,i.jsxs)(u.$0,{children:[(0,i.jsx)(r.Z,{variant:"h2",gutterBottom:!0,children:"Stripe Customer"}),(0,i.jsx)(s.Z,{sx:{mb:2}}),!n&&(0,i.jsx)(o.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,i.jsx)(l.Z,{})}),n&&(0,i.jsx)(q,{customer:null===(e=n.profile)||void 0===e?void 0:e.customer})]}),t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.Z,{severity:"error",sx:{mb:2},children:"Error loading profile"}),(0,i.jsx)("pre",{style:{color:"red"},children:JSON.stringify(t,null,2)})]}):null]})},{loginOptions:{authorizationParams:{connection:"google-oauth2"}},returnTo:()=>window.location.pathname,onRedirecting:()=>(0,i.jsx)(c.v,{})})}},function(e){e.O(0,[161,356,536,888,774,179],function(){return e(e.s=600682)}),_N_E=e.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.