PageSourceSearch

https://www.teliaplay.se/oneweb/profiles-edit-view.85700e4f.js

js teliaplay.se collected 2026-10-01 15:57:40 UTC 10,661 bytes, 19 lines download raw bytes

1"use strict";(globalThis.webpackChunk_telia_company_tv_web_logged_in=globalThis.webpackChunk_telia_company_tv_web_logged_in||[]).push([[24],{"./src/profiles/components/Avatar/index.ts"(e,t,r){r.d(t,{e:()=>s.e});var s=r("./src/profiles/components/Avatar/Avatar.tsx")},"./src/profiles/components/AvatarSelector/index.ts"(e,t,r){r.d(t,{p:()=>g});var s=r("../../../node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]_react-_23af7fe1a84405345a895683eefe299d/node_modules/@apollo/client/react/hooks/useQuery.js"),a=r("./src/codegen/graphql.ts"),o=r("./src/profiles/hooks/useProfileSupport.ts"),i=r("./src/profiles/views/styles.ts"),n=r("./src/shared/components/ui/Button/index.ts"),d=r("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),l=r("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/react-i18next/dist/es/index.js"),c=r("./src/profiles/components/Avatar/index.ts"),p=r("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_support_a0dcb4b0ae680db98626d6fd11a2b9d9/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js"),m=r("./src/profiles/components/Avatar/Avatar.styles.ts"),u=r("./src/shared/components/custom/MarginContainer/index.ts"),_=r("./src/shared/constants/zindex.ts"),f=r("./src/shared/utils/breakpoints/mq.ts");const h=(0,p.A)(u._,{target:"eyzrmiz2"})({name:"1bqvcm9",styles:"display:flex;justify-content:center;flex-direction:column;align-items:center"}),E=(0,p.A)("button",{target:"eyzrmiz1"})("z-index:",_.M.PROFILES.PROFILE_PIC,";position:relative;background-color:transparent;width:96px;height:96px;padding:0;border:none;transition:transform 0.2s;:hover,:focus{transform:scale(1.1);}",f.mq.S`
2      width: 136px;
3      height: 136px;
4    `," ",f.mq.M`
5      width: 152px;
6      height: 152px;
7    `," ",m.wU,"{width:100%;height:100%;}"),x=(0,p.A)("ul",{target:"eyzrmiz0"})("display:grid;gap:24px 16px;max-width:100%;grid-template-columns:repeat(auto-fill, minmax(96px, 1fr));margin-top:24px;list-style:none;",f.mq.S`
8    gap: 24px;
9    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
10  `," ",f.mq.M`
11    gap: 24px;
12    margin-top: 48px;
13    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
14  `," ",f.mq.L`
15  grid-template-columns: repeat(5, 152px);
16  `,";");var v=r("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const g=({onAbort:e,onSave:t,previousAvatarId:r})=>{const{t:p}=(0,l.Bd)(),{pageMargin:m}=(0,o.u)(),{data:u}=(0,s.I)(a.n$r),_=(0,d.useCallback)(r=>{t({selectedAvatarId:r}),e()},[e,t]);if(!u)return null;const f=u.uiResources.profile.avatars;return(0,v.FD)(h,{children:[(0,v.Y)(i.A1,{children:p("PROFILES_SELECT_AVATAR")}),f&&(0,v.Y)(x,{role:"list",children:f.map(e=>(0,v.Y)("li",{children:(0,v.Y)(E,{"aria-current":e.id===r,"aria-label":e.altText,onClick:()=>_(e.id),children:(0,v.Y)(c.e,{imageSrc:e.square.source,isSelected:e.id===r,variant:"picker"})})},e.id))}),(0,v.Y)(i.NP,{margin:m,children:(0,v.Y)(n.$,{"data-testid":"abort-select-profile-button",onClick:e,type:"button",variant:"secondary",children:p("CANCEL")})})]})}},"./src/profiles/components/Buttons/EditAvatarButton.tsx"(e,t,r){r.d(t,{w:()=>l});var s=r("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),a=r("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/react-i18next/dist/es/index.js"),o=r("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-router/dist/development/chunk-62JRHF6Z.mjs"),i=r("./src/profiles/components/Avatar/index.ts"),n=r("./src/profiles/components/Buttons/Buttons.styles.ts"),d=r("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const l=({altText:e,href:t,imageSrc:r,isCurrent:l,onClick:c})=>{const{t:p}=(0,a.Bd)(),m=(0,s.useId)();return(0,d.FD)(n.D,{"aria-describedby":m,"aria-label":p("PROFILES_SELECT_AVATAR"),as:o.N_,"data-testid":"edit-avatar-button",href:t,onClick:c,shouldHover:!0,children:[(0,d.Y)(i.e,{imageSrc:r,isSelected:l,variant:"editAvatar"}),(0,d.Y)("span",{hidden:!0,id:m,children:e})]})}},"./src/profiles/views/ProfileEditView/ProfileEditView.tsx"(e,t,r){r.r(t),r.d(t,{default:()=>P});var s=r("../../../node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]_react-_23af7fe1a84405345a895683eefe299d/node_modules/@apollo/client/react/hooks/useQuery.js"),a=r("./src/codegen/graphql.ts"),o=r("./src/profiles/components/Buttons/EditAvatarButton.tsx"),i=r("./src/profiles/providers/UserProvider/UserProvider.tsx"),n=r("./src/shared/components/custom/DecoratedHelmet.tsx"),d=r("./src/shared/components/custom/FadeContainer/index.ts"),l=r("./src/shared/components/custom/Navbar/index.ts"),c=r("./src/shared/components/ui/Modal/index.ts"),p=r("./src/shared/errors/InvalidInputError.ts"),m=r("./src/shared/hooks/useTrackPageViewEvent.ts"),u=r("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_f734d82c55a697af95f95e7d1443e8d9/node_modules/@telia-company/tv.one-design-system-web/lib/index.js"),_=r("../../../node_modules/.pnpm/[email protected][email protected]/node_modules/i18next/dist/esm/i18next.js"),f=r("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),h=r("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-router/dist/development/chunk-62JRHF6Z.mjs"),E=r("./src/profiles/components/AvatarSelector/index.ts"),x=r("./src/profiles/hooks/useProfileSupport.ts"),v=r("./src/profiles/views/constants.tsx"),g=r("./src/profiles/views/styles.ts"),b=r("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_support_a0dcb4b0ae680db98626d6fd11a2b9d9/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js"),y=r("./src/shared/utils/breakpoints/mq.ts");const I=(0,b.A)("div",{target:"ec4m05o1"})("width:100%;",y.mq.S`
17    margin: 0 auto;
18    max-width: 416px;
19  `,";"),S=(0,b.A)(g.OV,{target:"ec4m05o0"})({name:"yz1nei",styles:"margin-top:16px"});var F=r("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const P=()=>{const{profileId:e}=(0,h.g)(),t=(0,f.useRef)(null),[r,b]=(0,f.useState)(),[y,P]=(0,f.useState)(),[R,L]=(0,f.useState)(),[w,A]=(0,f.useState)(),[O,C]=(0,f.useState)(!1),[k,T]=(0,f.useState)(!1),[j,D]=(0,f.useState)(!1),{deleteProfile:Y,isChildProfile:q,profiles:M,updateProfile:N}=(0,i.u)(),z=M?.find(({id:t})=>t===e),{data:V}=(0,s.I)(a.n$r),{pageMargin:B}=(0,x.u)(),[U,H]=(0,f.useState)(!1);
19if((0,l.st)({addOffsetTop:!0,showMenuItems:!1,solidBackground:!0}),!e)throw new p.o("ProfileEditView","Missing profileId");(0,m.z)((0,f.useMemo)(()=>({id:"profiles_edit",params:{profileId:e}}),[e])),(0,f.useEffect)(()=>{z&&(b(z.alias),P(z.avatar.id),L(z.avatar.square.source),A(z.avatar.altText))},[z]);const J=(0,f.useCallback)(t=>{t.preventDefault(),r&&y?(N({alias:r,avatarId:y,id:e}),C(!0)):H(!0)},[r,y,e,N]),Q=(0,f.useCallback)(()=>{Y({id:e}),C(!0)},[Y,e]),Z=()=>T(!1);if(O)return(0,F.Y)(h.C5,{to:"/profiles/edit"});const $=z?.isCurrent,K="default"===e,G=!$&&!K,W=t.current?.clientHeight||0;return(0,F.FD)(d.y,{"data-testid":"profiles-edit-view",children:[(0,F.Y)(n.J,{title:(0,_.t)("PROFILES_EDIT_PROFILE")}),!j&&(0,F.Y)(F.FK,{children:(0,F.FD)(g.Rx,{bottomMargin:W,children:[(0,F.Y)(g.A1,{children:q?(0,_.t)("EDIT_KIDS_PROFILE"):(0,_.t)("PROFILES_EDIT_PROFILE")}),(0,F.FD)(I,{children:[(0,F.Y)(g.wU,{children:(0,F.Y)(o.w,{altText:w,imageSrc:R,isCurrent:!1,onClick:()=>D(!0)})}),(0,F.FD)("form",{"data-testid":"profile-edit-form",children:[(0,F.Y)(g.sQ,{autoComplete:"name",characterCount:r?.length,"data-testid":"profile-alias-input",hasError:U,id:"profile-alias",label:(0,_.t)("PROFILES_PROFILE_NAME","Profilnamn"),maxCharacterLength:v.j,name:(0,_.t)("PROFILES_PROFILE_NAME","Profilnamn"),onChange:e=>U?H(!1):b(e.target.value.slice(0,v.j)),showEditIcon:0===r?.length,type:"text",value:r}),U&&(0,F.FD)(g.df,{"aria-live":"polite",role:"alert",children:[(0,F.Y)(g.Zi,{"aria-hidden":"true",color:u.ue.color.text.error,name:"WarningFill"}),(0,F.Y)(g.jQ,{children:(0,_.t)("PROFILES_INPUT_ERROR")})]}),(0,F.FD)(g.iN,{margin:B,ref:t,children:[(0,F.Y)(g.OV,{"aria-disabled":!r,"data-testid":"update-profile-submit-button",onClick:J,type:"submit",variant:"primary",children:(0,_.t)("SAVE")}),(0,F.Y)(g.OV,{"data-testid":"abort-update-profile-button",onClick:()=>C(!0),type:"button",variant:"secondary",children:(0,_.t)("CANCEL")}),G?(0,F.Y)(S,{"data-testid":"delete-profile-button",onClick:()=>T(!0),type:"button",variant:"ghost",children:(0,_.t)("DELETE_PROFILE")}):(0,F.Y)(g.D7,{children:K?(0,_.t)("PROFILES_INFO_DELETE_DEFAULT"):(0,_.t)("PROFILES_INFO_DELETE_CURRENT")})]})]})]})]})}),j&&(0,F.Y)(E.p,{onAbort:()=>D(!1),onSave:({selectedAvatarId:e})=>{P(e),L(V?.uiResources.profile.avatars.find(({id:t})=>t===e)?.square.source),A(V?.uiResources.profile.avatars.find(({id:t})=>t===e)?.altText)},previousAvatarId:y}),k&&(0,F.FD)(c.aF,{actions:[{disabled:!1,label:(0,_.t)("CANCEL"),onClick:Z,variant:"secondary"},{"data-testid":"delete-profile-confirm-button",disabled:!1,label:(0,_.t)("PROFILES_DELETE_PROFILE"),onClick:Q,variant:"primary"}],onHide:Z,overlayEventTrackingData:{overlay_title:(0,_.t)("PROFILES_DELETE_PROFILE")},title:(0,_.t)("PROFILES_DELETE_PROFILE"),visible:!0,children:[(0,_.t)("PROFILES_DELETE_PROFILE_DESCRIPTION",{alias:r})," ",(0,_.t)("PROFILES_DELETE_PROFILE_MESSAGE")]})]})}},"./src/profiles/views/constants.tsx"(e,t,r){r.d(t,{j:()=>s});const s=14},"./src/shared/hooks/useTrackPageViewEvent.ts"(e,t,r){r.d(t,{z:()=>i});var s=r("./src/core/analytics/tracker.ts"),a=r("./src/core/router/hooks/useIsModalRouteOpen/index.ts"),o=r("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js");const i=(e,t)=>{const{isModalRouteOpen:r}=(0,a.u)(),i=(0,o.useRef)("");(0,o.useLayoutEffect)(()=>{const a=e&&i.current===JSON.stringify(e);r||a||t||!e||(s.F.trackPage({page_name:e,page_variant:"page"}),i.current=JSON.stringify(e))},[r,e,t])}}}]);

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.