@clickview/library-editor 1.54.0-rc.1 → 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-8b643077a3.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-24f329fa27.min.js +0 -2
- package/dist/scripts/bundle-24f329fa27.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
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[101],{54096:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(32735),a=n(21679);function o(e){var t,n;return t=e,n=a.u.getInstance(t),r.useEffect((function(){return function(){a.u.releaseInstance(t)}})),n}},63038:function(e,t,n){"use strict";n.d(t,{n:function(){return O},W:function(){return w}});var r=n(32735),a=n(80247),o=n(18881),i=n(92802),l=n(53808),c=n(85887),s=n(49642),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function f(e){var t=e.label,n=e.checkboxLabelClassName,a=e.checkboxLabelFontWeight,i=e.className,l=u(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return r.createElement(o.Z.Group,{className:"form-group"},r.createElement("div",{className:"form-check ".concat(i||"")},r.createElement(O,Object.assign({className:"form-check-input"},l)),r.createElement(o.Z.Label,{className:"form-check-label cursor-pointer ".concat("normal"===a?"fw-normal":""," \n ").concat(n),htmlFor:l.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement(s.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var m=n(39396),d=n(66703),p={getCustomFormControlClassName:function(e,t,n,r,a,o){var l="";return l=function(e,t){var n="";return n="select"===e?"form-select":"form-control","sm"===t&&(n+=" ".concat(n,"-sm")),"lg"===t&&(n+=" ".concat(n,"-lg")),n}(o,r),(0,i.u9)(t,n)&&(0,i.u9)(e,n)&&(l+=" is-invalid"),a&&(l+=" ".concat(a)),l}},b=n(85475);function y(e){var t=(0,i.u6)().values,n=c.t.get(t,e.fieldName);return"string"!=typeof n?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-end text-secondary fw-normal"},n.length,"/",e.limit," characters")}var v={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG",spinner:"CycFx"};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},S="shared.formField";function O(e){var t,n,o=e.children,s=e.showLoadingSpinner,u=g(e,["children","showLoadingSpinner"]),f=(t=r.useState(e.type),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return h(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)?h(e,t):void 0}}(t,n)||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.")}()),d=f[0],p=f[1],y=l.q.isFunction(o)?function(e){return o(e)}:r.Children.count(o)?o:null;if("password"!==u.type)return s?r.createElement("div",{className:"position-relative"},r.createElement(i.gN,Object.assign({},c.t.omit(u,["formSize"])),y),r.createElement("div",{className:v.spinner},r.createElement(a.Z,{animation:"border",size:"sm"}))):r.createElement(i.gN,Object.assign({},c.t.omit(u,["formSize"])),y);var S="position-relative ".concat(v.passwordContainer);return u.className&&(S+=" ".concat(u.className)),u.disabled&&(S+=" ".concat(v.passwordContainerDisabled)),r.createElement("div",{className:S},r.createElement(i.gN,Object.assign({},c.t.omit(u,["formSize","type","className"]),{type:d,className:"".concat(v.passwordInput," border-0 w-100 h-100 outline-none rounded")}),y),"password"===u.type&&r.createElement(m.x,{svgName:"password"===d?b.vn.VisibleOn:b.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(v.revealPassword),onClick:function(){p("password"===d?"text":"password")}}))}function w(e){var t=e.label,n=e.className,a=e.showCharacterCounter,l=e.showRequiredStar,s=e.infoTooltip,u=e.infoTooltipPlacement,h=e.infoText,w=e.formSize,E=e.showOptionalLabel,x=g(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel"]),j=(0,i.u6)(),C=j.errors,N=j.touched,A=function(){};if("checkbox"===x.type){var P=c.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(P.onChange=A),r.createElement(f,Object.assign({},P))}var I=Object.assign(Object.assign({},x),{className:p.getCustomFormControlClassName(C,N,x.name,w,n,"string"==typeof e.as?e.as:null)});return e.disabled&&(I.onChange=A),r.createElement(o.Z.Group,{className:"form-group"},!!t&&r.createElement(o.Z.Label,{htmlFor:x.id,className:"d-flex align-items-center"},t,l&&r.createElement("span",{className:"text-danger"},"*"),s&&r.createElement(m.x,{className:"svg-container text-secondary ".concat(v.infoTooltip),svgName:b.vn.Info,title:s,tooltipPlacement:u,tooltipSpanHack:!0}),E&&r.createElement("span",{className:"text-secondary"}," ",r.createElement(d.x,{namespace:S,phrase:"optional"})),!!a&&!!x.maxLength&&r.createElement("div",{className:"ms-auto"},r.createElement(y,{fieldName:x.name,limit:x.maxLength}))),r.createElement(O,Object.assign({},I,{"aria-errormessage":"".concat(x.name,"Error")})),!!h&&r.createElement(o.Z.Text,{className:"text-secondary"},h),r.createElement(i.Bc,{name:x.name},(function(e){return r.createElement(o.Z.Control.Feedback,{id:"".concat(x.name,"Error"),type:"invalid",role:"status"},e)})))}O.defaultProps={autoComplete:"off"},w.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},86347:function(e,t,n){"use strict";n.d(t,{b:function(){return u},n:function(){return s}});var r=n(32735),a=n(92802),o=n(53808),i=n(85887);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function s(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,f=c(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(n){Object.keys(t).forEach((function(r){t.hasOwnProperty(r)&&(i.t.isObject(n[r])?e(n[r]):null===t[r]&&delete t[r])}))}(t),t}(s)):s,d={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(a.J9,Object.assign({enableReinitialize:!0},f,{initialValues:m,onSubmit:function(t,r){var a=r.setSubmitting,o=r.resetForm,i=r.setFieldError,c=n&&e.validationSchema?e.validationSchema.cast(t):t;u(c,(function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.reset&&o(),n.errors)for(var r=0,c=Object.entries(n.errors);r<c.length;r++){var s=(e=c[r],t=2,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 r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(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)?l(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.")}()),u=s[0],f=s[1];i(u,f)}a(!1)}))},initialStatus:d}),o.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},90335:function(e,t,n){"use strict";var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series",e.ProductionYear="production_year"}(r||(r={}))},2491:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92159),a=n(21186),o=n(54096);function i(){var e=(0,o.G)(r.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:t})}}}},94223:function(e,t,n){"use strict";n.d(t,{P:function(){return u}});var r=n(32735),a=n(70680),o=n(35656),i=n(53808),l=n(86120);function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){function o(e){if(e)return i.q.isFunction(t)?c(t(e)):c(e.data)}function s(e){var t,r;if(e)return n?n(e):null===(r=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===r?void 0:r.next}return(0,a.v9)((0,r.useMemo)((function(){return function(t){if(i.q.isFunction(e)){for(var n=e,r=i.q.isFunction(e)&&n(),a=r&&l.a.getResponse(t,r),u=a&&a.isFetching,f=a&&a.statusCode,m=a&&a.hasCompleted,d=m,p=a&&a.shouldFetch,b=o(a&&a.data),y=s(a&&a.data),v=function(e){if(e)return null==e?void 0:e.count}(a&&a.data);y&&(a=l.a.getResponse(t,n(y)),u=u||a.isFetching,f=a.statusCode,m=a.hasCompleted,!a.shouldFetch);){var h=o(a.data);h&&b.push.apply(b,c(h));var g=s(a.data);y=g===y?null:g}var S={shouldInitialFetch:p,items:b,nextCursor:y,isFetching:u,statusCode:f,hasCompleted:m,hasFirstPageCompleted:d};return"number"==typeof v&&(S.totalItems=v),S}}}),[e]))}o.o.Ok},50072:function(e,t,n){"use strict";var r;n.d(t,{l:function(){return r}}),function(e){e.Pending="Pending",e.Approved="Approved",e.Rejected="Rejected",e.Closed="Closed",e.AutoApproved="AutoApproved"}(r||(r={}))},85739:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var r=n(32735),a=n(86120),o=n(94223),i=n(25796);function l(e,t){var n=a.a.useGetFetch(),l=function(n){return i.y.libraryRequests(e,t,n)},c=function(e){return n(l(e))},s=(0,o.P)(l&&function(e){return l(e).key});return r.useEffect((function(){s&&s.shouldInitialFetch&&c()}),[e,t]),Object.assign(Object.assign({},s),{fetchNext:c})}},41228:function(e,t,n){"use strict";n.r(t),n.d(t,{RejectLibraryRequestView:function(){return A}});var r=n(32735),a=n(92802),o=n(5173),i=n(57857),l=n(31647),c=n(86120),s=n(52076),u=n(70065),f=n(63038),m=n(86347),d=n(4231),p=n(83996),b=n(66703),y=n(90335),v=n(2491),h=n(22430),g=n(50997),S=n(50072),O=n(25796),w=n(85739);function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var x="libraryRequests.reject",j=i.T.encloseNamespace(x),C=(0,o.Ry)().shape({message:(0,o.Z_)().required((function(){return j("required")})).max(500,(function(){return j("max")}))});function N(e){var t=(0,m.b)();return r.createElement(a.l0,null,r.createElement("p",null,r.createElement(b.x,{namespace:x,phrase:"message",options:{videoName:e.libraryRequest.object.name}})),r.createElement(f.W,{label:j("label"),as:"textarea",name:"message",id:"message",value:t.values.message,placeholder:j("placeholder")}),r.createElement(p.u,null,r.createElement(p.u.Cancel,{onClick:e.closePopup}),r.createElement(p.u.Submit,{text:j("reject"),variant:"danger",showSpinner:e.showSpinner})))}function A(e){var t,n,a,o=c.a.useGetFetch(),i=(0,v.Z)(),f=(n=r.useState(!1),a=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 r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(n,a)||function(e,t){if(e){if("string"==typeof e)return E(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)?E(e,t):void 0}}(n,a)||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.")}()),p=f[0],b=f[1],x=(0,w.p)(e.queryParams.sort||y.D.Newest,[S.l.Pending]),A=c.a.useBasicFetch(O.y.libraryRequest(e.libraryRequestId));function P(){!function(){var e,t,n,r,a={location:u.LZ.Popup,actionType:u.Vw.Reject,entity:u.py.LibraryRequest,workflowPhase:u.eu.Complete},o={id:A.data.id,videoId:null===(e=A.data.object)||void 0===e?void 0:e.id,requestingUserId:null===(t=A.data.sender)||void 0===t?void 0:t.id,sourceLibraryId:null===(n=A.data.sourceLibrary)||void 0===n?void 0:n.id,sourceFolderId:null===(r=A.data.sourceCategory)||void 0===r?void 0:r.id};s.k.logUserAction(o,a)}(),i.success(j("success"));var t=x.items.findIndex((function(t){return t.id.toString()===e.libraryRequestId.toString()})),n=x.items[t+1];l.Q.C$.trigger({application:g.OV.LIBRARY_REQUESTS,action:g.eX.LibraryRequests.PENDING_REQUESTS,args:[(null==n?void 0:n.id)||""],params:e.queryParams},{replace:!0})}var I=((null===(t=x.items)||void 0===t?void 0:t.length)||x.hasCompleted)&&!!A.data;return r.createElement(d.G,{title:j("title"),closePopup:e.closePopup,showLoadingSpinner:!I},I&&r.createElement(m.n,{initialValues:{message:""},validationSchema:C,onSubmit:function(t){b(!0);var n={response:S.l.Rejected,message:t.message};o(O.y.fulfilRequest(e.libraryRequestId,n,P,(function(e){return i.error(h.M.libraryApiError(e))}),e.closePopup))}},r.createElement(N,{libraryRequest:A.data,closePopup:e.closePopup,showSpinner:p})))}},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1010],{51010:function(e,t,n){"use strict";n.r(t),n.d(t,{DisableReviewView:function(){return k}});var r=n(21679),o=n(57857),i=n(31647),a=n(52076),u=n(70065),l=n(10101),c=n(88172),s=n(57098),f=n(67670),p=n(19226),y=n(93569),b=n(17654),v=n.n(b);function h(e){return h="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},h(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}var k=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"==h(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,g()?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&&O(e,t)}(t,e),n=t,(b=[{key:"initialize",value:function(){this.bindListeners(),this.contentUpdatesDataService=r.u.getInstance(s.Or.ContentUpdates,this)}},{key:"name",get:function(){return"DisableReviewView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"contentUpdates.disableReview"}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:l.Yw,spinnerButtonOptions:{model:this.spinnerModel=new f.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"offBtn"),onClick:function(){return e.onClickDisable()}}}]}},{key:"bindListeners",value:function(){this.listenTo(s.Vk.VIDEO,"".concat(s.M_.VIDEOS_TO_REVIEW,":sync"),this.render)}},{key:"videosToReview",value:function(){return!!this.videoCollection&&!!this.videoCollection.length}},{key:"onClickDisable",value:function(){this.videosToReview()?this.approveAllThenDisableReview():this.disableReview(),this.triggerMethod("hide")}},{key:"approveAllThenDisableReview",value:function(){var e=this;this.contentUpdatesDataService.approveAllVideos((function(){return e.disableReview()}))}},{key:"disableReview",value:function(){this.contentUpdatesDataService.disableLibraryReview(this.redirectToPastReleases),this.logAction()}},{key:"redirectToPastReleases",value:function(){i.Q.C$.trigger({application:s.OV.CONTENT_UPDATES,action:s.eX.ContentUpdates.PAST_RELEASES})}},{key:"logAction",value:function(){var e={location:u.LZ.Popup,actionType:u.Vw.Disable,entity:u.py.CustomerSetting,descriptor:u.YK.LibraryReview,workflowPhase:u.eu.Complete},t={approvedCount:this.videoCollection.length};a.k.logUserAction(t,e)}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&this.spinnerModel.set(c.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{videosToReview:this.videosToReview(),dataFetched:!!this.videoCollection,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}}])&&d(n.prototype,b),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,b}(i.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="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},i(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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(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=s(t),function(e,t){if(t&&("object"==i(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,c()?Reflect.construct(t,n||[],s(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&&f(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},17654:function(e,t,n){var r=n(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1010],{51010:function(e,t,n){"use strict";n.r(t),n.d(t,{DisableReviewView:function(){return k}});var r=n(21679),o=n(57857),i=n(31647),a=n(52076),u=n(70065),l=n(10101),c=n(88172),s=n(57098),f=n(67670),p=n(19226),y=n(93569),b=n(17654),v=n.n(b);function h(e){return h="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},h(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}var k=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"==h(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,g()?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&&O(e,t)}(t,e),n=t,(b=[{key:"initialize",value:function(){this.bindListeners(),this.contentUpdatesDataService=r.u.getInstance(s.Or.ContentUpdates,this)}},{key:"name",get:function(){return"DisableReviewView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"contentUpdates.disableReview"}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:l.Yw,spinnerButtonOptions:{model:this.spinnerModel=new f.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"offBtn"),onClick:function(){return e.onClickDisable()}}}]}},{key:"bindListeners",value:function(){this.listenTo(s.Vk.VIDEO,"".concat(s.M_.VIDEOS_TO_REVIEW,":sync"),this.render)}},{key:"videosToReview",value:function(){return!!this.videoCollection&&!!this.videoCollection.length}},{key:"onClickDisable",value:function(){this.videosToReview()?this.approveAllThenDisableReview():this.disableReview(),this.triggerMethod("hide")}},{key:"approveAllThenDisableReview",value:function(){var e=this;this.contentUpdatesDataService.approveAllVideos((function(){return e.disableReview()}))}},{key:"disableReview",value:function(){this.contentUpdatesDataService.disableLibraryReview(this.redirectToPastReleases),this.logAction()}},{key:"redirectToPastReleases",value:function(){i.Q.C$.trigger({application:s.OV.CONTENT_UPDATES,action:s.eX.ContentUpdates.PAST_RELEASES})}},{key:"logAction",value:function(){var e={location:u.LZ.Popup,actionType:u.Vw.Disable,entity:u.py.CustomerSetting,descriptor:u.YK.LibraryReview,workflowPhase:u.eu.Complete},t={approvedCount:this.videoCollection.length};a.k.logUserAction(t,e)}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&this.spinnerModel.set(c.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{videosToReview:this.videosToReview(),dataFetched:!!this.videoCollection,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}}])&&d(n.prototype,b),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,b}(i.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="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},i(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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(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=s(t),function(e,t){if(t&&("object"==i(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,c()?Reflect.construct(t,n||[],s(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&&f(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},17654:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,l=e.escapeExpression;return'<p class="m-0 pb-2">'+l((n.lang||t&&t.lang||u).call(a,"noReview",{name:"lang",hash:{},data:o}))+"</p>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.videosToReview:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'<p class="m-0">'+l((n.lang||t&&t.lang||u).call(a,"undoInstructions",{name:"lang",hash:{},data:o}))+"</p>\n"},4:function(e,t,n,r,o){return e.propertyIsEnumerable,'<p class="m-0 pb-2">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"automaticApproval",{name:"lang",hash:{},data:o}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1086],{36537:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveFolderView:function(){return D}});var r=n(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1086],{36537:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveFolderView:function(){return D}});var r=n(43823),i=n(21161),o=n(21679),l=n(57857),a=n(99249),s=n(31647),u=n(52076),c=n(10101),d=n(60103),f=n(88172),h=n(57098),p=n(67670),y=n(60602),v=n(93569),b=n(77739),g=n(88441),m=n.n(g);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 I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function k(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 S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}var D=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=O(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,S()?Reflect.construct(t,n||[],O(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,g=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=o.u.getInstance(h.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(h.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(h.Vk.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return v.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:l.T.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};u.k.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:v.PU.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=v.PU.getLibrary(this.options.folderId,e),this.collection=new d.I([this.library]))}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=a.r.get(e,this.model.toJSON(),{ctor:y.g});var t=v.PU.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(f.ZV.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,function(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return I(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)?I(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(v.PU.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.r({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(i.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,i.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:v.Kp.getSpinner({size:v.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}],g&&P(n.prototype,g),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,g}(s.Q.G7)},88441:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){return'<div class="folder-details-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1216],{59054:function(e,t,n){"use strict";var o;n.d(t,{f:function(){return o}}),function(e){e.Share="share",e.MasterObject="masterobject"}(o||(o={}))},45114:function(e,t,n){"use strict";n.d(t,{L:function(){return g}});var o=n(43823),i=n(99249),r=n(31647),a=n(85475),l=n(10101),s=n(93569),c=n(40622),u=n(61596),p=n(89039),d=n.n(p);function h(e){return h="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},h(e)}function f(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,m(o.key),o)}}function m(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(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=v(t),function(e,t){if(t&&("object"==h(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||[],v(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&&b(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){var e=this;this.options.playerViewModelKey&&this.listenToPlayerViewModel(),this.initViewModel(),this.listenTo(this.options.channelName,"timeupdate",(function(t){e.webPlayerTime=t,e.syncTime()})),this.options.editing&&this.syncTime()}},{key:"name",get:function(){return"ChapterFormComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterForm"}},{key:"tagName",get:function(){return"form"}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return d()}},{key:"className",get:function(){return this.options.creating?"py-3":"border-top p-2"}},{key:"behaviors",get:function(){return[{behaviorClass:l.fS,bindViewModel:!0},{behaviorClass:l.Bp,bindViewModel:!0}]}},{key:"events",value:function(){return{submit:"onSubmit","change .chapter-name":"validateName","keyup .chapter-name":"validateName","change .time-input":"onTimeInputUpdate","click .time-input":"onTimeInputUpdate","keyup .time-input":"onTimeInputUpdate","click .cancel":"destroyView"}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=hours]":{observe:"hours",setOptions:{validate:!0}},"[name=minutes]":{observe:"minutes",setOptions:{validate:!0}},"[name=seconds]":{observe:"seconds",setOptions:{validate:!0}}}}},{key:"initViewModel",value:function(){this.viewModel=i.r.get(this.viewModelName,this.model.toJSON())}},{key:"listenToPlayerViewModel",value:function(){var e=i.r.get(this.options.playerViewModelKey);this.listenTo(e,"change:currenttime",this.updateTime)}},{key:"updateTime",value:function(e){this.webPlayerTime=e.get("currenttime"),this.syncTime()}},{key:"syncTime",value:function(){var e=this.viewModel.get("startTime")||this.webPlayerTime;this.viewModel.set({hours:s.X4.getHoursComponent(e)||"",minutes:s.X4.getMinutesComponent(e)||"",seconds:s.X4.getSecondsComponent(e)})}},{key:"getNewTime",value:function(){return this.enabled()?s.X4.parseTime(this.viewModel.pick("hours","minutes","seconds")):0}},{key:"enabled",value:function(){return this.options.creating||0!==this.model.collection.indexOf(this.model)}},{key:"maxTimes",value:function(){var e=s.X4.millisecondsToSeconds(this.options.duration),t=s.X4.getHoursComponent(e),n=t>0?59:s.X4.getMinutesComponent(e);return{maxHr:t,maxMin:n,maxSec:n>0?59:s.X4.getSecondsComponent(e)}}},{key:"onTimeInputUpdate",value:function(){o.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapterTime,this.getNewTime()),this.validateStartTime()}},{key:"destroyView",value:function(){o.Radio.channel(this.options.channelName).trigger(c.NT.CancelChapterEdit),this.destroy()}},{key:"onSubmit",value:function(e){if(e.preventDefault(),!this.validate())return!1;var t={id:this.viewModel.get("id"),name:this.viewModel.get("name"),startTime:this.getNewTime()},n=o.Radio.channel(this.options.channelName),r=c.NT.CreateChapter;this.options.editing&&(r=c.NT.UpdateChapter),n.trigger(r,t),this.stopListening(this.viewModel),i.r.clear(this.viewModelName)}},{key:"validate",value:function(){this.viewModel.validate();var e=this.validateStartTime(),t=this.validateName();return this.viewModel.isValid()&&e&&t}},{key:"validateStartTime",value:function(){var e=this,t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=this.getNewTime(),l=u.$.isValidChapterTime(this.model,a,this.options.duration,r),s=[],c=["seconds","minutes","hours"];return a<0?s=c:l&&(s.push("seconds"),a>59&&s.push("minutes"),a>3540&&s.push("hours")),c.forEach((function(t){return n(e,t,null)})),s.forEach((function(t){return i(e,t,l,null)})),!l}},{key:"validateName",value:function(e){if(!e||13!==e.keyCode){var t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=u.$.isValidChapterName(this.model,this.viewModel.get("name"),r);return a?i(this,"name",a,null):n(this,"name",null),!a}}},{key:"viewOptions",value:function(){var e=this.maxTimes(),t=e.maxHr,n=e.maxMin,o=0===e.maxSec,i=0===n,r=0===t;return Object.assign(Object.assign({},this.options),{enabled:this.enabled(),timeId:"".concat(this.cid,"-time"),chapterId:"".concat(this.cid,"-chapter-name"),plusSvg:a.Nj.getSvg(a.vn.Plus),secDisabled:o,minDisabled:i,hrDisabled:r})}}],r&&f(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},70693:function(e,t,n){"use strict";n.d(t,{Q:function(){return R}});var o=n(31647),i=n(43823),r=n(56210),a=n(85475),l=n(93569),s=n(45114),c=n(40622),u=n(95637),p=n.n(u),d={loading:"rOhrX",darkBackground:"Ubazj",svgContainer:"SiNm3",chapterItem:"MOpQI"},h=n(6723);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 m(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"!=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 v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=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,v()?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&&g(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"ChapterItemComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterItem"}},{key:"instanceChannelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"chapter ".concat(d.chapterItem)}},{key:"behaviors",get:function(){return[{behaviorClass:r.H,selector:".action"}]}},{key:"regions",value:function(){return{editForm:{replaceElement:!1,el:".edit-form-region"}}}},{key:"elements",get:function(){return{chapterItem:".chapter-item",editChapter:".edit-chapter",deleteChapter:".delete-chapter"}}},{key:"events",value:function(){return{"click @ui.editChapter":"onEditChapter","click @ui.deleteChapter":"onDeleteChapter","click .clickable-seek":"onClick"}}},{key:"bindListeners",value:function(){this.listenTo(this.instanceChannelName,c.NT.CancelChapterEdit,this.onCancelEdit),this.listenTo(this.instanceChannelName,c.NT.UpdateChapter,this.onUpdateChapter),this.listenTo(this.instanceChannelName,c.NT.UpdateChapterTime,this.onUpdateChapterTime),this.listenTo(this.model,"change:showEditor",this.onShowEditorChange),this.listenTo(this.model,"change:loading",this.onLoadingChange);var e=this.model.collection.first();this.model!==e?this.listenTo(this.model.collection,"sort",this.render):this.listenTo(this.model.collection,"add remove sort",this.render)}},{key:"onClick",value:function(){i.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapterTime,this.model.get("startTime"))}},{key:"onLoadingChange",value:function(){var e=this.model.get("loading")?"disable":"enable";this.getUI("editChapter").tooltip(e),this.getUI("deleteChapter").tooltip(e),this.model.set("showEditor",!1,{silent:!0}),this.render()}},{key:"onShowEditorChange",value:function(){this.model.get("loading")||(this.model.get("showEditor")?this.showEditView():this.hideEditView())}},{key:"showEditView",value:function(){this.renderEditForm(),this.getUI("chapterItem").addClass(d.darkBackground)}},{key:"hideEditView",value:function(){this.model.set("showEditor",!1,{silent:!0}),this.getUI("chapterItem").removeClass(d.darkBackground),this.detachChildView("editForm")}},{key:"onCancelEdit",value:function(){this.hideEditView()}},{key:"onDeleteChapter",value:function(){this.model.get("loading")||i.Radio.channel(this.options.channelName).trigger(c.NT.DeleteChapter,this.model)}},{key:"onUpdateChapter",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapter,e),this.render()}},{key:"onUpdateChapterTime",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapterTime,e)}},{key:"onEditChapter",value:function(){i.Radio.channel(this.options.channelName).trigger(c.NT.ToggleEdit,this.model)}},{key:"canDelete",value:function(e){var t=this.model.collection.length;return 1===e&&1===t||!(1===e&&t>1)}},{key:"viewOptions",value:function(){var e=this.model.collection.indexOf(this.model)+1,t=l.X4.trimToMinutes(l.X4.secondsToHoursFormatted(this.model.get("startTime")));return Object.assign(Object.assign({},this.options),{styles:d,time:t,index:e,loading:this.model.get("loading"),allowDelete:this.canDelete(e),editSvg:a.Nj.getSvg(a.vn.Edit),deleteSvg:a.Nj.getSvg(a.vn.Delete)})}},{key:"renderEditForm",value:function(){this.showChildView("editForm",new s.L({model:this.model,editing:!0,channelName:this.instanceChannelName,duration:this.options.duration}))}},{key:"onBeforeDetach",value:function(){h(".tooltip").remove()}}])&&m(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA);function k(e){return k="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},k(e)}function C(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,T(o.key),o)}}function T(e){var t=function(e){if("object"!=k(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var S=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=E(t),function(e,t){if(t&&("object"==k(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,O()?Reflect.construct(t,n||[],E(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&&j(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.bindEditorListeners()}},{key:"name",get:function(){return"ChapterComponentCollection"}},{key:"className",get:function(){return"chapters"}},{key:"childView",get:function(){return w}},{key:"bindEditorListeners",value:function(){this.options.editable&&this.listenTo(this.options.channelName,c.NT.ToggleEdit,this.toggleEditForm)}},{key:"toggleEditForm",value:function(e){this.collection.each((function(t){return t!==e&&t.set("showEditor",!1)})),e.set("showEditor",!e.get("showEditor"))}},{key:"childViewOptions",get:function(){return{showActions:this.options.showActions,duration:this.options.duration,channelName:this.options.channelName}}}])&&C(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.$W),N=n(46055),P=n.n(N);function x(e){return x="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},x(e)}function _(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,M(o.key),o)}}function M(e){var t=function(e){if("object"!=x(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:t+""}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var R=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=V(t),function(e,t){if(t&&("object"==x(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,I()?Reflect.construct(t,n||[],V(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,(o=[{key:"name",get:function(){return"ChaptersComponent"}},{key:"template",get:function(){return P()}},{key:"lang",get:function(){return"libraryEditor.chapters"}},{key:"className",get:function(){return"chapters ".concat(!this.options.editable&&"py-3 border-top")}},{key:"regions",value:function(){return{chapterList:{replaceElement:!0,el:".chapter-list-region"}}}},{key:"viewOptions",value:function(){return{showHeader:this.options.showHeader}}},{key:"onRender",value:function(){this.showChildView("chapterList",new S({collection:this.collection,duration:this.options.duration,channelName:this.options.channelName,showActions:this.options.showActions,editable:this.options.editable}))}}])&&_(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},89039: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.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-6 form-group">\n <label class="d-block" for="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"startTimeLabel",{name:"lang",hash:{},data:i}))+'</label>\n <div class="d-flex">\n <div class="d-flex col h-100 align-items-center">\n <input\n class="form-control d-inline-block time-input hour-input"\n type="number"\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"hoursPlaceholder",{name:"lang",hash:{},data:i}))+'"\n name="hours"\n autocomplete="off"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.hrDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\n >\n <span class="px-1">:</span>\n </div>\n <div class="d-flex col h-100 align-items-center">\n <input\n class="form-control d-inline-block time-input minute-input"\n type="number"\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"minutesPlaceholder",{name:"lang",hash:{},data:i}))+'"\n name="minutes"\n autocomplete="off"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.minDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\n >\n <span class="px-1">:</span>\n </div>\n <div class="d-flex col h-100">\n <input\n class="form-control d-inline-block time-input second-input"\n type="number"\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"secondsPlaceholder",{name:"lang",hash:{},data:i}))+'"\n name="seconds"\n id="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'"\n autocomplete="off"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.secDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\n >\n </div>\n </div>\n <div class="form-feedback d-block"></div>\n </div>\n'},2:function(e,t,n,o,i){return"disabled"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <div class="row">\n <button type="submit" class="btn btn-dark ms-2">\n <span class="d-inline-block align-middle svg-container">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.plusSvg:r,t))?r:"")+'</span>\n <span class="align-middle">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"add",{name:"lang",hash:{},data:i}))+"</span>\n </button>\n </div>\n"},6:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <button type="submit" class="btn btn-dark me-2">'+l((n.lang||t&&t.lang||a).call(r,"save",{name:"lang",hash:{},data:i}))+'</button>\n <button type="button" class="btn btn-secondary cancel me-2">'+l((n.lang||t&&t.lang||a).call(r,"cancel",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="row">\n <div class="col-6 form-group">\n <label for="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\n <input type="text" class="form-control chapter-name" name="name" id="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'" placeholder="'+l((n.lang||t&&t.lang||c).call(s,"namePlaceholder",{name:"lang",hash:{},data:i}))+'" autofocus autocomplete="off">\n <div class="form-feedback"></div>\n </div>\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.enabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+"</div>\n\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.creating:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+"\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.editing:r,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},95637: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.loading:r,t))},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-2 text-end">\n <a class="action edit-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-secondary"\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"edit",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.allowDelete:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+" </div>\n"},4:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return' <a class="action delete-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-secondary"\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"delete",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.deleteSvg:r,t))?r:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=null!=t?t:e.nullContext||{},s=e.lambda,c=e.escapeExpression;return'<div class="row mx-0 border-top chapter-item '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.loading:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickable-seek col-1">\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.index:r,t))+'</p>\n </div>\n <div class="clickable-seek col-6">\n <p class="m-0 py-2">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:i}):a)+'</p>\n </div>\n <div class="clickable-seek col-3 text-end">\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.time:r,t))+"</p>\n </div>\n"+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.showActions:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n<div class="edit-form-region"></div>\n'},useData:!0})},46055: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=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return"<h5>"+l((n.lang||t&&t.lang||a).call(r,"chapters",{name:"lang",hash:{},data:i}))+'</h5>\n<div class="row mt-3 m-0 border-bottom">\n <div class="col-1">\n <label>#</label>\n </div>\n <div class="col-6">\n <label>'+l((n.lang||t&&t.lang||a).call(r,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\n </div>\n <div class="col-3 text-end">\n <label>'+l((n.lang||t&&t.lang||a).call(r,"startLabel",{name:"lang",hash:{},data:i}))+'</>\n </div>\n</div>\n<div class="chapter-list-region"></div>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1269],{79665:function(e,t,n){"use strict";n.d(t,{A:function(){return v}});var o=n(48088),r=n(39479),i=n(57857),l=n(31647),c=n(52076),u=n(26357),s=n(93569),a=n(58315),p=n.n(a);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,y(o.key),o)}}function y(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 h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=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,h()?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,(l=[{key:"initialize",value:function(){this.bindListeners(),s.yV.deselectAll(this.collection),s.yV.setSelected(this.options.currentLibraryId,this.collection)}},{key:"name",get:function(){return"LibrarySelectComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.librarySelect"}},{key:"template",get:function(){return p()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"select:option:selected",(function(t){o.Radio.channel(e.options.channelName).trigger("library:selected",t)}))}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disabledLibraryIds;return function(t){var n=t||this.model;if(r.contains(e,n.get("id")+""))return!0}}},{key:"onRender",value:function(){this.showChildView("dropdown",new u.H({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||i.T.getPhrase(this.lang,"placeholder"),noOptionsText:i.T.getPhrase(this.lang,"noLibraries"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:c.k}))}}])&&d(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l}(l.Q.wA)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});var o=n(39479),r=n(31647),i=n(55142);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 c(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,u(o.key),o)}}function u(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 s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=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"==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,s()?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&&p(e,t)}(t,e),n=t,r=[{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 i.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,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{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)}}}],r&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.$W)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return m}});var o=n(48088),r=n(39479),i=n(31647),l=n(71641),c=n(93569),u=n(46635),s=n.n(u),a={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function p(e){return p="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},p(e)}function f(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,d(o.key),o)}}function d(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(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=h(t),function(e,t){if(t&&("object"==p(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||[],h(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&&b(e,t)}(t,e),n=t,i=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return s()}},{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){c.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(c.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)||(c.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=c.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=c.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))||(c.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=r.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=r.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=r.first(n),this.sameCharIndex=0),this.sameCharIndex++,o}return r.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(!r.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];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=c.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new l.w({collection:this.collection,channelName:this.options.channelName,childOptions:r.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],i&&f(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return m}});var o=n(48088),r=n(57857),i=n(31647),l=n(50299),c=n(93569),u=n(68979),s=n.n(u),a={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",maxHeight:"jp36d",customItem:"aJzJB"};function p(e){return p="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},p(e)}function f(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,d(o.key),o)}}function d(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var m=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=h(t),function(e,t){if(t&&("object"==p(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||[],h(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&&b(e,t)}(t,e),n=t,i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),(n={},r=!0,(o=d(o=t))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,n));var n,o,r}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return s()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var o=c.PU.getSelected(this.options.folderTreeKey,this.collection),i=o?o.get("name"):r.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew,dropdown:this.options.dropdown}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}],i&&f(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var o=n(31647),r=n(88172);function i(e){return i="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},i(e)}function l(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(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,u(o.key),o)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=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=a(t),function(e,t){if(t&&("object"==i(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,s()?Reflect.construct(t,n||[],a(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&&p(e,t)}(t,e),n=t,(o=[{key:"defaults",value:function(){return l(l({},r.ZV.Disabled,!0),r.ZV.Hidden,!1)}}])&&c(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.Hn)},58315:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="dropdown-menu-region"></div>\n<div class="form-feedback"></div>'},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,c=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<button \n class="dropdown-toggle form-control text-start position-relative '+c(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \n type="button" \n id="dropdownMenuButton" \n data-bs-toggle="dropdown" \n aria-haspopup="true" \n aria-expanded="false"\n '+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \n name="'+c(l(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\n >\n '+c(l(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\n</button>\n<div class="dropdown-region"></div>\n<div class="form-feedback"></div>'},useData:!0})},68979:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,c=e.escapeExpression;return' <button\n class="'+c(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+c(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\n >\n <span class="d-block text-truncate button-text">\n '+c(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\n </span>\n </button>\n<div class="dropdown-menu '+c(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\n'},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,"border rounded-3 "+e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.maxHeight:i,t))},5:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 rounded-bottom-lg w-100 text-start '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:r}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' overflow-auto" name='+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.name:i,t))+'>\n <div class="selector-region"></div>\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1269],{79665:function(e,t,n){"use strict";n.d(t,{A:function(){return v}});var o=n(43823),r=n(21161),i=n(57857),l=n(31647),c=n(52076),u=n(26357),s=n(93569),a=n(58315),p=n.n(a);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,y(o.key),o)}}function y(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 h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=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,h()?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,(l=[{key:"initialize",value:function(){this.bindListeners(),s.yV.deselectAll(this.collection),s.yV.setSelected(this.options.currentLibraryId,this.collection)}},{key:"name",get:function(){return"LibrarySelectComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.librarySelect"}},{key:"template",get:function(){return p()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"select:option:selected",(function(t){o.Radio.channel(e.options.channelName).trigger("library:selected",t)}))}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disabledLibraryIds;return function(t){var n=t||this.model;if(r.contains(e,n.get("id")+""))return!0}}},{key:"onRender",value:function(){this.showChildView("dropdown",new u.H({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||i.T.getPhrase(this.lang,"placeholder"),noOptionsText:i.T.getPhrase(this.lang,"noLibraries"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:c.k}))}}])&&d(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l}(l.Q.wA)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});var o=n(21161),r=n(31647),i=n(55142);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 c(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,u(o.key),o)}}function u(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 s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=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"==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,s()?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&&p(e,t)}(t,e),n=t,r=[{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 i.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,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{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)}}}],r&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.$W)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return m}});var o=n(43823),r=n(21161),i=n(31647),l=n(71641),c=n(93569),u=n(46635),s=n.n(u),a={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};function p(e){return p="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},p(e)}function f(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,d(o.key),o)}}function d(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(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=h(t),function(e,t){if(t&&("object"==p(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||[],h(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&&b(e,t)}(t,e),n=t,i=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return s()}},{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){c.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(c.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)||(c.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=c.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=c.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))||(c.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=r.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=r.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=r.first(n),this.sameCharIndex=0),this.sameCharIndex++,o}return r.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(!r.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];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=c.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new l.w({collection:this.collection,channelName:this.options.channelName,childOptions:r.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],i&&f(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return m}});var o=n(43823),r=n(57857),i=n(31647),l=n(50299),c=n(93569),u=n(68979),s=n.n(u),a={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",maxHeight:"jp36d",customItem:"aJzJB"};function p(e){return p="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},p(e)}function f(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,d(o.key),o)}}function d(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var m=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=h(t),function(e,t){if(t&&("object"==p(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||[],h(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&&b(e,t)}(t,e),n=t,i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),(n={},r=!0,(o=d(o=t))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,n));var n,o,r}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return s()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var o=c.PU.getSelected(this.options.folderTreeKey,this.collection),i=o?o.get("name"):r.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew,dropdown:this.options.dropdown}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}],i&&f(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var o=n(31647),r=n(88172);function i(e){return i="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},i(e)}function l(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(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,u(o.key),o)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=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=a(t),function(e,t){if(t&&("object"==i(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,s()?Reflect.construct(t,n||[],a(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&&p(e,t)}(t,e),n=t,(o=[{key:"defaults",value:function(){return l(l({},r.ZV.Disabled,!0),r.ZV.Hidden,!1)}}])&&c(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.Hn)},58315: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,r){return'<div class="dropdown-menu-region"></div>\n<div class="form-feedback"></div>'},useData:!0})},46635:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,c=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<button \n class="dropdown-toggle form-control text-start position-relative '+c(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \n type="button" \n id="dropdownMenuButton" \n data-bs-toggle="dropdown" \n aria-haspopup="true" \n aria-expanded="false"\n '+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \n name="'+c(l(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\n >\n '+c(l(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\n</button>\n<div class="dropdown-region"></div>\n<div class="form-feedback"></div>'},useData:!0})},68979:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,c=e.escapeExpression;return' <button\n class="'+c(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+c(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\n >\n <span class="d-block text-truncate button-text">\n '+c(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\n </span>\n </button>\n<div class="dropdown-menu '+c(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\n'},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,"border rounded-3 "+e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.maxHeight:i,t))},5:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 rounded-bottom-lg w-100 text-start '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:r}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.dropdown:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' overflow-auto" name='+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.name:i,t))+'>\n <div class="selector-region"></div>\n'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1409],{71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var r=n(39479),o=n(31647),i=n(55142);function u(e){return u="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},u(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(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=a(t),function(e,t){if(t&&("object"==u(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,l()?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&&f(e,t)}(t,e),n=t,o=[{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 i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.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,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{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)}}}],o&&c(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.$W)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="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},i(e)}function u(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(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=a(t),function(e,t){if(t&&("object"==i(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,l()?Reflect.construct(t,n||[],a(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&&f(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return u(u({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},31409:function(e,t,n){"use strict";n.r(t),n.d(t,{RestrictAccessView:function(){return ve}});var r=n(48088),o=n(39479),i=n(21679),u=n(57857),c=n(31647),s=n(52076),l=n(70065),a=n(25692),f=n(56210),p=n(98985),d=n(63791),y=n(10101),h=n(71641),b=n(93569),m=n(28492),g=n.n(m);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 w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O(r.key),r)}}function O(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(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=k(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,S()?Reflect.construct(t,n||[],k(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&&j(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e=this.model?this.model.get("id"):"";b.yV.setSelected(e,this.collection),this.listenTo(this.options.channelName,this.options.eventName,this.onSelect)}},{key:"name",get:function(){return"DropdownComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return this.options.buttonClass?"select-channel ".concat(this.options.buttonClass):"select-channel"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onSelect",value:function(e){b.yV.setSelected(e.get("id"),this.collection),this.render()}},{key:"viewOptions",value:function(){var e=b.yV.getSelected(this.collection);return Object.assign({selected:e&&e.get("name")},this.options)}},{key:"getIsOptionDisabledFn",value:function(){var e=b.yV.getSelected(this.collection),t=e&&e.id;return function(){return!!t&&(t=t.toString(),this.model.get("id").toString()===t)}}},{key:"renderChannelDropdown",value:function(){this.showChildView("dropdown",new h.w({collection:this.collection,channelName:this.options.channelName,childOptions:{titleProperty:this.options.titleProperty,isDisabled:this.getIsOptionDisabledFn(),eventName:this.options.eventName},displayOptions:this.options.displayOptions,analyticsHelper:this.options.analyticsHelper}))}},{key:"onRender",value:function(){this.renderChannelDropdown()}}])&&w(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),T=n(88172),C=n(57098),_=n(29457),E=n(67670),I=n(13052),A=n(48404),N=n(19226),R=n(264);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 D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function x(e){var t=function(e){if("object"!=V(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==V(t)?t:t+""}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(B=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}var M=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=G(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||[],G(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&&F(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictAccessNoneComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"noGroupSelected")}}])&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA);function U(e){return U="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},U(e)}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}var z=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=H(t),function(e,t){if(t&&("object"==U(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,L()?Reflect.construct(t,n||[],H(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&&Z(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictAccessComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"groupNoAccess",{groupName:b.S9.mapYearGroupToName(this.model.get("groupId"))})}}])&&Y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),K=n(26033),$=n.n(K),q={select:"iQmg0",selectButton:"T67RV",svgContainer:"bNfyr",groupButton:"YOe2E",groupButtons:"q45Xi",groupButtonSelected:"FU9Dm",buttonDisabled:"UTSW5",mediumWeight:"CexaV"};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 J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function ee(e,t,n){return t&&X(e.prototype,t),n&&X(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function te(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 ne(e,t,n){return t=oe(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,re()?Reflect.construct(t,n||[],oe(e).constructor):t.apply(e,n))}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ie(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&&ue(e,t)}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}var ce,se=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"name",get:function(){return"RestrictAccessYearGroupItemView"}},{key:"className",get:function(){var e="btn text-center p-0 pb-1 pt-1 ".concat(q.groupButton);return this.model.get("selected")&&(e+=" ".concat(q.groupButtonSelected)),e}},{key:"tagName",get:function(){return"button"}},{key:"attributes",get:function(){var e=100/this.model.collection.length;return{type:"button",style:"width: ".concat(e,"%")}}},{key:"template",get:function(){var e=this.model.get("year");return function(){return"<span>".concat(e,"</span>")}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){r.Radio.channel(this.options.channelName).trigger("group:selected",this.model)}}])}(c.Q.wA),le=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"RestrictAccessYearGroupComponentCollection"}},{key:"className",get:function(){return"btn-group w-100 ".concat(q.groupButtons)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"childView",get:function(){return se}},{key:"childViewOptions",get:function(){return{channelName:this.channelName}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"group:selected",this.onYearGroupSelected)}},{key:"onYearGroupSelected",value:function(e){this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e.get("groupId"))})),this.model.set("groupId",e.get("groupId")),this.model.set("yearGroup",e.get("groupId")),this.render()}},{key:"onBeforeRender",value:function(){var e=this.model.get("yearGroup")||this.model.get("groupId");e&&(this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e)})),this.model.set("groupId",e))}}])}(c.Q.n6),ae=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"initialize",value:function(){this.configDataService=i.u.getInstance(C.Or.Config,this)}},{key:"name",get:function(){return"RestrictAccessGroupComponent"}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"props",get:function(){return["configDataService","currentUser"]}},{key:"template",get:function(){return $()}},{key:"bindings",get:function(){var e=this;return{"[name=year]":{observe:"groupId",onGet:function(t){return e.buildGroupMessage(t)},updateMethod:"html",escape:!1}}}},{key:"regions",value:function(){return{yearGroupList:{replaceElement:!0,el:".year-group-region"}}}},{key:"requiredResources",get:function(){return{currentUser:N.K.currentUser}}},{key:"viewOptions",value:function(){return{styles:q}}},{key:"onBeforeRender",value:function(){var e=this;this.yearGroups||this.getYearGroups(),o.some(this.yearGroups,(function(t){return t.groupId===e.model.get("groupId")}))||this.model.set("groupId",void 0)}},{key:"onRender",value:function(){this.stickit(),this.showChildView("yearGroupList",new le({model:this.model,collection:new c.Q.FE(this.yearGroups)}))}},{key:"onBeforeDestroy",value:function(){this.unstickit()}},{key:"getYearGroups",value:function(){var e=this,t=this.configDataService.getCustomerYearGroups(this.currentUser.get("countryCode"));this.yearGroups=[],o.keys(_.lA).forEach((function(n){var r=parseInt(n,10);if(!o.isNaN(r)&&o.contains(t,r)){var i=r===_.lA.Kindergarten?"K":_.lA[r].replace("Year","Y");e.yearGroups.push({year:i,groupId:r})}}))}},{key:"buildGroupMessage",value:function(e){if(e){var t=b.S9.mapYearGroupToName(e);return u.T.getPhrase(this.lang,"selectedYearGroups",{classNames:q.mediumWeight,groupName:t})}return u.T.getPhrase(this.lang,"selectYearGroups")}}])}(c.Q.wA),fe=n(59047),pe=n.n(fe);function de(e){return de="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},de(e)}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,he(r.key),r)}}function he(e){var t=function(e){if("object"!=de(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==de(t)?t:t+""}function be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(be=function(){return!!e})()}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}function ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}!function(e){e.None="Select a group...",e.Students="Students",e.Groups="Certain year levels",e.All="Students and staff"}(ce||(ce={}));var ve=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=me(t),function(e,t){if(t&&("object"==de(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,be()?Reflect.construct(t,n||[],me(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&&ge(e,t)}(t,e),n=t,h=[{key:"initialize",value:function(){this.restriction=new I.g({groupId:_.lA.Students}),this.selected=ce.None,this.bindListeners(),this.videoDataService=i.u.getInstance(C.Or.Video,this),this.restrictedVideoDataService=i.u.getInstance(C.Or.RestrictedVideo,this),this.videoMixinService=i.u.getInstance(C.K9.VideoMixin,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"dropdown:selected",this.onOptionSelected),this.listenTo(this.restriction,"change:groupId",this.onGroupChanged),this.listenTo(C.Vk.VIDEO,"".concat(C.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(C.Vk.RESTRICTED_VIDEO,"".concat(C.M_.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"name",get:function(){return"RestrictAccessView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return pe()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:y.Yw,title:u.T.getPhrase(this.lang,"popupHeading"),modalClasses:q.modal,hideCloseButton:!0,size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new E.v,buttonText:u.T.getPhrase(this.lang,"updateAccess"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}},buttons:[{text:u.T.getPhrase(this.lang,"allowFullAccess"),getClassName:function(){return e.getAllowFullAccessBtnClassName()}}]},{behaviorClass:f.H,selector:".".concat(q.svgContainer),title:u.T.getPhrase(this.lang,"findOutMore")}]}},{key:"elements",get:function(){return{submit:"submit"}}},{key:"events",value:function(){return{submit:"onSubmit","click .allow-full-access":"onAllowFullAccess"}}},{key:"regions",value:function(){return{dropdown:".dropdown-region",accessView:{replaceElement:!0,el:".access-view-region"}}}},{key:"getAllowFullAccessBtnClassName",value:function(){var e="btn btn-link cursor-pointer me-2 allow-full-access";return this.dataFetched()&&!this.spinnerModel.get(T.ZV.ShowSpinner)||(e+=" disabled"),e}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.dataFetched()&&this.spinnerModel.get(T.ZV.Disabled))return{title:u.T.getPhrase(this.lang,"selectYear")}}},{key:"onOptionSelected",value:function(e){this.refreshRestriction();var t=this.getAccessView(e.get("name"));this.spinnerModel.set(T.ZV.Disabled,e.get("name")===ce.None),this.showChildView("accessView",new t({model:this.restriction,currentUser:this.currentUser})),this.renderDropdown()}},{key:"onGroupChanged",value:function(e){this.isRendered()&&this.spinnerModel.set(T.ZV.Disabled,o.isUndefined(e.get("groupId")))}},{key:"getAccessView",value:function(e){switch(this.selected=e,e){case ce.None:return M;case ce.Students:return this.restriction.set("groupId",_.lA.Students),z;case ce.Groups:return ae;case ce.All:return this.restriction.set("groupId",_.lA.All),z}}},{key:"getSelection",value:function(e){switch(e){case _.lA.All:case _.lA.Staff:return ce.All;case _.lA.Students:return ce.Students;default:return ce.Groups}}},{key:"refreshRestriction",value:function(){if(this.restrictedObjectCollection&&this.restrictedObjectCollection.length&&this.model){this.videoMixinService.mixinVideoRestriction(this.model,this.restrictedObjectCollection);var e=this.model.restrictions.last(),t=e.get("groupId");e&&o.isNumber(t)&&(this.restriction.set("groupId",t),this.selected=this.getSelection(t))}}},{key:"onSubmit",value:function(e){var t=this;if(e&&e.preventDefault(),o.isUndefined(this.restriction.get("groupId")))return!1;r.Radio.channel(this.channelName).trigger(T.I3.ShowSpinner),this.restrictedVideoDataService.updateVideoRestriction(this.options.videoId,this.restriction.get("groupId"),this.currentUser.get("customerId"),this.currentUser.get("id"),(function(){return t.triggerMethod("hide")})),this.logAction(this.restriction.get("groupId"))}},{key:"onAllowFullAccess",value:function(){var e=this;this.dataFetched()&&!this.spinnerModel.get(T.ZV.ShowSpinner)&&(this.spinnerModel.set(T.ZV.Disabled,!0),this.restriction.set("groupId",_.lA.All),this.restrictedVideoDataService.deleteVideoRestriction(this.options.videoId,(function(){return e.triggerMethod("hide")})),this.logAction())}},{key:"logAction",value:function(e){var t={location:l.LZ.Popup,actionType:l.Vw.SetAccess,entity:l.py.Video,workflowPhase:l.eu.Complete},n={id:this.model.get("id"),restriction:!!o.isNumber(e)&&_.lA[e]};s.k.logUserAction(n,t)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.restrictedObjectCollection}},{key:"renderDropdown",value:function(){var e=this;this.collection=new c.Q.FE([{name:ce.None},{name:ce.Students},{name:ce.Groups},{name:ce.All}]),this.collection.each((function(t){return t.set("selected",t.get("name")===e.selected)})),this.showChildView("dropdown",new P({titleProperty:"name",eventName:"dropdown:selected",buttonId:"select-btn",collection:this.collection,channelName:this.channelName,buttonClass:q.selectButton,displayOptions:{extraClasses:"w-100"},analyticsHelper:s.k}))}},{key:"requiredResources",get:function(){return{config:A.p.config,currentUser:N.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;this.model||this.videoDataService.getUnionVideo(this.options.videoId,this.options.typeId,(function(t){e.model=t,e.render()})),this.restrictedObjectCollection||this.restrictedVideoDataService.getVideoRestrictions([this.options.videoId],null,(function(t){e.restrictedObjectCollection=t,e.render()})),this.dataFetched()&&(this.refreshRestriction(),this.spinnerModel.set(T.ZV.Disabled,!1))}},{key:"viewOptions",value:function(){return{styles:q,supportUrl:!R.g.hasLite&&p.o.getOnlineArticle(a.s.VideoAccess),svg:d.Nj.getSvg(d.vn.Info),dataFetched:this.dataFetched(),spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"}),restrictFromLabel:u.T.getPhrase(this.lang,"popupSubheading")}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderDropdown(),this.onOptionSelected(new c.Q.Hn({name:this.selected})))}}],h&&ye(n.prototype,h),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,h}(c.Q.G7)},28492:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<label for="'+c(u(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" class="control-label">'+c(u(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+"</label>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.labelText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<button class="dropdown-toggle form-control text-start '+c(u(null!=(i=null!=t?t.options:t)?i.buttonClass:i,t))+'" type="button" id="'+c(u(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n '+c(u(null!=(i=null!=t?t.options:t)?i.selected:i,t))+'\n</button>\n<div class="dropdown-menu-region"></div>'},useData:!0})},59047:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<div class="d-flex align-items-center">\n<label class="control-label m-0 pb-2">'+c(u(null!=(i=null!=t?t.options:t)?i.restrictFromLabel:i,t))+"</label>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="dropdown-region '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.select:i,t))+' mb-3"></div>\n<div class="access-view-region"></div>\n'},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<a \n class="d-inline-block ms-1 mb-3 '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'"\n title="'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"findOutMore",{name:"lang",hash:{},data:o}))+'"\n href="'+c(u(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+'" \n target="_blank"\n>\n '+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+"\n</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},26033:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="year-group-region"></div>\n<div name="year" class="mt-3"></div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1409],{71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var r=n(21161),o=n(31647),i=n(55142);function u(e){return u="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},u(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(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=a(t),function(e,t){if(t&&("object"==u(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,l()?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&&f(e,t)}(t,e),n=t,o=[{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 i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.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,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{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)}}}],o&&c(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.$W)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="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},i(e)}function u(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function s(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(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=a(t),function(e,t){if(t&&("object"==i(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,l()?Reflect.construct(t,n||[],a(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&&f(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return u(u({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},31409:function(e,t,n){"use strict";n.r(t),n.d(t,{RestrictAccessView:function(){return ve}});var r=n(43823),o=n(21161),i=n(21679),u=n(57857),c=n(31647),s=n(52076),l=n(70065),a=n(25692),f=n(56210),p=n(98985),d=n(85475),y=n(10101),h=n(71641),b=n(93569),m=n(28492),g=n.n(m);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 w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,O(r.key),r)}}function O(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(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=k(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,S()?Reflect.construct(t,n||[],k(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&&j(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){var e=this.model?this.model.get("id"):"";b.yV.setSelected(e,this.collection),this.listenTo(this.options.channelName,this.options.eventName,this.onSelect)}},{key:"name",get:function(){return"DropdownComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return this.options.buttonClass?"select-channel ".concat(this.options.buttonClass):"select-channel"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onSelect",value:function(e){b.yV.setSelected(e.get("id"),this.collection),this.render()}},{key:"viewOptions",value:function(){var e=b.yV.getSelected(this.collection);return Object.assign({selected:e&&e.get("name")},this.options)}},{key:"getIsOptionDisabledFn",value:function(){var e=b.yV.getSelected(this.collection),t=e&&e.id;return function(){return!!t&&(t=t.toString(),this.model.get("id").toString()===t)}}},{key:"renderChannelDropdown",value:function(){this.showChildView("dropdown",new h.w({collection:this.collection,channelName:this.options.channelName,childOptions:{titleProperty:this.options.titleProperty,isDisabled:this.getIsOptionDisabledFn(),eventName:this.options.eventName},displayOptions:this.options.displayOptions,analyticsHelper:this.options.analyticsHelper}))}},{key:"onRender",value:function(){this.renderChannelDropdown()}}])&&w(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),T=n(88172),C=n(57098),_=n(29457),E=n(67670),I=n(13052),A=n(48404),N=n(19226),R=n(264);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 D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function x(e){var t=function(e){if("object"!=V(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==V(t)?t:t+""}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(B=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}var M=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=G(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||[],G(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&&F(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictAccessNoneComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"noGroupSelected")}}])&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA);function U(e){return U="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},U(e)}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}var z=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=H(t),function(e,t){if(t&&("object"==U(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,L()?Reflect.construct(t,n||[],H(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&&Z(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"RestrictAccessComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"groupNoAccess",{groupName:b.S9.mapYearGroupToName(this.model.get("groupId"))})}}])&&Y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),K=n(26033),$=n.n(K),q={select:"iQmg0",selectButton:"T67RV",svgContainer:"bNfyr",groupButton:"YOe2E",groupButtons:"q45Xi",groupButtonSelected:"FU9Dm",buttonDisabled:"UTSW5",mediumWeight:"CexaV"};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 J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,te(r.key),r)}}function ee(e,t,n){return t&&X(e.prototype,t),n&&X(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function te(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 ne(e,t,n){return t=oe(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,re()?Reflect.construct(t,n||[],oe(e).constructor):t.apply(e,n))}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}function ie(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&&ue(e,t)}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}var ce,se=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"name",get:function(){return"RestrictAccessYearGroupItemView"}},{key:"className",get:function(){var e="btn text-center p-0 pb-1 pt-1 ".concat(q.groupButton);return this.model.get("selected")&&(e+=" ".concat(q.groupButtonSelected)),e}},{key:"tagName",get:function(){return"button"}},{key:"attributes",get:function(){var e=100/this.model.collection.length;return{type:"button",style:"width: ".concat(e,"%")}}},{key:"template",get:function(){var e=this.model.get("year");return function(){return"<span>".concat(e,"</span>")}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){r.Radio.channel(this.options.channelName).trigger("group:selected",this.model)}}])}(c.Q.wA),le=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"RestrictAccessYearGroupComponentCollection"}},{key:"className",get:function(){return"btn-group w-100 ".concat(q.groupButtons)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"childView",get:function(){return se}},{key:"childViewOptions",get:function(){return{channelName:this.channelName}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"group:selected",this.onYearGroupSelected)}},{key:"onYearGroupSelected",value:function(e){this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e.get("groupId"))})),this.model.set("groupId",e.get("groupId")),this.model.set("yearGroup",e.get("groupId")),this.render()}},{key:"onBeforeRender",value:function(){var e=this.model.get("yearGroup")||this.model.get("groupId");e&&(this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e)})),this.model.set("groupId",e))}}])}(c.Q.n6),ae=function(e){function t(){return J(this,t),ne(this,t,arguments)}return ie(t,e),ee(t,[{key:"initialize",value:function(){this.configDataService=i.u.getInstance(C.Or.Config,this)}},{key:"name",get:function(){return"RestrictAccessGroupComponent"}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"props",get:function(){return["configDataService","currentUser"]}},{key:"template",get:function(){return $()}},{key:"bindings",get:function(){var e=this;return{"[name=year]":{observe:"groupId",onGet:function(t){return e.buildGroupMessage(t)},updateMethod:"html",escape:!1}}}},{key:"regions",value:function(){return{yearGroupList:{replaceElement:!0,el:".year-group-region"}}}},{key:"requiredResources",get:function(){return{currentUser:N.K.currentUser}}},{key:"viewOptions",value:function(){return{styles:q}}},{key:"onBeforeRender",value:function(){var e=this;this.yearGroups||this.getYearGroups(),o.some(this.yearGroups,(function(t){return t.groupId===e.model.get("groupId")}))||this.model.set("groupId",void 0)}},{key:"onRender",value:function(){this.stickit(),this.showChildView("yearGroupList",new le({model:this.model,collection:new c.Q.FE(this.yearGroups)}))}},{key:"onBeforeDestroy",value:function(){this.unstickit()}},{key:"getYearGroups",value:function(){var e=this,t=this.configDataService.getCustomerYearGroups(this.currentUser.get("countryCode"));this.yearGroups=[],o.keys(_.lA).forEach((function(n){var r=parseInt(n,10);if(!o.isNaN(r)&&o.contains(t,r)){var i=r===_.lA.Kindergarten?"K":_.lA[r].replace("Year","Y");e.yearGroups.push({year:i,groupId:r})}}))}},{key:"buildGroupMessage",value:function(e){if(e){var t=b.S9.mapYearGroupToName(e);return u.T.getPhrase(this.lang,"selectedYearGroups",{classNames:q.mediumWeight,groupName:t})}return u.T.getPhrase(this.lang,"selectYearGroups")}}])}(c.Q.wA),fe=n(59047),pe=n.n(fe);function de(e){return de="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},de(e)}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,he(r.key),r)}}function he(e){var t=function(e){if("object"!=de(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==de(t)?t:t+""}function be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(be=function(){return!!e})()}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}function ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}!function(e){e.None="Select a group...",e.Students="Students",e.Groups="Certain year levels",e.All="Students and staff"}(ce||(ce={}));var ve=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=me(t),function(e,t){if(t&&("object"==de(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,be()?Reflect.construct(t,n||[],me(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&&ge(e,t)}(t,e),n=t,h=[{key:"initialize",value:function(){this.restriction=new I.g({groupId:_.lA.Students}),this.selected=ce.None,this.bindListeners(),this.videoDataService=i.u.getInstance(C.Or.Video,this),this.restrictedVideoDataService=i.u.getInstance(C.Or.RestrictedVideo,this),this.videoMixinService=i.u.getInstance(C.K9.VideoMixin,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"dropdown:selected",this.onOptionSelected),this.listenTo(this.restriction,"change:groupId",this.onGroupChanged),this.listenTo(C.Vk.VIDEO,"".concat(C.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(C.Vk.RESTRICTED_VIDEO,"".concat(C.M_.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"name",get:function(){return"RestrictAccessView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return pe()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:y.Yw,title:u.T.getPhrase(this.lang,"popupHeading"),modalClasses:q.modal,hideCloseButton:!0,size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new E.v,buttonText:u.T.getPhrase(this.lang,"updateAccess"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}},buttons:[{text:u.T.getPhrase(this.lang,"allowFullAccess"),getClassName:function(){return e.getAllowFullAccessBtnClassName()}}]},{behaviorClass:f.H,selector:".".concat(q.svgContainer),title:u.T.getPhrase(this.lang,"findOutMore")}]}},{key:"elements",get:function(){return{submit:"submit"}}},{key:"events",value:function(){return{submit:"onSubmit","click .allow-full-access":"onAllowFullAccess"}}},{key:"regions",value:function(){return{dropdown:".dropdown-region",accessView:{replaceElement:!0,el:".access-view-region"}}}},{key:"getAllowFullAccessBtnClassName",value:function(){var e="btn btn-link cursor-pointer me-2 allow-full-access";return this.dataFetched()&&!this.spinnerModel.get(T.ZV.ShowSpinner)||(e+=" disabled"),e}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.dataFetched()&&this.spinnerModel.get(T.ZV.Disabled))return{title:u.T.getPhrase(this.lang,"selectYear")}}},{key:"onOptionSelected",value:function(e){this.refreshRestriction();var t=this.getAccessView(e.get("name"));this.spinnerModel.set(T.ZV.Disabled,e.get("name")===ce.None),this.showChildView("accessView",new t({model:this.restriction,currentUser:this.currentUser})),this.renderDropdown()}},{key:"onGroupChanged",value:function(e){this.isRendered()&&this.spinnerModel.set(T.ZV.Disabled,o.isUndefined(e.get("groupId")))}},{key:"getAccessView",value:function(e){switch(this.selected=e,e){case ce.None:return M;case ce.Students:return this.restriction.set("groupId",_.lA.Students),z;case ce.Groups:return ae;case ce.All:return this.restriction.set("groupId",_.lA.All),z}}},{key:"getSelection",value:function(e){switch(e){case _.lA.All:case _.lA.Staff:return ce.All;case _.lA.Students:return ce.Students;default:return ce.Groups}}},{key:"refreshRestriction",value:function(){if(this.restrictedObjectCollection&&this.restrictedObjectCollection.length&&this.model){this.videoMixinService.mixinVideoRestriction(this.model,this.restrictedObjectCollection);var e=this.model.restrictions.last(),t=e.get("groupId");e&&o.isNumber(t)&&(this.restriction.set("groupId",t),this.selected=this.getSelection(t))}}},{key:"onSubmit",value:function(e){var t=this;if(e&&e.preventDefault(),o.isUndefined(this.restriction.get("groupId")))return!1;r.Radio.channel(this.channelName).trigger(T.I3.ShowSpinner),this.restrictedVideoDataService.updateVideoRestriction(this.options.videoId,this.restriction.get("groupId"),this.currentUser.get("customerId"),this.currentUser.get("id"),(function(){return t.triggerMethod("hide")})),this.logAction(this.restriction.get("groupId"))}},{key:"onAllowFullAccess",value:function(){var e=this;this.dataFetched()&&!this.spinnerModel.get(T.ZV.ShowSpinner)&&(this.spinnerModel.set(T.ZV.Disabled,!0),this.restriction.set("groupId",_.lA.All),this.restrictedVideoDataService.deleteVideoRestriction(this.options.videoId,(function(){return e.triggerMethod("hide")})),this.logAction())}},{key:"logAction",value:function(e){var t={location:l.LZ.Popup,actionType:l.Vw.SetAccess,entity:l.py.Video,workflowPhase:l.eu.Complete},n={id:this.model.get("id"),restriction:!!o.isNumber(e)&&_.lA[e]};s.k.logUserAction(n,t)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.restrictedObjectCollection}},{key:"renderDropdown",value:function(){var e=this;this.collection=new c.Q.FE([{name:ce.None},{name:ce.Students},{name:ce.Groups},{name:ce.All}]),this.collection.each((function(t){return t.set("selected",t.get("name")===e.selected)})),this.showChildView("dropdown",new P({titleProperty:"name",eventName:"dropdown:selected",buttonId:"select-btn",collection:this.collection,channelName:this.channelName,buttonClass:q.selectButton,displayOptions:{extraClasses:"w-100"},analyticsHelper:s.k}))}},{key:"requiredResources",get:function(){return{config:A.p.config,currentUser:N.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;this.model||this.videoDataService.getUnionVideo(this.options.videoId,this.options.typeId,(function(t){e.model=t,e.render()})),this.restrictedObjectCollection||this.restrictedVideoDataService.getVideoRestrictions([this.options.videoId],null,(function(t){e.restrictedObjectCollection=t,e.render()})),this.dataFetched()&&(this.refreshRestriction(),this.spinnerModel.set(T.ZV.Disabled,!1))}},{key:"viewOptions",value:function(){return{styles:q,supportUrl:!R.g.hasLite&&p.o.getOnlineArticle(a.s.VideoAccess),svg:d.Nj.getSvg(d.vn.Info),dataFetched:this.dataFetched(),spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"}),restrictFromLabel:u.T.getPhrase(this.lang,"popupSubheading")}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderDropdown(),this.onOptionSelected(new c.Q.Hn({name:this.selected})))}}],h&&ye(n.prototype,h),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,h}(c.Q.G7)},28492:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<label for="'+c(u(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" class="control-label">'+c(u(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+"</label>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.labelText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<button class="dropdown-toggle form-control text-start '+c(u(null!=(i=null!=t?t.options:t)?i.buttonClass:i,t))+'" type="button" id="'+c(u(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n '+c(u(null!=(i=null!=t?t.options:t)?i.selected:i,t))+'\n</button>\n<div class="dropdown-menu-region"></div>'},useData:!0})},59047:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<div class="d-flex align-items-center">\n<label class="control-label m-0 pb-2">'+c(u(null!=(i=null!=t?t.options:t)?i.restrictFromLabel:i,t))+"</label>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="dropdown-region '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.select:i,t))+' mb-3"></div>\n<div class="access-view-region"></div>\n'},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return'<a \n class="d-inline-block ms-1 mb-3 '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'"\n title="'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"findOutMore",{name:"lang",hash:{},data:o}))+'"\n href="'+c(u(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+'" \n target="_blank"\n>\n '+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+"\n</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},26033:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="year-group-region"></div>\n<div name="year" class="mt-3"></div>'},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1537],{24828:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var r=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},22231:function(e,t,n){"use strict";function r(e,t){return t[e.charCodeAt(0)%t.length]}n.d(t,{x:function(){return r}})},98001:function(e,t,n){"use strict";n.d(t,{u:function(){return w}});var r=n(43823),o=n(21161),i=n(11306),l=n(57857),a=n(31647),u=n(85475),c=n(57098),s=n(93569),f=n(93421),p=n(40622),d="bimhO";function y(e){return y="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},y(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function h(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}n(8757);var w=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=v(t),function(e,t){if(t&&("object"==y(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,g()?Reflect.construct(t,n||[],v(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&&m(e,t)}(t,e),n=t,(h=[{key:"initialize",value:function(){this.options.model||a.Q.Ry.throw(new i.H("DraggableVideoBehavior must be passed a Video model")),this.listenTo(c.jr.VIDEO_DRAG_DROP,"drag:style:".concat(this.options.model.id),this.styleDragStart),this.listenTo(c.jr.VIDEO_DRAG_DROP,"drag:stop",this.styleDragStop)}},{key:"lang",get:function(){return"libraryEditor.behaviors"}},{key:"helper",value:function(){var e=this.getVideoModels();return new f.ND({text:e.length>1?l.T.getPhrase(this.lang,"videos",{videoCount:e.length}):e[0].get("name"),svg:u.Nj.getSvg(u.vn.Play)}).render().el}},{key:"getSelector",value:function(){return this.view.getUI(this.options.selector)}},{key:"styleDragStart",value:function(){this.getSelector().addClass(d)}},{key:"styleDragStop",value:function(){this.getSelector().removeClass(d)}},{key:"start",value:function(){var e=this.getVideoModels(),t=r.Radio.channel(c.jr.VIDEO_DRAG_DROP);t.trigger("drag:start",e,this.options.collectionIdentifier),o.each(e,(function(e){return t.trigger("drag:style:".concat(e.id))}))}},{key:"stop",value:function(){r.Radio.channel(c.jr.VIDEO_DRAG_DROP).trigger("drag:stop")}},{key:"getVideoModels",value:function(){var e=this,t=s.S0.GetSelectedModels({key:this.options.collectionIdentifier.toString(),type:p.De.VIDEO_LIST,collection:this.view.model.collection});return o.any(t,(function(t){return t.id===e.view.model.id}))||(t=[this.view.model]),t.length?t:[this.view.model]}},{key:"getClassMappings",value:function(){return{"ui-draggable":f.W2.draggable,"ui-draggable-disabled":f.W2.disabled,"ui-draggable-handle":f.W2.handle,"ui-draggable-dragging":f.W2.dragging}}},{key:"onRender",value:function(){var e=this.getSelector(),t={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};t.classes=this.getClassMappings(),e.draggable(o.extend({},f.wc,t))}},{key:"onBeforeDestroy",value:function(){var e=this.getSelector();e.draggable("instance")&&e.draggable("destroy")}}])&&b(n.prototype,h),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,h}(a.Q.cg)},87002:function(e,t,n){"use strict";n.d(t,{Y:function(){return O}});var r=n(31647),o=n(70065),i=n(24828),l=n(22231),a=n(50997),u=n(93569),c=n(91439),s=(n(98001),n(6929)),f=n(51785),p=n(90743),d=n.n(p),y={folder:"cLuIF",actions:"vWWVi"};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 h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function g(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 v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var O=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"==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,v()?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&&w(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render)}},{key:"name",get:function(){return"FolderItemComponent"}},{key:"template",get:function(){return d()}},{key:"className",get:function(){return"col-2 p-1 rounded position-relative"}},{key:"appLinks",get:function(){return{a:{application:a.OV.LIBRARY_EDITOR,action:a.eX.LibraryEditor.FOLDER,args:[this.model.get("id")]}}}},{key:"regions",value:function(){return{actions:{el:".actions-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:s.x,channelNames:[a.jr.VIDEO_DRAG_DROP,a.jr.FOLDER_DRAG_DROP],analyticsOptions:{location:"library"===this.options.location?o.LZ.LibraryTiles:o.LZ.SubFolderList}},{behaviorClass:c.u}]}},{key:"viewOptions",value:function(){var e=u.jw.createFolderThumbnailUrl(this.model.thumbnail);return{styles:y,imageUrl:e,backgroundColor:(0,l.x)(this.model.get("name"),i.o)}}},{key:"onRender",value:function(){this.showChildView("actions",new f.c({model:this.model,extraClasses:"".concat(y.actions," rounded-circle"),buttonClass:"text-light",analyticsOptions:{location:o.LZ.LibraryTiles},overrideClasses:!0}))}}])&&h(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},55175:function(e,t,n){"use strict";n.r(t),n.d(t,{LibraryView:function(){return x}});var r=n(21161),o=n(21679),i=n(57857),l=n(31647),a=n(70065),u=n(80758),c=n(77502),s=n(85475),f=n(57098),p=n(29457),d=n(3059),y=n(48404),b=n(43953),h=n(87002);function g(e){return g="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},g(e)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var k=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=O(t),function(e,t){if(t&&("object"==g(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,w()?Reflect.construct(t,n||[],O(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&&j(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"LibraryFolderListComponent"}},{key:"className",get:function(){return"row"}},{key:"childView",get:function(){return h.Y}},{key:"childViewOptions",get:function(){return this.options.childOptions}}])&&v(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(l.Q.$W),S=n(32849),_=n.n(S),P={actions:"_12j8"},E=n(6723);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 R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function C(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 T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}var x=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=I(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,T()?Reflect.construct(t,n||[],I(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,(l=[{key:"initialize",value:function(){var e=this;this.libraryDataService=o.u.getInstance(f.Or.Library,this),this.listenTo(f.Vk.LIBRARY,"clear:library:folder:cache",(function(){e.folders=null,e.render()}))}},{key:"name",get:function(){return"LibraryView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.library"}},{key:"template",get:function(){return _()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.o,region:"folders",type:p.ub.Library,shouldRender:function(){return e.model&&!e.model.children.length},componentOptions:{libraryId:this.options.libraryId,moreSvg:s.Nj.getSvg(s.vn.More),heading:i.T.getPhrase(this.lang,"emptyStateHeading"),description:i.T.getPhrase(this.lang,"emptyStateInfo",{moreSvg:'<span class="d-inline-block svg-container align-top">\n '.concat(s.Nj.getSvg(s.vn.More),"</span>")})},emptyStateComponents:f.aW}]}},{key:"regions",value:function(){return{upgradesBanner:{el:".upgrades-banner-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0,partialLoading:p.LP.LibraryFolders},actions:{el:".actions-region",replaceElement:!0}}}},{key:"renderFolders",value:function(){this.showChildView("folders",new k({collection:this.folders,childOptions:{location:"library"}}))}},{key:"renderActions",value:function(){this.showChildView("actions",new b.J({model:this.model,extraClasses:"".concat(P.actions," rounded-circle me-2 mt-2"),analyticsOptions:{location:a.LZ.Banner}}))}},{key:"requiredResources",get:function(){return{config:y.p.config}}},{key:"bindScrollListener",value:function(){var e=this;if(!this.scrollBound){this.scrollBound=!0;var t=E(window),n=r.debounce((function(){if(t.scrollTop()+t.height()>e.$el.offset().top+e.$el.height()&&e.currentIdentifier){var n=e.libraryDataService.getFoldersCursors(e.currentIdentifier);n&&n.next&&e.libraryDataService.getFolders(e.getNewCollectionIdentifier(n.next),(function(t){e.folders.add(t.toJSON())}))}}),333);t.scroll(n),window.setTimeout(n,100)}}},{key:"getNewCollectionIdentifier",value:function(e){return this.currentIdentifier=new d.KX(this.model.categoryTree.get("id"),c.E.AtoZ,e)}},{key:"onBeforeRender",value:function(){var e=this;if(this.model)return this.folders||this.libraryDataService.getFolders(this.getNewCollectionIdentifier(),(function(t){e.folders=t,e.render()})),!!this.model&&!!this.folders;this.libraryDataService.getLibraries((function(t){e.model=t.get(e.options.libraryId),e.listenTo(e.model,"change:name",e.render),e.render()}))}},{key:"viewOptions",value:function(){return{styles:P}}},{key:"onRender",value:function(){this.renderFolders(),this.renderActions(),this.bindScrollListener()}}])&&R(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l}(l.Q.G7)},90743:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"style=\"background-image: url('"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+"')\""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,c="function",s=e.escapeExpression,f=e.lambda;return'<a class="rounded d-block text-decoration-none" title="'+s(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:u)===c?l.call(a,{name:"name",hash:{},data:o}):l)+'">\n <div \n class="'+s(f(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.folder:i,t))+" "+s(f(null!=(i=null!=t?t.options:t)?i.backgroundColor:i,t))+' rounded-top"\n '+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.imageUrl:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n ></div>\n <h3 class="font-size-normal fw-semibold mb-0 p-2 bg-white border-start border-end border-bottom rounded-bottom ">\n <span class="text-truncate d-block">'+s(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:u)===c?l.call(a,{name:"name",hash:{},data:o}):l)+'</span>\n </h3>\n</a>\n<div class="actions-region"></div>'},useData:!0})},32849:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.escapeExpression;return'<div class="upgrades-banner-region"></div>\n<div class="bg-white px-3 pt-3 pb-2 position-relative rounded '+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+'">\n <h1 class="h3">'+a("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):l)+'</h1>\n <div class="folders-region"></div>\n <div class="actions-region"></div>\n</div>'},useData:!0})}}]);
|