@clickview/library-editor 1.54.0 → 1.54.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +3 -3
- package/dist/css/{826-library-editor-2797c4568f.chunk.css → 4001-library-editor-da87291909.chunk.css} +3 -2
- package/dist/css/{library-editor-app-cade5e4b6a.css → library-editor-app-08d619de95.css} +2 -2
- package/dist/languages/en.json +1 -1
- package/dist/scripts/101-1aa755b98b.chunk.js +1 -0
- package/dist/scripts/{1010-37e7c83417.chunk.js → 1010-2c4e71bac2.chunk.js} +1 -1
- package/dist/scripts/{1086-7632f7b45b.chunk.js → 1086-d0efa1a0ca.chunk.js} +1 -1
- package/dist/scripts/1216-9d2e314558.chunk.js +1 -0
- package/dist/scripts/{1269-02d8d91784.chunk.js → 1269-ec70091b19.chunk.js} +1 -1
- package/dist/scripts/{1409-79be9fc25d.chunk.js → 1409-f3fea6c3c3.chunk.js} +1 -1
- package/dist/scripts/1537-2945b91924.chunk.js +1 -0
- package/dist/scripts/{1703-4d41a9e919.chunk.js → 1703-0e6940a3c0.chunk.js} +1 -1
- package/dist/scripts/{1832-305c691701.chunk.js → 1832-9fd96d5efe.chunk.js} +1 -1
- package/dist/scripts/{1876-33e86bc26f.chunk.js → 1876-fc815ba31e.chunk.js} +1 -1
- package/dist/scripts/1973-074d4e72c2.chunk.js +1 -0
- package/dist/scripts/209-f9e52775b1.chunk.js +1 -0
- package/dist/scripts/{243-526e36736c.chunk.js → 243-d27b3c7903.chunk.js} +1 -1
- package/dist/scripts/2516-0290fc7712.chunk.js +1 -0
- package/dist/scripts/{259-e1c3eb98ce.chunk.js → 259-d6a4aa6694.chunk.js} +1 -1
- package/dist/scripts/{2601-f14eacbf73.chunk.js → 2601-d42245cb40.chunk.js} +1 -1
- package/dist/scripts/2639-efe1222211.chunk.js +2 -0
- package/dist/scripts/2639-efe1222211.chunk.js.LICENSE.txt +8 -0
- package/dist/scripts/{2644-60bdfc1c95.chunk.js → 2644-cadc6531d6.chunk.js} +1 -1
- package/dist/scripts/2648-61a84bc983.chunk.js +1 -0
- package/dist/scripts/{2692-1ddd87476e.chunk.js → 2692-b7dff9da8a.chunk.js} +1 -1
- package/dist/scripts/{2803-fbb9d2439d.chunk.js → 2803-026f3af7cb.chunk.js} +1 -1
- package/dist/scripts/{2888-c2c8b859cd.chunk.js → 2888-a406bcd564.chunk.js} +1 -1
- package/dist/scripts/2955-521e238d27.chunk.js +1 -0
- package/dist/scripts/299-32a1391000.chunk.js +1 -0
- package/dist/scripts/{2998-aae0ec14de.chunk.js → 2998-a3c3a1e950.chunk.js} +1 -1
- package/dist/scripts/{3400-ebc91cde7a.chunk.js → 3400-326dc33968.chunk.js} +1 -1
- package/dist/scripts/{35-278014f3ca.chunk.js → 35-d04a61537f.chunk.js} +1 -1
- package/dist/scripts/{3551-17275d533c.chunk.js → 3551-97ac416527.chunk.js} +1 -1
- package/dist/scripts/{3639-c5cc04c72d.chunk.js → 3639-171b53e474.chunk.js} +1 -1
- package/dist/scripts/3746-9f89d2e526.chunk.js +1 -0
- package/dist/scripts/376-4d9e8d5305.chunk.js +1 -0
- package/dist/scripts/{3763-47619f0e54.chunk.js → 3763-21a9bc8c81.chunk.js} +1 -1
- package/dist/scripts/3969-14f58e46c8.chunk.js +1 -0
- package/dist/scripts/4001-5f16bcaff3.chunk.js +2 -0
- package/dist/scripts/4024-e76b07c207.chunk.js +1 -0
- package/dist/scripts/{4201-ffd35af9cb.chunk.js → 4201-9f363cadea.chunk.js} +1 -1
- package/dist/scripts/{4245-9262674448.chunk.js → 4245-3680566469.chunk.js} +1 -1
- package/dist/scripts/{8727-30dadf014c.chunk.js → 4506-e3e16c1c39.chunk.js} +1 -1
- package/dist/scripts/4523-e918636e67.chunk.js +1 -0
- package/dist/scripts/{4591-78600e384c.chunk.js → 4591-84bc2f21f0.chunk.js} +1 -1
- package/dist/scripts/471-9ae0a7d088.chunk.js +2 -0
- package/dist/scripts/{4860-6001ab4e2a.chunk.js → 4860-7e9c7b578f.chunk.js} +1 -1
- package/dist/scripts/4984-e55e0bfa17.chunk.js +1 -0
- package/dist/scripts/514-9e42f33112.chunk.js +2 -0
- package/dist/scripts/514-9e42f33112.chunk.js.LICENSE.txt +6 -0
- package/dist/scripts/{5173-d333602893.chunk.js → 5173-6fe93f90b8.chunk.js} +1 -1
- package/dist/scripts/{5286-b5a0097954.chunk.js → 5286-c55bd5882c.chunk.js} +1 -1
- package/dist/scripts/535-96be75b325.chunk.js +1 -0
- package/dist/scripts/{5412-e2505df3a4.chunk.js → 5412-abf3c7ab24.chunk.js} +1 -1
- package/dist/scripts/{5418-f84d0ff359.chunk.js → 5418-4cf3592f6a.chunk.js} +1 -1
- package/dist/scripts/{5424-65be3c657c.chunk.js → 5424-fb9af4cac5.chunk.js} +1 -1
- package/dist/scripts/5524-83e92242a1.chunk.js +1 -0
- package/dist/scripts/5698-74d4a95cab.chunk.js +1 -0
- package/dist/scripts/{5707-41459498e9.chunk.js → 5707-2455798bbe.chunk.js} +1 -1
- package/dist/scripts/{5747-f28298b80d.chunk.js → 5747-dc100fe944.chunk.js} +1 -1
- package/dist/scripts/5850-21711256a9.chunk.js +1 -0
- package/dist/scripts/5891-1f548b9c62.chunk.js +1 -0
- package/dist/scripts/{6093-e19df1d1fa.chunk.js → 6093-c4d7d99258.chunk.js} +1 -1
- package/dist/scripts/61-35a4e0dd3d.chunk.js +2 -0
- package/dist/scripts/{6352-d267f9afea.chunk.js → 6352-9f5498c43f.chunk.js} +1 -1
- package/dist/scripts/6637-3078ed12bc.chunk.js +1 -0
- package/dist/scripts/6725-52d65e0d02.chunk.js +2 -0
- package/dist/scripts/{6732-85afd02f41.chunk.js → 6732-0223b7e084.chunk.js} +1 -1
- package/dist/scripts/{6774-a002ac7253.chunk.js → 6774-7d16e3a1b2.chunk.js} +1 -1
- package/dist/scripts/{6788-dc6b522995.chunk.js → 6788-1baf5483df.chunk.js} +1 -1
- package/dist/scripts/6963-2e5edf04ac.chunk.js +1 -0
- package/dist/scripts/{7053-00950d18ae.chunk.js → 7053-5f6f2bf8ee.chunk.js} +1 -1
- package/dist/scripts/7071-9ae15d6979.chunk.js +1 -0
- package/dist/scripts/7153-11798dda90.chunk.js +1 -0
- package/dist/scripts/{7190-2b40df1e89.chunk.js → 7190-b143292308.chunk.js} +1 -1
- package/dist/scripts/7295-c5ccbfe2be.chunk.js +1 -0
- package/dist/scripts/{7376-e3bf3a94f9.chunk.js → 7376-e476873e22.chunk.js} +1 -1
- package/dist/scripts/{7408-49b32d5829.chunk.js → 7408-eb04403233.chunk.js} +1 -1
- package/dist/scripts/7416-bafece2a3d.chunk.js +1 -0
- package/dist/scripts/7827-53c10fe9d7.chunk.js +1 -0
- package/dist/scripts/8080-540165cb5c.chunk.js +1 -0
- package/dist/scripts/8113-eb9901344c.chunk.js +1 -0
- package/dist/scripts/{8213-6c873c853e.chunk.js → 8213-4d11becb33.chunk.js} +1 -1
- package/dist/scripts/{8362-267efdac61.chunk.js → 8362-2712404025.chunk.js} +1 -1
- package/dist/scripts/8542-7dbc2fa676.chunk.js +1 -0
- package/dist/scripts/8591-920b0560e4.chunk.js +1 -0
- package/dist/scripts/{8726-2d0bc64637.chunk.js → 8726-10013d1e22.chunk.js} +1 -1
- package/dist/scripts/8757-8ba60a3c5f.chunk.js +2 -0
- package/dist/scripts/8757-8ba60a3c5f.chunk.js.LICENSE.txt +44 -0
- package/dist/scripts/{8762-be126e413d.chunk.js → 8762-0c818e61d0.chunk.js} +1 -1
- package/dist/scripts/{8906-2ae58fb990.chunk.js → 8906-3052c24e98.chunk.js} +1 -1
- package/dist/scripts/{8952-27f5ea4a16.chunk.js → 8952-5dfd08cdc7.chunk.js} +2 -2
- package/dist/scripts/9077-fd1d054d31.chunk.js +1 -0
- package/dist/scripts/9134-8845590ece.chunk.js +1 -0
- package/dist/scripts/{9357-e71ea6a34d.chunk.js → 9357-04700677af.chunk.js} +1 -1
- package/dist/scripts/9369-cacc5f30e5.chunk.js +2 -0
- package/dist/scripts/9383-26ce3e3847.chunk.js +1 -0
- package/dist/scripts/{9695-636ea0ef64.chunk.js → 9695-8b46921478.chunk.js} +1 -1
- package/dist/scripts/{9927-7a935c955d.chunk.js → 9927-1a5a65a341.chunk.js} +1 -1
- package/dist/scripts/bundle-5d010f1f12.min.js +2 -0
- package/dist/scripts/bundle-5d010f1f12.min.js.LICENSE.txt +133 -0
- package/dist/scripts/{polyfills-5ce436cbbe.min.js → polyfills-e4d8584da7.min.js} +1 -1
- package/package.json +4 -4
- package/dist/scripts/101-c8fa0bf8c0.chunk.js +0 -1
- package/dist/scripts/112-4f413f94c0.chunk.js +0 -1
- package/dist/scripts/1216-83f6fbc7be.chunk.js +0 -1
- package/dist/scripts/152-808e046b1f.chunk.js +0 -2
- package/dist/scripts/1973-7a1768228d.chunk.js +0 -1
- package/dist/scripts/2417-e85abc4005.chunk.js +0 -1
- package/dist/scripts/2482-ded3090c15.chunk.js +0 -1
- package/dist/scripts/2648-0a58c0fc05.chunk.js +0 -1
- package/dist/scripts/2802-d428814c29.chunk.js +0 -2
- package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +0 -8
- package/dist/scripts/299-e59ef1fc4f.chunk.js +0 -1
- package/dist/scripts/343-4f77983932.chunk.js +0 -1
- package/dist/scripts/3746-1fd61fe062.chunk.js +0 -1
- package/dist/scripts/376-0ae51da38f.chunk.js +0 -1
- package/dist/scripts/3969-c636ff3159.chunk.js +0 -1
- package/dist/scripts/4024-8372510247.chunk.js +0 -1
- package/dist/scripts/4523-e244d0dae2.chunk.js +0 -1
- package/dist/scripts/5046-7f741b88da.chunk.js +0 -1
- package/dist/scripts/514-eeb95eba47.chunk.js +0 -1
- package/dist/scripts/535-b26597b4d0.chunk.js +0 -1
- package/dist/scripts/5524-04583b6e40.chunk.js +0 -1
- package/dist/scripts/5850-996ea58208.chunk.js +0 -1
- package/dist/scripts/5891-bf6bb58afe.chunk.js +0 -1
- package/dist/scripts/61-29f179811f.chunk.js +0 -2
- package/dist/scripts/6532-48f3f080f5.chunk.js +0 -2
- package/dist/scripts/6963-68cce4d38c.chunk.js +0 -1
- package/dist/scripts/7002-48057608dc.chunk.js +0 -1
- package/dist/scripts/7071-78d0b6c0cb.chunk.js +0 -1
- package/dist/scripts/708-4faf09f1e5.chunk.js +0 -1
- package/dist/scripts/7153-b581d35045.chunk.js +0 -1
- package/dist/scripts/7295-5a82c36f28.chunk.js +0 -1
- package/dist/scripts/7827-ef0d617862.chunk.js +0 -1
- package/dist/scripts/8113-d678e76098.chunk.js +0 -1
- package/dist/scripts/8234-d793dd9bda.chunk.js +0 -1
- package/dist/scripts/826-c6d1a46e45.chunk.js +0 -2
- package/dist/scripts/8542-475ab8438e.chunk.js +0 -1
- package/dist/scripts/8591-149f4a2b62.chunk.js +0 -1
- package/dist/scripts/9369-f43ee314be.chunk.js +0 -2
- package/dist/scripts/9383-2c77c78fe8.chunk.js +0 -1
- package/dist/scripts/bundle-8f42183790.min.js +0 -2
- package/dist/scripts/bundle-8f42183790.min.js.LICENSE.txt +0 -1
- package/typings/libs/CVEvents.d.ts +0 -13
- package/typings/libs/CVLanguages.d.ts +0 -24
- package/typings/libs/LazyLoad.d.ts +0 -30
- package/typings/libs/LazyLoad.ts +0 -27
- package/typings/libs/cookiesjs.d.ts +0 -24
- /package/dist/css/{2417-library-editor-46f8e6e95b.chunk.css → 1537-library-editor-46f8e6e95b.chunk.css} +0 -0
- /package/dist/css/{2482-library-editor-1b6dc45d45.chunk.css → 209-library-editor-1b6dc45d45.chunk.css} +0 -0
- /package/dist/css/{343-library-editor-d2f704c6a5.chunk.css → 2955-library-editor-d2f704c6a5.chunk.css} +0 -0
- /package/dist/css/{112-library-editor-6a2d152d7d.chunk.css → 6637-library-editor-6a2d152d7d.chunk.css} +0 -0
- /package/dist/css/{152-library-editor-01b4461ff1.chunk.css → 6725-library-editor-01b4461ff1.chunk.css} +0 -0
- /package/dist/css/{708-library-editor-7ffe353138.chunk.css → 8080-library-editor-7ffe353138.chunk.css} +0 -0
- /package/dist/css/{5046-library-editor-765ea88cb0.chunk.css → 9077-library-editor-765ea88cb0.chunk.css} +0 -0
- /package/dist/css/{8234-library-editor-5a1c6fc3b4.chunk.css → 9134-library-editor-5a1c6fc3b4.chunk.css} +0 -0
- /package/dist/scripts/{61-29f179811f.chunk.js.LICENSE.txt → 4001-5f16bcaff3.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6532-48f3f080f5.chunk.js.LICENSE.txt → 471-9ae0a7d088.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{546-40961bc779.chunk.js → 546-2cf4378b0c.chunk.js} +0 -0
- /package/dist/scripts/{826-c6d1a46e45.chunk.js.LICENSE.txt → 61-35a4e0dd3d.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{152-808e046b1f.chunk.js.LICENSE.txt → 6725-52d65e0d02.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8952-27f5ea4a16.chunk.js.LICENSE.txt → 8952-5dfd08cdc7.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9369-f43ee314be.chunk.js.LICENSE.txt → 9369-cacc5f30e5.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7153],{31709:function(e,t,n){n.d(t,{K:function(){return u}});var a=n(32735),i=n(80247),l=n(53808),r=n(52076),o=n(49642),c=n(17439),s=n(21660);function u(e){var t,n,u=e.showSpinner?a.createElement(i.Z,{as:"span",animation:"border",role:"status",size:"sm"}):e.children;if(e.tooltip&&e.svgName){var d=null!==(t=e.className)&&void 0!==t?t:"";return e.disabled&&!e.appLink&&(d+=" pointer-events-none"),a.createElement(s.u,{title:e.tooltip,spanHack:!0},a.createElement(c.h,{appLink:e.appLink,href:e.href,svgName:e.svgName,svgSize:e.svgSize,onClick:e.onClick,className:d,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled,ariaLabel:e.tooltip},u))}if(e.svgName)return a.createElement(c.h,{onClick:e.onClick,appLink:e.appLink,href:e.href,svgName:e.svgName,svgSize:e.svgSize,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled,ariaLabel:e.ariaLabel},u);if(e.tooltip&&e.appLink)return a.createElement(s.u,{title:e.tooltip,spanHack:!0},a.createElement(o.F,{onClick:e.onClick,appLink:e.appLink,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled,ariaLabel:e.tooltip},u));if(e.appLink)return a.createElement(o.F,{onClick:e.onClick,appLink:e.appLink,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled,ariaLabel:e.ariaLabel},u);function p(t){e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions),l.q.isFunction(e.onClick)&&e.onClick(t)}return e.tooltip?a.createElement(s.u,{title:e.tooltip,spanHack:!0},a.createElement("button",{onClick:p,className:"".concat(null!==(n=e.className)&&void 0!==n?n:"").concat(e.disabled?" pointer-events-none":""),disabled:e.disabled,"aria-label":"string"==typeof u?u:e.ariaLabel},u)):a.createElement("button",{onClick:p,className:e.className,disabled:e.disabled,"aria-label":"string"==typeof u?u:e.ariaLabel},u)}},17439:function(e,t,n){n.d(t,{h:function(){return u}});var a=n(32735),i=n(53808),l=n(31647),r=n(52076),o=n(49642),c=n(39396),s={iconButton:"aGxoe",iconWithText:"_cjiV",svg:"q6vwS",iconOnly:"T1CzO",iconBorder:"lBPNt"};function u(e){var t="".concat(e.className," ").concat(s.iconButton);a.Children.toArray(e.children).length?t+=" ".concat(s.iconWithText):e.showBorder||e.customSize||(t+=" ".concat(s.iconOnly)),e.showBorder&&(t+=" ".concat(s.iconBorder," btn btn-outline-dark me-2")),e.disabled&&(t+=" disabled");var n=a.createElement(c.x,{svgName:e.svgName,className:"svg-container ".concat(s.svg),size:e.svgSize});return e.appLink||e.href?e.href?a.createElement("a",{className:t,href:e.href,onClick:function(t){t.preventDefault(),e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions),i.q.isFunction(e.onClick)&&e.onClick(t),l.Q.Ab.PageLoad(e.href,e.openInNewTab)},"aria-label":e.ariaLabel},n,e.children):a.createElement(o.F,{appLink:e.appLink,className:t,onClick:e.onClick,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled,ariaLabel:e.ariaLabel},n,e.children):a.createElement("button",{type:"button",className:t,"aria-label":e.ariaLabel,onClick:function(t){e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions),i.q.isFunction(e.onClick)&&e.onClick(t)},disabled:e.disabled},n,e.children)}},4231:function(e,t,n){n.d(t,{G:function(){return f}});var a=n(32735),i=n(82184),l=n(25417),r=n(31647),o=n(31709),c=n(6367),s=n(52076),u=n(70065);var d=n(80247);function p(){return a.createElement("div",{className:"text-center p-5"},a.createElement(d.Z,{as:"div",animation:"border",role:"status"}))}function f(e){var t;!function(e){function t(e){var t;return Object.assign(Object.assign({},e),{args:null===(t=e.args)||void 0===t?void 0:t.reduce((function(e,t,n){return e["arg".concat(n)]=t,e}),{})})}a.useEffect((function(){e&&function(e,n){var a=r.Q.C$.getHref(e);s.k.logUserAction({title:n,url:a,isAddressable:!!a,isError:"error"===e.action,appLink:t(e)},{actionType:u.Vw.PageView,entity:u.py.Url,location:u.LZ.Global})}(r.Q.C$.getCurrentAppLink(),e)}),[e])}(e.title),(0,c.L)(l.G.SHELL,r.Q.Vy.ROUTE,(function(t,n){e.closeOnNavigate&&n.isAppRoute&&e.closePopup()}),[]);var n=(null===(t=e.headerButtons)||void 0===t?void 0:t.length)?e.headerButtons.map((function(e,t){return a.createElement(o.K,Object.assign({key:t},e))})):a.createElement(a.Fragment,null);return a.createElement(i.Z,{show:!0,onHide:e.closePopup,onEntered:e.onEntered,size:"md"===e.size?null:e.size,contentClassName:e.contentClassName,dialogClassName:e.dialogClassName,centered:e.centered,backdrop:e.backdrop,container:document.getElementById("dialog-region"),restoreFocus:!0},!!e.title&&!e.hideTitle&&a.createElement(i.Z.Header,{className:"d-flex align-items-center bg-white",closeButton:e.closeButton},a.createElement(i.Z.Title,{as:"h2",className:"h4 flex-grow-1 text-truncate"},e.title),n),e.showLoadingSpinner?a.createElement(p,null):a.createElement(i.Z.Body,{className:e.bodyClassName},e.children))}f.defaultProps={closeButton:!0,bodyClassName:"",dialogClassName:"",size:"md",closeOnNavigate:!0}},83996:function(e,t,n){n.d(t,{u:function(){return b}});var a=n(32735),i=n(98269),l=n(18881),r=n(92802),o=n(66703);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var s=n(80247);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,l,r,o=[],c=!0,s=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=l.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(s)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function p(e){var t=e.showSpinner,n=e.children,l=e.style,r=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]])}return n}(e,["showSpinner","children","style"]),o=a.useRef(null),c=u(a.useState({}),2),d=c[0],p=d.width,f=d.height,m=c[1],b=u(a.useState(t),2),y=b[0],v=b[1];a.useEffect((function(){if(t){var e=o.current,n=e.offsetHeight,a=e.offsetWidth;n&&a&&m({width:a,height:n})}else m({})}),[t]),a.useLayoutEffect((function(){v(t)}),[t]);var h=Object.assign({},l);return p&&(h.width="".concat(p+1,"px")),f&&(h.height="".concat(f+1,"px")),a.createElement(i.Z,Object.assign({ref:o,disabled:t,style:h},r),y?a.createElement(s.Z,{as:"span",animation:"border",role:"status",size:"sm"}):n)}var f=n(9063),m="shared.popup",b=function(e){var t;return a.createElement("div",{className:"d-flex justify-content-end align-items-center border-top pt-3 px-3 mx-n3 undo-changes-btn ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)};function y(e){return a.createElement(p,{variant:e.variant||"primary",type:e.type||"submit",disabled:e.disabled||e.showSpinner,size:e.size,className:e.className?e.className:"",onClick:function(){var t;return null===(t=e.onClick)||void 0===t?void 0:t.call(e)},showSpinner:e.showSpinner},e.text?a.createElement(a.Fragment,null,e.text):a.createElement(o.x,{namespace:m,phrase:e.isNew?"create":"save"}))}function v(e){var t=(0,r.u6)(),n=function(e){var t,n,i,l=(n=a.useState(!1),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,l,r,o=[],c=!0,s=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=l.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(s)throw i}}return o}}(n,i)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=l[0],o=l[1];return a.useEffect((function(){var t;e.isValid&&(e.dirty||(null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit))?o(!0):o(!1)}),[e.isValid,null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit,e.dirty,e.values]),a.useEffect((function(){e.isSubmitting&&o(!1)}),[e.isSubmitting]),r}(null!=t?t:{}),i=(null==t?void 0:t.isSubmitting)||e.showSpinner;return a.createElement(y,Object.assign({},e,{disabled:"boolean"==typeof e.disabled?e.disabled:!!t&&!n||i,showSpinner:i}))}b.Submit=function(e){return a.useContext(r.k5)?a.createElement(v,Object.assign({},e)):a.createElement(y,Object.assign({},e))},b.Cancel=function(e){return a.createElement(i.Z,{onClick:e.onClick,variant:e.variant||"link",size:e.size,className:e.className?e.className:"me-2"},e.text?e.text:a.createElement(o.x,{namespace:m,phrase:"cancel"}))},b.Checkbox=function(e){var t;return a.createElement(l.Z.Check,{type:"checkbox",className:null!==(t=e.className)&&void 0!==t?t:"me-auto",label:e.label,id:e.id,onChange:e.onToggle,checked:e.checked})},b.Toggle=function(e){return a.createElement("div",{className:"d-flex align-items-center me-auto"},a.createElement(f.Z,{on:e.on,onClick:e.onClick,disabled:e.disabled,tooltipText:e.tooltip}),!!e.label&&a.createElement("span",{className:"fw-semibold ms-2"},e.label))}},9063:function(e,t,n){n.d(t,{Z:function(){return c}});var a=n(32735),i=n(58424),l=n(21660),r=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]])}return n},o={info:"custom-toggle-info"};function c(e){var t,n=e.on,c=e.showStateWhenDisabled,s=e.tooltipText,u=e.variant,d=e.floatEnd,p=e.hideOutline,f=r(e,["on","showStateWhenDisabled","tooltipText","variant","floatEnd","hideOutline"]);function m(){e.disabled||e.onClick.apply(e,arguments)}var b=e.disabled?"disabled":"",y=p?"outline-none":"",v=null!==(t=o[u])&&void 0!==t?t:"",h=d?"float-end":"",g=n?"on":"";e.disabled&&!c&&(g="");var k="".concat("d-inline-block align-top custom-toggle toggle-option"," ").concat(v," ").concat(g," ").concat(b," ").concat(y," ").concat(h);return e.tooltipText?a.createElement(l.u,{title:s,spanHack:!0},a.createElement(i.L,Object.assign({},f,{role:"switch","aria-checked":"".concat(n),onClick:m,className:k}),a.createElement("span",{className:"handle"}))):a.createElement(i.L,Object.assign({},f,{role:"switch","aria-checked":n,onClick:m,className:k}),a.createElement("span",{className:"handle"}))}c.defaults={floatEnd:!0}},6367:function(e,t,n){n.d(t,{L:function(){return l}});var a=n(32735),i=n(43823),l=function(e,t,n){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r="string"==typeof e?i.Radio.channel(e):e;a.useEffect((function(){if(e)return r.on(t,n),function(){e&&r.off(t,n)}}),l)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7190],{61596:function(e,r,t){t.d(r,{$:function(){return u}});var n=t(39479),i=t(57857),o=t(93569),a="libraryEditor.utils",u={isValidChapterTime:function(e,r,t,i){if(i){if(!n.isNumber(r))return s.StartTime.Invalid();if(r<0)return s.StartTime.Invalid();if(r>o.X4.millisecondsToSeconds(t))return s.StartTime.Exceeds();if(i.some((function(t){return!(t.id&&t.id===e.id||t.cid===e.cid)&&t.get("startTime")===r})))return s.StartTime.Exists()}},isValidChapterName:function(e,r,t){return r?r.length>255?s.Name.MaxLength():t.some((function(t){return!(t.id&&t.id===e.id||t.cid===e.cid)&&t.get("name").trim()===r.trim()}))?s.Name.Exists():n.isEmpty(r.trim())?s.Name.Invalid():void 0:s.Name.Invalid()}},s={Name:{Invalid:function(){return i.T.getPhrase(a,"chapterNameInvalid")},Exists:function(){return i.T.getPhrase(a,"chapterNameExists")},MaxLength:function(){return i.T.getPhrase(a,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.T.getPhrase(a,"chapterStartTimeInvalid")},Exists:function(){return i.T.getPhrase(a,"chapterStartTimeExists")},Exceeds:function(){return i.T.getPhrase(a,"chapterStartTimeExceeds")}}}},57785:function(e,r,t){t.d(r,{A9:function(){return b},B9:function(){return g},Zg:function(){return E},Zl:function(){return m},aj:function(){return N},c6:function(){return v},nf:function(){return y},oJ:function(){return x},rr:function(){return l},tD:function(){return h},xC:function(){return f},xs:function(){return T},yU:function(){return P}});var n=t(39479),i=t(11306),o=t(57857),a=t(31647),u="libraryEditor.utils",s=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function c(e,r){if(e){var t=n.reduce(e,(function(e,t,i){var o=r[i];return t||o?n.isObject(t)&&n.isObject(o)&&!n.isUndefined(t.id)&&t.id===o.id?e:n.isArray(t)?d(t,o).length?e.concat(i):e:n.isEqual(t,o)?e:e.concat(i):e}),[]);if(t.length)return n.object(n.map(t,(function(t){return n.isArray(r[t])?[t,d(e[t],r[t])]:[t,r[t]]})))}}function d(e,r){var t=[];return n.each(r,(function(r){var i=n.findWhere(e,{id:r.id});if(!n.isUndefined(i)||0!==Object.keys(r).length){var o=n.isUndefined(i)?r:c(i,r);o&&(r.id<0&&!r.value||(!i||r.id<0?t.push(r):(o.id=r.id,t.push(o))))}})),t}var f={getChanges:function(e,r){var t=c(n.omit(e.toJSON(),s),n.omit(r.toJSON(),s));if(t)return n.object(n.map(n.keys(t),(function(e){return[e,f.formatChanges(e,t[e])]})))},formatChanges:function(e,r){if(!r)return null;if(n.isObject(r)&&n.isEmpty(r))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return r;case"channel":case"series":case"rating":case"season":return{id:r.id};case"distributors":case"producers":case"directors":case"productionCompanies":return n.map(r,(function(e){return e.id}));case"dateModified":case"hasBroadcast":case"seriesSort":case"_timepoints":return;default:a.Q.Ry.throw(new i.H("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,r,t){var i=["distributors","producers","directors","productionCompanies"];for(var o in n.each(n.keys(t),(function(e){i.includes(e)&&(t[e]=r.get(e).toJSON())})),r.set(n.clone(t),{silent:!0}),e.set(r.toJSON(),{silent:!0}),t)if(!t[o]&&e.associations[o]){var u=e.get(o);(u instanceof a.Q.Hn||u instanceof a.Q.Do)&&u.clear()}},getRemovedObjectIds:function(e,r){var t=["distributors","productionCompanies","producers","directors"],i={};return n.each(n.keys(e.toJSON()),(function(o){if(n.contains(t,o)){var a=e.get(o).map((function(e){return e.id})),u=r.get(o).map((function(e){return e.id})),s=n.filter(a,(function(e){return e&&!n.contains(u,e)}));s.length&&(i[o]=s)}})),i}},l={name:[{required:!0,msg:function(){return o.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,r,t){return e&&e<1?o.T.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?o.T.getPhrase(u,"episodeNumberExceeds"):e%1!=0?o.T.getPhrase(u,"episodeNumberNotWhole"):t.season&&t.season.get("number")>=0&&null===e?o.T.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,r,t){return t.season&&t.season.get("number")||e&&e.number||!t.episodeNumber?"":o.T.getPhrase(u,"seasonNoEpisodeNumber")}},g={name:[{required:!0,msg:function(){return o.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"videoDescriptionExceeds")}}]},m={name:[{required:!0,msg:function(){return o.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"videoDescriptionExceeds")}}]},p=(new Date).getFullYear(),h={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>p?o.T.getPhrase(u,"validProductionYears",{currentYear:p}):void 0):""}},b={name:[{required:!0,msg:function(){return o.T.getPhrase(u,"resourceNameRequired")}}]},T={suggestion:[{required:!0,msg:function(){return o.T.getPhrase(u,"suggestEditRequired")}},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return o.T.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"suggestEditReasonExceeds")}}]},v={number:function(e){return e?+e<1?o.T.getPhrase(u,"seasonLessThanOne"):+e>3e3?o.T.getPhrase(u,"seasonExceeds"):+e%1!=0?o.T.getPhrase(u,"seasonNotWhole"):"":o.T.getPhrase(u,"seasonRequired")}},y={empty:function(){return o.T.getPhrase(u,"suggestEditRatingRequired")},original:function(){return o.T.getPhrase(u,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return o.T.getPhrase(u,"linkUrlRequired")}},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return o.T.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(u,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return o.T.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"fieldValueExceeds")}}]},x={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":o.T.getPhrase(u,"fieldsInvalid"):""}};function N(){return[{id:-1,name:"Admin notes",value:"",placeholder:"Notes that only administrators will see"}]}},11653:function(e,r,t){t.d(r,{h:function(){return d}});var n=t(39479),i=t(57857),o=t(54008),a=t(22557),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return i.T.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return i.T.getPhrase(u,"folderNameExceeds")}}]},c=function(e,r){return{parentId:function(t){return t?a.P.calculateDestinationFolderDepth(e,t,r)>o.p.MAX_FOLDER_DEPTH?i.T.getPhrase(u,"maxFolderDepth",{maxDepth:o.p.MAX_FOLDER_DEPTH}):"":i.T.getPhrase(u,"selectParentFolder")}}},d=function(e){var r=e.validateName,t=e.validateParent,i=e.folder,o=e.collection;return r&&t?n.extend({},s,c(i,o)):r?s:t?c(i,o):void 0}},87120:function(e,r,t){t.d(r,{Y:function(){return o}});var n=t(57857),i="libraryEditor.utils",o={name:[{required:!0,msg:function(){return n.T.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return n.T.getPhrase(i,"libraryNameExceeds")}}]}},39155:function(e,r,t){t.d(r,{I:function(){return a}});var n=t(57857),i=t(57785),o=n.T.encloseNamespace("libraryEditor.utils"),a={name:[{required:!0,msg:function(){return o("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return o("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return o("uploadLibraryRequired")}}],episodeNumber:function(e,r,t){return e&&e<1?o("episodeNumberLessThanOne"):e&&e>255?o("episodeNumberExceeds"):e&&e%1!=0?o("episodeNumberNotWhole"):t.season&&t.season.get("number")>=0&&null===e?o("episodeNumberNoSeason"):""},season:function(e,r,t){return t.season&&t.season.get("number")||e&&e.number||!t.episodeNumber?"":o("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.tD.productionYear.apply(null,r)}}},70042:function(e,r,t){t.d(r,{u:function(){return m}});var n=t(57857),i=t(75459),o=t(74421),a=t(63791),u=t(83665),s=t(264),c=t(40622);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,r,t){return(r=function(e){var r=function(e){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!=d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var l,g="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(l||(l={}));var m={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-blue";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e){switch(e.get("type")){case i.r.HostedLibrary:case i.r.CustomLibrary:return e.get("name");case i.r.Exchange:return n.T.getPhrase(g,"exchange");case i.r.Workspace:return n.T.getPhrase(g,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case i.r.HostedLibrary:case i.r.CustomLibrary:return"bg-blue";case i.r.Exchange:return"bg-green";case i.r.Workspace:default:return"bg-red"}},mapMediaTypeToClass:function(e){switch(e.get("typeId")){case o.E.Clip:return"bg-ultramarine";case o.E.Interactive:return"bg-green";default:return""}},mapMediaTypeToSvg:function(e){switch(e.get("typeId")){case o.E.Clip:return a.Nj.getSvg(a.vn.Clip);case o.E.Interactive:return a.Nj.getSvg(a.vn.Interactive);default:return""}},isInteractive:function(e){return!(s.g.hasLite||!e||!e.interactives||!e.interactives.length)},mapTypeToSvg:function(e){var r=f(f(f(f(f(f(f({},l.Pdf,a.vn.FilePDF),l.Image,a.vn.FileImg),l.PowerPoint,a.vn.FilePowerpoint),l.Document,a.vn.FileWord),l.Excel,a.vn.FileExcel),l.Zip,a.vn.FileZip),l.File,a.vn.File)[e];return r||(r=a.vn.Folder),a.Nj.getSvg(r)},mapTypeToClass:function(e){switch(e){case l.Pdf:return"icon-red";case l.Image:return"icon-purple";case l.Document:return"icon-blue";case l.Excel:return"icon-green";case l.PowerPoint:return"icon-orange";case l.Zip:return"icon-teal";case l.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case l.Pdf:return n.T.getPhrase(g,"pdf");case l.Image:return n.T.getPhrase(g,"image");case l.Document:return n.T.getPhrase(g,"document");case l.Excel:return n.T.getPhrase(g,"spreadsheet");case l.PowerPoint:return n.T.getPhrase(g,"presentation");case l.Zip:return n.T.getPhrase(g,"zipArchive");case l.File:return n.T.getPhrase(g,"file");default:return""}},translateMetadataCollectionNames:function(e){return new u.L(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:m.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var r="suggestEdit";switch(e){case c.pG.VideoTitle:r+="VideoTitle";break;case c.pG.Description:r+="Description";break;case c.pG.Rating:r+="Rating";break;case c.pG.SeriesTitle:r+="SeriesTitle";break;case c.pG.Season:r+="SeasonNumber";break;case c.pG.EpisodeNumber:r+="EpisodeNumber";break;case c.pG.BroadcastDate:r+="BroadcastDate";break;case c.pG.Channel:r+="Channel";break;case c.pG.ProductionYear:r+="ProductionYear";break;case c.pG.Distributors:r+="Distributors";break;case c.pG.ProductionCompanies:r+="ProductionCompanies";break;case c.pG.Directors:r+="Directors";break;case c.pG.Producers:r+="Producers";break;case c.pG.Other:r+="Other"}return n.T.getPhrase(g,r)}}},7190:function(e,r,t){t.d(r,{Y7:function(){return i.Y},yU:function(){return n.yU},A9:function(){return n.A9},c6:function(){return n.c6},nf:function(){return n.nf},xs:function(){return n.xs},uB:function(){return o.u}}),t(61596);var n=t(57785),i=(t(11653),t(57857),t(87120)),o=(t(39155),t(70042))},83665:function(e,r,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,r){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},a(e,r)}t.d(r,{L:function(){return u}});var u=function(e){function r(){return function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,r,t){return r=o(r),function(e,r){if(r&&("object"==n(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(r,t||[],o(e).constructor):r.apply(e,t))}(this,r,arguments)}return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&a(e,r)}(r,e),t=r,Object.defineProperty(t,"prototype",{writable:!1}),t;var t}(t(31647).Q.FE)}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7190],{61596:function(e,r,t){t.d(r,{$:function(){return u}});var n=t(21161),i=t(57857),o=t(93569),a="libraryEditor.utils",u={isValidChapterTime:function(e,r,t,i){if(i){if(!n.isNumber(r))return s.StartTime.Invalid();if(r<0)return s.StartTime.Invalid();if(r>o.X4.millisecondsToSeconds(t))return s.StartTime.Exceeds();if(i.some((function(t){return!(t.id&&t.id===e.id||t.cid===e.cid)&&t.get("startTime")===r})))return s.StartTime.Exists()}},isValidChapterName:function(e,r,t){return r?r.length>255?s.Name.MaxLength():t.some((function(t){return!(t.id&&t.id===e.id||t.cid===e.cid)&&t.get("name").trim()===r.trim()}))?s.Name.Exists():n.isEmpty(r.trim())?s.Name.Invalid():void 0:s.Name.Invalid()}},s={Name:{Invalid:function(){return i.T.getPhrase(a,"chapterNameInvalid")},Exists:function(){return i.T.getPhrase(a,"chapterNameExists")},MaxLength:function(){return i.T.getPhrase(a,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.T.getPhrase(a,"chapterStartTimeInvalid")},Exists:function(){return i.T.getPhrase(a,"chapterStartTimeExists")},Exceeds:function(){return i.T.getPhrase(a,"chapterStartTimeExceeds")}}}},57785:function(e,r,t){t.d(r,{A9:function(){return b},B9:function(){return g},Zg:function(){return E},Zl:function(){return m},aj:function(){return N},c6:function(){return v},nf:function(){return y},oJ:function(){return x},rr:function(){return l},tD:function(){return h},xC:function(){return f},xs:function(){return T},yU:function(){return P}});var n=t(21161),i=t(11306),o=t(57857),a=t(31647),u="libraryEditor.utils",s=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function c(e,r){if(e){var t=n.reduce(e,(function(e,t,i){var o=r[i];return t||o?n.isObject(t)&&n.isObject(o)&&!n.isUndefined(t.id)&&t.id===o.id?e:n.isArray(t)?d(t,o).length?e.concat(i):e:n.isEqual(t,o)?e:e.concat(i):e}),[]);if(t.length)return n.object(n.map(t,(function(t){return n.isArray(r[t])?[t,d(e[t],r[t])]:[t,r[t]]})))}}function d(e,r){var t=[];return n.each(r,(function(r){var i=n.findWhere(e,{id:r.id});if(!n.isUndefined(i)||0!==Object.keys(r).length){var o=n.isUndefined(i)?r:c(i,r);o&&(r.id<0&&!r.value||(!i||r.id<0?t.push(r):(o.id=r.id,t.push(o))))}})),t}var f={getChanges:function(e,r){var t=c(n.omit(e.toJSON(),s),n.omit(r.toJSON(),s));if(t)return n.object(n.map(n.keys(t),(function(e){return[e,f.formatChanges(e,t[e])]})))},formatChanges:function(e,r){if(!r)return null;if(n.isObject(r)&&n.isEmpty(r))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return r;case"channel":case"series":case"rating":case"season":return{id:r.id};case"distributors":case"producers":case"directors":case"productionCompanies":return n.map(r,(function(e){return e.id}));case"dateModified":case"hasBroadcast":case"seriesSort":case"_timepoints":return;default:a.Q.Ry.throw(new i.H("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,r,t){var i=["distributors","producers","directors","productionCompanies"];for(var o in n.each(n.keys(t),(function(e){i.includes(e)&&(t[e]=r.get(e).toJSON())})),r.set(n.clone(t),{silent:!0}),e.set(r.toJSON(),{silent:!0}),t)if(!t[o]&&e.associations[o]){var u=e.get(o);(u instanceof a.Q.Hn||u instanceof a.Q.Do)&&u.clear()}},getRemovedObjectIds:function(e,r){var t=["distributors","productionCompanies","producers","directors"],i={};return n.each(n.keys(e.toJSON()),(function(o){if(n.contains(t,o)){var a=e.get(o).map((function(e){return e.id})),u=r.get(o).map((function(e){return e.id})),s=n.filter(a,(function(e){return e&&!n.contains(u,e)}));s.length&&(i[o]=s)}})),i}},l={name:[{required:!0,msg:function(){return o.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,r,t){return e&&e<1?o.T.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?o.T.getPhrase(u,"episodeNumberExceeds"):e%1!=0?o.T.getPhrase(u,"episodeNumberNotWhole"):t.season&&t.season.get("number")>=0&&null===e?o.T.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,r,t){return t.season&&t.season.get("number")||e&&e.number||!t.episodeNumber?"":o.T.getPhrase(u,"seasonNoEpisodeNumber")}},g={name:[{required:!0,msg:function(){return o.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"videoDescriptionExceeds")}}]},m={name:[{required:!0,msg:function(){return o.T.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"videoDescriptionExceeds")}}]},p=(new Date).getFullYear(),h={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>p?o.T.getPhrase(u,"validProductionYears",{currentYear:p}):void 0):""}},b={name:[{required:!0,msg:function(){return o.T.getPhrase(u,"resourceNameRequired")}}]},T={suggestion:[{required:!0,msg:function(){return o.T.getPhrase(u,"suggestEditRequired")}},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return o.T.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"suggestEditReasonExceeds")}}]},v={number:function(e){return e?+e<1?o.T.getPhrase(u,"seasonLessThanOne"):+e>3e3?o.T.getPhrase(u,"seasonExceeds"):+e%1!=0?o.T.getPhrase(u,"seasonNotWhole"):"":o.T.getPhrase(u,"seasonRequired")}},y={empty:function(){return o.T.getPhrase(u,"suggestEditRatingRequired")},original:function(){return o.T.getPhrase(u,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return o.T.getPhrase(u,"linkUrlRequired")}},{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return o.T.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return o.T.getPhrase(u,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return o.T.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return o.T.getPhrase(u,"fieldValueExceeds")}}]},x={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":o.T.getPhrase(u,"fieldsInvalid"):""}};function N(){return[{id:-1,name:"Admin notes",value:"",placeholder:"Notes that only administrators will see"}]}},11653:function(e,r,t){t.d(r,{h:function(){return d}});var n=t(21161),i=t(57857),o=t(54008),a=t(22557),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return i.T.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return i.T.getPhrase(u,"folderNameExceeds")}}]},c=function(e,r){return{parentId:function(t){return t?a.P.calculateDestinationFolderDepth(e,t,r)>o.p.MAX_FOLDER_DEPTH?i.T.getPhrase(u,"maxFolderDepth",{maxDepth:o.p.MAX_FOLDER_DEPTH}):"":i.T.getPhrase(u,"selectParentFolder")}}},d=function(e){var r=e.validateName,t=e.validateParent,i=e.folder,o=e.collection;return r&&t?n.extend({},s,c(i,o)):r?s:t?c(i,o):void 0}},87120:function(e,r,t){t.d(r,{Y:function(){return o}});var n=t(57857),i="libraryEditor.utils",o={name:[{required:!0,msg:function(){return n.T.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return n.T.getPhrase(i,"libraryNameExceeds")}}]}},39155:function(e,r,t){t.d(r,{I:function(){return a}});var n=t(57857),i=t(57785),o=n.T.encloseNamespace("libraryEditor.utils"),a={name:[{required:!0,msg:function(){return o("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return o("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return o("uploadLibraryRequired")}}],episodeNumber:function(e,r,t){return e&&e<1?o("episodeNumberLessThanOne"):e&&e>255?o("episodeNumberExceeds"):e&&e%1!=0?o("episodeNumberNotWhole"):t.season&&t.season.get("number")>=0&&null===e?o("episodeNumberNoSeason"):""},season:function(e,r,t){return t.season&&t.season.get("number")||e&&e.number||!t.episodeNumber?"":o("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return i.tD.productionYear.apply(null,r)}}},70042:function(e,r,t){t.d(r,{u:function(){return m}});var n=t(57857),i=t(75459),o=t(74421),a=t(85475),u=t(83665),s=t(264),c=t(40622);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,r,t){return(r=function(e){var r=function(e){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!=d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var l,g="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(l||(l={}));var m={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-blue";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e){switch(e.get("type")){case i.r.HostedLibrary:case i.r.CustomLibrary:return e.get("name");case i.r.Exchange:return n.T.getPhrase(g,"exchange");case i.r.Workspace:return n.T.getPhrase(g,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case i.r.HostedLibrary:case i.r.CustomLibrary:return"bg-blue";case i.r.Exchange:return"bg-green";case i.r.Workspace:default:return"bg-red"}},mapMediaTypeToClass:function(e){switch(e.get("typeId")){case o.E.Clip:return"bg-ultramarine";case o.E.Interactive:return"bg-green";default:return""}},mapMediaTypeToSvg:function(e){switch(e.get("typeId")){case o.E.Clip:return a.Nj.getSvg(a.vn.Clip);case o.E.Interactive:return a.Nj.getSvg(a.vn.Interactive);default:return""}},isInteractive:function(e){return!(s.g.hasLite||!e||!e.interactives||!e.interactives.length)},mapTypeToSvg:function(e){var r=f(f(f(f(f(f(f({},l.Pdf,a.vn.FilePDF),l.Image,a.vn.FileImg),l.PowerPoint,a.vn.FilePowerpoint),l.Document,a.vn.FileWord),l.Excel,a.vn.FileExcel),l.Zip,a.vn.FileZip),l.File,a.vn.File)[e];return r||(r=a.vn.Folder),a.Nj.getSvg(r)},mapTypeToClass:function(e){switch(e){case l.Pdf:return"icon-red";case l.Image:return"icon-purple";case l.Document:return"icon-blue";case l.Excel:return"icon-green";case l.PowerPoint:return"icon-orange";case l.Zip:return"icon-teal";case l.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case l.Pdf:return n.T.getPhrase(g,"pdf");case l.Image:return n.T.getPhrase(g,"image");case l.Document:return n.T.getPhrase(g,"document");case l.Excel:return n.T.getPhrase(g,"spreadsheet");case l.PowerPoint:return n.T.getPhrase(g,"presentation");case l.Zip:return n.T.getPhrase(g,"zipArchive");case l.File:return n.T.getPhrase(g,"file");default:return""}},translateMetadataCollectionNames:function(e){return new u.L(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:m.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var r="suggestEdit";switch(e){case c.pG.VideoTitle:r+="VideoTitle";break;case c.pG.Description:r+="Description";break;case c.pG.Rating:r+="Rating";break;case c.pG.SeriesTitle:r+="SeriesTitle";break;case c.pG.Season:r+="SeasonNumber";break;case c.pG.EpisodeNumber:r+="EpisodeNumber";break;case c.pG.BroadcastDate:r+="BroadcastDate";break;case c.pG.Channel:r+="Channel";break;case c.pG.ProductionYear:r+="ProductionYear";break;case c.pG.Distributors:r+="Distributors";break;case c.pG.ProductionCompanies:r+="ProductionCompanies";break;case c.pG.Directors:r+="Directors";break;case c.pG.Producers:r+="Producers";break;case c.pG.Other:r+="Other"}return n.T.getPhrase(g,r)}}},7190:function(e,r,t){t.d(r,{Y7:function(){return i.Y},yU:function(){return n.yU},A9:function(){return n.A9},c6:function(){return n.c6},nf:function(){return n.nf},xs:function(){return n.xs},uB:function(){return o.u}}),t(61596);var n=t(57785),i=(t(11653),t(57857),t(87120)),o=(t(39155),t(70042))},83665:function(e,r,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,r){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},a(e,r)}t.d(r,{L:function(){return u}});var u=function(e){function r(){return function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,r,t){return r=o(r),function(e,r){if(r&&("object"==n(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(r,t||[],o(e).constructor):r.apply(e,t))}(this,r,arguments)}return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&a(e,r)}(r,e),t=r,Object.defineProperty(t,"prototype",{writable:!1}),t;var t}(t(31647).Q.FE)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7295],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return v}});var o=n(43823),i=n(57857),r=n(31647),l=n(57085),s=n(35630),a=n(57098),u=n(43791),c=n.n(u),p={svgContainer:"mtegw"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,h(o.key),o)}}function h(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var v=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=b(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return c()}},{key:"viewOptions",value:function(){return{styles:p}}},{key:"onSave",value:function(){o.Radio.channel(a.OV.LIBRARY_EDITOR).trigger(a.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new s.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new l.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},82407:function(e,t,n){"use strict";n.r(t),n.d(t,{EditResourcesView:function(){return Lt}});var o=n(43823),i=n(25417),r=n(99748),l=n(21679),s=n(57857),a=n(31647),u=n(52076),c=n(70065),p=n(81937),f=n(56252),d=n(18222),h=n(45837),y=n(83162),b=n(57769),m=n(44237),v=n.n(m),g=n(61571),k=n.n(g),w={fileDrop:"ejhuF",dropMask:"fLdBH",dragOver:"_sk3R"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function S(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,C(o.key),o)}}function C(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,T()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(t,e),n=t,o=[{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"shared._fileSelect"}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:b.Z,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:y.V,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n;return e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"},n="onDragLeave",(t=C(t="dragleave .".concat(w.dropMask)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(w.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(w.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(w.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:w,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(k()({dropMask:w.dropMask,fileDropText:s.T.getPhrase(this.lang,"drop")}))}}],o&&S(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),R=n(85835);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function V(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_(o.key),o)}}function _(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var U="shared.errors.tooManyResources",D=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=x(t),function(e,t){if(t&&("object"==L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],x(e).constructor):t.apply(e,n))}(this,t,["Cannot add that many resources"])).resourceLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(U,"heading"),text:s.T.getPhrase(U,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:s.T.getPhrase(U,"okay"),className:"btn btn-dark",success:!0}]}}}])&&V(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(R.S);function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function A(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,F(o.key),o)}}function F(e){var t=function(e){if("object"!=B(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==B(t)?t:t+""}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var z="shared.errors.tooManySubtitles",K=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Q(t),function(e,t){if(t&&("object"==B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,M()?Reflect.construct(t,n||[],Q(e).constructor):t.apply(e,n))}(this,t,["Cannot add that many subtitles"])).subtileLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(z,"heading"),text:s.T.getPhrase(z,"body",{subtitleLimit:this.subtileLimit}),buttons:[{text:s.T.getPhrase(z,"okay"),className:"btn btn-dark",success:!0}]}}}])&&A(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(R.S),q=n(10101),$=n(57098),Z=n(29457),G=n(14327),H=n(19226),W=n(93569),Y=n(99249),X=n(88172),ee=n(7190),te=n(41165),ne=n.n(te);function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,re(o.key),o)}}function re(e){var t=function(e){if("object"!=oe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(le=function(){return!!e})()}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}var ue=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=se(t),function(e,t){if(t&&("object"==oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,le()?Reflect.construct(t,n||[],se(e).constructor):t.apply(e,n))}(this,t,[e])).showNameField=!1,n.disableBtn=!0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ae(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.model=Y.r.get(this.viewModelName),this.model.addValidation(ee.yU),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return ne()}},{key:"lang",get:function(){return"libraryEditor.addLinks"}},{key:"tagName",get:function(){return"form"}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:q.Bp},{behaviorClass:q.fS}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change:url",this.onChangeUrl),this.listenTo(this.model,"change:name",this.onChangeName),this.listenTo(this.options.channelName,"attach:link",this.onClickAttach)}},{key:"onChangeUrl",value:function(){this.showNameField&&!this.model.isValid("url")?(this.getUI("nameField").hide(),this.model.set("name",""),this.showNameField=!1):!this.showNameField&&this.model.isValid("url")&&(this.getUI("nameField").show(),this.showNameField=!0)}},{key:"onChangeName",value:function(){this.model.validate("name"),this.disableBtn=!this.model.isValid(),this.renderAttachButton()}},{key:"onClickAttach",value:function(){var e=this.model.toJSON();this.model.clear(),o.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new X.Py({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.T.getPhrase(this.lang,"attach"),extraButtonClass:"btn-dark attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:W.Ey.Medium,type:W.dR.Light,extraClasses:"mx-auto"}}))}},{key:"viewOptions",value:function(){return{limit:this.options.limit,hide:this.options.hide}}},{key:"onRender",value:function(){this.renderAttachButton(),this.stickit(),o.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&ie(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.wA),ce=n(68708),pe=n(21053),fe=n(53808),de=n(85475),he=n(97237),ye=n.n(he),be={svgContainer:"sr9KQ",progress:"Cn0ad"};function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function ve(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ge(o.key),o)}}function ge(e){var t=function(e){if("object"!=me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==me(t)?t:t+""}function ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ke=function(){return!!e})()}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}function Oe(e,t){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oe(e,t)}var Se=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=we(t),function(e,t){if(t&&("object"==me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ke()?Reflect.construct(t,n||[],we(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return ye()}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){fe.q.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:be,svg:de.Nj.getSvg(de.vn.Folder),tickSvg:de.Nj.getSvg(de.vn.Check),finished:this.model.get("progress")>=100}}}])&&ve(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA);function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,je(o.key),o)}}function je(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}function Pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pe=function(){return!!e})()}function Ee(e){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ee(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Le=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ee(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pe()?Reflect.construct(t,n||[],Ee(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(t,e),n=t,(i=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return Se}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){o.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&Te(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.$W),Ve=n(36022),_e=n(21161),Ne=n(47416),xe=n(19249),Ie={handleQuery:function(){return function(e,t){var n=[];if(e){var o=Ne.S.getEnglishNameContains(e);return _e.each(o,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:Ie.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:xe.ou,pending:xe.gb,notFound:xe.TX}}}}},Ue=n(56730),De=n.n(Ue);function Be(e){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(e)}function Ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Fe(o.key),o)}}function Fe(e){var t=function(e){if("object"!=Be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Be(t)?t:t+""}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Me=function(){return!!e})()}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}var ze=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Qe(t),function(e,t){if(t&&("object"==Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Me()?Reflect.construct(t,n||[],Qe(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(e){this.model=Y.r.get("subtitle:language",e.defaultLanguage),this.model.addValidation(W.AJ),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return De()}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"behaviors",get:function(){return[{behaviorClass:q.Yw,title:s.T.getPhrase(this.lang,"heading"),buttons:[{text:s.T.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-dark submit"}]},{behaviorClass:q.fS}]}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:Ie.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new Ve.M({model:this.model,parentChannelName:this.channelName,inputId:"language",selectEvent:"select:language",typeaheadConfigs:this.getTypeaheadConfigs()}))}},{key:"onLanguageSelected",value:function(e){this.model.set("code",e.key)}},{key:"onClickSubmit",value:function(){this.model.validate(),this.model.isValid()&&(this.options.promise.resolve(this.model.toJSON()),this.triggerMethod("hide"))}},{key:"onBeforeDestroy",value:function(){"pending"===this.options.promise.state()&&this.options.promise.reject()}},{key:"onRender",value:function(){this.renderTypeahead()}}])&&Ae(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),Ke=n(77605),qe=function(e,t){var n,o,i=e.language;return o=(null==t?void 0:t.filter((function(e){return e.language!==i}))).length>0?Ne.S.getFullEnglishName(i):Ne.S.getEnglishName(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?s.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:o}):o},$e=n(21974),Ze=n(85985),Ge=n.n(Ze),He={container:"SizJb",svgContainer:"PuqLQ",actionSvg:"L9P1P"};function We(e){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},We(e)}function Ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Xe(o.key),o)}}function Xe(e){var t=function(e){if("object"!=We(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=We(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==We(t)?t:t+""}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}var ot=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=tt(t),function(e,t){if(t&&("object"==We(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,et()?Reflect.construct(t,n||[],tt(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return Ge()}},{key:"className",get:function(){return"".concat(He.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return qe(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&fe.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:He,svg:de.Nj.getSvg($e.u.mapTypeToSvg("subtitle")),trashSvg:de.Nj.getSvg(de.vn.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&&Ye(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),it=n(54758),rt=n(71060),lt=n.n(rt);function st(e){return st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(e)}function at(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ut(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,pt(o.key),o)}}function ct(e,t,n){return t&&ut(e.prototype,t),n&&ut(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pt(e){var t=function(e){if("object"!=st(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==st(t)?t:t+""}function ft(e,t,n){return t=ht(t),function(e,t){if(t&&("object"==st(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dt()?Reflect.construct(t,n||[],ht(e).constructor):t.apply(e,n))}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dt=function(){return!!e})()}function ht(e){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ht(e)}function yt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bt(e,t)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}var mt=function(e){function t(e){return at(this,t),ft(this,t,[e])}return yt(t,e),ct(t,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return lt()}},{key:"regions",value:function(){return{subtitles:{el:".subtitles-list-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{headerText:this.options.headerText,emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.showChildView("subtitles",new vt({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}])}(a.Q.wA),vt=function(e){function t(e){return at(this,t),ft(this,t,[e])}return yt(t,e),ct(t,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return ot}},{key:"childViewOptions",get:function(){var e=this;return{isClickViewContent:this.options.isClickViewContent,onClickDelete:function(t){return e.onClickDelete(t)}}}},{key:"onClickDelete",value:function(e){var t=this;this.options.isClickViewContent||new it.M({title:s.T.getPhrase(this.lang,"removeHeading"),text:s.T.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:s.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return qe(e.toJSON(),e.collection.toJSON())}}])}(a.Q.$W),gt=n(56906),kt=n(95061),wt=n(51069),Ot=n.n(wt),St=n(6723);function Ct(e){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ct(e)}function Tt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,jt(o.key),o)}}function jt(e){var t=function(e){if("object"!=Ct(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ct(t)?t:t+""}function Pt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pt=function(){return!!e})()}function Et(e){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Et(e)}function Rt(e,t){return Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rt(e,t)}var Lt=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Et(t),function(e,t){if(t&&("object"==Ct(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pt()?Reflect.construct(t,n||[],Et(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rt(e,t)}(t,e),n=t,y=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),W.Si.initBackButton(),this.videoDataService=l.u.getInstance($.Or.Video,this),this.linkDataService=l.u.getInstance($.Or.Link,this),this.resourceDataService=l.u.getInstance($.Or.Resource,this),this.subtitleDataService=l.u.getInstance($.Or.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{key:"name",get:function(){return"EditResourcesView"}},{key:"lang",get:function(){return"libraryEditor.editResources"}},{key:"title",get:function(){return this.model&&this.model.get("name")||"Edit Resources"}},{key:"template",get:function(){return Ot()}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return W.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:q._7}]}},{key:"requiredResources",get:function(){return{currentUser:H.K.currentUser,libraries:kt.T.libraries}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new f.L1,this.listenTo($.jr.RESOURCE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new f.M_,this.listenTo($.jr.SUBTITLE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo($.Vk.VIDEO,"".concat($.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo($.Vk.VIDEO,"".concat($.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),p.S.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),p.S.FILES_SELECTED,this.onResourceFilesAdded)}},{key:"getSubtitleSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"subtitles")}},{key:"getResourceSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"resources")}},{key:"onVideoDataError",value:function(e){switch(e.type){case r.h.NotFound:a.Q.Ry.throw(new gt.l1);break;case r.h.Forbidden:a.Q.Ry.throw(new gt.aV)}}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?a.Q.Ry.throw(new K(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?a.Q.Ry.throw(new D(25)):(this.resourceUploadCount+=e.length,t&&(this.interactionType=t),this.resourceUploadService.addFiles(e))}},{key:"onAddLink",value:function(e){var t=this;25!==this.model.links.length&&(this.model.links.length+1===25&&this.renderAddLinks(!0),this.linkDataService.addLink(this.model.get("id"),e,(function(e){t.model.links.add(e),t.render()})))}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:Z.LP.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:Z.LP.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:Z.LP.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:Z.LP.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(c.py.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(c.py.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(c.py.Link,e),t.render()}))}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),o={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:d.v.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:d.v.getResourceType(n.fileInfo.extension)},contribution:!1,url:n.fileInfo.url,fileIdType:2};this.resourceUploads.push(o),this.resourceUploadCount--,this.resourceUploadCount>0||(this.resourceDataService.addResource(this.options.videoId,this.resourceUploads,(function(e){t.model.resources.add(e);var n=t.resourceUploadService.getCollection().filter((function(t){return t.get("fileInfo").id===e.get("fileId")}));t.resourceUploadService.getCollection().remove(n),t.logUploadAction(e),t.render()})),this.resourceUploads=[])}},{key:"onSubtitleUploadComplete",value:function(e){var t=this,n=St.Deferred(),r=new ze({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var o=e.toJSON(),i={fileId:o.fileInfo.id,name:n.name,language:n.code,type:d.v.getResourceType(o.fileInfo.extension),fileIdType:2};t.subtitleDataService.addSubtitle(t.options.videoId,i,(function(n){t.model.subtitles.add(n),t.subtitleUploadService.getCollection().remove(e),t.logUploadAction(n),t.render()}))})).fail((function(){t.subtitleUploadService.cancelUpload(e.get("id"))})),o.Radio.channel(i.G.POPUP).trigger(a.Q.Vy.SHOW_POPUP,r)}},{key:"logUploadAction",value:function(e){var t=e instanceof G._?c.py.Resource:c.py.Subtitle,n=u.k.mapInteractionType(this.interactionType),o={location:c.LZ.EditVideoResources,actionType:c.Vw.Upload,entity:t,descriptor:n};u.k.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:c.LZ.EditVideoResources,actionType:c.Vw.Delete,entity:e},o={id:t,parentId:+this.options.videoId};u.k.logUserAction(o,n)}},{key:"renderTabs",value:function(){var e=W.BK.canEditVideo(this.model);this.showChildView("tabs",new pe.W({model:this.model,tabs:W.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-resources-subtitles-applink",context:"resources",folder:this.folder,libraries:this.libraries}))}},{key:"renderSubtitleFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new E({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerSubtitles"):s.T.getPhrase(this.lang,"subtitles"),description:s.T.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.T.getPhrase(this.lang,"subtitlesAlternative"),mimeType:d.l.SUBTITLES,channelName:this.getSubtitleSelectChannelName(),acceptMultiple:!1,limitText:this.model.subtitles.length>=5?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderSubtitleUploadList",value:function(){var e=this.subtitleUploadService.getCollection();this.showChildView("subtitlesUploadList",new Le({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=W.BK.filterObjectsByOwnerType(this.model.subtitles,h.N.ClickView);this.showChildView("clickViewSubtitlesList",new mt({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.T.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new mt({collection:W.BK.filterObjectsByOwnerType(this.model.subtitles,h.N.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new E({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerResources"):s.T.getPhrase(this.lang,"resources"),description:s.T.getPhrase(this.lang,"resourcesDescription"),alternateText:s.T.getPhrase(this.lang,"resourcesAlternative"),mimeType:d.l.RESOURCES,channelName:this.getResourceSelectChannelName(),limitText:this.model.resources.length>=25?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderResourcesUploadList",value:function(){var e=this.resourceUploadService.getCollection();this.showChildView("resourcesUploadList",new Le({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=W.BK.filterObjectsByOwnerType(this.model.resources,h.N.ClickView);this.showChildView("clickViewResourcesList",new Ke.c({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.T.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:c.LZ.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new Ke.h({collection:W.BK.filterObjectsByOwnerType(this.model.resources,h.N.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:c.LZ.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new ue({collection:this.model.get("links"),channelName:this.channelName,hide:e||25===this.model.get("links").length,limit:25}))}},{key:"renderLinkLists",value:function(){var e={channelName:this.channelName,analyticsOptions:{location:c.LZ.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=W.BK.filterObjectsByOwnerType(this.model.links,h.N.ClickView);this.showChildView("clickViewLinkList",new ce.c(Object.assign(Object.assign({},e),{headingText:"Resource links by ClickView",emptyStateText:t.models.length?"":"There are no ClickView links for this video",customCollection:t,editable:!1})))}}},{key:"renderCustomerLinkList",value:function(e){this.showChildView("customerLinkList",new ce.c(Object.assign(Object.assign({},e),{customCollection:W.BK.filterObjectsByOwnerType(this.model.links,h.N.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.isClickViewContent=this.model&&!W.BK.canEditVideo(this.model),this.folder=this.model&&this.model.categories.first()}},{key:"shouldRender",value:function(){return!!this.model}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}],y&&Tt(n.prototype,y),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,y}(a.Q.G7)},36022:function(e,t,n){"use strict";n.d(t,{M:function(){return g}});var o=n(43823),i=n(21161),r=n(11306),l=n(31647),s=n(17391),a=n(85475),u=n(93569),c=n(94407),p=n.n(c),f={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,y(o.key),o)}}function y(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,c=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(f.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||l.Q.Ry.throw(new r.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new l.Q.Hn),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n;return e={},t="[name=".concat(this.options.inputName,"]"),n={observe:this.options.stickItProperty,setOptions:{validate:!0}},(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t){var n;e.preventDefault(),n="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,n),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,t),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var t=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){t.model.clear(),t.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return i.isArray(this.options.typeaheadConfigs)?s.J.getSearchSources(this.options.typeaheadConfigs):s.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?i.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return i.isObject(this.options.actionOptions)?i.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){i.isObject(this.options.callbacks)&&(i.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",i.bind(this.options.callbacks.onRender,this)),i.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),i.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",i.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",i.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f},this.options),{showRemove:this.shouldShowRemove(),svgRemove:a.Nj.getSvg(a.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}],c&&h(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c}(l.Q.wA)},44237:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<p class="alert alert-warning mb-0">'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.limitText:r,t))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.fileDrop:r,t))+" p-2"+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <button class="browse btn btn-outline-dark me-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"browse",{name:"lang",hash:{},data:i}))+'</button>\n <span class="text-secondary align-middle">'+s(l(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\n</div>\n"},4:function(e,t,n,o,i){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return"<h5>"+e.escapeExpression(l(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\n<p>"+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.description:r,t))?r:"")+"</p>\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},61571:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.escapeExpression;return'<div class="'+s("function"==typeof(l=null!=(l=n.dropMask||(null!=t?t.dropMask:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):l)+'">\n <h3>'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\n</div>"},useData:!0})},97237:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-end text-success">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' cursor-pointer cancel-upload btn-close float-end" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,p="function";return'<span class="d-inline-block align-middle me-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\n<span class="align-middle">\n '+a(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)===p?l.call(u,{name:"name",hash:{},data:i}):l)+"\n</span>\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.finished:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'\n<div class="progress my-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\n <div class="progress-bar bg-blue" style="width: '+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'%" aria-valuenow="'+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'" aria-valuemin="0" aria-valuemax="100"></div>\n</div>'},useData:!0})},85985:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression;return'<a class="float-end '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-secondary delete">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle me-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\n<a href="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(u,{name:"url",hash:{},data:i}):l)+"?name="+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\n '+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\n</a>\n"+(null!=(r=n.unless.call(u,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},41165:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<p class="alert alert-warning col-8">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"limit",{name:"lang",hash:{limit:null!=(r=null!=t?t.options:t)?r.limit:r},data:i}))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||l).call(r,"subheading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="form-group mb-1">\n <label for="url">'+s((n.lang||t&&t.lang||l).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="form-group mb-1" id="name-container" style="display: none;">\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="attach-btn-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h5 class="pt-2">Resource links</h5>\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.hide:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},43791:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},56730:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return e.propertyIsEnumerable,'<form>\n <div class="form-group">\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+'</label>\n <div class="typahead-region"></div>\n </div>\n</form>'},useData:!0})},71060:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\n<div class="subtitles-list-region"></div>'},useData:!0})},51069:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"col-5"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\n\n<div class="row py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-subtitles-list-region"></div>\n </div>\n <div class="col-7">\n <div class="subtitles-upload-region"></div>\n <div class="subtitles-upload-list-region p-0 col-8"></div>\n <div class="customer-subtitles-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-resources-list-region"></div>\n </div>\n <div class="col-7">\n <div class="resources-upload-region"></div>\n <div class="resources-upload-list-region p-0 col-8"></div>\n <div class="customer-resources-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-link-list-region"></div>\n </div>\n <div class="col-7">\n <div class="add-links-region mb-2"></div>\n <div class="customer-link-list-region p-0 col-8"></div>\n </div>\n</div>'},useData:!0})},94407:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return"autofocus"},5:function(e,t,n,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<input\n name="'+s(l(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n type="text"\n class="form-control '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+" "+s(l(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\n id="'+s(l(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\n autocomplete="off"\n placeholder="'+s(l(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\n '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.autofocus:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+"\n "+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'\n></input>\n<span class="svg-container mb-2 '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7376],{57085:function(t,e,n){"use strict";n.d(e,{n:function(){return C}});var r=n(31647),o=n(57098),i=n(22557),u=n(86363),a=n.n(u);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function f(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function b(t,e,n){return e=m(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var h=function(t){function e(){return l(this,e),b(this,e,arguments)}return d(e,t),f(e,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return a()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="breadcrumb-item";return this.model.get("active")&&(t+=" active"),t}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}])}(r.Q.wA),g=function(t){function e(){return l(this,e),b(this,e,arguments)}return d(e,t),f(e,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return h}}])}(r.Q.$W),w=n(93933),k=n.n(w);function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function E(t){var e=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==O(e)?e:e+""}function _(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_=function(){return!!t})()}function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}var C=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=P(e),function(t,e){if(e&&("object"==O(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_()?Reflect.construct(e,n||[],P(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(e,t),n=e,(u=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var t=this;this.breadcrumbCollection=new r.Q.FE([]);var e,n=this.options.folder;do{if(!n)break;if(e=i.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!e),{at:0}),!e)break;n=e}while(e);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:o.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(e){return t.breadcrumbCollection.add(e)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(t,e){var n=e?o.eX.LibraryEditor.FOLDER:o.eX.LibraryEditor.LIBRARY;return{name:t.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:n,args:[t.id]}}}},{key:"onRender",value:function(){var t=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",t)}}])&&j(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},35630:function(t,e,n){"use strict";n.d(e,{n:function(){return y}});var r=n(39479),o=n(31647),i=n(92655),u=n.n(i),a={pillTabSelector:"lo5ex",pillItem:"Zschz",umm:"uD6rh"};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var y=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=p(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(e,t),n=e,o=[{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var t="bg-white py-3 border-bottom";return this.options.className&&(t+=" ".concat(this.options.className)),t}},{key:"template",get:function(){return u()}},{key:"tagName",get:function(){return"nav"}},{key:"appLinks",get:function(){var t={};return this.options.tabs.forEach((function(e){return t[e.link.selector]=e.link.appLink})),t}},{key:"viewOptions",value:function(){var t=this.options.tabs.map((function(t){return Object.assign(Object.assign({},t),{link:t.link.selector.replace(".","")})}));return{styles:a,tabs:t}}},{key:"setActiveTab",value:function(){var t=this,e=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===t.options.activeTab&&(n.active=!0,e=!0)})),!e){var n=r.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}}],o&&l(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},86363:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,'<span class="fw-bolder">'+t.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=e?e.name:e))?i:t.hooks.helperMissing)?i.call(null!=e?e:t.nullContext||{},{name:"name",hash:{},data:o}):i)+"</span>\n"},3:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,"<a>"+t.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=e?e.name:e))?i:t.hooks.helperMissing)?i.call(null!=e?e:t.nullContext||{},{name:"name",hash:{},data:o}):i)+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.isActive:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:""},useData:!0})},93933:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},92655:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({1:function(t,e,n,r,o,i,u){var a;return t.propertyIsEnumerable,null!=(a=n.unless.call(null!=e?e:t.nullContext||{},null!=e?e.hide:e,{name:"unless",hash:{},fn:t.program(2,o,0,i,u),inverse:t.noop,data:o}))?a:""},2:function(t,e,n,r,o,i,u){t.propertyIsEnumerable;var a,c=t.lambda,l=t.escapeExpression;return' <li class="p-0 '+(null!=(a=n.if.call(null!=e?e:t.nullContext||{},null!=e?e.active:e,{name:"if",hash:{},fn:t.program(3,o,0,i,u),inverse:t.program(5,o,0,i,u),data:o}))?a:"")+'">\n <a class="'+l(c(null!=e?e.link:e,e))+" cursor-pointer d-block text-decoration-none text-reset px-2 "+l(c(null!=(a=null!=(a=null!=u[1]?u[1].options:u[1])?a.styles:a)?a.pillItem:a,e))+'">\n '+l(c(null!=e?e.name:e,e))+"\n </a>\n </li>\n"},3:function(t,e,n,r,o){return"btn btn-dark"},5:function(t,e,n,r,o){return"btn btn-outline-dark"},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o,i,u){var a;return t.propertyIsEnumerable,'<ul class="list-unstyled d-inline-block m-0 d-flex '+t.escapeExpression(t.lambda(null!=(a=null!=(a=null!=e?e.options:e)?a.styles:a)?a.pillTabSelector:a,e))+'">\n'+(null!=(a=n.each.call(null!=e?e:t.nullContext||{},null!=(a=null!=e?e.options:e)?a.tabs:a,{name:"each",hash:{},fn:t.program(1,o,0,i,u),inverse:t.noop,data:o}))?a:"")+"</ul>"},useData:!0,useDepths:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7376],{57085:function(t,e,n){"use strict";n.d(e,{n:function(){return C}});var r=n(31647),o=n(57098),i=n(22557),u=n(86363),a=n.n(u);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function f(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function b(t,e,n){return e=m(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var h=function(t){function e(){return l(this,e),b(this,e,arguments)}return d(e,t),f(e,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return a()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="breadcrumb-item";return this.model.get("active")&&(t+=" active"),t}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}])}(r.Q.wA),g=function(t){function e(){return l(this,e),b(this,e,arguments)}return d(e,t),f(e,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return h}}])}(r.Q.$W),w=n(93933),k=n.n(w);function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function E(t){var e=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==O(e)?e:e+""}function _(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_=function(){return!!t})()}function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}var C=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=P(e),function(t,e){if(e&&("object"==O(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_()?Reflect.construct(e,n||[],P(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(e,t),n=e,(u=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var t=this;this.breadcrumbCollection=new r.Q.FE([]);var e,n=this.options.folder;do{if(!n)break;if(e=i.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!e),{at:0}),!e)break;n=e}while(e);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:o.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(e){return t.breadcrumbCollection.add(e)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(t,e){var n=e?o.eX.LibraryEditor.FOLDER:o.eX.LibraryEditor.LIBRARY;return{name:t.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:n,args:[t.id]}}}},{key:"onRender",value:function(){var t=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",t)}}])&&j(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},35630:function(t,e,n){"use strict";n.d(e,{n:function(){return y}});var r=n(21161),o=n(31647),i=n(92655),u=n.n(i),a={pillTabSelector:"lo5ex",pillItem:"Zschz",umm:"uD6rh"};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var y=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=p(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(e,t),n=e,o=[{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var t="bg-white py-3 border-bottom";return this.options.className&&(t+=" ".concat(this.options.className)),t}},{key:"template",get:function(){return u()}},{key:"tagName",get:function(){return"nav"}},{key:"appLinks",get:function(){var t={};return this.options.tabs.forEach((function(e){return t[e.link.selector]=e.link.appLink})),t}},{key:"viewOptions",value:function(){var t=this.options.tabs.map((function(t){return Object.assign(Object.assign({},t),{link:t.link.selector.replace(".","")})}));return{styles:a,tabs:t}}},{key:"setActiveTab",value:function(){var t=this,e=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===t.options.activeTab&&(n.active=!0,e=!0)})),!e){var n=r.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}}],o&&l(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},86363:function(t,e,n){var r=n(31197);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,'<span class="fw-bolder">'+t.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=e?e.name:e))?i:t.hooks.helperMissing)?i.call(null!=e?e:t.nullContext||{},{name:"name",hash:{},data:o}):i)+"</span>\n"},3:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,"<a>"+t.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=e?e.name:e))?i:t.hooks.helperMissing)?i.call(null!=e?e:t.nullContext||{},{name:"name",hash:{},data:o}):i)+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){var i;return t.propertyIsEnumerable,null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.isActive:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:""},useData:!0})},93933:function(t,e,n){var r=n(31197);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},92655:function(t,e,n){var r=n(31197);t.exports=(r.default||r).template({1:function(t,e,n,r,o,i,u){var a;return t.propertyIsEnumerable,null!=(a=n.unless.call(null!=e?e:t.nullContext||{},null!=e?e.hide:e,{name:"unless",hash:{},fn:t.program(2,o,0,i,u),inverse:t.noop,data:o}))?a:""},2:function(t,e,n,r,o,i,u){t.propertyIsEnumerable;var a,c=t.lambda,l=t.escapeExpression;return' <li class="p-0 '+(null!=(a=n.if.call(null!=e?e:t.nullContext||{},null!=e?e.active:e,{name:"if",hash:{},fn:t.program(3,o,0,i,u),inverse:t.program(5,o,0,i,u),data:o}))?a:"")+'">\n <a class="'+l(c(null!=e?e.link:e,e))+" cursor-pointer d-block text-decoration-none text-reset px-2 "+l(c(null!=(a=null!=(a=null!=u[1]?u[1].options:u[1])?a.styles:a)?a.pillItem:a,e))+'">\n '+l(c(null!=e?e.name:e,e))+"\n </a>\n </li>\n"},3:function(t,e,n,r,o){return"btn btn-dark"},5:function(t,e,n,r,o){return"btn btn-outline-dark"},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o,i,u){var a;return t.propertyIsEnumerable,'<ul class="list-unstyled d-inline-block m-0 d-flex '+t.escapeExpression(t.lambda(null!=(a=null!=(a=null!=e?e.options:e)?a.styles:a)?a.pillTabSelector:a,e))+'">\n'+(null!=(a=n.each.call(null!=e?e:t.nullContext||{},null!=(a=null!=e?e.options:e)?a.tabs:a,{name:"each",hash:{},fn:t.program(1,o,0,i,u),inverse:t.noop,data:o}))?a:"")+"</ul>"},useData:!0,useDepths:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7408],{8371:function(e,t,n){"use strict";var o;n.d(t,{b:function(){return o}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(o||(o={}))},34629:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return te}});var o=n(39479),i=n(21679),r=n(57857),a=n(99249),s=n(31647),l=n(52076),u=n(70065),c=n(8371),d=n(75459),p=n(10101),f=n(83665),h=n(26357),y=n(88172),g=n(57098),m=n(67670);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var O=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=w(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(s.Q.Hn),k=n(13102),T=n(48404),M=n(19226),P=n(93569),E=n(48088),j=n(10657),V=n(48726),C=n(29457),x=n(40622),_=n(7190),R=n(19098),N=n.n(R),I={metadataValue:"mvVSS"};function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function B(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,G(o.key),o)}}function G(e){var t=function(e){if("object"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}var F,H=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=A(t),function(e,t){if(t&&("object"==D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,U()?Reflect.construct(t,n||[],A(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return N()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===x.pG.BroadcastDate?this.options.metadataValue?j.O.format(this.options.metadataValue,C.K4.FULL_YEAR):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof s.Q.FE?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===x.pG.Other?r.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===x.pG.Rating&&this.showChildView("ratingSelect",new V.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:I,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===x.pG.Rating,isOtherType:this.options.metadataType===x.pG.Other,metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),E.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),E.Validation.unbind(this)}}])&&B(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(s.Q.wA),K=n(68249),Z=n(60519);!function(e){e[e.Email=0]="Email"}(F||(F={}));var Q=Object.assign(Object.assign({},Z.c),{createSuggestEditNotification:function(e){return{_type:K.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[F.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),z=n(34651),$=n.n(z);function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,J(o.key),o)}}function J(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}function Y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Y=function(){return!!e})()}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}var te=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=X(t),function(e,t){if(t&&("object"==W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Y()?Reflect.construct(t,n||[],X(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(t,e),n=t,(s=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=i.u.getInstance(g.Or.Video,this),this.ratingsDataService=i.u.getInstance(g.Or.Ratings,this),this.notificationDataService=i.u.getInstance(g.Or.Notifications,this),this.selectedMetadata=new O,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return $()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return r.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return P.N0.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:p.Yw,title:r.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.v,channelName:this.channelName,buttonText:r.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:T.p.config,currentUser:M.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(g.Vk.VIDEO,"".concat(g.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(g.Vk.NOTIFICATIONS,"".concat(g.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(y.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===x.pG.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=Q.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(y.ZV.ShowSpinner,!1),e.spinnerModel.set(y.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(y.ZV.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(y.ZV.Disabled,!1),P.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==x.pG.Other?this.model.get(e.get("property")):null}),e.get("name")!==x.pG.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(x.zK).map((function(e){return x.zK[e]}));return(P.M2.isClip(this.model)||P.M2.isInteractive(this.model))&&(e=e.filter((function(e){return e.name===x.pG.VideoTitle||e.name===x.pG.Description}))),this.currentUser.get("instanceRegion")===c.b.US&&(e=e.filter((function(e){return e.name!==x.pG.Channel&&e.name!==x.pG.BroadcastDate}))),new f.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=a.r.get(this.viewModelName),this.viewModel.addValidation(_.xs)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==x.pG.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==x.pG.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?_.nf.original():"":_.nf.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=P.M2.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==d.r.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};l.k.logUserAction(t,{descriptor:u.gL.Edit,location:u.LZ.Popup,actionType:u.Vw.Suggest,entity:u.py.Video})}},{key:"dataFetched",value:function(){return!(!this.model||P.M2.isVideo(this.model)&&!this.ratingCollection)}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new h.H({collection:_.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:l.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new H({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new k.i(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.model||(this.model=this.videoDataService.getUnionVideo(this.options.videoId,this.options.typeId)),this.ratingCollection||(this.ratingCollection=this.ratingsDataService.getAllRatings()),this.model&&!this.metadataCollection&&(this.metadataCollection=this.getMetadataCollection()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:P.Kp.getSpinner({size:P.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&q(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s}(s.Q.G7)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var o=n(39479),i=n(31647),r=n(55142);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var p=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=c(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,i=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return r.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],i&&s(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.$W)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return m}});var o=n(48088),i=n(39479),r=n(31647),a=n(71641),s=n(93569),l=n(46635),u=n.n(l),c={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=y(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])).selectSearch="",n.sameCharIndex=1,n.optionStep=1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return u()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),o.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=i.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=i.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var o=n[this.sameCharIndex];return o||(o=i.first(n),this.sameCharIndex=0),this.sameCharIndex++,o}return i.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!i.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(o))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:c,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.w({collection:this.collection,channelName:this.options.channelName,childOptions:i.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(c.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],r&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var o=n(31647),i=n(88172);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=c(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,(o=[{key:"defaults",value:function(){return a(a({},i.ZV.Disabled,!0),i.ZV.Hidden,!1)}}])&&s(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.Hn)},19098:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression,s=e.lambda;return'<p class="fw-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(r=null!=t?t.options:t)?r.metadataType:r},data:i}))+'</p>\n<p class="mb-3 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.metadataValue:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.metadataValue:r,t))?r:"")+"</p>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <textarea\n id="suggest-edit"\n placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.suggestionPlaceholder:r,t))+'"\n class="form-control"\n name="suggestion"\n ></textarea>\n <div class="form-feedback"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.isOtherType:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\n<div class="dropdown-divider"></div>\n\n<div class="form-group">\n <label for="suggest-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:i}))+'</label>\n <div class="rating-select-region"></div>\n <div class="rating-form-feedback invalid-feedback"></div>\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.useRatingSelect:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n\n<div class="form-group">\n <label for="reason-for-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:i}))+'</label>\n <textarea\n id="reason-for-edit"\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:i}))+'"\n class="form-control"\n name="reason"\n ></textarea>\n <div class="form-feedback"></div>\n</div>'},useData:!0})},34651:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(r,"guidelines",{name:"lang",hash:{},data:i}))+'</p>\n<p class="fw-bold mb-1">'+s((n.lang||t&&t.lang||a).call(r,"dropdownHeading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="metadata-dropdown-region position-relative"></div>\n<div class="suggest-edit-region"></div>\n'},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.spinnerEl:r,t))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.dataFetched:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \n class="dropdown-toggle form-control text-start position-relative '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \n type="button" \n id="dropdownMenuButton" \n data-bs-toggle="dropdown" \n aria-haspopup="true" \n aria-expanded="false"\n '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \n name="'+s(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n >\n '+s(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\n</button>\n<div class="dropdown-region"></div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7408],{8371:function(e,t,n){"use strict";var o;n.d(t,{b:function(){return o}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(o||(o={}))},34629:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return te}});var o=n(21161),i=n(21679),r=n(57857),a=n(99249),s=n(31647),l=n(52076),u=n(70065),c=n(8371),d=n(75459),p=n(10101),f=n(83665),h=n(26357),y=n(88172),g=n(57098),m=n(67670);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var O=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=w(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(s.Q.Hn),k=n(13102),T=n(48404),M=n(19226),P=n(93569),E=n(43823),j=n(10657),V=n(48726),C=n(29457),x=n(40622),_=n(7190),R=n(19098),N=n.n(R),I={metadataValue:"mvVSS"};function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function B(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,G(o.key),o)}}function G(e){var t=function(e){if("object"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}var F,H=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=A(t),function(e,t){if(t&&("object"==D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,U()?Reflect.construct(t,n||[],A(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return N()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===x.pG.BroadcastDate?this.options.metadataValue?j.O.format(this.options.metadataValue,C.K4.FULL_YEAR):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof s.Q.FE?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===x.pG.Other?r.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===x.pG.Rating&&this.showChildView("ratingSelect",new V.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:I,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===x.pG.Rating,isOtherType:this.options.metadataType===x.pG.Other,metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),E.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),E.Validation.unbind(this)}}])&&B(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(s.Q.wA),K=n(68249),Z=n(60519);!function(e){e[e.Email=0]="Email"}(F||(F={}));var Q=Object.assign(Object.assign({},Z.c),{createSuggestEditNotification:function(e){return{_type:K.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[F.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),z=n(34651),$=n.n(z);function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,J(o.key),o)}}function J(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}function Y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Y=function(){return!!e})()}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}var te=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=X(t),function(e,t){if(t&&("object"==W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Y()?Reflect.construct(t,n||[],X(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(t,e),n=t,(s=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=i.u.getInstance(g.Or.Video,this),this.ratingsDataService=i.u.getInstance(g.Or.Ratings,this),this.notificationDataService=i.u.getInstance(g.Or.Notifications,this),this.selectedMetadata=new O,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return $()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return r.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return P.N0.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:p.Yw,title:r.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.v,channelName:this.channelName,buttonText:r.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:T.p.config,currentUser:M.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(g.Vk.VIDEO,"".concat(g.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(g.Vk.NOTIFICATIONS,"".concat(g.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(y.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===x.pG.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=Q.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(y.ZV.ShowSpinner,!1),e.spinnerModel.set(y.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(y.ZV.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(y.ZV.Disabled,!1),P.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==x.pG.Other?this.model.get(e.get("property")):null}),e.get("name")!==x.pG.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(x.zK).map((function(e){return x.zK[e]}));return(P.M2.isClip(this.model)||P.M2.isInteractive(this.model))&&(e=e.filter((function(e){return e.name===x.pG.VideoTitle||e.name===x.pG.Description}))),this.currentUser.get("instanceRegion")===c.b.US&&(e=e.filter((function(e){return e.name!==x.pG.Channel&&e.name!==x.pG.BroadcastDate}))),new f.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=a.r.get(this.viewModelName),this.viewModel.addValidation(_.xs)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==x.pG.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==x.pG.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?_.nf.original():"":_.nf.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=P.M2.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==d.r.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};l.k.logUserAction(t,{descriptor:u.gL.Edit,location:u.LZ.Popup,actionType:u.Vw.Suggest,entity:u.py.Video})}},{key:"dataFetched",value:function(){return!(!this.model||P.M2.isVideo(this.model)&&!this.ratingCollection)}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new h.H({collection:_.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:l.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new H({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new k.i(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.model||(this.model=this.videoDataService.getUnionVideo(this.options.videoId,this.options.typeId)),this.ratingCollection||(this.ratingCollection=this.ratingsDataService.getAllRatings()),this.model&&!this.metadataCollection&&(this.metadataCollection=this.getMetadataCollection()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:P.Kp.getSpinner({size:P.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&q(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s}(s.Q.G7)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var o=n(21161),i=n(31647),r=n(55142);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var p=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=c(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,i=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return r.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],i&&s(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.$W)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return m}});var o=n(43823),i=n(21161),r=n(31647),a=n(71641),s=n(93569),l=n(46635),u=n.n(l),c={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var m=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=y(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])).selectSearch="",n.sameCharIndex=1,n.optionStep=1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return u()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),o.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=i.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=i.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var o=n[this.sameCharIndex];return o||(o=i.first(n),this.sameCharIndex=0),this.sameCharIndex++,o}return i.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!i.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(o))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:c,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.w({collection:this.collection,channelName:this.options.channelName,childOptions:i.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(c.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],r&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var o=n(31647),i=n(88172);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=c(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,(o=[{key:"defaults",value:function(){return a(a({},i.ZV.Disabled,!0),i.ZV.Hidden,!1)}}])&&s(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.Hn)},19098:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression,s=e.lambda;return'<p class="fw-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(r=null!=t?t.options:t)?r.metadataType:r},data:i}))+'</p>\n<p class="mb-3 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.metadataValue:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.metadataValue:r,t))?r:"")+"</p>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <textarea\n id="suggest-edit"\n placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.suggestionPlaceholder:r,t))+'"\n class="form-control"\n name="suggestion"\n ></textarea>\n <div class="form-feedback"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.isOtherType:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\n<div class="dropdown-divider"></div>\n\n<div class="form-group">\n <label for="suggest-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:i}))+'</label>\n <div class="rating-select-region"></div>\n <div class="rating-form-feedback invalid-feedback"></div>\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.useRatingSelect:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n\n<div class="form-group">\n <label for="reason-for-edit" class="fw-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:i}))+'</label>\n <textarea\n id="reason-for-edit"\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:i}))+'"\n class="form-control"\n name="reason"\n ></textarea>\n <div class="form-feedback"></div>\n</div>'},useData:!0})},34651:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(r,"guidelines",{name:"lang",hash:{},data:i}))+'</p>\n<p class="fw-bold mb-1">'+s((n.lang||t&&t.lang||a).call(r,"dropdownHeading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="metadata-dropdown-region position-relative"></div>\n<div class="suggest-edit-region"></div>\n'},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.spinnerEl:r,t))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.dataFetched:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},46635:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \n class="dropdown-toggle form-control text-start position-relative '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \n type="button" \n id="dropdownMenuButton" \n data-bs-toggle="dropdown" \n aria-haspopup="true" \n aria-expanded="false"\n '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \n name="'+s(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n >\n '+s(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\n</button>\n<div class="dropdown-region"></div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
|