1"use strict";(globalThis.webpackChunkomc_ui_2_0||=[]).push([[8913],{84910(e,t,a){var s,o,l,n,r,i,c,m,d,u,h,g,x,f,p,v,b,C,w,y,j,A=a(9950);function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},N.apply(null,arguments)}function E(e,t){let{title:a,titleId:E,...S}=e;return A.createElement("svg",N({width:201,height:200,viewBox:"0 0 201 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":E},S),a?A.createElement("title",{id:E},a):null,s||(s=A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 42L80 62V77L10 97C10 97 0 90 0 69.5C0 49 10 42 10 42Z",fill:"#FFFDCC"})),o||(o=A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M124 15C123.448 15 123 15.4477 123 16V22.5858L118.343 17.9289C117.953 17.5384 117.319 17.5384 116.929 17.9289C116.538 18.3195 116.538 18.9526 116.929 19.3431L121.586 24H115C114.448 24 114 24.4477 114 25C114 25.5523 114.448 26 115 26H121.586L116.929 30.6569C116.538 31.0474 116.538 31.6805 116.929 32.0711C117.319 32.4616 117.953 32.4616 118.343 32.0711L123 27.4142V34C123 34.5523 123.448 35 124 35C124.552 35 125 34.5523 125 34V27.4142L129.657 32.0711C130.047 32.4616 130.681 32.4616 131.071 32.0711C131.462 31.6805 131.462 31.0474 131.071 30.6569L126.414 26H133C133.552 26 134 25.5523 134 25C134 24.4477 133.552 24 133 24H126.414L131.071 19.3431C131.462 18.9526 131.462 18.3195 131.071 17.9289C130.681 17.5384 130.047 17.5384 129.657 17.9289L125 22.5858V16C125 15.4477 124.552 15 124 15Z",fill:"#EBECED"})),l||(l=A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M171 55C170.448 55 170 55.4477 170 56V62.5858L165.343 57.9289C164.953 57.5384 164.319 57.5384 163.929 57.9289C163.538 58.3195 163.538 58.9526 163.929 59.3431L168.586 64H162C161.448 64 161 64.4477 161 65C161 65.5523 161.448 66 162 66H168.586L163.929 70.6569C163.538 71.0474 163.538 71.6805 163.929 72.0711C164.319 72.4616 164.953 72.4616 165.343 72.0711L170 67.4142V74C170 74.5523 170.448 75 171 75C171.552 75 172 74.5523 172 74V67.4142L176.657 72.0711C177.047 72.4616 177.681 72.4616 178.071 72.0711C178.462 71.6805 178.462 71.0474 178.071 70.6569L173.414 66H180C180.552 66 181 65.5523 181 65C181 64.4477 180.552 64 180 64H173.414L178.071 59.3431C178.462 58.9526 178.462 58.3195 178.071 57.9289C177.681 57.5384 177.047 57.5384 176.657 57.9289L172 62.5858V56C172 55.4477 171.552 55 171 55Z",fill:"#EBECED"})),n||(n=A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 116C16.4477 116 16 116.448 16 117V123.586L11.3431 118.929C10.9526 118.538 10.3195 118.538 9.92893 118.929C9.53841 119.319 9.53841 119.953 9.92893 120.343L14.5858 125H8C7.44772 125 7 125.448 7 126C7 126.552 7.44772 127 8 127H14.5858L9.92893 131.657C9.53841 132.047 9.53841 132.681 9.92893 133.071C10.3195 133.462 10.9526 133.462 11.3431 133.071L16 128.414V135C16 135.552 16.4477 136 17 136C17.5523 136 18 135.552 18 135V128.414L22.6569 133.071C23.0474 133.462 23.6805 133.462 24.0711 133.071C24.4616 132.681 24.4616 132.047 24.0711 131.657L19.4142 127H26C26.5523 127 27 12
16.552 27 126C27 125.448 26.5523 125 26 125H19.4142L24.0711 120.343C24.4616 119.953 24.4616 119.319 24.0711 118.929C23.6805 118.538 23.0474 118.538 22.6569 118.929L18 123.586V117C18 116.448 17.5523 116 17 116Z",fill:"#EBECED"})),r||(r=A.createElement("g",{filter:"url(#filter0_i)"},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80 86H120L140 170C140 170 133 185 100 185C67 185 60 170 60 170L80 86Z",fill:"white"}))),i||(i=A.createElement("path",{d:"M80 85H79.2101L79.0272 85.7684L59.0272 169.768L58.9465 170.107L59.0938 170.423L60 170C59.0938 170.423 59.0942 170.424 59.0946 170.425L59.0956 170.427L59.0981 170.432L59.1051 170.447C59.1107 170.458 59.1181 170.473 59.1274 170.492C59.1461 170.529 59.1723 170.58 59.2068 170.644C59.2757 170.771 59.3774 170.95 59.5168 171.174C59.7955 171.621 60.2244 172.244 60.8412 172.984C62.0755 174.465 64.0585 176.41 67.087 178.343C73.1502 182.213 83.3449 186 100 186C116.655 186 126.85 182.213 132.913 178.343C135.942 176.41 137.924 174.465 139.159 172.984C139.776 172.244 140.205 171.621 140.483 171.174C140.623 170.95 140.724 170.771 140.793 170.644C140.828 170.58 140.854 170.529 140.873 170.492C140.882 170.473 140.889 170.458 140.895 170.447L140.902 170.432L140.904 170.427L140.905 170.425C140.906 170.424 140.906 170.423 140 170L140.906 170.423L141.053 170.107L140.973 169.768L120.973 85.7684L120.79 85H120H80Z",stroke:"#677078",strokeWidth:2})),c||(c=A.createElement("rect",{x:73,y:116,width:23,height:2,rx:1,fill:"#CCCFD2"})),m||(m=A.createElement("rect",{x:112,y:157,width:23,height:2,rx:1,fill:"#CCCFD2"})),d||(d=A.createElement("rect",{x:71,y:123,width:12,height:2,rx:1,fill:"#CCCFD2"})),u||(u=A.createElement("g",{filter:"url(#filter1_i)"},A.createElement("rect",{x:80,y:54,width:40,height:30,fill:"white"}
1))),h||(h=A.createElement("rect",{x:79,y:53,width:42,height:32,stroke:"#677078",strokeWidth:2})),g||(g=A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M83.5 77C87.6421 77 91 73.6421 91 69.5C91 65.3579 87.6421 62 83.5 62C79.3579 62 76 65.3579 76 69.5C76 73.6421 79.3579 77 83.5 77Z",fill:"#FFFDCC",stroke:"#677078",strokeWidth:2})),x||(x=A.createElement("g",{filter:"url(#filter2_i)"},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M100 34L122 54H78L100 34Z",fill:"white"}))),f||(f=A.createElement("path",{d:"M80.5866 53L100 35.3515L119.413 53H80.5866Z",stroke:"#677078",strokeWidth:2})),p||(p=A.createElement("rect",{x:74,y:52,width:52,height:2,rx:1,fill:"#677078"})),v||(v=A.createElement("rect",{x:74,y:84,width:52,height:2,rx:1,fill:"#677078"})),b||(b=A.createElement("g",{filter:"url(#filter3_i)"},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 110H29V104.5C29 99.8056 32.8056 96 37.5 96H41C43.7614 96 46 98.2386 46 101C46 101.552 46.4477 102 47 102H48.3333C52.0152 102 55 104.985 55 108.667C55 109.403 55.597 110 56.3333 110H67",fill:"white"}))),C||(C=A.createElement("path",{d:"M20 110H29V104.5C29 99.8056 32.8056 96 37.5 96H41C43.7614 96 46 98.2386 46 101V101C46 101.552 46.4477 102 47 102H48.3333C52.0152 102 55 104.985 55 108.667V108.667C55 109.403 55.597 110 56.3333 110H67",stroke:"#677078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),w||(w=A.createElement("g",{filter:"url(#filter4_i)"},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M112 125H122V124C122 118.477 126.477 114 132 114H138V112C138 106.477 142.477 102 148 102H164C169.523 102 174 106.477 174 112V117H183.333C187.015 117 190 119.985 190 123.667C190 124.403 190.597 125 191.333 125H200",fill:"white"}))),y||(y=A.createElement("path",{d:"M112 125H122V124C122 118.477 126.477 114 132 114H138V112C138 106.477 142.477 102 148 102H164C169.523 102 174 106.477 174 112V117H183.333C187.015 117 190 119.985 190 123.667V123.667C190 124.403 190.597 125 191.333 125H200",stroke:"#677078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),j||(j=A.createElement("defs",null,A.createElement("filter",{id:"filter0_i",x:57.8931,y:84,width:84.2139,height:103,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",{dx:-10,dy:-5}),A.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 1 0"}),A.createElement("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow"})),A.createElement("filter",{id:"filter1_i",x:78,y:52,width:44,height:34,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",{dx:-10,dy:-5}),A.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 1 0"}),A.createElement("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow"})),A.createElement("filter",{id:"filter2_i",x:78,y:34,width:44,height:20,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",{dx:-10,dy:-5}),A.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 1 0"}),A.createElement("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow"})),A.createElement("filter",{id:"filter3_i",x:19,y:95,width:49,height:16,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"}
1,A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",{dx:-5,dy:1}),A.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 1 0"}),A.createElement("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow"})),A.createElement("filter",{id:"filter4_i",x:111,y:101,width:90,height:25,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",{dx:-5,dy:1}),A.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 0 0.97 0 0 0 1 0"}),A.createElement("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow"})))))}const S=A.forwardRef(E);a.p;a.d(t,["h",0,S])},43399(e,t,a){var s,o=a(9950);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},l.apply(null,arguments)}function n(e,t){let{title:a,titleId:n,...r}=e;return o.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:120,height:100,viewBox:"0 0 256 256",xmlSpace:"preserve",ref:t,"aria-labelledby":n},r),a?o.createElement("title",{id:n},a):null,s||(s=o.createElement("defs",null)),o.createElement("g",{style:{stroke:"none",strokeWidth:0,strokeDasharray:"none",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:10,fill:"none",fillRule:"nonzero",opacity:1},transform:"translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"},o.createElement("path",{d:"M 88.119 23.338 c -1.035 -3.872 -4.085 -6.922 -7.957 -7.957 C 73.144 13.5 45 13.5 45 13.5 s -28.144 0 -35.162 1.881 c -3.872 1.035 -6.922 4.085 -7.957 7.957 C 0 30.356 0 45 0 45 s 0 14.644 1.881 21.662 c 1.035 3.872 4.085 6.922 7.957 7.957 C 16.856 76.5 45 76.5 45 76.5 s 28.144 0 35.162 -1.881 c 3.872 -1.035 6.922 -4.085 7.957 -7.957 C 90 59.644 90 45 90 45 S 90 30.356 88.119 23.338 z",style:{stroke:"none",strokeWidth:1,strokeDasharray:"none",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:10,fill:"rgb(255,0,0)",fillRule:"nonzero",opacity:1},transform:" matrix(1 0 0 1 0 0) ",strokeLinecap:"round"}),o.createElement("polygon",{points:"36,58.5 59.38,45 36,31.5 ",style:{stroke:"none",strokeWidth:1,strokeDasharray:"none",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:10,fill:"rgb(255,255,255)",fillRule:"nonzero",opacity:1},transform:" matrix(1 0 0 1 0 0) "})))}const r=o.forwardRef(n);a.p;a.d(t,["h",0,r])},8130(e,t,a){var s=a(42087),o=a(72004),l=a(26217),n=a(9950),r=a(44414);const i=e=>{let{src:t,alt:a="thumbnail-preview",assetId:n}=e;const{isLoading:i,hasError:c,onLoad:m,onError:d,retries:u=0}=(0,s.N9)(n,!0);return(0,r.jsxs)(r.Fragment,{children:[!!t&&(0,r.jsx)("img",{"data-testid":"image",src:t,alt:a,onLoad:m,onError:d,className:(0,o.A)(i||c?"d-none":"omc-object-contain omc-object-center omc-rounded-sm omc-w-full omc-h-full")},`${u}`)," ",i||c||!t?(0,r.jsx)(l.A,{mode:c?"error":"loading"}):null]})},c=(0,n.memo)(i);a.d(t,["A",0,c])},54874(e,t,a){var s=a(88858),o=a(14491),l=a(44414);const n=o.Ay.div` 2 display: flex; 3 width: 100%; 4 height: 100%; 5 6 svg { 7 flex: 1; 8 margin-right: 10px; 9 width: 100%; 10 &:last-child { 11 margin-right: 0; 12 } 13 } 14`,r=e=>(0,l.jsxs)(s.Ay,{speed:5,backgroundColor:"#f3f3f3",foregroundColor:"#ecebeb",...e,children:[(0,l.jsx)("rect",{x:"0",y:"0",rx:"2",ry:"2",width:"100%",height:"150"}),(0,l.jsx)("rect",{x:"0",y:"160",rx:"2",ry:"2",width:"100%",height:"10"}),(0,l.jsx)("rect",{x:"0",y:"180",rx:"2",ry:"2",width:"70%",height:"10"}),(0,l.jsx)("rect",{x:"10vw",y:"180",rx:"2",ry:"2",width:"10vw",height:"10"})]}),i=()=>(0,l.jsx)(n,{children:Array.from({length:5},(e,t)=>t).map((e,t)=>(0,l.jsx)(r,{},t))});a.d(t,["A",0,i])},26217(e,t,a){var s=a(35657),o=a(9950),l=a(44414);const n=e=>{let{mode:t="loading"}=e;return(0,l.jsx)("div",{"data-testid":"img-thumbnail-placeholder",className:"omc-w-[120px] omc-h-[68px] bg-linear-gradient text-center omc-flex omc-items-center omc-justify-center omc-mb-2",children:"loading"===t?(0,l.jsx)(s.In,{"data-testid":"image",name:"image",className:"h-100 text-white"}):(0,l.jsx)(s.In,{"data-testid":"warning",name:"warning",className:"h-100 text-white"})})},r=(0,o.memo)(n);a.d(t,["A",0,r])},98913(e,t,a){a.r(t),a.d(t,{default:()=>be});var s=a(42087),o=a(9950);const l=(0,o.createContext)({});l.displayName="ManageAssetsContext";var n=a(48661),r=a(44414);const i=()=>{const{t:e}=(0,n.B)();return(0,r.jsx)("h2",{className:"omc-m-0 omc-text-black omc-text-2xl omc-font-medium omc-leading-8 omc-mb-1 omc-capitalize",children:e("manageAssets:tabAllAssets","All Assets")})};var c=a(95912),m=a(5418),d=a(54874),u=a(92526),h=a(87946),g=a.n(h),x=a(13531),f=a(49125),p=a(72004),v=a(8130),b=a(43399),C=a(23765),w=a(32673),y=a(11961),j=a(41433);const A=e=>{let{asset:t}=e;const a=(0,s.GV)(u.tE),[l,n]=(0,o.useState)({height:t.height,width:t.width}),[i,{data:c,startPolling:m,stopPolling:d}]=(0,w._)(y.Wy,{variables:{accountNumber:a,assetId:t.id}});return(0,o.useEffect)(()=>{i(),m(5e3)},[i,m]),(0,o.useEffect)(()=>{var e,t,a,s,o,l,r,i,m;c&&(console.log(c),null!==c&&void 0!==c&&null!==(e=c.getAssetInfoById)&&void 0!==e&&e.isError||8===(null===(t=c.getAssetInfoById)||void 0===t||null===(a=t.result)||void 0===a?void 0:a.uploadStatus)&&(n({height:null!==(s=null===(o=c.getAssetInfoById)||void 0===o||null===(l=o.result)||void 0===l?void 0:l.height)&&void 0!==s?s:0,width:null!==(r=null===(i=c.getAssetInfoById)||void 0===i||null===(m=i.result)||void 0===m?void 0:m.width)&&void 0!==r?r:0}),d()))},[c,d]),(0,r.jsxs)("div",{"data-testid":"metadata-header",className:"omc-flex omc-items-start",children:[(0,r.jsx)("div",{className:(0,p.A)("omc-w-30 omc-h-30 omc-mb-3"),children:t.isYoutube?(0,r.jsx)("div",{className:"youtube-icon-wrapper",children:(0,r.jsx)(b.h,{"data-testid":"youtube-icon"})}):(0,r.jsx)(v.A,{src:null===t||void 0===t?void 0:t.urls.thumbnail,assetId:null===t||void 0===t?void 0:t.id})}),(0,r.jsxs)("div",{className:"w-100",children:[(0,r.jsx)("div",{className:"d-flex",children:(0,r.jsx)(j.A,{fileName:null===t||void 0===t?void 0:t.name,fileSize:null===t||void 0===t?void 0:t.sizeInKB,widthPx:null!==t&&void 0!==t&&t.isPdfDocument?0:l.width,heightPx:null!==t&&void 0!==t&&t.isPdfDocument?0:l.height})}),t.isImage||t.isLogo?(0,r.jsx)(C.A,{dimensions:l}):null]})]})};var N=a(46814);const E=e=>{let{metadata:t,asset:a,languages:s,setMetadata:l,showErrors:i,errors:c}=e;const{t:m}=(0,n.B)(),{tLabel:d,tPlaceholder:u}=(0,o.useMemo)(()=>{const e={tLabel:{},tPlaceholder:{}};return s.includes("en-CA")&&s.includes("fr-CA")?(e.tLabel={"en-CA":m("createRelease:englishImageCaption","English caption"),"fr-CA":m("createRelease:frenchImageCaption","French caption")},e.tPlaceholder={"en-CA":m("createRelease:multimediaImageMetadataCaptionPlaceholder","Enter caption here"),"fr-CA":m("createRelease:frenchCaptionPlaceholder",'Enter caption here. Or if you need translation, enter "translation needed"')}):s.forEach(t=>{e.tLabel[t]=m("createRelease:multimediaImageMetadataAddCaption","Caption"),e.tPlaceholder[t]=m("createRelease:multimediaImageMetadataCaptionPlaceholder","Enter caption here")}),e},[s,m]);return(0,r.jsxs)("div",{className:"omc-mt-2",children:[s.map(e=>{var s;return(0,r.jsx)(N.A,{label:d[e],langCode:e,caption:t.captions[e],setMetadata:l,isValid:!i||!c[e],placeholder:u[e],freeUsage:null!==(s=a.isArchived)&&void 0!==s&&s})}),(0,r.jsx)("div",{className:"omc-mt-2 omc-text-sm omc-font-medium omc-leading-5 omc-text-neutral-600",children:m("manageAssets:captionPanelInfo","Captioning is also used for image alt-text on releases. This ensures compliance with website accessibility standards and improves SEO performance.")})]})};var S=a(48813);const L=e=>{var t,a,s,o,l;return{languageSelector:!(Object.keys(g()(e,"captions",{})).length>0),"en-US":!((null!==(t=g()(e,"captions[en-US]",""))&&void 0!==t?t:"").trim().length>0),"fr-CA":!((null!==(a=g()(e,"captions[fr-CA]",""))&&void 0!==a?a:"").trim().length>0),"en-CA":!((null!==(s=g()(e,"captions[en-CA]",""))&&void 0!==s?s:"").trim().length>0),"en-IN":!((null!==(o=g()(e,"captions[en-IN]",""))&&void 0!==o?o:"").trim().length>0),"en-GB":!((null!==(l=g()(e,"captions[en-GB]",""))&&void 0!==l?l:"").trim().length>0)}},I=e=>{let{asset:t,showErrors:a=!1,langulages:l,onMetadataChange:n}=e;const[i,c]=(0,o.useState)(((e,t)=>{var a;const s=new Map;for(const n of(null===e||void 0===e?void 0:e.metadatas)||[])s.set(n.key,n.value);const o=s.get(S.sD)||"",l={};
14return t.forEach(e=>{l[e]=o}),{captions:l,archiveForAYear:null!==(a=null===e||void 0===e?void 0:e.isArchived)&&void 0!==a&&a,addClosedCaptioning:!1}})(t,l)),[m,d]=(0,o.useState)(L(i));return(0,s.w5)(()=>{d(L(i))},[i]),(0,o.useEffect)(()=>{n((e=>{var t;const a=[];return Object.entries(e.captions).forEach(e=>{let[t,s]=e;a.push({languageCode:t,assetCaption:s,delete:!1})}),{...e,captions:a,caption:(null===(t=a[0])||void 0===t?void 0:t.assetCaption)||""}})(i))},[i]),(0,r.jsxs)("div",{className:"omc-flex omc-flex-col omc-flex-1 omc-p-3",children:[(0,r.jsx)(A,{asset:t}),(0,r.jsx)(E,{asset:t,metadata:i,languages:l,setMetadata:c,showErrors:a,errors:m})]})};var k=a(79412);const M=e=>{let{show:t,asset:a,onClose:s}=e;const{languageCodes:i}=(0,k.p)(),[d]=(0,n.B)(),[u,h]=(0,o.useState)({}),[p,v]=(0,o.useState)(!1),[b,C]=(0,o.useState)(!0),w=(0,o.useMemo)(()=>i.filter(e=>"fr-ca"!==(null===e||void 0===e?void 0:e.toLowerCase())),[i]),{allAssets:{saveMetadata:y,isMetadataSaving:j}}=(0,m.y)(l),A=(0,o.useCallback)(()=>{if(w.length>0){var e;const t=(null!==(e=g()(u,"captions",[]))&&void 0!==e?e:[]).filter(e=>!g()(e,"delete",!1));return t.length>0&&t.every(e=>{var t;return(null!==(t=g()(e,"assetCaption",""))&&void 0!==t?t:"").trim().length>0})}var t;return(null!==(t=g()(u,"caption",""))&&void 0!==t?t:"").trim().length>0},[w,u]),N=(0,o.useCallback)(()=>{if(null!==a&&void 0!==a&&a.isArchived)s();else{if(!A())return void v(!0);y({...u,assetId:null===a||void 0===a?void 0:a.id})}},[u,s,a]);return(0,o.useEffect)(()=>{p&&A()&&v(!1)},[p,A]),(0,r.jsx)(c.Jlq,{open:t&&void 0!==a,children:a?(0,r.jsx)(c._cd,{className:"!omc-p-0 !omc-gap-0 !omc-max-w-[498px] omc-max-h-[calc(100vh-90px)] omc-overflow-y-auto",children:(0,r.jsxs)(c.Xhe,{children:[(0,r.jsx)(c.wMf,{className:"omc-px-4 omc-py-3 omc-border omc-border-solid omc-border-b omc-border-w omc-border-x-0 omc-border-t-0 omc-border-neutral-300",children:(0,r.jsxs)("div",{className:"omc-flex omc-items-center omc-justify-between",children:[(0,r.jsx)("span",{className:"omc-text-xl omc-text-neutral-800",children:(e=>e.isLogo?d("createRelease:editLogoDetails","Edit Logo Details"):e.isYoutube?d("createRelease:editYouTubeDetails","Edit YouTube Details"):e.isVideo?d("createRelease:editVideoDetails","Edit Video Details"):!e.isPdfDocument||e.isImage||e.isLogo?d("createRelease:editImageDetails","Edit Image Details"):d("createRelease:editPdfDetails","Edit Pdf Details"))(a)}),(0,r.jsx)(c.t2X,{children:(0,r.jsx)(c.ben,{"aria-label":"close",onClick:s,variant:"tertiary",size:"sm",disabled:j,className:"!omc-text-neutral-600","data-testid":"close-asset-metadata-modal",children:(0,r.jsx)(x.U,{})})})]})}),(0,r.jsx)(I,{asset:a,showErrors:p,onMetadataChange:e=>{b&&0!==Object.keys(u).length&&C(!1),h(e)},langulages:w}),(0,r.jsxs)(c.s$1,{className:"omc-flex omc-px-4 omc-py-3 omc-border-t omc-border-solid omc-border-x-0 omc-border-b-0 omc-border-gray-40",children:[(0,r.jsx)(c.ben,{variant:"tertiary",onClick:s,type:"button",disabled:j,children:d("general:cancel","Cancel")}),(0,r.jsxs)(c.ben,{disabled:j,variant:"primary",onClick:N,className:"ms-2",type:"button",children:[j?(0,r.jsx)(f.h,{className:"spinner omc-mr-2"}):null,d("createRelease:done","Done")]})]})]})}):null})};var R=a(74047);const T=()=>{var e;const[,t]=(0,n.B)(),a=(0,s.GV)(u.eS),{allAssets:{mediaTabs:h,activeTab:g,setActiveTab:x,assets:f,pageNumber:p,setPageNumber:v,pageSize:b,setPageSize:C,searchTerm:w,onSearch:y,tabClicked:j,loading:A,deleteAssetFromGallary:N,showMetaModal:E,selectedAssetForMetaUpdate:S,onAssetClick:L,closeMetaModal:I}}=(0,m.y)(l),{accountPreference:{preferences:{defaultMediaAssetId:k},saveAccountPreferences:T}}=(0,m.y)(R.BR),B=(0,o.useMemo)(()=>{const e={};return f.forEach(t=>{e[t.id]=!0}),e},[f]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i,{}),(0,r.jsx)(c.qa1,{isReset:!1,isShowSearch:!0,searchTerm:w,onSearch:y,isShowUploadBtn:!1,mediaTabs:h,setActiveTab:x,activeRegion:a,assets:f,loading:A,tabClicked:j,showSelectedState:!1,selectedAsset:B,onAssetClick:L,onAssetDeleteClick:N,contentLoader:(0,r.jsx)(d.A,{}),language:t.language,defaultLogo:k,setDefaultLogo:e=>T({defaultMediaAssetId:e}),showDefaultLogo:!0,showDeleteIcon:!0,allowArchivedAssetEdit:!0}),(0,r.jsx)(c.XQ6,{pageNumber:p,pageSize:b,totalItems:(null===(e=h[g])||void 0===e?void 0:e.assetCount)||0,onChangePage:e=>v(e),showPaginateResultsMini:!0,enablePageSizeSelect:!0,pageSizeIncrementBy:12,onChangePageSize:e=>C(e),language:t.language}),S?(0,r.jsx)(M,{show:E,asset:S,onClose:I}):null]})};var B=a(76363),H=a(60552);const F=H.J1` 15 query GET_ARCHIVED_ASSETS( 16 $pageNumber: Int 17 $pageSize: Int 18 $sorting: String 19 $accountNumber: String 20 ) { 21 getArchivedAssets( 22 pageNumber: $pageNumber 23 pageSize: $pageSize 24 sorting: $sorting 25 accountNumber: $accountNumber 26 ) { 27 pageNumber 28 pageSize 29 totalPages 30 totalRecords 31 isAccountAutoRenewalEnabled 32 data { 33 id 34 assetName 35 caption 36 thumbnail 37 autoRenew 38 isCancelled 39 isRenewed 40 startDateUtc 41 endDateUtc 42 expiryDays 43 } 44 } 45 } 46`,V=H.J1` 47 mutation CANCEL_ARCHIVED_ASSET($accountNumber: String!, $assetId: Int!, $note: String) { 48 cancelArchivedAsset(accountNumber: $accountNumber, assetId: $assetId, note: $note) { 49 status 50 } 51 } 52`,P=H.J1` 53 mutation AUTO_RENEWAL_ARCHIVED_ASSET( 54 $accountNumber: String! 55 $assetId: Int! 56 $enable: Boolean 57 $note: String 58 ) { 59 autoRenewalArchivedAsset( 60 accountNumber: $accountNumber 61 assetId: $assetId 62 enable: $enable 63 note: $note 64 ) { 65 status 66 } 67 } 68`,z=H.J1` 69 mutation SET_ASSET_METADATA($accountNumber: String!, $assetId: Int!, $caption: String!) { 70 setAssetMetadata(accountNumber: $accountNumber, assetId: $assetId, c
70aption: $caption) { 71 status 72 } 73 } 74`;var D=a(41397),O=a(56943),U=a(71316),$=a(676),_=a(27061);var G=a(83119),K=a(78503),Z=a(45711);const W=()=>{const e=(0,s.GV)(u.eS),t=(0,o.useMemo)(()=>({allAssets:{name:"All assets",value:"all-assets",locizeKey:"tabAllAssets"},..."canada"!==(null===e||void 0===e?void 0:e.toLowerCase())?{freeUsage:{name:"Free usage",value:"free-usage",locizeKey:"tabFreeUsage"}}:{}}),[e]),[a,l]=(0,o.useState)(t.allAssets.value),r=(()=>{const e=(0,s.jL)(),[t]=(0,n.B)(),[a,l]=(0,o.useState)({}),[r,i]=(0,o.useState)("all"),[c,d]=(0,o.useState)(1),[h,x]=(0,o.useState)(12),[f,p]=(0,o.useState)(0),[v,b]=(0,o.useState)([]),[C,w]=(0,o.useState)(""),[j,A]=(0,o.useState)(""),[N,E]=(0,o.useState)(!1),[L,I]=(0,o.useState)(!1),[k,M]=(0,o.useState)(),T=(0,s.GV)(u.tE),H=(0,s.GV)(K.H4),{addNotification:F,removeNotification:V}=(0,m.y)(R.V2),{isManageArchivedAssetsEnabled:P,isMediaServiceEnabled:D}=(0,_.RL)(),[$]=(0,s.XO)(y.n6),{data:W,error:Y,loading:X,refetch:J}=(0,B.IT)(y.d9,{variables:{accountNumber:T,pageNumber:c,pageSize:h,assetType:r,searchTerm:C,archiveOnly:!1},notifyOnNetworkStatusChange:!0,skip:!T||!P||!D}),[q,{loading:Q}]=(0,s.XO)(z),ee=()=>{M(void 0),I(!1)};return(0,o.useEffect)(()=>{if(W){var e,t,s,o,n,r,i,c;const m=null!==(e=g()(W,"getAssetsByAccount.result"))&&void 0!==e?e:{},d=null!==(t=g()(m,"totalAssetCount"))&&void 0!==t?t:0,u=null!==(s=g()(m,"imageCount"))&&void 0!==s?s:0,h=null!==(o=g()(m,"logoCount"))&&void 0!==o?o:0,x=null!==(n=g()(m,"videoCount"))&&void 0!==n?n:0,f=null!==(r=g()(m,"youtubeCount"))&&void 0!==r?r:0,v=null!==(i=g()(m,"pdfCount"))&&void 0!==i?i:0,C=null!==(c=g()(W,"getAssetsByAccount.result.assets"))&&void 0!==c?c:[],w={...a};if(w.all.assetCount=d,w.image.assetCount=u,w.logo.assetCount=h,w.video.assetCount=x,w.youtube.assetCount=f,w.pdf.assetCount=v,l(w),C.length>0){const e=[...C];b(e)}else b([]);E(!1),p(d)}},[W]),(0,o.useEffect)(()=>{if(Y){const e=(0,O.cx)(Y);F({type:"error",title:t("general:errorTitle"),subtitle:(0,O.oL)(t("general:errorFallbackHeading"),e),dismissTime:U.wN}),E(!1)}},[Y]),(0,o.useEffect)(()=>{d(1),b([]),E(!0);const e=(0,S.T_)(),t={};Object.keys(e).forEach(a=>{"archived"!==a&&(t[a]={...e[a],active:a===r})}),l(t)},[r,C]),(0,o.useEffect)(()=>{d(1),b([]),E(!0)},[h]),(0,s.bN)(()=>{w(null===j||void 0===j?void 0:j.trim())},[j]),(0,o.useEffect)(()=>()=>{V(G.Od.cprErrorMetadataUpdate)},[]),(0,o.useEffect)(()=>{i("all"),d(1),x(12),p(0),w(""),b([]),M(void 0),I(!1)},[T]),{mediaTabs:a,activeTab:r,setActiveTab:e=>i(e),assets:v,setAssets:b,pageNumber:c,setPageNumber:d,pageSize:h,setPageSize:x,totalItems:f,setTotalItems:p,searchTerm:j,onSearch:e=>{A(e.currentTarget.value)},tabClicked:N,loading:X,refetch:J,deleteAssetFromGallary:async a=>{try{const s="id"in a?a.id:void 0;if(!s)return void F({type:"error",title:t("general:errorTitle"),subtitle:t("createRelease:invalidAsset","Unable to delete asset: Invalid asset ID"),dismissTime:U.wN});e((0,Z.ro)());const o=await $({variables:{draftOrderId:null,accountNumber:T,assetId:s,emailId:H}}),l=g()(o,"data.deleteAssetFromMS.success",!1),n=g()(o,"data.deleteAssetFromMS.message","");l?(F({type:"success",subtitle:t("createRelease:assetDeleteSuccessMessage","Asset deleted successfully."),dismissTime:U.wN}),J()):F({type:"error",title:t("general:errorTitle"),subtitle:t("createRelease:assetDeleteErrorMessage","Deletion failed. Try again.")||n,dismissTime:U.wN})}catch(s){const e=(0,O.cx)(s);F({type:"error",title:t("general:errorTitle"),subtitle:(0,O.oL)((null===e||void 0===e?void 0:e.errorMessage)||t("createRelease:assetDeleteErrorMessage","Deletion failed. Try again."),e),dismissTime:U.wN})}finally{e((0,Z.yr)())}},showMetaModal:L,selectedAssetForMetaUpdate:k,onAssetClick:(e,t)=>{null===e||void 0===e||e.stopPropagation(),M(t),I(!0)},closeMetaModal:ee,saveMetadata:async e=>{try{var a,s;await q({variables:{accountNumber:T,assetId:e.assetId,caption:e.caption||(null===(a=e.captions)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.assetCaption)||""}}),J(),ee()}catch(Y){const a=(0,O.cx)(Y);F({type:"error",title:t("general:errorTitle"),subtitle:(0,O.oL)(t("general:errorFallbackHeading"),a),dism
74issTime:U.wN})}},isMetadataSaving:Q}})(),i=(()=>{const[e]=(0,n.B)(),t=(0,s.GV)(u.tE),a=(0,s.GV)(u.eS),{addNotification:l}=(0,m.y)(R.V2),{isManageArchivedAssetsEnabled:r,isMediaServiceEnabled:i}=(0,_.RL)(),[c,d]=(0,o.useState)(1),[h,g]=(0,o.useState)(10),[x,f]=(0,o.useState)(0),[p,v]=(0,o.useState)({expdate:"ASC"}),[b,C]=(0,o.useState)([]),[w,y]=(0,o.useState)(""),[j,A]=(0,o.useState)(!1),N=(0,o.useMemo)(()=>Object.entries(p).map(e=>{let[t,a]=e;return`${t}:${a}`}).join(","),[p]),E=(0,o.useMemo)(()=>b.reduce((e,t)=>(e.push({...t,expiringSoon:!t.isCancelled&&t.expiryDays>=0&&t.expiryDays<=30}),e),[]),[b]),{loading:S,refetch:L}=(0,B.IT)(F,{variables:{accountNumber:t,pageNumber:c,pageSize:h,sorting:N},notifyOnNetworkStatusChange:!0,context:{debounceKey:$.L.queries.getArchivedAssets},skip:!t||!r||!i||"canada"===(null===a||void 0===a?void 0:a.toLowerCase()),onCompleted:e=>{const t=(0,D.get)(e,"getArchivedAssets.totalRecords",0),a=(0,D.get)(e,"getArchivedAssets.isAccountAutoRenewalEnabled",!1),s=(0,D.get)(e,"getArchivedAssets.data",[]);f(t),C(s),y(""),A(a)},onError:e=>{const t=(0,O.cx)(e),a=(0,O.oL)("",t);y((null!==a&&void 0!==a&&a.trim()?null===a||void 0===a?void 0:a.trim():e.message).replace("<br/>",""))}}),[I,{loading:k}]=(0,s.XO)(V,{onCompleted:()=>{L(),d(1)},onError:t=>{const a=(0,O.cx)(t);l({type:"error",title:e("general:errorTitle"),subtitle:(0,O.oL)(e("general:errorFallbackHeading"),a),dismissTime:U.wN})}}),[M,{loading:T}]=(0,s.XO)(P,{onCompleted:()=>{L()},onError:t=>{const a=(0,O.cx)(t);l({type:"error",title:e("general:errorTitle"),subtitle:(0,O.oL)(e("general:errorFallbackHeading"),a),dismissTime:U.wN})}});return(0,o.useEffect)(()=>{d(1)},[N]),(0,o.useEffect)(()=>{d(1),g(10),f(0),v({expdate:"ASC"}),C([])},[t]),(0,o.useEffect)(()=>{d(1),C([])},[h]),{pageNumber:c,setPageNumber:d,pageSize:h,setPageSize:g,totalItems:x,sorting:p,changeSorting:v,assets:E,errorStr:w,loading:S,refetch:L,isAccountAutoRenewalEnabled:j,cancleRenewInProgress:k,renewInProgress:T,cancleRenewAsset:e=>new Promise(a=>{I({variables:{accountNumber:t,assetId:e.id,note:"Cancle renew"}}).finally(()=>{a()})}),renewAsset:e=>new Promise(a=>{M({variables:{accountNumber:t,assetId:e.id,note:"Renew archieved asset"}}).finally(()=>{a()})})}})();return(0,o.useEffect)(()=>{"canada"===(null===e||void 0===e?void 0:e.toLowerCase())&&"free-usage"===a&&l(t.allAssets.value)},[e,a,l]),{optionTabs:t,activeOptionTab:a,setActiveOptionTab:l,allAssets:{...r},freeUsage:{...i}}},Y=()=>{const{t:e}=(0,n.B)(),{optionTabs:t,activeOptionTab:a,setActiveOptionTab:s}=(0,m.y)(l);return(0,r.jsx)("div",{className:"omc-border omc-border-solid omc-border-neutral-300 omc-rounded-md omc-px-[6px] omc-py-[4px] omc-w-max omc-flex omc-items-center omc-mb-5",children:Object.values(t).map(t=>(0,r.jsx)("button",{onClick:()=>s(t.value),className:(0,p.A)("omc-px-[10px] omc-py-[6px] omc-text-sm omc-font-medium omc-leading-5 omc-rounded omc-flex omc-items-center omc-justify-center",t.value===a?"omc-border omc-border-solid omc-border-neutral-200 omc-bg-neutral-100 omc-text-neutral-800":"omc-border-0 omc-bg-white"),children:e(`manageAssets:${t.locizeKey}`,t.name)},t.value))})},X=e=>{let{text:t}=e;return t?(0,r.jsx)("div",{className:"omc-inline-flex omc-h-5 omc-px-2.5 omc-py-0.5 omc-bg-[#063369] omc-rounded omc-justify-center omc-items-center omc-ml-2",children:(0,r.jsx)("div",{className:"omc-text-white omc-text-base omc-font-medium omc-leading-none",children:t})}):null};var J=a(84910);const q=e=>{let{totalCol:t}=e;return(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:t,children:(0,r.jsxs)("div",{className:"omc-flex omc-flex-col omc-justify-center omc-items-center omc-h-96",children:[(0,r.jsx)(J.h,{className:"omc-w-24 omc-h-24"}),(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-xl omc-font-medium omc-leading-7",children:"There are no archived images"}),(0,r.jsx)("div",{className:"omc-w-[373px] omc-text-center omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-7",children:"When you upload new images and archive them, they appear here."})]})})})};var Q=a(95252);const ee=e=>{let{totalCol:t}=e;return(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:t,children:(0,r.jsxs)("div",{className:"omc-flex omc-flex-col omc-items-center omc-justify-center omc-w-full omc-h-80",children:[(0,r.jsx)("div",{className:"omc-flex omc-items-center omc-justify-center omc-w-12 omc-h-12 omc-bg-neutral-100 omc-rounded-full",children:(0,r.jsx)(Q.A,{animation:"border",role:"status",className:"omc-text-xs omc-text-[#1c1b1f]"})}),(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-xl omc-font-medium omc-leading-7",children:"Loading data"}),(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-7",children:"It'll only take a moment"})]})})})};var te=a(7082),ae=a(64989);const se=e=>
74{let{msg:t,totalCol:a}=e;const{freeUsage:{refetch:s}}=(0,m.y)(l);return(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:a,children:(0,r.jsxs)("div",{className:"omc-flex omc-flex-col omc-justify-center omc-items-center omc-h-96",children:[(0,r.jsx)("div",{className:"omc-p-6 omc-bg-neutral-100 omc-rounded-[100px] omc-justify-start omc-items-center omc-gap-4 omc-inline-flex",children:(0,r.jsx)(ae.I,{className:"omc-w-24 omc-h-24"})}),(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-xl omc-font-medium omc-leading-7 omc-mt-4",children:"Something went wrong"}),(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-7",children:"Sorry, we were unable to load the data"}),t&&(0,r.jsx)("div",{className:"omc-text-neutral-500 omc-text-lg omc-font-medium omc-leading-7 omc-px-5 omc-mt-1",dangerouslySetInnerHTML:{__html:te.A.sanitize(t||"")}}),(0,r.jsx)("button",{onClick:()=>s(),className:"omc-mt-5 omc-text-[#063369] omc-text-base omc-font-semibold omc-leading-normal omc-border omc-border-solid omc-border-neutral-300 omc-rounded omc-px-4 omc-py-3 omc-bg-white hover:omc-bg-[#063369] hover:omc-text-white",children:"Reload data"})]})})})};var oe=a(77923),le=a(26217);const ne=a(14491).Ay.div` 75 position: absolute; 76 width: 100%; 77 height: 72%; 78 display: flex; 79 align-items: center; 80 justify-content: center; 81 .spinner-border { 82 font-size: 1px; 83 width: 36px; 84 height: 36px; 85 } 86`,re=e=>{let{src:t,alt:a}=e;const[s,l]=(0,o.useState)(!1),[n,i]=(0,o.useState)(!1);return t?(0,r.jsxs)(r.Fragment,{children:[s?(0,r.jsx)(ne,{children:(0,r.jsx)(Q.A,{animation:"border",variant:"secondary",size:"sm"})}):null,n?(0,r.jsx)(le.A,{mode:"error"}):(0,r.jsx)(oe.LazyLoadImage,{src:t,alt:a||"",threshold:100,beforeLoad:()=>{l(!0)},onLoad:()=>{l(!1)},onError:()=>{i(!0),l(!1)},className:"omc-w-full omc-h-full"})]}):(0,r.jsx)(le.A,{mode:"error"})};var ie=a(22647),ce=a(5637);const me=e=>{let{title:t,body:a,cancleBtnTxt:s,confirmBtnTxt:l,show:n,onClose:i,onConfirm:c,isCancleBtn:m,inProgress:d}=e;const u=()=>i(!1),h=(0,o.useMemo)(()=>({header:m?"omc-bg-[#feebea]":"omc-bg-white",title:m?"!omc-text-[#34404b] omc-text-base !omc-font-bold":"!omc-text-[#34404b] omc-text-xl !omc-font-bold",cancleBtn:"omc-px-3.5 omc-py-2.5 omc-border-0 omc-text-[#063369] omc-text-sm omc-font-semibold omc-leading-tight omc-bg-transparent",comfirmBtn:m?"omc-text-white omc-text-sm omc-font-semibold omc-leading-tight omc-bg-[#de4543] omc-px-3.5 omc-py-2.5 omc-rounded omc-border omc-border-solid omc-border-red-500":"omc-text-white omc-text-sm omc-font-semibold omc-leading-tight omc-bg-[#063369] omc-px-3.5 omc-py-2.5 omc-rounded omc-border omc-border-solid omc-border-[#063369]"}),[m]);return(0,r.jsxs)(ce.A,{show:n,onHide:u,centered:!0,children:[(0,r.jsx)(ce.A.Header,{closeButton:!0,className:h.header,children:(0,r.jsxs)(ce.A.Title,{className:(0,p.A)("omc-flex omc-items-center",h.title),children:[m&&(0,r.jsx)(ie.i,{className:"omc-mr-2 omc-fill-[#de4543]"}),t]})}),(0,r.jsx)(ce.A.Body,{className:"omc-text-[#34404b] omc-text-lg omc-font-normal !omc-p-6 !omc-break-all",dangerouslySetInnerHTML:{__html:te.A.sanitize(a)}}),(0,r.jsxs)(ce.A.Footer,{children:[(0,r.jsx)("button",{disabled:d,className:(0,p.A)("omc-flex omc-items-center disabled:omc-text-gray-80 disabled:omc-cursor-not-allowed",h.cancleBtn),onClick:u,children:(0,r.jsx)("span",{className:"omc-relative omc-top-0.3",children:s})}),(0,r.jsxs)("button",{disabled:d,className:(0,p.A)("omc-flex omc-items-center disabled:omc-text-gray-80 disabled:omc-cursor-not-allowed disabled:omc-bg-gray-40 disabled:omc-border-gray-40",h.comfirmBtn),onClick:c,children:[d&&(0,r.jsx)(Q.A,{animation:"border",size:"sm",className:"omc-mr-2"}),(0,r.jsx)("span",{className:"omc-relative omc-top-0.3",children:l})]})]})]})},de=e=>{let{asset:t}=e;const{t:a}=(0,n.B)(),{addNotification:s}=(0,m.y)(R.V2),{freeUsage:{isAccountAutoRenewalEnabled:i,cancleRenewInProgress:c,cancleRenewAsset:d,renewInProgress:u,renewAsset:h}}=(0,m.y)(l),[g,x]=(0,o.useState)(!1),[f,p]=(0,o.useState)(!1),v=()=>x(!0),b=()=>p(!0),C=(0,o.useMemo)(()=>({action:{onClick:i?v:b},text:i?a("manageAssets:txtCancelRenewal","Cancel Renewal"):a("manageAssets:txtRenew","Renew")}),[i,a]);return(0,r.jsxs)(r.Fragment,{children:[t.expiringSoon?(0,r.jsx)("button",{...C.action,className:"omc-px-2 omc-py-1.5 omc-bg-white omc-rounded omc-border omc-border-solid omc-border-neutral-300 omc-text-[#063369] omc-text-sm omc-font-medium omc-leading-tight hover:omc-bg-[#063369] hover:omc-text-white",children:(0,r.jsx)("span",{className:"omc-relative omc-top-0.5",children:C.text})}):null,(0,r.jsx)(me,{title:a("manageAssets:cancelRenewalConfirmationTitle","Cancel Renewal"),body:`<p class='omc-m-0'>${a("manageAssets:cancelRenewalConfirmationBody1","If you cancel renewal for this asset, it will no longer be available for unlimited reuse.")}</p> <p class='omc-m-0'>${a("manageAssets:cancelRenewalConfirmationBody2","Are you sure you want to cancel renewal?")}</p>`,cancleBtnTxt:a("manageAssets:cancelRenewalConfirmationBtnCancel","Keep Renewal"),confirmBtnTxt:a("manageAssets:cancelRenewalConfirmationBtnDone","Cancel Renewal"),show:g,onClose:x,onConfirm:async()=>{await d(t),x(!1),s({type:"success",subtitle:`Cancel archiving successful for ${t.assetName}
86`,dismissTime:U.wN})},isCancleBtn:!0,inProgress:c}),(0,r.jsx)(me,{title:a("manageAssets:renewalConfirmationTitle","Confirm Renewal"),body:`<p>${a("manageAssets:renewalConfirmationBody1","You are about to renew")} <strong>${t.assetName}</strong> ${a("manageAssets:renewalConfirmationBody2","for 1 year at a cost of $310.")}</p>`,cancleBtnTxt:a("manageAssets:renewalConfirmationBtnCancel","Cancel"),confirmBtnTxt:a("manageAssets:renewalConfirmationBtnDone","Confirm Renewal"),show:f,onClose:p,onConfirm:async()=>{await h(t),p(!1),s({type:"success",subtitle:`Renew archiving successful for ${t.assetName}`,dismissTime:U.wN})},inProgress:u})]})};var ue=a(35943);const he=e=>{let{headings:t}=e;const{t:a}=(0,n.B)(),{freeUsage:{sorting:s,changeSorting:o}}=(0,m.y)(l);return(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{className:"omc-bg-neutral-100 omc-rounded-tl-sm omc-rounded-tr-sm",children:t.map((e,t)=>(0,r.jsx)("th",{className:"omc-p-4 omc-text-neutral-600 omc-text-sm omc-font-semibold omc-uppercase omc-leading-tight omc-tracking-wide",children:(0,r.jsxs)("div",{className:"omc-flex omc-items-center",children:[(0,r.jsx)("span",{className:"omc-h-full omc-uppercase",children:a(`manageAssets:${e.locizeKey}`,e.name)}),e.sorting&&(0,r.jsx)("button",{className:"omc-p-0 omc-outline-none omc-border-none omc-bg-transparent",onClick:()=>{return t=e.value,void o(e=>({...e,[t]:"ASC"===e[t]?"DESC":"ASC"}));var t},children:(s[e.value],(0,r.jsx)(ue.m,{}))})]})},t))})})},ge=()=>{const[e]=(0,n.B)(),t=(0,s.GV)(u.Mv),a=(0,s.GV)(u.cn),{freeUsage:{assets:o,pageNumber:i,pageSize:d,totalItems:h,setPageNumber:g,setPageSize:x,errorStr:f,loading:p,isAccountAutoRenewalEnabled:v}}=(0,m.y)(l),b=[{name:"PREVIEW",value:"preview",locizeKey:"theadPreview",sorting:!1},{name:"FILE NAME",value:"file name",locizeKey:"theadFileName",sorting:!1},{name:"CAPTION",value:"caption",locizeKey:"theadCaption",sorting:!1},{name:"RENEWAL DATE",value:"expdate",locizeKey:"theadEndDateUtc",sorting:!0},{name:"",value:"",locizeKey:"",sorting:!1}],C=t=>t.expiringSoon?v?e("manageAssets:renewingSoon","Renewing soon"):e("manageAssets:expiringSoon","Expiring soon"):"";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"omc-overflow-x-auto",children:(0,r.jsxs)("table",{className:"omc-border omc-border-gray-200 omc-border-solid omc-w-full",children:[(0,r.jsx)(he,{headings:b}),(0,r.jsxs)("tbody",{children:[p&&(0,r.jsx)(ee,{totalCol:b.length}),!p&&f.length>0&&(0,r.jsx)(se,{totalCol:b.length,msg:f}),!p&&0===f.length&&0===o.length&&(0,r.jsx)(q,{totalCol:b.length}),!p&&0===f.length&&o.length>0&&o.map((s,o)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"omc-p-4",children:(0,r.jsx)("div",{className:"omc-relative !omc-w-16 !omc-h-12 omc-flex omc-items-center",children:(0,r.jsx)(re,{src:s.thumbnail,alt:s.assetName})})}),(0,r.jsx)("td",{className:"omc-p-4",children:(0,r.jsx)("div",{className:"omc-w-72 omc-break-all omc-text-black omc-text-base omc-font-medium omc-leading-normal",children:s.assetName})}),(0,r.jsx)("td",{className:"omc-p-4",children:(0,r.jsx)("div",{className:"omc-w-72 omc-break-words omc-text-black omc-text-base omc-font-medium omc-leading-normal",children:s.caption})}),(0,r.jsx)("td",{className:"omc-p-4",children:(0,r.jsxs)("div",{className:"omc-w-60",children:[e("dateTime:date",{date:s.endDateUtc,formatParams:{...(0,O.VD)(t,"medium",null===a||void 0===a?void 0:a.bureau_name)}}),s.expiringSoon&&(0,r.jsx)(X,{text:C(s)})]})}),(0,r.jsx)("td",{className:"omc-p-4",children:(0,r.jsx)("div",{className:"omc-w-40",children:(0,r.jsx)(de,{asset:s})})})]},o))]})]})}),!p&&0===f.length&&o.length>0&&(0,r.jsx)(c.XQ6,{pageNumber:i,pageSize:d,totalItems:h,onChangePage:e=>g(e),enablePageSizeSelect:!0,onChangePageSize:e=>x(e),showPaginateResultsMini:!0})]})},xe=()=>{const{t:e}=(0,n.B)();return(0,r.jsx)("div",{className:"omc-text-black omc-text-2xl omc-font-medium omc-leading-8 omc-mb-5 omc-capitalize",children:e("manageAssets:tabFreeUsage","Free usage")})};var fe=a(36113);const pe=()=>{const{t:e}=(0,n.B)(),{freeUsage:{isAccountAutoRenewalEnabled:t}}=(0,m.y)(l);return(0,r.jsx)("div",{className:"omc-flex omc-w-full omc-p-4 omc-bg-[#ecf4fe] omc-rounded omc-justify-between omc-items-center omc-mb-5",children:(0,r.jsxs)("div",{className:"omc-grow omc-shrink omc-basis-0 omc-h-full omc-pr-4 omc-justify-start omc-items-center omc-gap-3 omc-flex",children:[(0,r.jsx)(fe.m,{bgFill:!0}),t?(0,r.jsxs)("div",{className:"omc-grow omc-shrink omc-basis-0",children:[(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-tight",children:e("manageAssets:freeUsageRenewInfo1","These assets were archived for unlimited reuse and will automatically renew at a discounted rate of $310* per year. Click on 'Cancel Renewal' before your assets's renewal date to opt out of auto-renewal.")}),(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-tight",children:e("manageAssets:freeUsageRenewInfo2","*This rate may vary depending on your current agreement.")}),(0,r.jsxs)("div",{className:"omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-tight omc-mt-2",children:[e("manageAssets:freeUsageRenewInfo3","For help with current or past renewals, please contact"),(0,r.jsx)("a",{className:"omc-underline omc-ml-1 omc-text-neutral-800 hover:omc-text-neutral-800",href:"mailto:[email protected]",children:e("manageAssets:freeUsageInfoEmail","[email protected].")})]})]}):(0,r.jsxs)("div",{className:"omc-grow omc-shrink omc-basis-0",children:[(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-tight",children:e("manageAssets:freeUsageInfo1","Your account has opted out of automatic renew
86als. To renew an asset at the discounted rate $310*, select Renew before your asset's expiration date.")}),(0,r.jsx)("div",{className:"omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-tight",children:e("manageAssets:freeUsageInfo2","*This rate may vary depending on your current agreement.")}),(0,r.jsxs)("div",{className:"omc-text-neutral-800 omc-text-lg omc-font-medium omc-leading-tight omc-mt-2",children:[e("manageAssets:freeUsageInfo3","For help with current or past renewals, please contact"),(0,r.jsx)("a",{className:"omc-underline omc-ml-1 omc-text-neutral-800 hover:omc-text-neutral-800",href:"mailto:[email protected]",children:e("manageAssets:freeUsageInfoEmail","[email protected].")})]})]})]})})},ve=()=>(0,r.jsxs)("div",{children:[(0,r.jsx)(xe,{}),(0,r.jsx)(pe,{}),(0,r.jsx)(ge,{})]}),be=()=>{var e;const{t:t}=(0,n.B)();(0,s.Kp)(t("manageAssets:heading","Manage Assets"));const a=W();return(0,r.jsx)(l.Provider,{value:a,children:(0,r.jsxs)("div",{className:"omc-flex omc-flex-col omc-px-5 omc-py-5 omc-bg-white",children:[(0,r.jsx)(Y,{}),a.activeOptionTab===a.optionTabs.allAssets.value&&(0,r.jsx)(T,{}),a.activeOptionTab===(null===(e=a.optionTabs.freeUsage)||void 0===e?void 0:e.value)&&(0,r.jsx)(ve,{})]})})}},48813(e,t,a){a.d(t,["T_",0,()=>({all:{name:"All",locizeKey:"multimediaAssetLibraryTabTxtAll",active:!0,assetCount:0},archived:{name:"Free usage",locizeKey:"multimediaAssetLibraryTabTxtArchived",active:!0,assetCount:0},logo:{name:"Logos",locizeKey:"multimediaAssetLibraryTabTxtLogos",active:!1,assetCount:0},image:{name:"Images",locizeKey:"multimediaAssetLibraryTabTxtImages",active:!1,assetCount:0},video:{name:"Videos",locizeKey:"multimediaAssetLibraryTabTxtVideos",active:!1,assetCount:0},youtube:{name:"YouTube",locizeKey:"multimediaAssetLibraryTabTxtYoutube",active:!1,assetCount:0},pdf:{name:"PDFs",locizeKey:"multimediaAssetLibraryTabTxtPdfs",active:!1,assetCount:0}}),"sD",0,"CAPTION"])},23765(e,t,a){var s=a(48661),o=a(44414);const l=e=>{var t,a,l,n;let{dimensions:r}=e;const[i]=(0,s.B)();return(null!==(t=r.width)&&void 0!==t?t:0)>0&&(null!==(a=r.height)&&void 0!==a?a:0)>0&&Math.max(null!==(l=r.width)&&void 0!==l?l:0,null!==(n=r.height)&&void 0!==n?n:0)<800?(0,o.jsx)("div",{className:"mx-3",children:(0,o.jsx)("span",{"data-testid":"dimensions-warning-title",className:"text-danger-color body-text-small",children:i("createRelease:multimediaResolutionWarning","Your file is smaller than our suggested image size and you may be contacted for a larger image. Minimum is 800 pixels on the longest side.")})}):null};a.d(t,["A",0,l])},46814(e,t,a){var s=a(72004),o=a(48661),l=a(78813),n=a(90246),r=a(95912),i=a(44414);const c=e=>{let{langCode:t,caption:a,setMetadata:c,label:m,isValid:d,placeholder:u,freeUsage:h}=e;const[g]=(0,o.B)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{"data-testid":"caption-field-set",className:"mb-2",children:(0,i.jsxs)("label",{"data-testid":"label",htmlFor:`caption-${t}`,className:"mb-0 text-gray-90 fw-bold form-label omc-flex omc-items-center omc-gap-1",children:[m,h?(0,i.jsx)(l.A,{placement:"bottom",trigger:["hover","click","focus"],overlay:(0,i.jsx)(n.A,{className:"tooltip-body body-text text-center modal-tooltip","data-testid":"logo-archive",children:g("createRelease:freeUsageCaptionEditInfo","The caption can\u2019t be edited while the asset is on a free usage period.")}),children:(0,i.jsx)("button",{className:"btn-icon p-0",type:"button","aria-label":"information",children:(0,i.jsx)(r.Gn1,{name:"info-2",className:"omc-fill-none omc-stroke-black omc-w-4 omc-h-4"})})}):(0,i.jsx)("span",{className:"fw-bold",children:"*"})]})}),(0,i.jsx)("div",{children:(0,i.jsx)("textarea",{"data-testid":"textarea",id:`caption-${t}`,name:`caption-${t}`,className:(0,s.A)("rover-custom-textarea disabled:omc-opacity-50",d?"":"invalid"),rows:5,onChange:e=>{c(a=>({...a,captions:{...a.captions,[t]:e.target.value}}))},value:a,maxLength:500,placeholder:u,disabled:h})}),(0,i.jsx)("div",{"daa-testid":"caption-count",className:"caption-char-count text-gray-80",children:g("createRelease:multimediaImageMetadataCharacters",{count:null===a||void 0===a?void 0:a.length,limit:500})})]})};a.d(t,["A",0,c])},41433(e,t,a){var s=a(48661),o=a(44414);const l=e=>{let{fileName:t,fileSize:a,heightPx:l,widthPx:n}=e;const[r]=(0,s.B)();return(0,o.jsxs)("div",{"data-testid":"asset-information",className:"flex-1 omc-mx-3",children:[(0,o.jsx)("div",{"data-testid":"filename",className:"body-14 bold",children:null!==t&&void 0!==t?t:r("createRelease:multimediaImageMetadataDefaultTitle","Untitled")}),(0,o.jsxs)("div",{"data-testid":"file-size",className:"omc-mt-1.5 body-text-small text-gray-80",children:[a?(0,o.jsxs)("span",{children:[a,"KB"]}):null,n&&l?(0,o.jsxs)("span",{"data-testid":"dimensions",className:"omc-ml-3",children:[n," \xd7 ",l]}):null]})]})};a.d(t,["A",0,l])},35943(e,t,a){var s=a(44414);a.d(t,["m",0,e=>{let{gradient:t,...a}=e;const o=Math.random().toString(16).slice(2);return t?(0,s.jsxs)("svg",{...a,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:`url(#${o})`,children:[(0,s.jsx)("path",{d:"M7 10L12 15L17 10H7Z"}),(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:o,x1:"0",y1:"0.5",x2:"16.5",y2:"17",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"#f9714a"}),(0,s.jsx)("stop",{offset:"0.600625",stopColor:"#b3507c"}),(0,s.jsx)("stop",{offset:"1",stopColor:"#076286"})]})})]}):(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M7 10L12 15L17 10H7Z",fill:"#677078"})})}])},13531(e,t,a){var s=a(44414);a.d(t,["U",0,e=>(0,s.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"23",viewBox:"0 0 24 23",fill:"
86currentColor",children:(0,s.jsx)("path",{d:"M19 5.91L17.59 4.5L12 10.09L6.41 4.5L5 5.91L10.59 11.5L5 17.09L6.41 18.5L12 12.91L17.59 18.5L19 17.09L13.41 11.5L19 5.91Z"})})])},36113(e,t,a){var s=a(44414);a.d(t,["m",0,e=>{let{inverse:t=!1,bgFill:a=!1,...o}=e;return t?(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",children:(0,s.jsx)("path",{d:"M9.99984 1.6665C5.39984 1.6665 1.6665 5.39984 1.6665 9.99984C1.6665 14.5998 5.39984 18.3332 9.99984 18.3332C14.5998 18.3332 18.3332 14.5998 18.3332 9.99984C18.3332 5.39984 14.5998 1.6665 9.99984 1.6665ZM10.8332 14.1665H9.1665V9.1665H10.8332V14.1665ZM10.8332 7.49984H9.1665V5.83317H10.8332V7.49984Z"})}):a?(0,s.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("g",{id:"Alert Icon",children:(0,s.jsx)("path",{id:"Vector",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V11H13V17ZM13 9H11V7H13V9Z",fill:"#063369"})})}):(0,s.jsx)("svg",{...o,width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M7.2 5.6H8.8V4H7.2M8 14.4C4.472 14.4 1.6 11.528 1.6 8C1.6 4.472 4.472 1.6 8 1.6C11.528 1.6 14.4 4.472 14.4 8C14.4 11.528 11.528 14.4 8 14.4ZM8 0C6.94943 0 5.90914 0.206926 4.93853 0.608964C3.96793 1.011 3.08601 1.60028 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8C0 10.1217 0.842855 12.1566 2.34315 13.6569C3.08601 14.3997 3.96793 14.989 4.93853 15.391C5.90914 15.7931 6.94943 16 8 16C10.1217 16 12.1566 15.1571 13.6569 13.6569C15.1571 12.1566 16 10.1217 16 8C16 6.94943 15.7931 5.90914 15.391 4.93853C14.989 3.96793 14.3997 3.08601 13.6569 2.34315C12.914 1.60028 12.0321 1.011 11.0615 0.608964C10.0909 0.206926 9.05058 0 8 0ZM7.2 12H8.8V7.2H7.2V12Z",fill:"#677078"})})}])}}]);
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.