1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AddResourceToFolder-kasaoCYV.js","assets/constants-RhVSlIKL.js","assets/useQuery-BXsv_icE.js","assets/ToastContext-DZ84Y8eE.js","assets/runtime-C9sYHesu.js","assets/dist-jtK7tORL.js","assets/Text-00V1OU2_.js","assets/Button-DdWSmrnS.js","assets/CloseLine-D0Xhq-r2.js","assets/Icon-DMT7yY-i.js","assets/FolderSelect-CTUEMeBp.js","assets/form-Co1ZVZvX.js","assets/typeahead-CceSPoKZ.js","assets/equal-qyiaYhkl.js","assets/render-strategy-BTDd8ui4.js","assets/collapsible-content-CljdguBN.js","assets/mutation-observer-jSl40VVf.js","assets/number-GGZ5lItE.js","assets/chunk-QZ7TP4HQ-BPtzNgFj.js","assets/useMutation-CtNdBlp9.js","assets/preventUnhandledRejection-hYSwgEwf.js","assets/ArrowRightShortLine-DB2dVp1q.js","assets/HeartFill-c5IfZwpB.js","assets/folderQueries-ClXsKNIx.js","assets/Dialog-CapvHiZ8.js","assets/MessageBox-CiOBKzIH.js","assets/AuthenticationContext-jYLYg4ov.js","assets/authHelpers-CIEzjpgZ.js","assets/HeartLine-BDtJ5egi.js","assets/InformationLine-BAi538OJ.js","assets/routeHelpers-C3glI4Eo.js"])))=>i.map(i=>d[i]); 2(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`ndla-frontend@5177c0d`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`2bcde118-bb08-4127-a3ff-cc66ab6a33e0`,e._sentryDebugIdIdentifier=`sentry-dbid-2bcde118-bb08-4127-a3ff-cc66ab6a33e0`)}catch{}})();import{E as e,F as t,_t as n,st as r}from"./constants-RhVSlIKL.js";import{Ut as i,X as a,lt as o,t as s}from"./useQuery-BXsv_icE.js";import{f as c,p as l}from"./transform-BmTEwbLH.js";import{t as u}from"./CheckLine-C0IER7_w.js";import{n as d,t as f}from"./Text-00V1OU2_.js";import{n as p,t as ee}from"./Button-DdWSmrnS.js";import{t as m}from"./Image-D5eKofH7.js";import{a as te,c as ne,o as re,r as ie,s as ae}from"./Dialog-CapvHiZ8.js";import{It as h}from"./authHelpers-CIEzjpgZ.js";import{t as g}from"./MessageBox-CiOBKzIH.js";import{t as _}from"./SafeLinkButton-DDp8cH7E.js";import{t as v}from"./AuthenticationContext-jYLYg4ov.js";import{t as y}from"./ExternalLinkLine-BMfQ_TPu.js";import{t as oe}from"./FileCopyLine-CquZHzaF.js";import{t as se}from"./ListResource-fMRTbbFc.js";import{t as ce}from"./DialogCloseButton-3pAvlTyH.js";import{t as le}from"./LoginModalContent-BpjzP10C.js";import{a as ue,i as de,o as b,r as x,s as fe,t as S}from"./src-DtFIPvu9.js";import{i as pe,s as me}from"./folderQueries-ClXsKNIx.js";import{t as he}from"./FavoriteButton-Ds3vKTw_.js";var C={video:`MovingImage`,image:`Image`,audio:`Sound`,podcast:`Sound`,text:`Text`,h5p:`InteractiveResource`},w=e=>{let t=e?C[e]:null;return t?`http://purl.org/dc/dcmitype/${t}`:null},T={author:`author`,copyrightHolder:`copyrightHolder`,contributor:`contributor`,title:`title`,other:`other`,otherWithoutDescription:`otherWithoutDescription`},E=n(r(),1),D=e(),ge=(0,E.lazy)(()=>i(()=>import(`./AddResourceToFolder-kasaoCYV.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]))),O=({resource:e,children:t,defaultOpenFolder:n})=>{let[r,i]=(0,E.useState)(!1),{t:o}=a(),{authenticated:c}=(0,E.useContext)(v),{data:l,loading:u}=s(pe,{variables:{resource:e},skip:!e||!r}),d=(0,E.useCallback)(()=>i(!1),[]);return(0,D.jsxs)(re,{open:r,onOpenChange:e=>i(e.open),children:[(0,D.jsx)(ne,{asChild:!0,children:t}),c?(0,D.jsxs)(ie,{children:[(0,D.jsxs)(te,{children:[(0,D.jsx)(ae,{children:o(`myNdla.resource.addToMyNdla`)}),(0,D.jsx)(ce,{})]}),(0,D.jsx)(E.Suspense,{children:(0,D.jsx)(ge,{onClose:d,resource:e,defaultOpenFolder:n,type:`resource`})})]}):(0,D.jsx)(le,{title:o(`myNdla.myPage.loginResourcePitch`),content:!!e&&(0,D.jsx)(se,{nonInteractive:!0,isLoading:u,id:e.id.toString(),link:e.path,title:l?.myNdlaResourceMeta?.title??``,resourceImage:{src:l?.myNdlaResourceMeta?.metaImage?.url,alt:l?.myNdlaResourceMeta?.metaImage?.alt??``},traits:l?.myNdlaResourceMeta?.__typename===`MyNdlaArticleResourceMeta`?l.myNdlaResourceMeta.traits:void 0,resourceTypes:l?.myNdlaResourceMeta?.resourceTypes,storedResourceType:e.resourceType})})]})},k=e=>{let{authenticated:t}=(0,E.useContext)(v),n=s(me,{skip:!t,variables:{path:e.path}});return(0,D.jsx)(he,{isFavorite:!!n.data?.myNdlaResourceConnections?.length,...e})},_e=o(`ul`,{base:{listStyleType:`disc`,marginInlineStart:`medium`}}),ve=({licenseRights:e,locale:t})=>(0,D.jsx)(_e,{children:e.filter(e=>e!==`cc`).map(e=>(0,D.jsx)(`li`,{children:b(e,t).description},e))}),A=o(`ul`,{base:{width:`100%`,"& > li":{paddingBlock:`xlarge`,borderBottom:`1px solid`,borderColor:`stroke.subtle`,_last:{borderBottom:`none`,paddingBlockEnd:`0`},_first:{paddingBlockStart:`medium`}},"& p ":{marginBlockEnd:`3xsmall`},tabletDown:{"& button, a":{width:`100%`}}}}),ye=o(`div`,{base:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,minHeight:`xxlarge`}}),j=({licenseType:e,title:t,sourceTitle:n,sourceType:r,children:i})=>{let{i18n:o,t:s}=a(),l=x(e,o.language),{description:u}=b(l.rights[0]??``,o.language),p=l.rights[0]===fe.COPYRIGHTED?`restrictedUseText`:`licenseText`;return(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(ye,{children:[!!t&&(0,D.jsx)(f,{textStyle:`title.small`,fontWeight:`semibold`,asChild:!0,consumeCss:!0,children:(0,D.jsx)(`h3`,{children:`${t} "${n}"`})}),(0,D.jsx)(`div`,{children:i})]}),!!u&&(0,D.jsxs)(d,{textStyle:`body.medium`,children:[`${s(`license.${r}.${p}`)} `,(0,D.jsx)(c,{license:l}),`. ${u}`]}),l.rights.length>1&&(0,D.jsx)(ve,{licenseRights:l.rights,locale:o.language})]})},M=o(`li`,{base:{"& img":{width:`100%`}}}),N=o(`div`,{base:{display:`flex`,flexDirection:`column`,gap:`3xsmall`}}),P=o(`span`,{base:{display:`none`}}),be=o(`div`,{base:{display:`flex`,flexDirection:`column`,gap:`medium`}}),F=({children:e,license:t,locale:n,resourceUrl:r,resourceType:i})=>{let a=x(t,n),o=de(a.rights)?{"xmlns:cc":`https://creativecommons.org/ns#`,"xmlns:dct":`http://purl.org/dc/terms/`,about:r??``}:{},s=w(i);return(0,D.jsxs)(be,{...o,children:[!!s&&(0,D.jsx)(P,{rel:`dct:type`,href:s}),e]})},I=o(`div`,{base:{display:`flex`,flexWrap:`wrap`,gap:`xsmall`,marginBlockStart:`3xsmall`,"& > a":{width:`fit-content`},tabletDown:{flexDirection:`column`}}}),xe={title:`dct:title`,author:`cc:attributionName`,copyrightHolder:`cc:copyrightHolder`,contributor:`cc:contributor`,other:void 0,otherWithoutDescription:void 0},Se=e=>e.metaType===T.otherWithoutDescription,L=({item:e})=>Se(e)?e.label:(0,D.jsxs)(d,{textStyle:`body.medium`,children:[`${e.label}: `,(0,D.jsx)(`span`,{property:xe[e.metaType],children:e.description})]}),Ce=o(`li`,{base:{wordBreak:`break-word`}}),R=({items:e=[]})=>(0,D.jsx)(`ul`,{children:e.map(e=>(0,D.jsx)(Ce,{children:(0,D.jsx)(L,{item:e})},e.label))}),z=e=>{let t=new URL(e);return t.searchParams.set(`download`,`true`),t.toString()},B=e=>e===ue.COPYRIGHTED;
2function V(e,t,n){return e.map(e=>{let r=e.type.toLowerCase();return r===t?e.name:`${n(r)} ${e.name}`}).join(`, `)}function H(e,t){return[{label:t(`originator`),description:V(e?.creators??[],`originator`,t),metaType:T.author},{label:t(`rightsholder`),description:V(e?.rightsholders??[],`rightsholder`,t),metaType:T.copyrightHolder},{label:t(`processor`),description:V(e?.processors??[],`processor`,t),metaType:T.contributor}].filter(e=>e.description!==``)}var we=o(`div`,{base:{display:`flex`,alignItems:`center`,gap:`xsmall`}}),Te=o(`div`,{base:{display:`flex`,flexDirection:`column`,gap:`xsmall`}}),Ee=o(g,{base:{width:`100%`}}),U=({stringToCopy:e,license:t})=>{let{t:n}=a(),[r,i]=(0,E.useState)(!1),o=(0,E.useCallback)(async()=>{if(!(!e||r))try{await navigator.clipboard.writeText(e),i(!0)}catch{i(!1)}},[r,e]);return(0,E.useEffect)(()=>{let e;return r&&(e=setTimeout(()=>i(!r),1e4)),()=>window.clearTimeout(e)},[r]),B(t)||!e?null:(0,D.jsxs)(Te,{children:[(0,D.jsx)(f,{asChild:!0,consumeCss:!0,textStyle:`label.large`,fontWeight:`bold`,children:(0,D.jsx)(`h4`,{children:n(`licenseBox.sourceTitle`)})}),(0,D.jsxs)(we,{children:[(0,D.jsx)(Ee,{children:e}),(0,D.jsx)(p,{variant:`secondary`,onClick:o,"aria-label":n(r?`license.hasCopiedTitle`:`license.copyTitle`),children:r?(0,D.jsx)(u,{}):(0,D.jsx)(oe,{})})]})]})},W={kind:`Document`,definitions:[{kind:`FragmentDefinition`,name:{kind:`Name`,value:`LicenseListCopyright`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Copyright`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`license`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`license`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`creators`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`processors`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`rightsholders`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`origin`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`processed`},arguments:[],directives:[]}]}}],loc:{start:0,end:140,source:{body:`fragment LicenseListCopyright on Copyright{license{license}creators{name type}processors{name type}rightsholders{name type}origin processed}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}},De=e=>{let t=new Set;return e.filter(e=>{if(e.kind!==`FragmentDefinition`)return!0;let n=e.name?.value;return!n||t.has(n)?!1:(t.add(n),!0)})},Oe=({audio:e})=>{let{t:n,i18n:r}=a(),{pathname:i}=t(),o=(0,E.useMemo)(()=>`/audio/${e.id}`,[e.id]),s=(0,E.useMemo)(()=>i!==o,[i,o]),c=H(e.copyright,n);e.title&&c.unshift({label:n(`title`),description:e.title,metaType:T.title}),e.copyright.origin&&c.push({label:n(`source`),description:e.copyright.origin,metaType:T.other}),e.copyright.processed===!0&&c.push({label:n(`license.processed`),metaType:T.otherWithoutDescription});let u=S(e.title,void 0,e.src,`${h.ndlaFrontendDomain}/audio/${e.id}`,e.copyright,e.copyright.license.license,``,e=>n(e),r.language);return(0,D.jsx)(M,{children:(0,D.jsxs)(F,{license:e.copyright.license.license,resourceType:`audio`,resourceUrl:e.src,locale:r.language,children:[(0,D.jsxs)(N,{children:[(0,D.jsx)(j,{licenseType:e.copyright.license.license,title:n(`license.audio.rules`),sourceTitle:e.title,sourceType:`audio`,children:!B(e.copyright.license.license)&&(0,D.jsx)(O,{resource:{id:e.id,path:`/audio/${e.id}`,resourceType:`audio`},children:(0,D.jsx)(k,{path:`/audio/${e.id}`})})}),!B(e.copyright.license.license)&&(0,D.jsxs)(I,{children:[(0,D.jsxs)(_,{to:z(e.src),download:!0,variant:`secondary`,size:`small`,children:[(0,D.jsx)(l,{}),n(`license.download`)]}),!!s&&(0,D.jsxs)(_,{to:o,target:`_blank`,variant:`secondary`,rel:`noopener noreferrer`,size:`small`,children:[(0,D.jsx)(y,{}),n(`license.openLink`)]})]})]}),(0,D.jsx)(I,{children:(0,D.jsxs)(N,{children:[(0,D.jsx)(R,{items:c}),(0,D.jsx)(U,{stringToCopy:u,license:e.copyright.license.license})]})})]})})},G=({audios:e})=>(0,D.jsx)(A,{children:e.map(e=>(0,D.jsx)(Oe,{audio:e},`audio-${e.id}`))});G.fragments={audio:{kind:`Document`,definitions:De([{kind:`FragmentDefinition`,name:{kind:`N
2ame`,value:`AudioLicenseList_AudioLicense`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`AudioLicense`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`src`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`copyright`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`origin`},arguments:[],directives:[]},{kind:`FragmentSpread`,name:{kind:`Name`,value:`LicenseListCopyright`},directives:[]}]}}]}}].concat(W.definitions)),loc:{start:0,end:110,source:{body:`fragment AudioLicenseList_AudioLicense on AudioLicense{id src title copyright{origin ...LicenseListCopyright}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}};var K=({stringToCopy:e,copyTitle:t,hasCopiedTitle:n,children:r})=>{let[i,a]=(0,E.useState)(!1);return(0,E.useEffect)(()=>{let e;return i&&(e=setTimeout(()=>a(!i),1e4)),()=>window.clearTimeout(e)},[i]),(0,D.jsx)(`span`,{children:(0,D.jsxs)(ee,{variant:`secondary`,disabled:i,onClick:async()=>{try{await navigator.clipboard.writeText(e),a(!0)}catch{a(!1)}},size:`small`,children:[r,i?n:t]})})},q=({concept:e,type:n})=>{let{t:r,i18n:i}=a(),{pathname:o}=t(),s=`/concept/${e.id}`,c=(0,E.useMemo)(()=>o!==s,[o,s]),l=`${h.ndlaFrontendDomain}/embed-iframe/${i.language}/concept/${e.id}`,u=H(e.copyright,r);e.title&&u.unshift({label:r(`title`),description:e.title,metaType:T.title}),e.copyright?.origin&&u.push({label:r(`source`),description:e.copyright.origin,metaType:T.other}),e.copyright?.processed===!0&&u.push({label:r(`license.processed`),metaType:T.otherWithoutDescription});let d=S(e.title,void 0,e.src??void 0,`${h.ndlaFrontendDomain}/concept/${e.id}`,e.copyright??void 0,e.copyright?.license?.license,``,e=>r(e),i.language);return(0,D.jsx)(M,{children:(0,D.jsxs)(F,{license:e.copyright?.license?.license??``,resourceUrl:e.src,locale:i.language,children:[(0,D.jsxs)(N,{children:[(0,D.jsx)(j,{licenseType:e.copyright?.license?.license??``,title:r(`license.${n}.rules`),sourceTitle:e.title,sourceType:n,children:!B(e.copyright?.license?.license)&&(0,D.jsx)(O,{resource:{id:e.id,path:`/concept/${e.id}`,resourceType:`concept`},children:(0,D.jsx)(k,{path:`/concept/${e.id}`})})}),!B(e.copyright?.license?.license)&&(0,D.jsxs)(I,{children:[(0,D.jsx)(K,{stringToCopy:`<iframe title="${e.title}" aria-label="${e.title}" height="400" width="500" style="border: none;" allowfullscreen="" src="${l}"></iframe>`,copyTitle:r(`license.embed`),hasCopiedTitle:r(`license.embedCopied`)}),!!c&&(0,D.jsxs)(_,{to:s,target:`_blank`,rel:`noopener noreferrer`,variant:`secondary`,size:`small`,children:[(0,D.jsx)(y,{}),r(`license.openLink`)]})]})]}),(0,D.jsx)(I,{children:(0,D.jsxs)(N,{children:[(0,D.jsx)(R,{items:u}),(0,D.jsx)(U,{stringToCopy:d,license:e.copyright?.license?.license})]})})]})})},J=({concepts:e})=>(0,D.jsx)(A,{children:e.map((e,t)=>(0,D.jsx)(q,{type:`concept`,concept:e},t))}),Y=({glosses:e})=>(0,D.jsx)(A,{children:e.map((e,t)=>(0,D.jsx)(q,{type:`gloss`,concept:e},t))});Y.fragments={gloss:{kind:`Document`,definitions:[{kind:`FragmentDefinition`,name:{kind:`Name`,value:`GlossLicenseList_GlossLicense`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`GlossLicense`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`src`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`copyright`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`license`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`license`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`creators`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`N
2ame`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`processors`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`rightsholders`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`origin`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`processed`},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:176,source:{body:`fragment GlossLicenseList_GlossLicense on GlossLicense{id title src copyright{license{license}creators{name type}processors{name type}rightsholders{name type}origin processed}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}},J.fragments={concept:{kind:`Document`,definitions:[{kind:`FragmentDefinition`,name:{kind:`Name`,value:`ConceptLicenseList_ConceptLicense`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`ConceptLicense`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`src`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`copyright`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`license`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`license`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`creators`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`processors`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`rightsholders`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`name`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`type`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`origin`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`processed`},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:182,source:{body:`fragment ConceptLicenseList_ConceptLicense on ConceptLicense{id title src copyright{license{license}creators{name type}processors{name type}rightsholders{name type}origin processed}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}};var ke=e=>{let t=new Set;return e.filter(e=>{if(e.kind!==`FragmentDefinition`)return!0;let n=e.name?.value;return!n||t.has(n)?!1:(t.add(n),!0)})},Ae=({h5p:e})=>{let{t:n,i18n:r}=a(),{pathname:i}=t(),o=(0,E.useMemo)(()=>`/h5p/${e.id}`,[e.id]),s=(0,E.useMemo)(()=>i!==o,[o,i]),c=H(e.copyright,n);e.title&&c.unshift({label:n(`title`),description:e.title,metaType:T.title});let l=S(e.title,void 0,e.src??void 0,`${h.ndlaFrontendDomain}/h5p/${e.id}`,e.copyright??void 0,e?.copyright?.license.license,``,e=>n(e),r.language);return(0,D.jsx)(M,{children:(0,D.jsxs)(F,{license:e.copyright?.license?.license??``,resourceType:`h5p`,resourceUrl:e.src,locale:r.language,children:[(0,D.jsxs)(N,{children:[(0,D.jsx)(j,{licenseType:e.copyright?.license?.license??``,title:n(`license.h5p.rules`),sourceTitle:e.title,sourceType:`h5p`}),!B(e.copyright?.license.license)&&(0,D.jsxs)(I,{children:[(0,D.jsx)(K,{stringToCopy:`<iframe title="${e.title}" aria-label="${e.src}" height="400" width="500" style="border: none;" allowfullscreen="" src="${e.src}"></iframe>`,copyTitle:n(`license.embed`),hasCopiedTitle:n(`license.embedCopied`)}),!!s&&(0,D.jsxs)(_,{to:o,target:`_blank`,rel:`noopener noreferrer`,variant:`secondary`,size:`small`,children:[(0,D.jsx)(y,{}),n(`license.openLink`)]})]})]}),(0,D.jsx)(I,{children:(0,D.jsxs)(N,{children:[(0,D.jsx)(R,{items:c}),(0,D.jsx)(U,{stringToCopy:l,license:e.copyright?.license.license})]})})]})})},X=({h5ps:e})=>(0,D.jsx)(A,{children:e.map(e=>(0,D.jsx)(Ae,{h5p:e},`h5p-${e.id}`))});X.fragments={h5p:{kind:`Document`,definitions:ke([{kind:`FragmentDefinition`,name:{kind:`N
2ame`,value:`H5pLicenseList_H5pLicense`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`H5pLicense`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`src`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`copyright`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`LicenseListCopyright`},directives:[]}]}}]}}].concat(W.definitions)),loc:{start:0,end:97,source:{body:`fragment H5pLicenseList_H5pLicense on H5pLicense{id title src copyright{...LicenseListCopyright}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}};var je=e=>{let t=new Set;return e.filter(e=>{if(e.kind!==`FragmentDefinition`)return!0;let n=e.name?.value;return!n||t.has(n)?!1:(t.add(n),!0)})},Me=({image:e,isResourcePage:n})=>{let{t:r,i18n:i}=a(),{pathname:o}=t(),s=(0,E.useMemo)(()=>`/image/${e.id}`,[e.id]),c=(0,E.useMemo)(()=>o!==s,[o,s]),u=H(e.copyright,r),d=S(e.title,void 0,e.src,`${h.ndlaFrontendDomain}/image/${e.id}`,e.copyright,e.copyright.license.license,``,e=>r(e),i.language);return e.title&&u.unshift({label:r(`title`),description:e.title,metaType:T.title}),e.copyright.origin&&u.push({label:r(`source`),description:e.copyright.origin,metaType:T.other}),e.copyright.processed===!0&&u.push({label:r(`license.processed`),metaType:T.otherWithoutDescription}),(0,D.jsx)(M,{children:(0,D.jsxs)(F,{license:e.copyright.license?.license,resourceType:`image`,resourceUrl:e.src,locale:i.language,children:[(0,D.jsxs)(N,{children:[(0,D.jsx)(j,{licenseType:e.copyright.license.license,title:r(`license.images.rules`),sourceTitle:e.title,sourceType:`images`,children:!B(e.copyright.license.license)&&(0,D.jsx)(O,{resource:{id:e.id,path:`/image/${e.id}`,resourceType:`image`},children:(0,D.jsx)(k,{path:`/image/${e.id}`})})}),!n&&(0,D.jsx)(m,{alt:e.altText,src:e.src,fallbackWidth:300}),!B(e.copyright.license.license)&&(0,D.jsxs)(I,{children:[(0,D.jsxs)(_,{to:z(e.src),variant:`secondary`,download:!0,size:`small`,children:[(0,D.jsx)(l,{}),r(`license.download`)]}),(0,D.jsx)(K,{stringToCopy:`<iframe title="${e.title}" aria-label="${e.title}" height="400" width="500" style="border: none;" allowfullscreen="" src="${e.src}"></iframe>`,copyTitle:r(`license.embed`),hasCopiedTitle:r(`license.embedCopied`)}),!!c&&(0,D.jsxs)(_,{to:s,target:`_blank`,variant:`secondary`,rel:`noopener noreferrer`,size:`small`,children:[(0,D.jsx)(y,{}),r(`license.openLink`)]})]})]}),(0,D.jsx)(I,{children:(0,D.jsxs)(N,{children:[(0,D.jsx)(R,{items:u}),(0,D.jsx)(U,{stringToCopy:d,license:e.copyright.license.license})]})})]})})},Z=({images:e,isResourcePage:t})=>(0,D.jsx)(A,{children:e.map((e,n)=>(0,D.jsx)(Me,{image:e,isResourcePage:t},`${e.id}-${n}`))});Z.fragments={image:{kind:`Document`,definitions:je([{kind:`FragmentDefinition`,name:{kind:`Name`,value:`ImageLicenseList_ImageLicense`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`ImageLicense`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`altText`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`src`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`copyText`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`copyright`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`origin`},arguments:[],directives:[]},{kind:`FragmentSpread`,name:{kind:`Name`,value:`LicenseListCopyright`},directives:[]}]}}]}}].concat(W.definitions)),loc:{start:0,end:127,source:{body:`fragment ImageLicenseList_ImageLicense on ImageLicense{id title altText src copyText copyright{origin ...LicenseListCopyright}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}};var Ne=e=>{let t=new Set;return e.filter(e=>{if(e.kind!==`FragmentDefinition`)return!0;let n=e.name?.value;return!n||t.has(n)?!1:(t.add(n),!0)})},Pe=({podcast:e})=>{let{t:n,i18n:r}=a(),{pathname:i}=t(),o=(0,E.useMemo)(()=>`/audio/${e.id}`,[e.id]),s=(0,E.useMemo)(()=>
2i!==o,[o,i]),c=H(e.copyright,n),u=S(e.title,void 0,e.src,`${h.ndlaFrontendDomain}/audio/${e.id}`,e.copyright,e.copyright.license.license,``,e=>n(e),r.language);return e.title&&c.unshift({label:n(`title`),description:e.title,metaType:T.title}),e.copyright.origin&&c.push({label:n(`source`),description:e.copyright.origin,metaType:T.other}),e.copyright.processed===!0&&c.push({label:n(`license.processed`),metaType:T.otherWithoutDescription}),(0,D.jsx)(M,{children:(0,D.jsxs)(F,{license:e.copyright.license?.license,resourceType:`podcast`,resourceUrl:e.src,locale:r.language,children:[(0,D.jsxs)(N,{children:[(0,D.jsx)(j,{licenseType:e.copyright.license.license,title:n(`license.podcast.rules`),sourceTitle:e.title,sourceType:`podcast`,children:!B(e.copyright.license.license)&&(0,D.jsx)(O,{resource:{id:e.id,path:`/audio/${e.id}`,resourceType:`audio`},children:(0,D.jsx)(k,{path:`/audio/${e.id}`})})}),!B(e.copyright.license.license)&&(0,D.jsxs)(I,{children:[(0,D.jsxs)(_,{to:z(e.src),download:!0,variant:`secondary`,size:`small`,children:[(0,D.jsx)(l,{}),n(`license.download`)]}),(0,D.jsx)(K,{stringToCopy:`<iframe title="${e.title}" aria-label="${e.title}" height="400" width="500" allowfullscreen="" style="border: none;" src="${e.src}"></iframe>`,copyTitle:n(`license.embed`),hasCopiedTitle:n(`license.embedCopied`)}),!!s&&(0,D.jsxs)(_,{to:o,target:`_blank`,variant:`secondary`,rel:`noopener noreferrer`,size:`small`,children:[(0,D.jsx)(y,{}),n(`license.openLink`)]})]})]}),(0,D.jsx)(I,{children:(0,D.jsxs)(N,{children:[(0,D.jsx)(R,{items:c}),(0,D.jsx)(U,{stringToCopy:u,license:e.copyright.license.license})]})})]})})},Q=({podcasts:e})=>(0,D.jsx)(A,{children:e.map((e,t)=>(0,D.jsx)(Pe,{podcast:e},`${e.id}-${t}`))});Q.fragments={podcast:{kind:`Document`,definitions:Ne([{kind:`FragmentDefinition`,name:{kind:`Name`,value:`PodcastLicenseList_PodcastLicense`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`PodcastLicense`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`src`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`copyText`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`description`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`copyright`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`origin`},arguments:[],directives:[]},{kind:`FragmentSpread`,name:{kind:`Name`,value:`LicenseListCopyright`},directives:[]}]}}]}}].concat(W.definitions)),loc:{start:0,end:137,source:{body:`fragment PodcastLicenseList_PodcastLicense on PodcastLicense{id src copyText title description copyright{origin ...LicenseListCopyright}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}};var Fe=e=>{let t=new Set;return e.filter(e=>{if(e.kind!==`FragmentDefinition`)return!0;let n=e.name?.value;return!n||t.has(n)?!1:(t.add(n),!0)})},Ie=({video:e,isResourcePage:n})=>{let{t:r,i18n:i}=a(),{pathname:o}=t(),s=(0,E.useMemo)(()=>`/video/${e.id}`,[e.id]),c=(0,E.useMemo)(()=>o!==s,[s,o]),u=H(e.copyright,r);e.title&&u.unshift({label:r(`title`),description:e.title,metaType:T.title}),e.copyright?.origin&&u.push({label:r(`source`),description:e.copyright.origin,metaType:T.other});let d=S(e.title,void 0,e.src??void 0,`${h.ndlaFrontendDomain}/video/${e.id}`,e.copyright??void 0,e?.copyright?.license.license,``,e=>r(e),i.language);return(0,D.jsx)(M,{children:(0,D.jsxs)(F,{license:e.copyright?.license?.license??``,resourceType:`video`,resourceUrl:e.src,locale:i.language,children:[(0,D.jsxs)(N,{children:[(0,D.jsx)(j,{licenseType:e.copyright?.license?.license??``,title:r(`license.video.rules`),sourceTitle:e.title,sourceType:`video`,children:!B(e.copyright?.license.license)&&(0,D.jsx)(O,{resource:{id:e.id,path:`/video/${e.id}`,resourceType:`video`},children:(0,D.jsx)(k,{path:`/video/${e.id}`})})}),!!e.cover&&!n&&(0,D.jsx)(m,{alt:e.title,src:e.cover,fallbackWidth:300}),!B(e.copyright?.license.license)&&(0,D.jsxs)(I,{children:[!!e.download&&(0,D.jsxs)(_,{to:e.download,download:!0,variant:`secondary`,size:`small`,children:[(0,D.jsx)(l,{}),r(`license.download`)]}),(0,D.jsx)(K,{stringToCopy:`<iframe title="${e.title}" height="${e.iframe?.height}" aria-label="${e.title}" width="${e.iframe?.width}" style="border: none;" allowfullscreen="" src="${e.iframe?.src}"></iframe>`,copyTitle:r(`license.embed`),hasCopiedTitle:r(`license.embedCopied`)}),!!c&&(0,D.jsxs)(_,{to:s,target:`_blank`,variant:`secondary`,rel:`noopener noreferrer`,size:`small`,children:[(0,D.jsx)(y,{}),r(`license.openLink`)]})]})]}),(0,D.jsx)(I,{children:(0,D.jsxs)(N,{children:[(0,D.jsx)(R,{items:u}),(0,D.jsx)(U,{stringToCopy:d,license:e.copyright?.license.license})]})})]})})},$=({videos:e,isResourcePage:t})=>(0,D.jsx)(A,{children:e.map(e=>(0,D.jsx)(Ie,{video:e,isResourcePage:t},`video-${e.id}`))});$.fragments={video:{kind:`Document`,definitions:Fe([{kind:`FragmentDefinition`,name:{kind:`N
2ame`,value:`VideoLicenseList_BrightcoveLicense`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`BrightcoveLicense`}},directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`title`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`download`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`src`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`cover`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`iframe`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`width`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`height`},arguments:[],directives:[]},{kind:`Field`,name:{kind:`Name`,value:`src`},arguments:[],directives:[]}]}},{kind:`Field`,name:{kind:`Name`,value:`copyright`},arguments:[],directives:[],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`LicenseListCopyright`},directives:[]}]}}]}}].concat(W.definitions)),loc:{start:0,end:152,source:{body:`fragment VideoLicenseList_BrightcoveLicense on BrightcoveLicense{id title download src cover iframe{width height src}copyright{...LicenseListCopyright}}`,name:`GraphQL request`,locationOffset:{line:1,column:1}}}}};export{R as _,J as a,O as b,G as c,H as d,A as f,F as g,I as h,X as i,W as l,M as m,Q as n,Y as o,N as p,Z as r,K as s,$ as t,U as u,j as v,T as x,k as y}; 3//# sourceMappingURL=VideoLicenseList-CuuGAxx2.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.