PageSourceSearch

https://www.teliaplay.se/oneweb/search-view.61813ee4.js

js teliaplay.se collected 2026-10-01 15:58:07 UTC 10,242 bytes, 17 lines download raw bytes

1"use strict";(globalThis.webpackChunk_telia_company_tv_web_logged_in=globalThis.webpackChunk_telia_company_tv_web_logged_in||[]).push([[767],{"./src/search/views/SearchView/SearchView.tsx"(e,t,r){r.r(t),r.d(t,{default:()=>J});var s=r("../../../node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]_react-_23af7fe1a84405345a895683eefe299d/node_modules/@apollo/client/core/networkStatus.js"),o=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"),n=r("./src/core/router/hooks/useIsModalRouteOpen/index.ts"),c=r("./src/page/components/Panels/index.tsx"),i=r("./src/shared/components/custom/DecoratedHelmet.tsx"),d=r("./src/shared/components/custom/FetchMoreAnchor/index.ts"),l=r("./src/shared/components/custom/Navbar/index.ts"),u=r("./src/shared/components/ui/Navbar/index.ts"),p=r("./src/shared/hooks/useTrackPageViewEvent.ts"),m=r("./src/shared/utils/isDefined.ts"),h=r("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]__@typ_208c15ae729122632d926888ccf5cf22/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs"),_=r("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),g=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"),f=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"),x=r("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),y=r("./src/shared/components/custom/MarginContainer/MarginContainer.tsx"),S=r("./src/shared/utils/breakpoints/mq.ts"),b=r("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_f734d82c55a697af95f95e7d1443e8d9/node_modules/@telia-company/tv.one-design-system-web/lib/index.js"),v=r("./src/search/views/SearchView/providers/SearchProvider/index.ts"),C=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 A=(0,f.A)("div",{target:"e8fyren5"})("flex:1;background-color:",b.ue.color.background.tertiary,";"),k=(0,f.A)(y._9,{target:"e8fyren4"})("display:flex;align-items:center;padding:16px 0;",S.mq.M`
2    padding: 36px 0;
3  `,";"),P=(0,f.A)(b.PA,{target:"e8fyren3"})("height:32px;width:32px;",S.mq.M`
4    height: 40px;
5    width: 40px;
6  `," path{stroke:",b.ue.color.text.primary,";}"),w=(0,f.A)("div",{target:"e8fyren2"})({name:"wbox5",styles:"position:relative;flex:1 1 0;margin-left:8px"}),E=(0,f.A)("input",{target:"e8fyren1"})("border:0;padding:0;margin:0;background-color:transparent;width:100%;color:",b.ue.color.text.primary,";caret-color:",b.ue.color.text.primary,";",b.ue.typography.textPrimary,";"),I=(0,f.A)("span",{target:"e8fyren0"})("color:",b.ue.color.text.secondary,";pointer-events:none;position:absolute;left:0;top:50%;transform:translateY(-50%);",({text:e,textSm:t})=>(0,x.css)(b.ue.typography.textPrimary," &:after{content:'",t,"';}",S.mq.M`
7        &:after {
8          content: "${e}";
9        }
10      `,";"),";"),R=({className:e})=>{const t=(0,_.useRef)(null),{searchQueryString:r,setSearchQuery:s}=(0,v.$A)(),[o,a]=(0,_.useState)(r),{t:n}=(0,g.Bd)(),c=(0,_.useCallback)(e=>{a(e.target.value),s(e.target.value)},[s]);return(0,C.Y)(A,{className:e,children:(0,C.FD)(k,{children:[(0,C.Y)(P,{"aria-hidden":!0,name:"Search"}),(0,C.FD)(w,{children:[(0,C.Y)(E,{"aria-label":n("SEARCH_INPUT_PLACEHOLDER"),autoCapitalize:"off",autoCorrect:"false",autoFocus:!0,"data-testid":"search-input",onChange:c,ref:t,spell
10Check:!1,type:"text",value:o}),!o&&(0,C.Y)(I,{text:n("SEARCH_INPUT_PLACEHOLDER"),textSm:n("SEARCH")})]})]})})};var T=r("./src/core/analytics/tracker.ts"),Y=r("./src/page/components/Panels/PosterListPanel/components/index.ts"),N=r("./src/page/providers/AssetTrackingProvider.tsx"),H=r("./src/shared/components/custom/Announcement/Context/AnnouncementContext.tsx"),j=r("./src/shared/components/ui/Switch/Switch.tsx");const O=(0,f.A)("div",{target:"ej6q5ot1"})("display:flex;flex:1;flex-direction:column-reverse;align-items:center;justify-content:center;",S.mq.L`
11    flex-direction: row;
12    justify-content: flex-start;
13  `,";"),L=(0,f.A)(j.d,{target:"ej6q5ot0"})("margin-left:auto;margin-bottom:24px;",S.mq.L`
14    margin-bottom: 0;
15  `,";"),M=({className:e})=>{const{t:t}=(0,g.Bd)(),{setShowPurchasableContent:r,showPurchasableContent:s}=(0,v.$A)(),o=(0,_.useId)();return(0,C.Y)(O,{className:e,children:(0,C.Y)(L,{id:o,label:t("SHOW_PURCHASABLE_CONTENT"),onValueChange:r,value:s})})};var q=r("./src/page/components/Panels/PosterListPanel/components/LayoutGrid/utils/index.ts"),F=r("./src/shared/hooks/useWindowSize.ts"),D=r("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/Config.js");const B=(0,f.A)("div",{target:"eoxtc0w0"})("color:",b.ue.color.text.secondary,";strong{font-weight:normal;color:",b.ue.color.text.primary,";}",b.ue.typography.textPrimary,";"),Q=({className:e})=>{const{t:t}=(0,g.Bd)(),[r,s]=(0,_.useState)(!1);(0,_.useEffect)(()=>{const e=setTimeout(()=>s(!0),500);return()=>{clearTimeout(e)}},[]);const{searchQueryString:o}=(0,v.$A)();return(0,C.Y)(B,{"aria-live":"polite",className:e,"data-testid":"search-no-data-found",role:"status",children:r?(0,C.Y)(g.x6,{i18nKey:"SEARCH_NO_HITS_FOR_QUERY",t:t,tOptions:{interpolation:{escapeValue:!1}},values:{query:o}}):null})};const $=(0,x.css)("margin-top:24px;",S.mq.M`
16    margin-top: 32px;
17  `,";"),V=(0,f.A)("div",{target:"e10k6l02"})($,";"),U=(0,f.A)(M,{target:"e10k6l01"})({name:"18uqayh",styles:"margin-bottom:16px"}),z=(0,f.A)("div",{target:"e10k6l00"})($,";"),G=()=>{const{searchQueryString:e,setSearchNumberOfItems:t,showPurchasableContent:r,storePreviousSearchItem:s}=(0,v.$A)(),{announce:n}=(0,H.b)(),{t:c}=(0,g.Bd)(),i=(()=>{const{searchQueryString:e,showPurchasableContent:t}=(0,v.$A)(),r=(0,F.l)(),s=4*(0,q.o5)(r.width);return{includeOutOfEngagement:!!t||("all"===D.Config.get("app/search/hiddenPurchasableContent")?t:void 0),limit:s,offset:0,q:e,searchRentalsType:t?void 0:"rentals"===D.Config.get("app/search/hiddenPurchasableContent")?a.QX$.None:void 0,skip:!e}})(),{data:l,fetchMore:u,loading:p}=(0,o.I)(a.g7L,{skip:!e,variables:i}),h=l?.search2?.pageInfo.totalCount;(0,_.useEffect)(()=>{e&&l&&!p&&(0,m.O)(h)&&(T.F.trackSearchResult({search_filter:r?"":"hide purchasable content",search_number_of_items:h,search_term:e}),t(h))},[l,h,p,e,t,r]);const f=l?.search2?.posters||[],x=!p&&!f.length&&!!e,S=(0,_.useCallback)(()=>{u&&f.length&&u({variables:{limit:i.limit,offset:f.length,q:e}})},[u,e,f.length,i.limit]),b=(0,_.useCallback)(t=>()=>{s({id:t.id,term:e})},[e,s]),A=1===h?c("ACCESSIBILITY_SEARCH_HITS_SINGULAR",{SEARCH_HITS:1}):"",k=h&&h>1?c("ACCESSIBILITY_SEARCH_HITS_PLURAL",{SEARCH_HITS:h}):"",P=c("ACCESSIBILITY_SEARCH_MESSAGE",{SEARCH_HITS:A||k,SEARCH_TERM:e});return(0,_.useEffect)(()=>{if((A||k)&&P){const e=setTimeout(()=>n(P),900);return()=>{clearTimeout(e)}}},[n,k,A,P]),(0,C.FD)(N.N,{skipTracking:!1,children:[(0,C.Y)(y._9,{children:(0,C.FD)(V,{children:[e&&(0,C.Y)(U,{}),x&&(0,C.Y)(Q,{})]})}),f.length?(0,C.FD)(z,{children:[(0,C.Y)(Y.D6,{items:f,onClickItem:b,posterOrientation:a.mjg.Landscape}),(0,C.Y)(d.P,{hasNextPage:!!l?.search2?.pageInfo?.hasNextPage,loading:p,onFetchMore:S,threshold:"30%"})]}):null]})},J=(0,v.ey)(()=>{const{t:e}=(0,g.Bd)(),{isModalRouteOpen:t}=(0,n.u)(),{previousSearchPosterIds:r,searchQueryString:f}=(0,v.$A)();(0,p.z)({id:"search"}),(0,l.st)({addOffsetTop:!0,solidBackground:!0});const x=f?"":"pre-search",{data:y,fetchMore:S,networkStatus:b}=(0,o.I)(a.$7K,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,returnPartialData:!0,skip:!x,variables:{id:x,previousSearchPosterIds:r}}),A=s.p.fetchMore===b,k=y?.page,P=k?.pagePanels?.panels?.filter(m.O),{hasNextPage:w,nextPageOffset:E}=k?.pagePanels?.pageInfo||{};(0,_.useEffect)(()=>{f||scrollTo({top:0})},[f]);const I=(0,_.useCallback)(()=>{S({variables:{id:x,pagePanelsOffset:E}})},[x,S,E]);return(0,C.FD)("div",{"data-testid":"search-view",children:[(0,C.Y)(i.J,{title:e("SEARCH")}),(0,C.FD)(l.fL,{children:[(0,C.Y)(h.bL,{children:(0,C.Y)("h1",{children:e("SEARCH")})}),(0,C.Y)(u.F.SubRow,{disableGutter:!0,children:(0,C.Y)(R,{})})]}),f&&(0,C.Y)(G,{}),(0,C.Y)(c.Q,{data:P,skipTracking:t}),(0,C.Y)(d.P,{hasNextPage:w,loading:A,onFetchMore:I,threshold:"40%"})]})})},"./src/shared/components/custom/FetchMoreAnchor/index.ts"(e,t,r){r.d(t,{P:()=>n});var s=r("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),o=r("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-intersection-observer/dist/index.mjs"),a=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 n=({containerRef:e,hasNextPage:t,loading:r,loadingComponent:n,onFetchMore:c,threshold:i="0%"})=>{const[d,l]=(0,o.Wx)({root:e?.current,rootMargin:i});return(0,s.useEffect)(()=>{l&&t&&!r&&c()},[t,l,r,c]),t?r?n||null:(0,a.Y)("div",{"data-testid":"fetch-more-anchor",ref:d}):null}},"./src/shared/hooks/useTrackPageViewEvent.ts"(e,t,r){r.d(t,{z:()=>n});var s=r("./src/core/analytics/tracker.ts"),o=r("./src/core/router/hooks/useIsModalRouteOpen/index.ts"),a=r("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js");const n=(e,t)=>{const{isModalRouteOpen:r}=(0,o.u)(),n=(0,a.useRef)("");(0,a.useLayoutEffect)(()=>{const o=e&&n.current===JSON.stringify(e);r||o||t||!e||(s.F.trackPage({page_name:e,page_variant:"page"}),n.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.