@clickview/library-editor 1.57.0 → 1.58.0-rc.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/{152-library-editor-01b4461ff1.chunk.css → 463-library-editor-911bfc41fe.chunk.css} +1 -1
- package/dist/css/{5524-library-editor-de77327cdc.chunk.css → 4719-library-editor-7e2ac516b4.chunk.css} +1 -1
- package/dist/css/{61-library-editor-b5c939f10f.chunk.css → 4796-library-editor-2a18ebe0b9.chunk.css} +4 -4
- package/dist/css/{4001-library-editor-da87291909.chunk.css → 5319-library-editor-fe54adac16.chunk.css} +2 -2
- package/dist/css/library-editor-app-380eaa3fce.css +62 -0
- package/dist/scripts/{1010-f1c8bca022.chunk.js → 1010-a34c5ba546.chunk.js} +1 -1
- package/dist/scripts/1015-fde8b5ba1e.chunk.js +2 -0
- package/dist/scripts/1015-fde8b5ba1e.chunk.js.LICENSE.txt +41 -0
- package/dist/scripts/{7408-c1551d3e0d.chunk.js → 1080-78e6c18aa7.chunk.js} +1 -1
- package/dist/scripts/1115-c6cc1353bd.chunk.js +1 -0
- package/dist/scripts/1200-193f4b5bbd.chunk.js +1 -0
- package/dist/scripts/1524-1e4a0330df.chunk.js +1 -0
- package/dist/scripts/{1934-562cd9f48b.chunk.js → 1934-84460445ad.chunk.js} +1 -1
- package/dist/scripts/1973-47ac2859c2.chunk.js +1 -0
- package/dist/scripts/{2998-aae0ec14de.chunk.js → 2035-d874bdac26.chunk.js} +1 -1
- package/dist/scripts/2539-915297f0b5.chunk.js +1 -0
- package/dist/scripts/2591-fba291a9c0.chunk.js +1 -0
- package/dist/scripts/2598-225a27335b.chunk.js +1 -0
- package/dist/scripts/2614-aed18ce4af.chunk.js +1 -0
- package/dist/scripts/2648-3893c6b865.chunk.js +1 -0
- package/dist/scripts/{2803-fbb9d2439d.chunk.js → 2803-7a2cdecd93.chunk.js} +1 -1
- package/dist/scripts/{2888-c2c8b859cd.chunk.js → 2888-3298161a61.chunk.js} +1 -1
- package/dist/scripts/299-df09594cf4.chunk.js +1 -0
- package/dist/scripts/3288-ab3ca0da7f.chunk.js +1 -0
- package/dist/scripts/3305-b4175d4211.chunk.js +1 -0
- package/dist/scripts/3373-3286d26d40.chunk.js +1 -0
- package/dist/scripts/{5286-c574f5b574.chunk.js → 3391-469c93ab2c.chunk.js} +1 -1
- package/dist/scripts/{3400-ebc91cde7a.chunk.js → 3400-7a082a0377.chunk.js} +1 -1
- package/dist/scripts/3450-ad966a93e7.chunk.js +1 -0
- package/dist/scripts/{1832-52444b0088.chunk.js → 3475-d6fd75feeb.chunk.js} +1 -1
- package/dist/scripts/{3639-c5cc04c72d.chunk.js → 3639-631906e5be.chunk.js} +1 -1
- package/dist/scripts/3643-a191b71123.chunk.js +1 -0
- package/dist/scripts/{3763-47619f0e54.chunk.js → 3763-7ae73d91fa.chunk.js} +1 -1
- package/dist/scripts/3873-42f43a345f.chunk.js +1 -0
- package/dist/scripts/4027-fd3b5a0220.chunk.js +1 -0
- package/dist/scripts/416-4e7988439a.chunk.js +1 -0
- package/dist/scripts/{4201-ffd35af9cb.chunk.js → 4201-8856b389f1.chunk.js} +1 -1
- package/dist/scripts/4245-bcb3d8e3e4.chunk.js +1 -0
- package/dist/scripts/{4860-6001ab4e2a.chunk.js → 4327-b8cd9a74f9.chunk.js} +1 -1
- package/dist/scripts/{6732-85afd02f41.chunk.js → 4567-3ca6ef4308.chunk.js} +1 -1
- package/dist/scripts/{4591-78600e384c.chunk.js → 4591-9ea0b32ac6.chunk.js} +1 -1
- package/dist/scripts/463-f5f80e35df.chunk.js +2 -0
- package/dist/scripts/4719-8c6ca32259.chunk.js +1 -0
- package/dist/scripts/4796-284cbfa43b.chunk.js +2 -0
- package/dist/scripts/4851-5877fa3e54.chunk.js +1 -0
- package/dist/scripts/{5173-f2d72d7c3e.chunk.js → 5173-9338a14ee3.chunk.js} +1 -1
- package/dist/scripts/{8906-2ae58fb990.chunk.js → 5180-37c1d4f9bd.chunk.js} +1 -1
- package/dist/scripts/5182-0c4b67f64d.chunk.js +2 -0
- package/dist/scripts/5193-e559c4c41a.chunk.js +1 -0
- package/dist/scripts/5319-4f146e8e39.chunk.js +2 -0
- package/dist/scripts/{259-ef5133c0fd.chunk.js → 5327-9b16f6b411.chunk.js} +1 -1
- package/dist/scripts/5346-6ecbb5b2b1.chunk.js +1 -0
- package/dist/scripts/{5412-e2505df3a4.chunk.js → 5412-bc03f5a901.chunk.js} +1 -1
- package/dist/scripts/{5418-f84d0ff359.chunk.js → 5418-a9d060f9d0.chunk.js} +1 -1
- package/dist/scripts/5424-fa6c668f42.chunk.js +1 -0
- package/dist/scripts/{546-2ee5c90feb.chunk.js → 546-36e1e11039.chunk.js} +1 -1
- package/dist/scripts/{7295-49780496e2.chunk.js → 5736-83fa0776d5.chunk.js} +1 -1
- package/dist/scripts/576-243c823838.chunk.js +1 -0
- package/dist/scripts/5814-5a46f1f264.chunk.js +1 -0
- package/dist/scripts/5972-d637eea712.chunk.js +1 -0
- package/dist/scripts/6239-92a0bebbeb.chunk.js +1 -0
- package/dist/scripts/6350-862d3edb93.chunk.js +1 -0
- package/dist/scripts/6439-8aac0bd92a.chunk.js +1 -0
- package/dist/scripts/{8762-be126e413d.chunk.js → 6450-a3ca4cdb2a.chunk.js} +1 -1
- package/dist/scripts/6467-db60883ef6.chunk.js +1 -0
- package/dist/scripts/{1086-7632f7b45b.chunk.js → 6587-eed4f0308b.chunk.js} +1 -1
- package/dist/scripts/{1409-ae672618b1.chunk.js → 6677-66b4b60478.chunk.js} +1 -1
- package/dist/scripts/6768-5f9040eac8.chunk.js +1 -0
- package/dist/scripts/{6774-a002ac7253.chunk.js → 6774-7ed47e1b8c.chunk.js} +1 -1
- package/dist/scripts/{6788-dc6b522995.chunk.js → 6788-d3b052f1a9.chunk.js} +1 -1
- package/dist/scripts/7071-4b42b6a81f.chunk.js +1 -0
- package/dist/scripts/7153-b8a8099148.chunk.js +1 -0
- package/dist/scripts/7182-9378cbae60.chunk.js +2 -0
- package/dist/scripts/7182-9378cbae60.chunk.js.LICENSE.txt +8 -0
- package/dist/scripts/{7190-2b40df1e89.chunk.js → 7190-35f785a3e3.chunk.js} +1 -1
- package/dist/scripts/{5747-7ca7ad6c1d.chunk.js → 7366-1132e85416.chunk.js} +1 -1
- package/dist/scripts/7384-29be02029c.chunk.js +1 -0
- package/dist/scripts/7416-4d6b9b9a5b.chunk.js +1 -0
- package/dist/scripts/7696-08e022c4b5.chunk.js +1 -0
- package/dist/scripts/775-2c991c9c6e.chunk.js +1 -0
- package/dist/scripts/777-1b328a0073.chunk.js +2 -0
- package/dist/scripts/8113-e17a857adc.chunk.js +1 -0
- package/dist/scripts/{9695-636ea0ef64.chunk.js → 8143-3c844e6f7b.chunk.js} +1 -1
- package/dist/scripts/{8362-267efdac61.chunk.js → 8362-a48a464bd6.chunk.js} +1 -1
- package/dist/scripts/8542-6f5077cb9a.chunk.js +1 -0
- package/dist/scripts/8591-047736d51e.chunk.js +1 -0
- package/dist/scripts/8757-9ff47570ba.chunk.js +2 -0
- package/dist/scripts/8757-9ff47570ba.chunk.js.LICENSE.txt +44 -0
- package/dist/scripts/{7376-e3bf3a94f9.chunk.js → 8797-2e772deab9.chunk.js} +1 -1
- package/dist/scripts/8862-0ce7a20f11.chunk.js +1 -0
- package/dist/scripts/{5707-b2b239ff4e.chunk.js → 8915-53b71a635d.chunk.js} +1 -1
- package/dist/scripts/{2692-1ddd87476e.chunk.js → 8989-258e7f8a87.chunk.js} +1 -1
- package/dist/scripts/9011-4862aa077d.chunk.js +1 -0
- package/dist/scripts/{6093-e19df1d1fa.chunk.js → 9037-7ce5f91571.chunk.js} +1 -1
- package/dist/scripts/9217-9c61b07e9e.chunk.js +1 -0
- package/dist/scripts/{9357-e71ea6a34d.chunk.js → 9357-64d247d840.chunk.js} +1 -1
- package/dist/scripts/{3551-d2ea1832c5.chunk.js → 95-bd02e086ac.chunk.js} +1 -1
- package/dist/scripts/{8726-2d0bc64637.chunk.js → 9620-3ba8334ebc.chunk.js} +1 -1
- package/dist/scripts/{5424-65be3c657c.chunk.js → 9734-37ab55da4e.chunk.js} +1 -1
- package/dist/scripts/9766-753d188467.chunk.js +2 -0
- package/dist/scripts/9766-753d188467.chunk.js.LICENSE.txt +6 -0
- package/dist/scripts/{9927-7a935c955d.chunk.js → 9825-965bc63629.chunk.js} +1 -1
- package/dist/scripts/9928-f43d6de0a3.chunk.js +1 -0
- package/dist/scripts/bundle-5438371664.min.js +2 -0
- package/dist/scripts/bundle-5438371664.min.js.LICENSE.txt +124 -0
- package/dist/scripts/{polyfills-5ce436cbbe.min.js → polyfills-4c06ebd0dd.min.js} +1 -1
- package/package.json +4 -5
- package/dist/css/library-editor-app-6b401b236c.css +0 -62
- package/dist/scripts/101-c2af2cc10c.chunk.js +0 -1
- package/dist/scripts/112-5209a9a2d0.chunk.js +0 -1
- package/dist/scripts/1216-83f6fbc7be.chunk.js +0 -1
- package/dist/scripts/1269-02d8d91784.chunk.js +0 -1
- package/dist/scripts/152-808e046b1f.chunk.js +0 -2
- package/dist/scripts/1703-0f9e8a489f.chunk.js +0 -1
- package/dist/scripts/1876-0a931d62d9.chunk.js +0 -1
- package/dist/scripts/1973-7a1768228d.chunk.js +0 -1
- package/dist/scripts/2417-9731b9da6b.chunk.js +0 -1
- package/dist/scripts/243-c4bb9e995e.chunk.js +0 -1
- package/dist/scripts/2482-ded3090c15.chunk.js +0 -1
- package/dist/scripts/2601-0bbd055a92.chunk.js +0 -1
- package/dist/scripts/2644-17c596a0c9.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-5585deab1d.chunk.js +0 -1
- package/dist/scripts/343-a3dabdd615.chunk.js +0 -1
- package/dist/scripts/35-dde0c25008.chunk.js +0 -1
- package/dist/scripts/3746-588ea9d62d.chunk.js +0 -1
- package/dist/scripts/376-d76b864238.chunk.js +0 -1
- package/dist/scripts/3969-c636ff3159.chunk.js +0 -1
- package/dist/scripts/3978-46652b7a6d.chunk.js +0 -1
- package/dist/scripts/4001-e9f2e6c242.chunk.js +0 -2
- package/dist/scripts/4024-e9e014aae3.chunk.js +0 -1
- package/dist/scripts/4245-db2d86c59d.chunk.js +0 -1
- package/dist/scripts/4523-4dc52522e2.chunk.js +0 -1
- package/dist/scripts/471-8eefc9b28a.chunk.js +0 -2
- package/dist/scripts/471-8eefc9b28a.chunk.js.LICENSE.txt +0 -13
- package/dist/scripts/5046-b65e8db7c0.chunk.js +0 -1
- package/dist/scripts/514-eeb95eba47.chunk.js +0 -1
- package/dist/scripts/535-794be8eab5.chunk.js +0 -1
- package/dist/scripts/5524-04583b6e40.chunk.js +0 -1
- package/dist/scripts/5850-fd3912ade8.chunk.js +0 -1
- package/dist/scripts/5891-ac4d3f803a.chunk.js +0 -1
- package/dist/scripts/61-4b8d6a6f6d.chunk.js +0 -2
- package/dist/scripts/6352-50c10c1bc6.chunk.js +0 -1
- package/dist/scripts/6963-254d82f6c2.chunk.js +0 -1
- package/dist/scripts/7002-6d9f52d6d3.chunk.js +0 -1
- package/dist/scripts/7053-91a52f57d7.chunk.js +0 -1
- package/dist/scripts/7071-6d98c3dcfa.chunk.js +0 -1
- package/dist/scripts/708-f7536cb7a4.chunk.js +0 -1
- package/dist/scripts/7153-fc080e3d53.chunk.js +0 -1
- package/dist/scripts/7827-c1f1b4f608.chunk.js +0 -1
- package/dist/scripts/8113-d678e76098.chunk.js +0 -1
- package/dist/scripts/8213-6c873c853e.chunk.js +0 -1
- package/dist/scripts/8542-64733a5c92.chunk.js +0 -1
- package/dist/scripts/8591-149f4a2b62.chunk.js +0 -1
- package/dist/scripts/8727-188101f028.chunk.js +0 -1
- package/dist/scripts/8952-4201ae6599.chunk.js +0 -2
- package/dist/scripts/9369-d0cfe79b64.chunk.js +0 -2
- package/dist/scripts/9383-4ed13f5993.chunk.js +0 -1
- package/dist/scripts/bundle-e23c97dca7.min.js +0 -2
- package/dist/scripts/bundle-e23c97dca7.min.js.LICENSE.txt +0 -1
- 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/{7408-library-editor-2a67dae087.chunk.css → 1080-library-editor-2a67dae087.chunk.css} +0 -0
- /package/dist/css/{376-library-editor-ce09c2fd78.chunk.css → 1524-library-editor-ce09c2fd78.chunk.css} +0 -0
- /package/dist/css/{6352-library-editor-33de5ce339.chunk.css → 2591-library-editor-33de5ce339.chunk.css} +0 -0
- /package/dist/css/{3978-library-editor-5a1c6fc3b4.chunk.css → 2598-library-editor-5a1c6fc3b4.chunk.css} +0 -0
- /package/dist/css/{3746-library-editor-46e4b6af59.chunk.css → 2614-library-editor-46e4b6af59.chunk.css} +0 -0
- /package/dist/css/{7053-library-editor-cbe896c46a.chunk.css → 3288-library-editor-cbe896c46a.chunk.css} +0 -0
- /package/dist/css/{2644-library-editor-9a25c88900.chunk.css → 3305-library-editor-9a25c88900.chunk.css} +0 -0
- /package/dist/css/{5046-library-editor-765ea88cb0.chunk.css → 3373-library-editor-765ea88cb0.chunk.css} +0 -0
- /package/dist/css/{1832-library-editor-e123877850.chunk.css → 3475-library-editor-e123877850.chunk.css} +0 -0
- /package/dist/css/{3969-library-editor-30997910e2.chunk.css → 3643-library-editor-30997910e2.chunk.css} +0 -0
- /package/dist/css/{4860-library-editor-f5eddb2400.chunk.css → 4327-library-editor-f5eddb2400.chunk.css} +0 -0
- /package/dist/css/{6732-library-editor-0be4d10f09.chunk.css → 4567-library-editor-0be4d10f09.chunk.css} +0 -0
- /package/dist/css/{1086-library-editor-9f7cd4e27e.chunk.css → 5180-library-editor-9f7cd4e27e.chunk.css} +0 -0
- /package/dist/css/{9369-library-editor-e354d61dfe.chunk.css → 5182-library-editor-e354d61dfe.chunk.css} +0 -0
- /package/dist/css/{4024-library-editor-b0081783ab.chunk.css → 5193-library-editor-b0081783ab.chunk.css} +0 -0
- /package/dist/css/{2601-library-editor-8922d361d6.chunk.css → 5346-library-editor-8922d361d6.chunk.css} +0 -0
- /package/dist/css/{1703-library-editor-3334df179f.chunk.css → 5424-library-editor-3334df179f.chunk.css} +0 -0
- /package/dist/css/{7295-library-editor-34087db2b0.chunk.css → 5736-library-editor-34087db2b0.chunk.css} +0 -0
- /package/dist/css/{535-library-editor-fa24102d7f.chunk.css → 576-library-editor-fa24102d7f.chunk.css} +0 -0
- /package/dist/css/{5891-library-editor-46e4b6af59.chunk.css → 5814-library-editor-46e4b6af59.chunk.css} +0 -0
- /package/dist/css/{708-library-editor-7ffe353138.chunk.css → 5972-library-editor-7ffe353138.chunk.css} +0 -0
- /package/dist/css/{243-library-editor-decee8d957.chunk.css → 6239-library-editor-decee8d957.chunk.css} +0 -0
- /package/dist/css/{4523-library-editor-c52f3ffbb0.chunk.css → 6350-library-editor-c52f3ffbb0.chunk.css} +0 -0
- /package/dist/css/{2482-library-editor-1b6dc45d45.chunk.css → 6439-library-editor-1b6dc45d45.chunk.css} +0 -0
- /package/dist/css/{2692-library-editor-9f7cd4e27e.chunk.css → 6450-library-editor-9f7cd4e27e.chunk.css} +0 -0
- /package/dist/css/{1876-library-editor-3334df179f.chunk.css → 6467-library-editor-3334df179f.chunk.css} +0 -0
- /package/dist/css/{8762-library-editor-9f7cd4e27e.chunk.css → 6587-library-editor-9f7cd4e27e.chunk.css} +0 -0
- /package/dist/css/{1409-library-editor-bc215e1152.chunk.css → 6677-library-editor-bc215e1152.chunk.css} +0 -0
- /package/dist/css/{9383-library-editor-02381b537c.chunk.css → 6768-library-editor-02381b537c.chunk.css} +0 -0
- /package/dist/css/{5747-library-editor-de4ea80bfc.chunk.css → 7366-library-editor-de4ea80bfc.chunk.css} +0 -0
- /package/dist/css/{2417-library-editor-46f8e6e95b.chunk.css → 7384-library-editor-46f8e6e95b.chunk.css} +0 -0
- /package/dist/css/{101-library-editor-cc4c4155eb.chunk.css → 7696-library-editor-cc4c4155eb.chunk.css} +0 -0
- /package/dist/css/{8952-library-editor-5d85817bef.chunk.css → 777-library-editor-5d85817bef.chunk.css} +0 -0
- /package/dist/css/{9695-library-editor-c5004a1fec.chunk.css → 8143-library-editor-c5004a1fec.chunk.css} +0 -0
- /package/dist/css/{343-library-editor-d2f704c6a5.chunk.css → 8862-library-editor-d2f704c6a5.chunk.css} +0 -0
- /package/dist/css/{8906-library-editor-9f7cd4e27e.chunk.css → 8989-library-editor-9f7cd4e27e.chunk.css} +0 -0
- /package/dist/css/{112-library-editor-6a2d152d7d.chunk.css → 9011-library-editor-6a2d152d7d.chunk.css} +0 -0
- /package/dist/css/{6093-library-editor-446ee2e049.chunk.css → 9037-library-editor-446ee2e049.chunk.css} +0 -0
- /package/dist/css/{6963-library-editor-46e4b6af59.chunk.css → 9217-library-editor-46e4b6af59.chunk.css} +0 -0
- /package/dist/css/{3551-library-editor-787101ac7a.chunk.css → 95-library-editor-787101ac7a.chunk.css} +0 -0
- /package/dist/css/{5424-library-editor-30b3c7de26.chunk.css → 9734-library-editor-30b3c7de26.chunk.css} +0 -0
- /package/dist/css/{514-library-editor-4cb4f22674.chunk.css → 9766-library-editor-4cb4f22674.chunk.css} +0 -0
- /package/dist/css/{9927-library-editor-a11669ad9d.chunk.css → 9825-library-editor-a11669ad9d.chunk.css} +0 -0
- /package/dist/scripts/{1934-562cd9f48b.chunk.js.LICENSE.txt → 1934-84460445ad.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{152-808e046b1f.chunk.js.LICENSE.txt → 463-f5f80e35df.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4001-e9f2e6c242.chunk.js.LICENSE.txt → 4796-284cbfa43b.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{61-4b8d6a6f6d.chunk.js.LICENSE.txt → 5182-0c4b67f64d.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8952-4201ae6599.chunk.js.LICENSE.txt → 5319-4f146e8e39.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9369-d0cfe79b64.chunk.js.LICENSE.txt → 777-1b328a0073.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 1934-
|
|
1
|
+
/*! For license information please see 1934-84460445ad.chunk.js.LICENSE.txt */
|
|
2
2
|
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1934],{51934:function(t){t.exports=function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function i(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(n,!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r="undefined"!=typeof window&&void 0!==window.document,h=r?window:{},s=!!r&&"ontouchstart"in h.document.documentElement,c=!!r&&"PointerEvent"in h,l="cropper",d="all",p="crop",u="move",m="zoom",g="e",f="w",v="s",w="n",b="ne",x="nw",y="se",M="sw",C="".concat(l,"-crop"),D="".concat(l,"-disabled"),k="".concat(l,"-hidden"),B="".concat(l,"-hide"),O="".concat(l,"-invisible"),T="".concat(l,"-modal"),E="".concat(l,"-move"),W="".concat(l,"Action"),N="".concat(l,"Preview"),H="crop",L="move",z="none",Y="crop",X="cropend",R="cropmove",S="cropstart",A="dblclick",j=c?"pointerdown":s?"touchstart":"mousedown",P=c?"pointermove":s?"touchmove":"mousemove",I=c?"pointerup pointercancel":s?"touchend touchcancel":"mouseup",U="ready",q="resize",$="wheel",_="zoom",Q="image/jpeg",K=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Z=/^data:/,G=/^data:image\/jpeg;base64,/,V=/^img|canvas$/i,F={viewMode:0,dragMode:H,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},J=Number.isNaN||h.isNaN;function tt(t){return"number"==typeof t&&!J(t)}var et=function(t){return t>0&&t<1/0};function it(t){return void 0===t}function at(e){return"object"===t(e)&&null!==e}var nt=Object.prototype.hasOwnProperty;function ot(t){if(!at(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&nt.call(i,"isPrototypeOf")}catch(t){return!1}}function rt(t){return"function"==typeof t}var ht=Array.prototype.slice;function st(t){return Array.from?Array.from(t):ht.call(t)}function ct(t,e){return t&&rt(e)&&(Array.isArray(t)||tt(t.length)?st(t).forEach((function(i,a){e.call(t,i,a,t)})):at(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var lt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];return at(t)&&i.length>0&&i.forEach((function(e){at(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},dt=/\.\d*(?:0|9){12}\d*$/;function pt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return dt.test(t)?Math.round(t*e)/e:t}var ut=/^width|height|left|top|marginLeft|marginTop$/;function mt(t,e){var i=t.style;ct(e,(function(t,e){ut.test(e)&&tt(t)&&(t="".concat(t,"px")),i[e]=t}))}function gt(t,e){if(e)if(tt(t.length))ct(t,(function(t){gt(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function ft(t,e){e&&(tt(t.length)?ct(t,(function(t){ft(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function vt(t,e,i){e&&(tt(t.length)?ct(t,(function(t){vt(t,e,i)})):i?gt(t,e):ft(t,e))}var wt=/([a-z\d])([A-Z])/g;function bt(t){return t.replace(wt,"$1-$2").toLowerCase()}function xt(t,e){return at(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(bt(e)))}function yt(t,e,i){at(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(bt(e)),i)}var Mt=/\s\s*/,Ct=function(){var t=!1;if(r){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});h.addEventListener("test",i,a),h.removeEventListener("test",i,a)}return t}();function Dt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Mt).forEach((function(e){if(!Ct){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)}))}function kt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Mt).forEach((function(e){if(a.once&&!Ct){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,h=new Array(o),s=0;s<o;s++)h[s]=arguments[s];i.apply(t,h)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],a),r[e][i]=n,t.listeners=r}t.addEventListener(e,n,a)}))}function Bt(t,e,i){var a;return rt(Event)&&rt(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function Ot(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Tt=h.location,Et=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Wt(t){var e=t.match(Et);return null!==e&&(e[1]!==Tt.protocol||e[2]!==Tt.hostname||e[3]!==Tt.port)}function Nt(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Ht(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,o=t.translateY,r=[];tt(n)&&0!==n&&r.push("translateX(".concat(n,"px)")),tt(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),tt(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),tt(i)&&1!==i&&r.push("scaleX(".concat(i,")")),tt(a)&&1!==a&&r.push("scaleY(".concat(a,")"));var h=r.length?r.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function Lt(t,e){var i=t.pageX,a=t.pageY,o={endX:i,endY:a};return e?o:n({startX:i,startY:a},o)}function zt(t){var e=t.aspectRatio,i=t.height,a=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=et(a),r=et(i);if(o&&r){var h=i*e;"contain"===n&&h>a||"cover"===n&&h<a?i=a/e:a=i*e}else o?i=a/e:r&&(a=i*e);return{width:a,height:i}}var Yt=String.fromCharCode;var Xt=/^data:.*,/;function Rt(t){var e,i=new DataView(t);try{var a,n,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,h=2;h+1<r;){if(255===i.getUint8(h)&&225===i.getUint8(h+1)){n=h;break}h+=1}if(n){var s=n+10;if("Exif"===function(t,e,i){var a="";i+=e;for(var n=e;n<i;n+=1)a+=Yt(t.getUint8(n));return a}(i,n+4,4)){var c=i.getUint16(s);if(((a=18761===c)||19789===c)&&42===i.getUint16(s+2,a)){var l=i.getUint32(s+4,a);l>=8&&(o=s+l)}}}if(o){var d,p,u=i.getUint16(o,a);for(p=0;p<u;p+=1)if(d=o+12*p+2,274===i.getUint16(d,a)){d+=8,e=i.getUint16(d,a),i.setUint16(d,1,a);break}}}catch(t){e=1}return e}var St={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper;gt(a,k),ft(t,k);var n={width:Math.max(i.offsetWidth,Number(e.minContainerWidth)||200),height:Math.max(i.offsetHeight,Number(e.minContainerHeight)||100)};this.containerData=n,mt(a,{width:n.width,height:n.height}),gt(t,k),ft(a,k)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,o=a?e.naturalWidth:e.naturalHeight,r=n/o,h=t.width,s=t.height;t.height*r>t.width?3===i?h=t.height*r:s=t.width/r:3===i?s=t.width/r:h=t.height*r;var c={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:h,height:s};c.left=(t.width-h)/2,c.top=(t.height-s)/2,c.oldLeft=c.left,c.oldTop=c.top,this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=lt({},e),this.initialCanvasData=lt({},c)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,h=n.aspectRatio,s=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,a.width),l=Math.max(l,a.height),3===r&&(l*h>c?c=l*h:l=c/h)):r>0&&(c?c=Math.max(c,s?o.width:0):l?l=Math.max(l,s?o.height:0):s&&(c=o.width,(l=o.height)*h>c?c=l*h:l=c/h));var d=zt({aspectRatio:h,width:c,height:l});c=d.width,l=d.height,n.minWidth=c,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(s?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),h=e*r+i*o,s=e*o+i*r;return a>90?{width:s,height:h}:{width:h,height:s}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,h=i.width*(o/i.naturalWidth),s=i.height*(r/i.naturalHeight);i.left-=(h-i.width)/2,i.top-=(s-i.height)/2,i.width=h,i.height=s,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,mt(this.canvas,lt({width:i.width,height:i.height},Ht({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);lt(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),mt(this.image,lt({width:i.width,height:i.height},Ht(lt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=lt({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,h=i.aspectRatio;if(t){var s=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,d=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;s=Math.min(s,a.width),c=Math.min(c,a.height),h&&(s&&c?c*h>s?c=s/h:s=c*h:s?c=s/h:c&&(s=c*h),d*h>l?d=l/h:l=d*h),o.minWidth=Math.min(s,l),o.minHeight=Math.min(c,d),o.maxWidth=l,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&yt(this.face,W,i.width>=e.width&&i.height>=e.height?u:d),mt(this.cropBox,lt({width:i.width,height:i.height},Ht({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Bt(this.element,Y,this.getData())}},At={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,ct(r,(function(t){var i=document.createElement("img");yt(t,N,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){ct(this.previews,(function(t){var e=xt(t,N);mt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(at(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(bt(e)))}(t,N)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,h=i.left-e.left-t.left,s=i.top-e.top-t.top;this.cropped&&!this.disabled&&(mt(this.viewBoxImage,lt({width:o,height:r},Ht(lt({translateX:-h,translateY:-s},t)))),ct(this.previews,(function(e){var i=xt(e,N),c=i.width,l=i.height,d=c,p=l,u=1;a&&(p=n*(u=c/a)),n&&p>l&&(d=a*(u=l/n),p=l),mt(e,{width:d,height:p}),mt(e.getElementsByTagName("img")[0],lt({width:o*u,height:r*u},Ht(lt({translateX:-h*u,translateY:-s*u},t))))})))}},jt={bind:function(){var t=this.element,e=this.options,i=this.cropper;rt(e.cropstart)&&kt(t,S,e.cropstart),rt(e.cropmove)&&kt(t,R,e.cropmove),rt(e.cropend)&&kt(t,X,e.cropend),rt(e.crop)&&kt(t,Y,e.crop),rt(e.zoom)&&kt(t,_,e.zoom),kt(i,j,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&kt(i,$,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&kt(i,A,this.onDblclick=this.dblclick.bind(this)),kt(t.ownerDocument,P,this.onCropMove=this.cropMove.bind(this)),kt(t.ownerDocument,I,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&kt(window,q,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;rt(e.cropstart)&&Dt(t,S,e.cropstart),rt(e.cropmove)&&Dt(t,R,e.cropmove),rt(e.cropend)&&Dt(t,X,e.cropend),rt(e.crop)&&Dt(t,Y,e.crop),rt(e.zoom)&&Dt(t,_,e.zoom),Dt(i,j,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Dt(i,$,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Dt(i,A,this.onDblclick),Dt(t.ownerDocument,P,this.onCropMove),Dt(t.ownerDocument,I,this.onCropEnd),e.responsive&&Dt(window,q,this.onResize)}},Pt={resize:function(){var t=this.options,e=this.container,i=this.containerData,a=Number(t.minContainerWidth)||200,n=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=a||i.height<=n)){var o,r,h=e.offsetWidth/i.width;1===h&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),r=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ct(o,(function(t,e){o[e]=t*h}))),this.setCropBoxData(ct(r,(function(t,e){r[e]=t*h})))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===z||this.setDragMode((t=this.dragBox,e=C,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?L:H))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(tt(e)&&1!==e||tt(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?ct(t.changedTouches,(function(t){o[t.identifier]=Lt(t)})):o[t.pointerId||0]=Lt(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?m:xt(t.target,W),K.test(a)&&!1!==Bt(this.element,S,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===p&&(this.cropping=!0,gt(this.dragBox,T)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Bt(this.element,R,{originalEvent:t,action:e})&&(t.changedTouches?ct(t.changedTouches,(function(t){lt(i[t.identifier]||{},Lt(t,!0))})):lt(i[t.pointerId||0]||{},Lt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?ct(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,vt(this.dragBox,T,this.cropped&&this.options.modal)),Bt(this.element,X,{originalEvent:t,action:e}))}}},It={change:function(t){var e,i=this.options,a=this.canvasData,o=this.containerData,r=this.cropBoxData,h=this.pointers,s=this.action,c=i.aspectRatio,l=r.left,C=r.top,D=r.width,B=r.height,O=l+D,T=C+B,E=0,W=0,N=o.width,H=o.height,L=!0;!c&&t.shiftKey&&(c=D&&B?D/B:1),this.limited&&(E=r.minLeft,W=r.minTop,N=E+Math.min(o.width,a.width,a.left+a.width),H=W+Math.min(o.height,a.height,a.top+a.height));var z=h[Object.keys(h)[0]],Y={x:z.endX-z.startX,y:z.endY-z.startY},X=function(t){switch(t){case g:O+Y.x>N&&(Y.x=N-O);break;case f:l+Y.x<E&&(Y.x=E-l);break;case w:C+Y.y<W&&(Y.y=W-C);break;case v:T+Y.y>H&&(Y.y=H-T)}};switch(s){case d:l+=Y.x,C+=Y.y;break;case g:if(Y.x>=0&&(O>=N||c&&(C<=W||T>=H))){L=!1;break}X(g),(D+=Y.x)<0&&(s=f,l-=D=-D),c&&(B=D/c,C+=(r.height-B)/2);break;case w:if(Y.y<=0&&(C<=W||c&&(l<=E||O>=N))){L=!1;break}X(w),B-=Y.y,C+=Y.y,B<0&&(s=v,C-=B=-B),c&&(D=B*c,l+=(r.width-D)/2);break;case f:if(Y.x<=0&&(l<=E||c&&(C<=W||T>=H))){L=!1;break}X(f),D-=Y.x,l+=Y.x,D<0&&(s=g,l-=D=-D),c&&(B=D/c,C+=(r.height-B)/2);break;case v:if(Y.y>=0&&(T>=H||c&&(l<=E||O>=N))){L=!1;break}X(v),(B+=Y.y)<0&&(s=w,C-=B=-B),c&&(D=B*c,l+=(r.width-D)/2);break;case b:if(c){if(Y.y<=0&&(C<=W||O>=N)){L=!1;break}X(w),B-=Y.y,C+=Y.y,D=B*c}else X(w),X(g),Y.x>=0?O<N?D+=Y.x:Y.y<=0&&C<=W&&(L=!1):D+=Y.x,Y.y<=0?C>W&&(B-=Y.y,C+=Y.y):(B-=Y.y,C+=Y.y);D<0&&B<0?(s=M,C-=B=-B,l-=D=-D):D<0?(s=x,l-=D=-D):B<0&&(s=y,C-=B=-B);break;case x:if(c){if(Y.y<=0&&(C<=W||l<=E)){L=!1;break}X(w),B-=Y.y,C+=Y.y,D=B*c,l+=r.width-D}else X(w),X(f),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y<=0&&C<=W&&(L=!1):(D-=Y.x,l+=Y.x),Y.y<=0?C>W&&(B-=Y.y,C+=Y.y):(B-=Y.y,C+=Y.y);D<0&&B<0?(s=y,C-=B=-B,l-=D=-D):D<0?(s=b,l-=D=-D):B<0&&(s=M,C-=B=-B);break;case M:if(c){if(Y.x<=0&&(l<=E||T>=H)){L=!1;break}X(f),D-=Y.x,l+=Y.x,B=D/c}else X(v),X(f),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y>=0&&T>=H&&(L=!1):(D-=Y.x,l+=Y.x),Y.y>=0?T<H&&(B+=Y.y):B+=Y.y;D<0&&B<0?(s=b,C-=B=-B,l-=D=-D):D<0?(s=y,l-=D=-D):B<0&&(s=x,C-=B=-B);break;case y:if(c){if(Y.x>=0&&(O>=N||T>=H)){L=!1;break}X(g),B=(D+=Y.x)/c}else X(v),X(g),Y.x>=0?O<N?D+=Y.x:Y.y>=0&&T>=H&&(L=!1):D+=Y.x,Y.y>=0?T<H&&(B+=Y.y):B+=Y.y;D<0&&B<0?(s=x,C-=B=-B,l-=D=-D):D<0?(s=M,l-=D=-D):B<0&&(s=b,C-=B=-B);break;case u:this.move(Y.x,Y.y),L=!1;break;case m:this.zoom(function(t){var e=n({},t),i=[];return ct(t,(function(t,a){delete e[a],ct(e,(function(e){var a=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(a*a+n*n),s=(Math.sqrt(o*o+r*r)-h)/h;i.push(s)}))})),i.sort((function(t,e){return Math.abs(t)<Math.abs(e)})),i[0]}(h),t),L=!1;break;case p:if(!Y.x||!Y.y){L=!1;break}e=Ot(this.cropper),l=z.startX-e.left,C=z.startY-e.top,D=r.minWidth,B=r.minHeight,Y.x>0?s=Y.y>0?y:b:Y.x<0&&(l-=D,s=Y.y>0?M:x),Y.y<0&&(C-=B),this.cropped||(ft(this.cropBox,k),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}L&&(r.width=D,r.height=B,r.left=l,r.top=C,this.action=s,this.renderCropBox()),ct(h,(function(t){t.startX=t.endX,t.startY=t.endY}))}},Ut={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&>(this.dragBox,T),ft(this.cropBox,k),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=lt({},this.initialImageData),this.canvasData=lt({},this.initialCanvasData),this.cropBoxData=lt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(lt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ft(this.dragBox,T),gt(this.cropBox,k)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ct(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ft(this.cropper,D)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,gt(this.cropper,D)),this},destroy:function(){var t=this.element;return t[l]?(t[l]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(it(t)?t:a+Number(t),it(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(tt(t)&&(i.left=t,a=!0),tt(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,h=n.naturalWidth,s=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=h*t,l=s*t;if(!1===Bt(this.element,_,{ratio:t,oldRatio:o/h,originalEvent:i}))return this;if(i){var d=this.pointers,p=Ot(this.cropper),u=d&&Object.keys(d).length?function(t){var e=0,i=0,a=0;return ct(t,(function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1})),{pageX:e/=a,pageY:i/=a}}(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(c-o)*((u.pageX-p.left-n.left)/o),n.top-=(l-r)*((u.pageY-p.top-n.top)/r)}else ot(e)&&tt(e.x)&&tt(e.y)?(n.left-=(c-o)*((e.x-n.left)/o),n.top-=(l-r)*((e.y-n.top)/r)):(n.left-=(c-o)/2,n.top-=(l-r)/2);n.width=c,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return tt(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,tt(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(tt(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(tt(t)&&(i.scaleX=t,a=!0),tt(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(ct(t,(function(e,i){t[i]=e/r})),e){var h=Math.round(t.y+t.height),s=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=s-t.x,t.height=h-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&ot(t)){var o=!1;e.rotatable&&tt(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(tt(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),tt(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;tt(t.x)&&(n.left=t.x*r+a.left),tt(t.y)&&(n.top=t.y*r+a.top),tt(t.width)&&(n.width=t.width*r),tt(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?lt({},this.containerData):{}},getImageData:function(){return this.sized?lt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&ct(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&ot(t)&&(tt(t.left)&&(e.left=t.left),tt(t.top)&&(e.top=t.top),tt(t.width)?(e.width=t.width,e.height=t.width/i):tt(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&ot(t)&&(tt(t.left)&&(a.left=t.left),tt(t.top)&&(a.top=t.top),tt(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),tt(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=function(t,e,i,a){var n=e.aspectRatio,r=e.naturalWidth,h=e.naturalHeight,s=e.rotate,c=void 0===s?0:s,l=e.scaleX,d=void 0===l?1:l,p=e.scaleY,u=void 0===p?1:p,m=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,v=a.fillColor,w=void 0===v?"transparent":v,b=a.imageSmoothingEnabled,x=void 0===b||b,y=a.imageSmoothingQuality,M=void 0===y?"low":y,C=a.maxWidth,D=void 0===C?1/0:C,k=a.maxHeight,B=void 0===k?1/0:k,O=a.minWidth,T=void 0===O?0:O,E=a.minHeight,W=void 0===E?0:E,N=document.createElement("canvas"),H=N.getContext("2d"),L=zt({aspectRatio:m,width:D,height:B}),z=zt({aspectRatio:m,width:T,height:W},"cover"),Y=Math.min(L.width,Math.max(z.width,g)),X=Math.min(L.height,Math.max(z.height,f)),R=zt({aspectRatio:n,width:D,height:B}),S=zt({aspectRatio:n,width:T,height:W},"cover"),A=Math.min(R.width,Math.max(S.width,r)),j=Math.min(R.height,Math.max(S.height,h)),P=[-A/2,-j/2,A,j];return N.width=pt(Y),N.height=pt(X),H.fillStyle=w,H.fillRect(0,0,Y,X),H.save(),H.translate(Y/2,X/2),H.rotate(c*Math.PI/180),H.scale(d,u),H.imageSmoothingEnabled=x,H.imageSmoothingQuality=M,H.drawImage.apply(H,[t].concat(o(P.map((function(t){return Math.floor(pt(t))}))))),H.restore(),N}(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(),n=a.x,r=a.y,h=a.width,s=a.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(n*=c,r*=c,h*=c,s*=c);var l=h/s,d=zt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=zt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=zt({aspectRatio:l,width:t.width||(1!==c?i.width:h),height:t.height||(1!==c?i.height:s)}),m=u.width,g=u.height;m=Math.min(d.width,Math.max(p.width,m)),g=Math.min(d.height,Math.max(p.height,g));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=pt(m),f.height=pt(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,g);var w=t.imageSmoothingEnabled,b=void 0===w||w,x=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,x&&(v.imageSmoothingQuality=x);var y,M,C,D,k,B,O=i.width,T=i.height,E=n,W=r;E<=-h||E>O?(E=0,y=0,C=0,k=0):E<=0?(C=-E,E=0,k=y=Math.min(O,h+E)):E<=O&&(C=0,k=y=Math.min(h,O-E)),y<=0||W<=-s||W>T?(W=0,M=0,D=0,B=0):W<=0?(D=-W,W=0,B=M=Math.min(T,s+W)):W<=T&&(D=0,B=M=Math.min(s,T-W));var N=[E,W,y,M];if(k>0&&B>0){var H=m/h;N.push(C*H,D*H,k*H,B*H)}return v.drawImage.apply(v,[i].concat(o(N.map((function(t){return Math.floor(pt(t))}))))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||it(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===H,o=e.movable&&t===L;t=n||o?t:z,e.dragMode=t,yt(i,W,t),vt(i,C,n),vt(i,E,o),e.cropBoxMovable||(yt(a,W,t),vt(a,C,n),vt(a,E,o))}return this}},qt=h.Cropper,$t=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!V.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=lt({},F,ot(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return i=t,n=[{key:"noConflict",value:function(){return window.Cropper=qt,t}},{key:"setDefaults",value:function(t){lt(F,ot(t)&&t)}}],(a=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[l]){if(e[l]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e,i,a,n,o=this;if(t){this.url=t,this.imageData={};var r=this.element,h=this.options;if(h.rotatable||h.scalable||(h.checkOrientation=!1),h.checkOrientation&&window.ArrayBuffer)if(Z.test(t))G.test(t)?this.read((e=t.replace(Xt,""),i=atob(e),a=new ArrayBuffer(i.length),ct(n=new Uint8Array(a),(function(t,e){n[e]=i.charCodeAt(e)})),a)):this.clone();else{var s=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=c,s.onerror=c,s.ontimeout=c,s.onprogress=function(){s.getResponseHeader("content-type")!==Q&&s.abort()},s.onload=function(){o.read(s.response)},s.onloadend=function(){o.reloading=!1,o.xhr=null},h.checkCrossOrigin&&Wt(t)&&r.crossOrigin&&(t=Nt(t)),s.open("GET",t),s.responseType="arraybuffer",s.withCredentials="use-credentials"===r.crossOrigin,s.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=Rt(t),n=0,o=1,r=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(Yt.apply(null,st(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,Q);var h=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=h.rotate,o=h.scaleX,r=h.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&Wt(e)&&(i||(i="anonymous"),a=Nt(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),gt(n,B),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=h.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(h.navigator.userAgent),a=function(e,i){lt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=n.querySelector(".".concat(l,"-container")),r=o.querySelector(".".concat(l,"-canvas")),h=o.querySelector(".".concat(l,"-drag-box")),s=o.querySelector(".".concat(l,"-crop-box")),c=s.querySelector(".".concat(l,"-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=h,this.cropBox=s,this.viewBox=o.querySelector(".".concat(l,"-view-box")),this.face=c,r.appendChild(i),gt(t,k),a.insertBefore(o,t.nextSibling),this.isImg||ft(i,B),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,gt(s,k),e.guides||gt(s.getElementsByClassName("".concat(l,"-dashed")),k),e.center||gt(s.getElementsByClassName("".concat(l,"-center")),k),e.background&>(o,"".concat(l,"-bg")),e.highlight||gt(c,O),e.cropBoxMovable&&(gt(c,E),yt(c,W,d)),e.cropBoxResizable||(gt(s.getElementsByClassName("".concat(l,"-line")),k),gt(s.getElementsByClassName("".concat(l,"-point")),k)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),rt(e.ready)&&kt(t,U,e.ready,{once:!0}),Bt(t,U)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),ft(this.element,k))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&e(i.prototype,a),n&&e(i,n),t;var i,a,n}();return lt($t.prototype,St,At,jt,Pt,It,Ut),$t}()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1973],{51541:function(e,t,n){"use strict";t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=a(n(60216)),i=a(n(19897)),u=a(n(73355)),s=n(42662);function a(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function c(e){return c="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},c(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}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,r.key,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(){return!0},v="suggestions-revealed",S="input-focused",w="input-changed",O="escape-pressed",I=function(e){!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}}),t&&m(e,t)}(l,e);var t,n,o,a=(o=l,function(){var e,t=h(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?d(e):t}(this,e)});function l(e){var t,n=e.alwaysRenderSuggestions;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),y(d(t=a.call(this)),"onDocumentMouseDown",(function(e){t.justClickedOnSuggestionsContainer=!1;for(var n=e.detail&&e.detail.target||e.target;null!==n&&n!==document;){if(n.getAttribute&&null!==n.getAttribute("data-suggestion-index"))return;if(n===t.suggestionsContainer)return void(t.justClickedOnSuggestionsContainer=!0);n=n.parentNode}})),y(d(t),"storeAutowhateverRef",(function(e){null!==e&&(t.autowhatever=e)})),y(d(t),"onSuggestionMouseEnter",(function(e,n){var r=n.sectionIndex,o=n.itemIndex;t.updateHighlightedSuggestion(r,o),e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!0),t.justMouseEntered=!0,setTimeout((function(){t.justMouseEntered=!1}))})),y(d(t),"highlightFirstSuggestion",(function(){t.updateHighlightedSuggestion(t.props.multiSection?0:null,0)})),y(d(t),"onDocumentMouseUp",(function(){t.pressedSuggestion&&!t.justSelectedSuggestion&&t.input.focus(),t.pressedSuggestion=null})),y(d(t),"onSuggestionMouseDown",(function(e){t.justSelectedSuggestion||(t.justSelectedSuggestion=!0,t.pressedSuggestion=e.target)})),y(d(t),"onSuggestionsClearRequested",(function(){var e=t.props.onSuggestionsClearRequested;e&&e()})),y(d(t),"onSuggestionSelected",(function(e,n){var r=t.props,o=r.alwaysRenderSuggestions,i=r.onSuggestionSelected,u=r.onSuggestionsFetchRequested;i&&i(e,n);var s=t.props.shouldKeepSuggestionsOnSelect(n.suggestion);o||s?u({value:n.suggestionValue,reason:"suggestion-selected"}):t.onSuggestionsClearRequested(),t.resetHighlightedSuggestion()})),y(d(t),"onSuggestionClick",(function(e){var n=t.props,r=n.alwaysRenderSuggestions,o=n.focusInputOnSuggestionClick,i=t.getSuggestionIndices(t.findSuggestionElement(e.target)),u=i.sectionIndex,s=i.suggestionIndex,a=t.getSuggestion(u,s),l=t.props.getSuggestionValue(a);t.maybeCallOnChange(e,l,"click"),t.onSuggestionSelected(e,{suggestion:a,suggestionValue:l,suggestionIndex:s,sectionIndex:u,method:"click"});var c=t.props.shouldKeepSuggestionsOnSelect(a);r||c||t.closeSuggestions(),!0===o?t.input.focus():t.onBlur(),setTimeout((function(){t.justSelectedSuggestion=!1}))})),y(d(t),"onBlur",(function(){var e=t.props,n=e.inputProps,r=e.shouldRenderSuggestions,o=n.value,i=n.onBlur,u=t.getHighlightedSuggestion(),s=r(o,"input-blurred");t.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),i&&i(t.blurEvent,{highlightedSuggestion:u})})),y(d(t),"onSuggestionMouseLeave",(function(e){t.resetHighlightedSuggestion(!1),t.justSelectedSuggestion&&e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!1)})),y(d(t),"onSuggestionTouchStart",(function(){t.justSelectedSuggestion=!0})),y(d(t),"onSuggestionTouchMove",(function(){t.justSelectedSuggestion=!1,t.pressedSuggestion=null,t.input.focus()})),y(d(t),"itemProps",(function(e){return{"data-section-index":e.sectionIndex,"data-suggestion-index":e.itemIndex,onMouseEnter:t.onSuggestionMouseEnter,onMouseLeave:t.onSuggestionMouseLeave,onMouseDown:t.onSuggestionMouseDown,onTouchStart:t.onSuggestionTouchStart,onTouchMove:t.onSuggestionTouchMove,onClick:t.onSuggestionClick}})),y(d(t),"renderSuggestionsContainer",(function(e){var n=e.containerProps,r=e.children;return(0,t.props.renderSuggestionsContainer)({containerProps:n,children:r,query:t.getQuery()})})),t.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},t.justPressedUpDown=!1,t.justMouseEntered=!1,t.pressedSuggestion=null,t}return t=l,n=[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=0===this.state.highlightedSuggestionIndex&&this.props.highlightFirstSuggestion&&!e.highlightFirstSuggestion;(0,i.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered?this.highlightFirstSuggestion():t&&this.resetHighlightedSuggestion():this.willRenderSuggestions(e,"suggestions-updated")?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),t&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,o=n.onSuggestionHighlighted,u=n.highlightFirstSuggestion;if(!(0,i.default)(r,e.suggestions)&&r.length>0&&u)this.highlightFirstSuggestion();else if(o){var s=this.getHighlightedSuggestion();s!=t.highlightedSuggestion&&o({suggestion:s})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(o){var i=o.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:i}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,o=n.multiSection,i=n.getSectionSuggestions;return o?i(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(t.getAttribute&&null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,o=r.value,i=r.onChange;t!==o&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e,t){var n=e.suggestions,r=e.inputProps,o=e.shouldRenderSuggestions,i=r.value;return n.length>0&&o(i,t)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,o=t.renderInputComponent,i=t.onSuggestionsFetchRequested,a=t.renderSuggestion,l=t.inputProps,c=t.multiSection,f=t.renderSectionTitle,p=t.id,d=t.getSectionSuggestions,h=t.theme,m=t.getSuggestionValue,y=t.alwaysRenderSuggestions,I=t.highlightFirstSuggestion,j=t.containerProps,P=this.state,k=P.isFocused,_=P.isCollapsed,x=P.highlightedSectionIndex,C=P.highlightedSuggestionIndex,D=P.valueBeforeUpDown,R=y?b:this.props.shouldRenderSuggestions,E=l.value,M=l.onFocus,T=l.onKeyDown,q=this.willRenderSuggestions(this.props,"render"),H=y||k&&!_&&q,F=H?n:[],A=g({},l,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=R(E,S);e.setState({isFocused:!0,isCollapsed:!n}),M&&M(t),n&&i({value:E,reason:S})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,r=R(n,w);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(g({},I?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!r})),r?i({value:n,reason:w}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(_)R(E,v)&&(i({value:E,reason:v}),e.revealSuggestions(),t.preventDefault());else if(n.length>0){var u,s=r.newHighlightedSectionIndex,a=r.newHighlightedItemIndex;u=null===a?null===D?E:D:e.getSuggestionValueByIndex(s,a),e.updateHighlightedSuggestion(s,a,E),e.maybeCallOnChange(t,u,40===o?"down":"up"),t.preventDefault()}e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var l=e.getHighlightedSuggestion();if(H&&!y&&e.closeSuggestions(),null!=l){t.preventDefault();var c=m(l);e.maybeCallOnChange(t,c,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:c,suggestionIndex:C,sectionIndex:x,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:H&&t.preventDefault();var f=H&&!y;null===D?f||(e.maybeCallOnChange(t,"","escape"),R("",O)?i({value:"",reason:O}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,D,"escape"),f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}T&&T(t)}}),U={query:this.getQuery()};return r.default.createElement(u.default,{multiSection:c,items:F,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:a,renderItemData:U,renderSectionTitle:f,getSectionItems:d,highlightedSectionIndex:x,highlightedItemIndex:C,containerProps:j,inputProps:A,itemProps:this.itemProps,theme:(0,s.mapToAutowhateverTheme)(h),id:p,ref:this.storeAutowhateverRef})}}],n&&p(t.prototype,n),l}(r.Component);t.default=I,y(I,"propTypes",{suggestions:o.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){if("function"!=typeof e[t])throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},shouldKeepSuggestionsOnSelect:o.default.func,onSuggestionSelected:o.default.func,onSuggestionHighlighted:o.default.func,renderInputComponent:o.default.func,renderSuggestionsContainer:o.default.func,getSuggestionValue:o.default.func.isRequired,renderSuggestion:o.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n)throw new Error("'inputProps' must be passed.");if(!Object.prototype.hasOwnProperty.call(n,"value"))throw new Error("'inputProps' must have 'value'.");if(!Object.prototype.hasOwnProperty.call(n,"onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:o.default.func,alwaysRenderSuggestions:o.default.bool,multiSection:o.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:o.default.bool,highlightFirstSuggestion:o.default.bool,theme:o.default.object,id:o.default.string,containerProps:o.default.object}),y(I,"defaultProps",{renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,shouldKeepSuggestionsOnSelect:function(){return!1},focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:s.defaultTheme,id:"1",containerProps:{}})},73355:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==d(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=l(n(60216)),i=l(n(91661)),u=l(n(97818)),s=l(n(16054)),a=l(n(57331));function l(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S={},w=function(e){!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}}),t&&b(e,t)}(c,e);var t,n,o,l=(o=c,function(){var e,t=y(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?m(e):t}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),v(m(t=l.call(this,e)),"storeInputReference",(function(e){null!==e&&(t.input=e);var n=t.props.inputProps.ref;n&&("function"==typeof n?n(e):"object"===d(n)&&Object.prototype.hasOwnProperty.call(n,"current")&&(n.current=e))})),v(m(t),"storeItemsContainerReference",(function(e){null!==e&&(t.itemsContainer=e)})),v(m(t),"onHighlightedItemChange",(function(e){t.highlightedItem=e})),v(m(t),"getItemId",(function(e,n){if(null===n)return null;var r=t.props.id,o=null===e?"":"section-".concat(e);return"react-autowhatever-".concat(r,"-").concat(o,"-item-").concat(n)})),v(m(t),"onFocus",(function(e){var n=t.props.inputProps;t.setState({isInputFocused:!0}),n.onFocus&&n.onFocus(e)})),v(m(t),"onBlur",(function(e){var n=t.props.inputProps;t.setState({isInputFocused:!1}),n.onBlur&&n.onBlur(e)})),v(m(t),"onKeyDown",(function(e){var n,r,o=t.props,i=o.inputProps,u=o.highlightedSectionIndex,s=o.highlightedItemIndex,a=e.keyCode;switch(a){case 40:case 38:var l=40===a?"next":"prev",c=(n=t.sectionIterator[l]([u,s]),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(n,r)||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.")}()),f=c[0],g=c[1];i.onKeyDown(e,{newHighlightedSectionIndex:f,newHighlightedItemIndex:g});break;default:i.onKeyDown(e,{highlightedSectionIndex:u,highlightedItemIndex:s})}})),t.highlightedItem=null,t.state={isInputFocused:!1},t.setSectionsItems(e),t.setSectionIterator(e),t.setTheme(e),t}return t=c,(n=[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,i.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,o=n.id,i=n.items,u=n.renderItem,l=n.renderItemData,c=n.renderSectionTitle,f=n.highlightedSectionIndex,g=n.highlightedItemIndex,p=n.itemProps;return i.map((function(n,i){var d="react-autowhatever-".concat(o,"-"),h="".concat(d,"section-").concat(i,"-"),m=0===i;return r.default.createElement("div",t("".concat(h,"container"),"sectionContainer",m&&"sectionContainerFirst"),r.default.createElement(s.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:h}),r.default.createElement(a.default,{items:e.sectionsItems[i],itemProps:p,renderItem:u,renderItemData:l,sectionIndex:i,highlightedItemIndex:f===i?g:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:d,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,o=n.id,i=n.renderItem,u=n.renderItemData,s=n.highlightedSectionIndex,l=n.highlightedItemIndex,c=n.itemProps;return r.default.createElement(a.default,{items:e,itemProps:c,renderItem:i,renderItemData:u,highlightedItemIndex:null===s?l:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-".concat(o,"-")})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,o=t.multiSection,i=t.renderInputComponent,u=t.renderItemsContainer,s=t.highlightedSectionIndex,a=t.highlightedItemIndex,l=this.state.isInputFocused,c=o?this.renderSections():this.renderItems(),f=null!==c,p=this.getItemId(s,a),d="react-autowhatever-".concat(n),h=g({role:"combobox","aria-haspopup":"listbox","aria-owns":d,"aria-expanded":f},e("react-autowhatever-".concat(n,"-container"),"container",f&&"containerOpen"),{},this.props.containerProps),m=i(g({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":d,"aria-activedescendant":p},e("react-autowhatever-".concat(n,"-input"),"input",f&&"inputOpen",l&&"inputFocused"),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),y=u({containerProps:g({id:d,role:"listbox"},e("react-autowhatever-".concat(n,"-items-container"),"itemsContainer",f&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:c});return r.default.createElement("div",h,m,y)}}])&&h(t.prototype,n),c}(r.Component);t.default=w,v(w,"propTypes",{id:o.default.string,multiSection:o.default.bool,renderInputComponent:o.default.func,renderItemsContainer:o.default.func,items:o.default.array.isRequired,renderItem:o.default.func,renderItemData:o.default.object,renderSectionTitle:o.default.func,getSectionItems:o.default.func,containerProps:o.default.object,inputProps:o.default.object,itemProps:o.default.oneOfType([o.default.object,o.default.func]),highlightedSectionIndex:o.default.number,highlightedItemIndex:o.default.number,theme:o.default.oneOfType([o.default.object,o.default.array])}),v(w,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:function(e){return r.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:S,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:S,inputProps:S,itemProps:S,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}})},57824:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=u(n(60216)),i=u(n(30745));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(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,r.key,r)}}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!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}}),t&&d(e,t)}(s,e);var t,n,o,u=(o=s,function(){var e,t=p(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?g(e):t}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(g(e=u.call.apply(u,[this].concat(n))),"storeItemReference",(function(t){null!==t&&(e.item=t)})),h(g(e),"onMouseEnter",(function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseEnter(t,{sectionIndex:r,itemIndex:o})})),h(g(e),"onMouseLeave",(function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseLeave(t,{sectionIndex:r,itemIndex:o})})),h(g(e),"onMouseDown",(function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseDown(t,{sectionIndex:r,itemIndex:o})})),h(g(e),"onClick",(function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onClick(t,{sectionIndex:r,itemIndex:o})})),e}return t=s,n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,i=e.renderItemData,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete u.sectionIndex,delete u.itemIndex,"function"==typeof u.onMouseEnter&&(u.onMouseEnter=this.onMouseEnter),"function"==typeof u.onMouseLeave&&(u.onMouseLeave=this.onMouseLeave),"function"==typeof u.onMouseDown&&(u.onMouseDown=this.onMouseDown),"function"==typeof u.onClick&&(u.onClick=this.onClick),r.default.createElement("li",l({role:"option"},u,{ref:this.storeItemReference}),o(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({isHighlighted:t},i)))}}],n&&f(t.prototype,n),s}(r.Component);t.default=m,h(m,"propTypes",{sectionIndex:o.default.number,isHighlighted:o.default.bool.isRequired,itemIndex:o.default.number.isRequired,item:o.default.any.isRequired,renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,onMouseEnter:o.default.func,onMouseLeave:o.default.func,onMouseDown:o.default.func,onClick:o.default.func})},57331:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=s(n(60216)),i=s(n(57824)),u=s(n(30745));function s(e){return e&&e.__esModule?e:{default:e}}function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}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(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(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,r.key,r)}}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!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}}),t&&h(e,t)}(a,e);var t,n,o,s=(o=a,function(){var e,t=d(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?p(e):t}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(p(e=s.call.apply(s,[this].concat(n))),"storeHighlightedItemReference",(function(t){e.props.onHighlightedItemChange(null===t?null:t.item)})),e}return t=a,n=[{key:"shouldComponentUpdate",value:function(e){return(0,u.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,o=t.itemProps,u=t.renderItem,s=t.renderItemData,a=t.sectionIndex,l=t.highlightedItemIndex,g=t.getItemId,p=t.theme,d=t.keyPrefix,h=null===a?d:"".concat(d,"section-").concat(a,"-"),y="function"==typeof o;return r.default.createElement("ul",c({role:"listbox"},p("".concat(h,"items-list"),"itemsList")),n.map((function(t,n){var d=0===n,b=n===l,v="".concat(h,"item-").concat(n),S=y?o({sectionIndex:a,itemIndex:n}):o,w=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:g(a,n),"aria-selected":b},p(v,"item",d&&"itemFirst",b&&"itemHighlighted"),{},S);return b&&(w.ref=e.storeHighlightedItemReference),r.default.createElement(i.default,c({},w,{sectionIndex:a,isHighlighted:b,itemIndex:n,item:t,renderItem:u,renderItemData:s}))})))}}],n&&g(t.prototype,n),a}(r.Component);t.default=y,m(y,"propTypes",{items:o.default.array.isRequired,itemProps:o.default.oneOfType([o.default.object,o.default.func]),renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,sectionIndex:o.default.number,highlightedItemIndex:o.default.number,onHighlightedItemChange:o.default.func.isRequired,getItemId:o.default.func.isRequired,theme:o.default.func.isRequired,keyPrefix:o.default.string.isRequired}),m(y,"defaultProps",{sectionIndex:null})},16054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=u(n(60216)),i=u(n(30745));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(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,r.key,r)}}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}var g,p,d,h=function(e){!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}}),t&&f(e,t)}(s,e);var t,n,o,u=(o=s,function(){var e,t=c(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),u.apply(this,arguments)}return t=s,(n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,o=e.theme,i=e.sectionKeyPrefix,u=n(t);return u?r.default.createElement("div",o("".concat(i,"title"),"sectionTitle"),u):null}}])&&l(t.prototype,n),s}(r.Component);t.default=h,g=h,p="propTypes",d={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},p in g?Object.defineProperty(g,p,{value:d,enumerable:!0,configurable:!0,writable:!0}):g[p]=d},30745:function(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!0;var u,s,a={};for(u=0,s=r.length;u<s;u++)a[r[u]]=!0;for(u=0,s=o.length;u<s;u++){var l=o[u],c=e[l],f=t[l];if(c!==f){if(!a[l]||null===c||null===f||"object"!==n(c)||"object"!==n(f))return!0;var g=Object.keys(c),p=Object.keys(f);if(g.length!==p.length)return!0;for(var d=0,h=g.length;d<h;d++){var m=g[d];if(c[m]!==f[m])return!0}}}return!1}},8952:function(e,t,n){"use strict";e.exports=n(51541).default},42662:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToAutowhateverTheme=t.defaultTheme=void 0,t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},97818:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o,i=(o=n(91565))&&o.__esModule?o:{default:o},u=function(e){return e};t.default=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(Array.isArray(e)&&2===e.length?e:[e,null],2),n=t[0],o=t[1];return function(e){for(var t=arguments.length,s=Array(t>1?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];var l=s.map((function(e){return n[e]})).filter(u);return"string"==typeof l[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,r(l)):l.join(" ")}:{key:e,style:i.default.apply(void 0,[{}].concat(r(l)))}}},e.exports=t.default},91565:function(e){"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter((function(n){return t.call(e,n)}))}e.exports=Object.assign||function(e,t){for(var r,o,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){r=arguments[u],o=n(Object(r));for(var s=0;s<o.length;s++)i[o[s]]=r[o[s]]}return i}},91661:function(e){"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function o(e){var o=t(e,2),i=o[0],u=o[1];return r?null===u||u===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,u+1]:0===n||u===n-1?[null,null]:null===u?[null,0]:[null,u+1]}return{next:o,prev:function(e){var o=t(e,2),i=o[0],u=o[1];return r?null===u||0===u?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,u-1]:0===n||0===u?[null,null]:null===u?[null,n-1]:[null,u-1]},isLast:function(e){return null===o(e)[1]}}}},19897:function(e){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},76198:function(e,t,n){"use strict";n.d(t,{O9:function(){return s},_8:function(){return i},yd:function(){return u}});class r{constructor(e){const{length:t,separator:n,dictionaries:r,style:o,seed:i}=e;this.dictionaries=r,this.separator=n,this.length=t,this.style=o,this.seed=i}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.\nLength provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);return this.dictionaries.slice(0,this.length).reduce(((e,t)=>{let n=t[Math.floor((this.seed?(r=this.seed,(e=>{e=1831565813+(e|=0)|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296})(r)):Math.random())*t.length)]||"";var r;if("lowerCase"===this.style)n=n.toLowerCase();else if("capital"===this.style){const[e,...t]=n.split("");n=e.toUpperCase()+t.join("")}else"upperCase"===this.style&&(n=n.toUpperCase());return e?`${e}${this.separator}${n}`:`${n}`}),"")}}const o={separator:"_",dictionaries:[]},i=e=>{const t=[...e&&e.dictionaries||o.dictionaries],n={...o,...e,length:e&&e.length||t.length,dictionaries:t};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new r(n).generate()};var u=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],s=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"]},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([[2998],{72998:function(e,n,t){"use strict";t.d(n,{J:function(){return Q}});var o=t(48088),i=t(57857),s=t(31647),r=t(17391),a=t(29625),l=t(48726),u=t(99844),c=t(36022),p=t(57098),d=t(93569),h=t(40622),f=t(99249),m=t(63791),b=t(10101),g=t(88172),y=t(7190),v=t(73519),k=t.n(v),w=t(48242),E=t.n(w),S={button:"pEi0b",svg:"Hg4El",disabled:"q5qSy",seasonContainer:"KfwZK"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function C(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function T(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,N(o.key),o)}}function I(e,n,t){return n&&T(e.prototype,n),t&&T(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e){var n=function(e){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=O(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(n)?n:n+""}function P(e,n,t){return n=R(n),function(e,n){if(n&&("object"==O(n)||"function"==typeof n))return n;if(void 0!==n)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,x()?Reflect.construct(n,t||[],R(e).constructor):n.apply(e,t))}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function j(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&_(e,n)}function _(e,n){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},_(e,n)}var B=function(e){function n(e){var t;return C(this,n),(t=P(this,n,[e])).showSpinner=!1,t.disableBtn=!0,t}return j(n,e),I(n,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"CreateSeasonComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"px-2"}},{key:"bindings",get:function(){return{"[name=number]":{observe:"number",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{button:{el:".button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:b.Bp},{behaviorClass:b.fS}]}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change",this.onChange),this.listenTo(this.options.channelName,"create:season",this.onCreateSeason),this.listenTo(p.Vk.SERIES,"".concat(p.M_.CREATE_SEASON,":").concat(this.options.seriesId,":sync"),this.onSync)}},{key:"onChange",value:function(){this.disableBtn=!this.model.isValid(),this.renderButton()}},{key:"onCreateSeason",value:function(){this.disableBtn||(this.model.validate(),this.model.isValid()&&(this.showSpinner=!0,this.renderButton(),this.model.set("number",parseInt(this.model.get("number"))),o.Radio.channel(this.options.channelName).trigger("select:season",this.model.toJSON())))}},{key:"onSync",value:function(){this.disableBtn=!0,this.showSpinner=!1,this.model.clear(),this.renderButton()}},{key:"viewOptions",value:function(){return{model:this.model,show:this.options.show}}},{key:"renderButton",value:function(){this.options.show&&this.showChildView("button",new g.Py({channelName:this.options.channelName,saveEvent:"create:season",extraButtonClass:"btn btn-dark",buttonText:"Create",buttonType:"submit",showSpinner:this.showSpinner,disabled:this.disableBtn,spinnerOptions:{size:d.Ey.Small}}))}},{key:"onRender",value:function(){this.stickit(),this.renderButton()}},{key:"onClose",value:function(){this.unstickit()}}])}(s.Q.wA),D=function(e){function n(e){return C(this,n),P(this,n,[e])}return j(n,e),I(n,[{key:"initialize",value:function(){this.model.get("season.id")&&d.yV.setSelected(this.model.get("season.id"),this.collection),this.viewModel=f.r.get("".concat(this.name,":").concat(this.model.get("id"))),this.options.disabled||this.viewModel.addValidation(y.c6)}},{key:"name",get:function(){return"EditSeasonInfoComponent"}},{key:"template",get:function(){return E()}},{key:"className",get:function(){return S.seasonContainer}},{key:"lang",get:function(){return"shared.editSeasonInfo"}},{key:"events",value:function(){return{"click .dropdown-btn":"onToggleDropdown","click .dropdown-menu":"onClickPopover","click .create":"onClickCreateNewSeason","change .form-select":"onSelectOption","click .remove":"onClickRemove"}}},{key:"elements",get:function(){return{dropdownBtn:".dropdown-btn"}}},{key:"regions",value:function(){return{create:{el:".create-region",replaceElement:!0}}}},{key:"onToggleDropdown",value:function(e){this.options.disabled?e.stopPropagation():this.renderCreate()}},{key:"onClickPopover",value:function(e){e.stopPropagation()}},{key:"onClickCreateNewSeason",value:function(e){e.preventDefault(),this.showCreateForm=!0,this.renderCreate()}},{key:"onSelectOption",value:function(e){var n=e.target.value,t="-1"===n?null:this.collection.findWhere({number:+n}).toJSON();this.setButtonText(n),o.Radio.channel(this.options.channelName).trigger("select:season",t),this.showCreateForm=!1,this.render()}},{key:"onClickRemove",value:function(e){e.stopPropagation(),o.Radio.channel(this.options.channelName).trigger("select:season",null),this.showCreateForm=!1,this.render()}},{key:"setButtonText",value:function(e){if(this.options.isSuggestEdit){var n=e&&"-1"!==e?i.T.getPhrase(this.lang,"season",{number:e}):"";n&&this.getUI("dropdownBtn").text(n)}else{var t=e&&"-1"!==e?"season":"placeholder";this.getUI("dropdownBtn").text(i.T.getPhrase(this.lang,t,{number:e}))}}},{key:"renderCreate",value:function(){this.showChildView("create",new B({model:this.viewModel,channelName:this.options.channelName,show:this.showCreateForm,seriesId:this.model.get("series.id")}))}},{key:"viewOptions",value:function(){return{styles:S,disabled:this.options.disabled,seasons:this.collection.toJSON(),svgRemove:m.Nj.getSvg(m.vn.Close),showRemoveIcon:!!this.model.get("season.id")&&!this.options.isSuggestEdit}}},{key:"onRender",value:function(){this.renderCreate(),this.setButtonText(this.model.get("season.number"))}}])}(s.Q.wA),A=t(37571),V=t.n(A),M=t(45092);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 F(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,L(o.key),o)}}function L(e){var n=function(e){if("object"!=U(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=U(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(n)?n:n+""}function G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(G=function(){return!!e})()}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}function q(e,n){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},q(e,n)}var Q=function(e){function n(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n,t){return n=J(n),function(e,n){if(n&&("object"==U(n)||"function"==typeof n))return n;if(void 0!==n)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(n,t||[],J(e).constructor):n.apply(e,t))}(this,n,[e])}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&q(e,n)}(n,e),t=n,f=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"select:season",this.onSelectSeason),this.listenTo(this.options.channelName,"clear:series",this.onSeriesChange),this.listenTo(this.model,"change:series",this.onSeriesChange),this.lockSeasonAndEpisode=!this.options.editable||!this.model.get("series.id")}},{key:"name",get:function(){return"EditBasicInfoComponent"}},{key:"tagName",get:function(){return"form"}},{key:"template",get:function(){return V()}},{key:"lang",get:function(){return"shared.editBasicInfo"}},{key:"channelName",get:function(){return this.options.channelName}},{key:"className",get:function(){return"edit-basic-info"}},{key:"events",value:function(){return{submit:function(e){return e.preventDefault()}}}},{key:"elements",get:function(){return{episodeNumberField:".episode-number",seriesTypeahead:".tt-input"}}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},ratings:{el:".ratings-region",replaceElement:!0},series:{el:".edit-series-region",replaceElement:!0},season:{el:".edit-season-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".suggest-title":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")],params:{metadata:h.pG.VideoTitle}},".suggest-description":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")],params:{metadata:h.pG.Description}},".suggest-series-title":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.SeriesTitle}},".suggest-season-number":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.Season}},".suggest-episode-number":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.EpisodeNumber}}}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=description]":{observe:"description",setOptions:{validate:!0}},"[name=episodeNumber]":{observe:"episodeNumber",setOptions:{validate:!0},onSet:function(e){return e?+e:null}}}}},{key:"onSelectSeason",value:function(e){e&&this.getUI("episodeNumberField").focus(),o.Radio.channel(this.options.channelName).trigger("add:season",e)}},{key:"onSeriesChange",value:function(e){this.lockSeasonAndEpisode=!e||!e.get("id"),this.renderEditSeason();var n=this.getUI("episodeNumberField");this.lockSeasonAndEpisode?(n.attr("disabled","disabled"),n.attr("class","form-control ".concat(M.Z.disabled))):(n.removeAttr("disabled"),n.attr("class","form-control"))}},{key:"getTypeaheadConfigs",value:function(){var e=d.MK.getTypeaheadConfig(),n=d.MK.getBloodhoundConfig(),t={filterEmptySeries:!1},o=Object.assign({hideEmptyResults:!0},t),i=Object.assign({newType:p.n8.Series},t),s=Object.assign({newType:p.n8.Series,footerTemplate:r.J.getConfirmSelectionTemplate()},t);return[{name:p.n8.Series,typeaheadConfig:e,bloodhoundConfig:n,options:o},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:n,options:i},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:n,options:s}]}},{key:"renderSeriesTypeahead",value:function(){if(d.M2.isVideo(this.model)){var e=this.model.series||new s.Q.Hn;this.showChildView("series",new c.M({model:e,editable:this.options.editable,parentChannelName:this.options.channelName,inputId:"series-search",selectEvent:"select:series",placeholderText:this.options.editable?i.T.getPhrase(this.lang,"searchSeries"):"",typeaheadConfigs:this.getTypeaheadConfigs(),typeaheadOptions:{hint:!1},callbacks:{onRender:r.J.selectFirstResult,onInput:r.J.emitEventOnInput(this.options.channelName,h.NT.DetectInput,"series"),onBlur:r.J.resetAssociationOnBlur(e.toJSON())},removeEvent:"remove:series"}))}}},{key:"renderEditSeason",value:function(){var e=this;if(d.M2.isVideo(this.model)){var n=this.model.get("series.seasons")||new a.i,t=new a.i(n.map((function(n){return n.set("displayName",i.T.getPhrase(e.lang,"seasonNumber",{number:n.get("number")}))})));this.showChildView("season",new D({model:this.model,collection:t,channelName:this.options.channelName,disabled:!this.options.editable||this.lockSeasonAndEpisode,isSuggestEdit:!this.options.editable}))}}},{key:"renderDescription",value:function(){this.showChildView("description",new u.F({name:"description",class:"form-control ".concat(!this.options.editable&&M.Z.disabled),placeholder:this.options.editable?i.T.getPhrase(this.lang,"descriptionPlaceholder"):"",id:"edit-description",disabled:!this.options.editable}))}},{key:"renderRatings",value:function(){d.M2.isVideo(this.model)&&this.showChildView("ratings",new l.R({model:this.model.rating,collection:this.options.ratings,parentChannelName:this.options.channelName,editable:this.options.editable,videoId:this.model.get("id")}))}},{key:"viewOptions",value:function(){return{styles:M.Z,requiredFields:this.options.requiredFields,videoTitlePlaceholder:this.options.editable?i.T.getPhrase(this.lang,"titlePlaceholder"):"",editable:this.options.editable,showingSaveButton:this.options.showingSaveButton,lockEpisodeNumber:this.lockSeasonAndEpisode,episodeNumberPlaceholderText:this.options.editable?i.T.getPhrase(this.lang,"epNumberPlaceholder"):""}}},{key:"onRender",value:function(){this.renderDescription(),this.renderRatings(),this.renderSeriesTypeahead(),this.renderEditSeason(),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}],f&&F(t.prototype,f),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,f}(s.Q.wA)},99844:function(e,n,t){"use strict";t.d(n,{F:function(){return f}});var o=t(39479),i=t(31647),s=t(64154),r=t.n(s),a={resizingTextarea:"hJmNl"};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 u(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,c(o.key),o)}}function c(e){var n=function(e){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=l(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(n)?n:n+""}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,n){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},h(e,n)}var f=function(e){function n(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n,t){return n=d(n),function(e,n){if(n&&("object"==l(n)||"function"==typeof n))return n;if(void 0!==n)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,p()?Reflect.construct(n,t||[],d(e).constructor):n.apply(e,t))}(this,n,[e])}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&h(e,n)}(n,e),t=n,(i=[{key:"name",get:function(){return"ResizingTextAreaComponent"}},{key:"template",get:function(){return r()}},{key:"events",value:function(){return{"input .event-selector":"onInput"}}},{key:"onInput",value:function(e){var n=e.target;n.style.height="inherit";var t=window.getComputedStyle(n),o=parseInt(t.getPropertyValue("border-top-width"),10)+parseInt(t.getPropertyValue("padding-top"),10)+n.scrollHeight+parseInt(t.getPropertyValue("padding-bottom"),10)+parseInt(t.getPropertyValue("border-bottom-width"),10);n.style.height=o+"px"}},{key:"viewOptions",value:function(){return o.extend({},this.options,{styles:a})}}])&&u(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}(i.Q.wA)},36022:function(e,n,t){"use strict";t.d(n,{M:function(){return v}});var o=t(48088),i=t(39479),s=t(11306),r=t(31647),a=t(17391),l=t(63791),u=t(93569),c=t(94407),p=t.n(c),d={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};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,n){for(var t=0;t<n.length;t++){var o=n[t];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 n=function(e){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=h(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(n)?n:n+""}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 y(e,n){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},y(e,n)}var v=function(e){function n(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n,t){return n=g(n),function(e,n){if(n&&("object"==h(n)||"function"==typeof n))return n;if(void 0!==n)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(n,t||[],g(e).constructor):n.apply(e,t))}(this,n,[e])}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&y(e,n)}(n,e),t=n,c=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(d.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||r.Q.Ry.throw(new s.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new r.Q.Hn),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,n,t;return e={},n="[name=".concat(this.options.inputName,"]"),t={observe:this.options.stickItProperty,setOptions:{validate:!0}},(n=m(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,n){var t;e.preventDefault(),t="string"==typeof n?n:n.title||n.name||n.query,this.model.set(this.options.stickItProperty,t),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,n),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var n=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){n.model.clear(),n.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return i.isArray(this.options.typeaheadConfigs)?a.J.getSearchSources(this.options.typeaheadConfigs):a.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?i.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return i.isObject(this.options.actionOptions)?i.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){i.isObject(this.options.callbacks)&&(i.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",i.bind(this.options.callbacks.onRender,this)),i.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),i.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",i.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",i.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:d},this.options),{showRemove:this.shouldShowRemove(),svgRemove:l.Nj.getSvg(l.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}],c&&f(t.prototype,c),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,c}(r.Q.wA)},37571:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return"d-inline-block"},3:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.programTitle:s,n))},5:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,'<span class="'+e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.requiredStar:s,n))+'">*</span>'},7:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-title">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},9:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},11:function(e,n,t,o,i){return"disabled"},13:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="row">\n <div class="form-group col-6 p-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-title">'+l((t.lang||n&&n.lang||a).call(r,"series",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="edit-series-region"></div>\n <div class="form-feedback"></div>\n </div>\n <div class="form-group col-3 pe-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(18,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-season-number">'+l((t.lang||n&&n.lang||a).call(r,"season",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(20,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="edit-season-region"></div>\n <div class="form-feedback"></div>\n </div>\n <div class="form-group col-3 pe-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-episode-number">'+l((t.lang||n&&n.lang||a).call(r,"episode",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(24,i,0),inverse:e.noop,data:i}))?s:"")+'\n <input\n name="episodeNumber"\n type="number"\n class="form-control episode-number '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.lockEpisodeNumber:s,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?s:"")+'"\n id="edit-episode-number"\n placeholder="'+l(e.lambda(null!=(s=null!=n?n.options:n)?s.episodeNumberPlaceholderText:s,n))+'"\n autocomplete="off"\n min="1"\n '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.lockEpisodeNumber:s,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?s:"")+'\n >\n <div class="form-feedback"></div>\n </div>\n </div>\n'},14:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.seriesTitle:s,n))},16:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-series-title">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},18:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.seasonNumber:s,n))},20:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-season-number">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},22:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.episodeNumber:s,n))},24:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-episode-number">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},26:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.description:s,n))},28:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-description">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return'<div class="position-relative '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.showingSaveButton:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <h5 class="d-inline-block">'+l((t.lang||n&&n.lang||a).call(r,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n</div>\n<div class="form-group '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-title">'+l((t.lang||n&&n.lang||a).call(r,"title",{name:"lang",hash:{},data:i}))+(null!=(s=t.if.call(r,null!=(s=null!=(s=null!=n?n.options:n)?s.requiredFields:s)?s.programTitle:s,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?s:"")+'\n <input\n name="name"\n type="text"\n class="form-control '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?s:"")+'"\n placeholder="'+l((t.lang||n&&n.lang||a).call(r,"titlePlaceholder",{name:"lang",hash:{},data:i}))+'"\n id="edit-title"\n autocomplete="off"\n '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?s:"")+'\n >\n <div class="form-feedback"></div>\n</div>\n<div class="container-fluid">\n'+(null!=(s=t.if.call(r,null!=n?n.series:n,{name:"if",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))?s:"")+'</div>\n<div class="form-group '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(26,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-description">'+l((t.lang||n&&n.lang||a).call(r,"description",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(28,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="description-region"></div>\n <div class="form-feedback"></div>\n</div>\n<div class="ratings-region"></div>\n'},useData:!0})},73519:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return'<div class="">\n <button class="btn btn-outline-dark create w-100">+ Create a season</button>\n</div>\n'},3:function(e,n,t,o,i){return'<div class="form-group mb-2">\n <input type="number" class="form-control" name="number" min="1" placeholder="Season number">\n <div class="form-feedback"></div>\n</div>\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,(null!=(s=t.unless.call(null!=n?n:e.nullContext||{},null!=(s=null!=n?n.options:n)?s.show:s,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?s:"")+'<div class="text-end">\n <div class="button-region"></div>\n</div>'},useData:!0})},48242:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},3:function(e,n,t,o,i){return"disabled"},5:function(e,n,t,o,i){return"selected"},7:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,a=e.escapeExpression;return' <option value="'+a(r(null!=n?n.number:n,n))+'" '+(null!=(s=t.if.call(null!=n?n:e.nullContext||{},null!=n?n.selected:n,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+">"+a(r(null!=n?n.displayName:n,n))+"</option>\n"},9:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda;return'<span class="svg-container mb-2 '+e.escapeExpression(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.svg:s,n))+' remove">'+(null!=(s=r(null!=(s=null!=n?n.options:n)?s.svgRemove:s,n))?s:"")+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression,a=null!=n?n:e.nullContext||{};return'<div\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n class="cursor-pointer w-100 dropdown-btn btn btn-link '+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.button:s,n))+" "+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.disabled:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+'"\n name="season"\n '+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.disabled:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+'\n> </div>\n<div class="dropdown-menu dropdown-menu-end dropdown-arrow w-100">\n <div class="text-center px-2">\n <select name="season" class="form-select">\n <option value="-1" '+(null!=(s=t.unless.call(a,null!=(s=null!=n?n.options:n)?s.hasSelected:s,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+">"+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(a,"selectASeason",{name:"lang",hash:{},data:i}))+"</option>\n"+(null!=(s=t.each.call(a,null!=(s=null!=n?n.options:n)?s.seasons:s,{name:"each",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?s:"")+' </select>\n </div>\n\n <div class="dropdown-divider"></div>\n\n <div class="create-region"></div>\n</div>\n'+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.showRemoveIcon:s,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?s:"")},useData:!0})},64154:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return"required"},3:function(e,n,t,o,i){return"readonly"},5:function(e,n,t,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,a=e.escapeExpression,l=null!=n?n:e.nullContext||{};return'<textarea\n name="'+a(r(null!=(s=null!=n?n.options:n)?s.name:s,n))+'"\n id="'+a(r(null!=(s=null!=n?n.options:n)?s.id:s,n))+'"\n autocomplete="false"\n class="'+a(r(null!=(s=null!=n?n.options:n)?s.class:s,n))+" event-selector "+a(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.resizingTextarea:s,n))+'"\n placeholder="'+a(r(null!=(s=null!=n?n.options:n)?s.placeholder:s,n))+'"\n '+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.required:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.readonly:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.disabled:s,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+"\n></textarea>"},useData:!0})},94407:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},3:function(e,n,t,o,i){return"autofocus"},5:function(e,n,t,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,a=e.escapeExpression,l=null!=n?n:e.nullContext||{};return'<input\n name="'+a(r(null!=(s=null!=n?n.options:n)?s.inputName:s,n))+'"\n type="text"\n class="form-control '+(null!=(s=t.unless.call(l,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+" "+a(r(null!=(s=null!=n?n.options:n)?s.additionalClasses:s,n))+'"\n id="'+a(r(null!=(s=null!=n?n.options:n)?s.inputId:s,n))+'"\n autocomplete="off"\n placeholder="'+a(r(null!=(s=null!=n?n.options:n)?s.placeholderText:s,n))+'"\n '+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.autofocus:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.unless.call(l,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+'\n></input>\n<span class="svg-container mb-2 '+a(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.svg:s,n))+' remove" style="display: none;">'+(null!=(s=r(null!=(s=null!=n?n.options:n)?s.svgRemove:s,n))?s:"")+"</span>"},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2035],{32035:function(e,n,t){"use strict";t.d(n,{J:function(){return Q}});var o=t(43823),i=t(57857),s=t(31647),r=t(62312),a=t(29625),l=t(99620),u=t(72059),c=t(52808),p=t(45390),d=t(93569),h=t(40622),f=t(99249),m=t(85475),b=t(10101),g=t(88172),y=t(7190),v=t(73519),k=t.n(v),w=t(48242),E=t.n(w),S={button:"pEi0b",svg:"Hg4El",disabled:"q5qSy",seasonContainer:"KfwZK"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function C(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function T(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,N(o.key),o)}}function I(e,n,t){return n&&T(e.prototype,n),t&&T(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e){var n=function(e){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=O(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(n)?n:n+""}function P(e,n,t){return n=R(n),function(e,n){if(n&&("object"==O(n)||"function"==typeof n))return n;if(void 0!==n)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,x()?Reflect.construct(n,t||[],R(e).constructor):n.apply(e,t))}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function j(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&_(e,n)}function _(e,n){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},_(e,n)}var B=function(e){function n(e){var t;return C(this,n),(t=P(this,n,[e])).showSpinner=!1,t.disableBtn=!0,t}return j(n,e),I(n,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"CreateSeasonComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"px-2"}},{key:"bindings",get:function(){return{"[name=number]":{observe:"number",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{button:{el:".button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:b.Bp},{behaviorClass:b.fS}]}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change",this.onChange),this.listenTo(this.options.channelName,"create:season",this.onCreateSeason),this.listenTo(p.Vk.SERIES,"".concat(p.M_.CREATE_SEASON,":").concat(this.options.seriesId,":sync"),this.onSync)}},{key:"onChange",value:function(){this.disableBtn=!this.model.isValid(),this.renderButton()}},{key:"onCreateSeason",value:function(){this.disableBtn||(this.model.validate(),this.model.isValid()&&(this.showSpinner=!0,this.renderButton(),this.model.set("number",parseInt(this.model.get("number"))),o.Radio.channel(this.options.channelName).trigger("select:season",this.model.toJSON())))}},{key:"onSync",value:function(){this.disableBtn=!0,this.showSpinner=!1,this.model.clear(),this.renderButton()}},{key:"viewOptions",value:function(){return{model:this.model,show:this.options.show}}},{key:"renderButton",value:function(){this.options.show&&this.showChildView("button",new g.Py({channelName:this.options.channelName,saveEvent:"create:season",extraButtonClass:"btn btn-dark",buttonText:"Create",buttonType:"submit",showSpinner:this.showSpinner,disabled:this.disableBtn,spinnerOptions:{size:d.Ey.Small}}))}},{key:"onRender",value:function(){this.stickit(),this.renderButton()}},{key:"onClose",value:function(){this.unstickit()}}])}(s.Q.wA),D=function(e){function n(e){return C(this,n),P(this,n,[e])}return j(n,e),I(n,[{key:"initialize",value:function(){this.model.get("season.id")&&d.yV.setSelected(this.model.get("season.id"),this.collection),this.viewModel=f.r.get("".concat(this.name,":").concat(this.model.get("id"))),this.options.disabled||this.viewModel.addValidation(y.c6)}},{key:"name",get:function(){return"EditSeasonInfoComponent"}},{key:"template",get:function(){return E()}},{key:"className",get:function(){return S.seasonContainer}},{key:"lang",get:function(){return"shared.editSeasonInfo"}},{key:"events",value:function(){return{"click .dropdown-btn":"onToggleDropdown","click .dropdown-menu":"onClickPopover","click .create":"onClickCreateNewSeason","change .form-select":"onSelectOption","click .remove":"onClickRemove"}}},{key:"elements",get:function(){return{dropdownBtn:".dropdown-btn"}}},{key:"regions",value:function(){return{create:{el:".create-region",replaceElement:!0}}}},{key:"onToggleDropdown",value:function(e){this.options.disabled?e.stopPropagation():this.renderCreate()}},{key:"onClickPopover",value:function(e){e.stopPropagation()}},{key:"onClickCreateNewSeason",value:function(e){e.preventDefault(),this.showCreateForm=!0,this.renderCreate()}},{key:"onSelectOption",value:function(e){var n=e.target.value,t="-1"===n?null:this.collection.findWhere({number:+n}).toJSON();this.setButtonText(n),o.Radio.channel(this.options.channelName).trigger("select:season",t),this.showCreateForm=!1,this.render()}},{key:"onClickRemove",value:function(e){e.stopPropagation(),o.Radio.channel(this.options.channelName).trigger("select:season",null),this.showCreateForm=!1,this.render()}},{key:"setButtonText",value:function(e){if(this.options.isSuggestEdit){var n=e&&"-1"!==e?i.T.getPhrase(this.lang,"season",{number:e}):"";n&&this.getUI("dropdownBtn").text(n)}else{var t=e&&"-1"!==e?"season":"placeholder";this.getUI("dropdownBtn").text(i.T.getPhrase(this.lang,t,{number:e}))}}},{key:"renderCreate",value:function(){this.showChildView("create",new B({model:this.viewModel,channelName:this.options.channelName,show:this.showCreateForm,seriesId:this.model.get("series.id")}))}},{key:"viewOptions",value:function(){return{styles:S,disabled:this.options.disabled,seasons:this.collection.toJSON(),svgRemove:m.Nj.getSvg(m.vn.Close),showRemoveIcon:!!this.model.get("season.id")&&!this.options.isSuggestEdit}}},{key:"onRender",value:function(){this.renderCreate(),this.setButtonText(this.model.get("season.number"))}}])}(s.Q.wA),A=t(37571),V=t.n(A),M=t(45289);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 F(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,L(o.key),o)}}function L(e){var n=function(e){if("object"!=U(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=U(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(n)?n:n+""}function G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(G=function(){return!!e})()}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}function q(e,n){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},q(e,n)}var Q=function(e){function n(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n,t){return n=J(n),function(e,n){if(n&&("object"==U(n)||"function"==typeof n))return n;if(void 0!==n)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(n,t||[],J(e).constructor):n.apply(e,t))}(this,n,[e])}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&q(e,n)}(n,e),t=n,f=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"select:season",this.onSelectSeason),this.listenTo(this.options.channelName,"clear:series",this.onSeriesChange),this.listenTo(this.model,"change:series",this.onSeriesChange),this.lockSeasonAndEpisode=!this.options.editable||!this.model.get("series.id")}},{key:"name",get:function(){return"EditBasicInfoComponent"}},{key:"tagName",get:function(){return"form"}},{key:"template",get:function(){return V()}},{key:"lang",get:function(){return"shared.editBasicInfo"}},{key:"channelName",get:function(){return this.options.channelName}},{key:"className",get:function(){return"edit-basic-info"}},{key:"events",value:function(){return{submit:function(e){return e.preventDefault()}}}},{key:"elements",get:function(){return{episodeNumberField:".episode-number",seriesTypeahead:".tt-input"}}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},ratings:{el:".ratings-region",replaceElement:!0},series:{el:".edit-series-region",replaceElement:!0},season:{el:".edit-season-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".suggest-title":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")],params:{metadata:h.pG.VideoTitle}},".suggest-description":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")],params:{metadata:h.pG.Description}},".suggest-series-title":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.SeriesTitle}},".suggest-season-number":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.Season}},".suggest-episode-number":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.EpisodeNumber}}}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=description]":{observe:"description",setOptions:{validate:!0}},"[name=episodeNumber]":{observe:"episodeNumber",setOptions:{validate:!0},onSet:function(e){return e?+e:null}}}}},{key:"onSelectSeason",value:function(e){e&&this.getUI("episodeNumberField").focus(),o.Radio.channel(this.options.channelName).trigger("add:season",e)}},{key:"onSeriesChange",value:function(e){this.lockSeasonAndEpisode=!e||!e.get("id"),this.renderEditSeason();var n=this.getUI("episodeNumberField");this.lockSeasonAndEpisode?(n.attr("disabled","disabled"),n.attr("class","form-control ".concat(M.Z.disabled))):(n.removeAttr("disabled"),n.attr("class","form-control"))}},{key:"getTypeaheadConfigs",value:function(){var e=d.MK.getTypeaheadConfig(),n=d.MK.getBloodhoundConfig(),t={filterEmptySeries:!1},o=Object.assign({hideEmptyResults:!0},t),i=Object.assign({newType:p.n8.Series},t),s=Object.assign({newType:p.n8.Series,footerTemplate:r.J.getConfirmSelectionTemplate()},t);return[{name:p.n8.Series,typeaheadConfig:e,bloodhoundConfig:n,options:o},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:n,options:i},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:n,options:s}]}},{key:"renderSeriesTypeahead",value:function(){if(d.M2.isVideo(this.model)){var e=this.model.series||new s.Q.Hn;this.showChildView("series",new c.M({model:e,editable:this.options.editable,parentChannelName:this.options.channelName,inputId:"series-search",selectEvent:"select:series",placeholderText:this.options.editable?i.T.getPhrase(this.lang,"searchSeries"):"",typeaheadConfigs:this.getTypeaheadConfigs(),typeaheadOptions:{hint:!1},callbacks:{onRender:r.J.selectFirstResult,onInput:r.J.emitEventOnInput(this.options.channelName,h.NT.DetectInput,"series"),onBlur:r.J.resetAssociationOnBlur(e.toJSON())},removeEvent:"remove:series"}))}}},{key:"renderEditSeason",value:function(){var e=this;if(d.M2.isVideo(this.model)){var n=this.model.get("series.seasons")||new a.i,t=new a.i(n.map((function(n){return n.set("displayName",i.T.getPhrase(e.lang,"seasonNumber",{number:n.get("number")}))})));this.showChildView("season",new D({model:this.model,collection:t,channelName:this.options.channelName,disabled:!this.options.editable||this.lockSeasonAndEpisode,isSuggestEdit:!this.options.editable}))}}},{key:"renderDescription",value:function(){this.showChildView("description",new u.F({name:"description",class:"form-control ".concat(!this.options.editable&&M.Z.disabled),placeholder:this.options.editable?i.T.getPhrase(this.lang,"descriptionPlaceholder"):"",id:"edit-description",disabled:!this.options.editable}))}},{key:"renderRatings",value:function(){d.M2.isVideo(this.model)&&this.showChildView("ratings",new l.R({model:this.model.rating,collection:this.options.ratings,parentChannelName:this.options.channelName,editable:this.options.editable,videoId:this.model.get("id")}))}},{key:"viewOptions",value:function(){return{styles:M.Z,requiredFields:this.options.requiredFields,videoTitlePlaceholder:this.options.editable?i.T.getPhrase(this.lang,"titlePlaceholder"):"",editable:this.options.editable,showingSaveButton:this.options.showingSaveButton,lockEpisodeNumber:this.lockSeasonAndEpisode,episodeNumberPlaceholderText:this.options.editable?i.T.getPhrase(this.lang,"epNumberPlaceholder"):""}}},{key:"onRender",value:function(){this.renderDescription(),this.renderRatings(),this.renderSeriesTypeahead(),this.renderEditSeason(),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}],f&&F(t.prototype,f),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,f}(s.Q.wA)},72059:function(e,n,t){"use strict";t.d(n,{F:function(){return f}});var o=t(21161),i=t(31647),s=t(64154),r=t.n(s),a={resizingTextarea:"hJmNl"};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 u(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,c(o.key),o)}}function c(e){var n=function(e){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=l(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(n)?n:n+""}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,n){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},h(e,n)}var f=function(e){function n(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n,t){return n=d(n),function(e,n){if(n&&("object"==l(n)||"function"==typeof n))return n;if(void 0!==n)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,p()?Reflect.construct(n,t||[],d(e).constructor):n.apply(e,t))}(this,n,[e])}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&h(e,n)}(n,e),t=n,(i=[{key:"name",get:function(){return"ResizingTextAreaComponent"}},{key:"template",get:function(){return r()}},{key:"events",value:function(){return{"input .event-selector":"onInput"}}},{key:"onInput",value:function(e){var n=e.target;n.style.height="inherit";var t=window.getComputedStyle(n),o=parseInt(t.getPropertyValue("border-top-width"),10)+parseInt(t.getPropertyValue("padding-top"),10)+n.scrollHeight+parseInt(t.getPropertyValue("padding-bottom"),10)+parseInt(t.getPropertyValue("border-bottom-width"),10);n.style.height=o+"px"}},{key:"viewOptions",value:function(){return o.extend({},this.options,{styles:a})}}])&&u(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}(i.Q.wA)},52808:function(e,n,t){"use strict";t.d(n,{M:function(){return v}});var o=t(43823),i=t(21161),s=t(11306),r=t(31647),a=t(62312),l=t(85475),u=t(93569),c=t(94407),p=t.n(c),d={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};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,n){for(var t=0;t<n.length;t++){var o=n[t];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 n=function(e){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=h(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(n)?n:n+""}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 y(e,n){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},y(e,n)}var v=function(e){function n(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n,t){return n=g(n),function(e,n){if(n&&("object"==h(n)||"function"==typeof n))return n;if(void 0!==n)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(n,t||[],g(e).constructor):n.apply(e,t))}(this,n,[e])}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&y(e,n)}(n,e),t=n,c=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(d.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||r.Q.Ry.throw(new s.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new r.Q.Hn),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,n,t;return e={},n="[name=".concat(this.options.inputName,"]"),t={observe:this.options.stickItProperty,setOptions:{validate:!0}},(n=m(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,n){var t;e.preventDefault(),t="string"==typeof n?n:n.title||n.name||n.query,this.model.set(this.options.stickItProperty,t),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,n),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var n=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){n.model.clear(),n.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return i.isArray(this.options.typeaheadConfigs)?a.J.getSearchSources(this.options.typeaheadConfigs):a.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?i.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return i.isObject(this.options.actionOptions)?i.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){i.isObject(this.options.callbacks)&&(i.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",i.bind(this.options.callbacks.onRender,this)),i.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),i.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",i.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",i.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:d},this.options),{showRemove:this.shouldShowRemove(),svgRemove:l.Nj.getSvg(l.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}],c&&f(t.prototype,c),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,c}(r.Q.wA)},37571:function(e,n,t){var o=t(31197);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return"d-inline-block"},3:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.programTitle:s,n))},5:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,'<span class="'+e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.requiredStar:s,n))+'">*</span>'},7:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-title">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},9:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},11:function(e,n,t,o,i){return"disabled"},13:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="row">\n <div class="form-group col-6 p-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-title">'+l((t.lang||n&&n.lang||a).call(r,"series",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="edit-series-region"></div>\n <div class="form-feedback"></div>\n </div>\n <div class="form-group col-3 pe-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(18,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-season-number">'+l((t.lang||n&&n.lang||a).call(r,"season",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(20,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="edit-season-region"></div>\n <div class="form-feedback"></div>\n </div>\n <div class="form-group col-3 pe-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-episode-number">'+l((t.lang||n&&n.lang||a).call(r,"episode",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(24,i,0),inverse:e.noop,data:i}))?s:"")+'\n <input\n name="episodeNumber"\n type="number"\n class="form-control episode-number '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.lockEpisodeNumber:s,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?s:"")+'"\n id="edit-episode-number"\n placeholder="'+l(e.lambda(null!=(s=null!=n?n.options:n)?s.episodeNumberPlaceholderText:s,n))+'"\n autocomplete="off"\n min="1"\n '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.lockEpisodeNumber:s,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?s:"")+'\n >\n <div class="form-feedback"></div>\n </div>\n </div>\n'},14:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.seriesTitle:s,n))},16:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-series-title">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},18:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.seasonNumber:s,n))},20:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-season-number">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},22:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.episodeNumber:s,n))},24:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-episode-number">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},26:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.description:s,n))},28:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-description">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return'<div class="position-relative '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.showingSaveButton:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <h5 class="d-inline-block">'+l((t.lang||n&&n.lang||a).call(r,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n</div>\n<div class="form-group '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-title">'+l((t.lang||n&&n.lang||a).call(r,"title",{name:"lang",hash:{},data:i}))+(null!=(s=t.if.call(r,null!=(s=null!=(s=null!=n?n.options:n)?s.requiredFields:s)?s.programTitle:s,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?s:"")+'\n <input\n name="name"\n type="text"\n class="form-control '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?s:"")+'"\n placeholder="'+l((t.lang||n&&n.lang||a).call(r,"titlePlaceholder",{name:"lang",hash:{},data:i}))+'"\n id="edit-title"\n autocomplete="off"\n '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?s:"")+'\n >\n <div class="form-feedback"></div>\n</div>\n<div class="container-fluid">\n'+(null!=(s=t.if.call(r,null!=n?n.series:n,{name:"if",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))?s:"")+'</div>\n<div class="form-group '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(26,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-description">'+l((t.lang||n&&n.lang||a).call(r,"description",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(28,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="description-region"></div>\n <div class="form-feedback"></div>\n</div>\n<div class="ratings-region"></div>\n'},useData:!0})},73519:function(e,n,t){var o=t(31197);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return'<div class="">\n <button class="btn btn-outline-dark create w-100">+ Create a season</button>\n</div>\n'},3:function(e,n,t,o,i){return'<div class="form-group mb-2">\n <input type="number" class="form-control" name="number" min="1" placeholder="Season number">\n <div class="form-feedback"></div>\n</div>\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,(null!=(s=t.unless.call(null!=n?n:e.nullContext||{},null!=(s=null!=n?n.options:n)?s.show:s,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?s:"")+'<div class="text-end">\n <div class="button-region"></div>\n</div>'},useData:!0})},48242:function(e,n,t){var o=t(31197);e.exports=(o.default||o).template({1:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},3:function(e,n,t,o,i){return"disabled"},5:function(e,n,t,o,i){return"selected"},7:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,a=e.escapeExpression;return' <option value="'+a(r(null!=n?n.number:n,n))+'" '+(null!=(s=t.if.call(null!=n?n:e.nullContext||{},null!=n?n.selected:n,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+">"+a(r(null!=n?n.displayName:n,n))+"</option>\n"},9:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda;return'<span class="svg-container mb-2 '+e.escapeExpression(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.svg:s,n))+' remove">'+(null!=(s=r(null!=(s=null!=n?n.options:n)?s.svgRemove:s,n))?s:"")+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression,a=null!=n?n:e.nullContext||{};return'<div\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n class="cursor-pointer w-100 dropdown-btn btn btn-link '+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.button:s,n))+" "+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.disabled:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+'"\n name="season"\n '+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.disabled:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+'\n> </div>\n<div class="dropdown-menu dropdown-menu-end dropdown-arrow w-100">\n <div class="text-center px-2">\n <select name="season" class="form-select">\n <option value="-1" '+(null!=(s=t.unless.call(a,null!=(s=null!=n?n.options:n)?s.hasSelected:s,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+">"+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(a,"selectASeason",{name:"lang",hash:{},data:i}))+"</option>\n"+(null!=(s=t.each.call(a,null!=(s=null!=n?n.options:n)?s.seasons:s,{name:"each",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?s:"")+' </select>\n </div>\n\n <div class="dropdown-divider"></div>\n\n <div class="create-region"></div>\n</div>\n'+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.showRemoveIcon:s,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?s:"")},useData:!0})},64154:function(e,n,t){var o=t(31197);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return"required"},3:function(e,n,t,o,i){return"readonly"},5:function(e,n,t,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,a=e.escapeExpression,l=null!=n?n:e.nullContext||{};return'<textarea\n name="'+a(r(null!=(s=null!=n?n.options:n)?s.name:s,n))+'"\n id="'+a(r(null!=(s=null!=n?n.options:n)?s.id:s,n))+'"\n autocomplete="false"\n class="'+a(r(null!=(s=null!=n?n.options:n)?s.class:s,n))+" event-selector "+a(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.resizingTextarea:s,n))+'"\n placeholder="'+a(r(null!=(s=null!=n?n.options:n)?s.placeholder:s,n))+'"\n '+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.required:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.readonly:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.disabled:s,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+"\n></textarea>"},useData:!0})},94407:function(e,n,t){var o=t(31197);e.exports=(o.default||o).template({1:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},3:function(e,n,t,o,i){return"autofocus"},5:function(e,n,t,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,a=e.escapeExpression,l=null!=n?n:e.nullContext||{};return'<input\n name="'+a(r(null!=(s=null!=n?n.options:n)?s.inputName:s,n))+'"\n type="text"\n class="form-control '+(null!=(s=t.unless.call(l,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+" "+a(r(null!=(s=null!=n?n.options:n)?s.additionalClasses:s,n))+'"\n id="'+a(r(null!=(s=null!=n?n.options:n)?s.inputId:s,n))+'"\n autocomplete="off"\n placeholder="'+a(r(null!=(s=null!=n?n.options:n)?s.placeholderText:s,n))+'"\n '+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.autofocus:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.unless.call(l,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+'\n></input>\n<span class="svg-container mb-2 '+a(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.svg:s,n))+' remove" style="display: none;">'+(null!=(s=r(null!=(s=null!=n?n.options:n)?s.svgRemove:s,n))?s:"")+"</span>"},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2539],{42539:function(e,t,n){n.d(t,{Z:function(){return Ne}});var r=n(95685),o=n.n(r),s=n(32735),a=n(30720),l=n(14473);var i=n(16608),c=n(47597),u=s.createContext(null),d=n(21756),p=n(56319),f=n(37479),v=n(51988),m=n(74512);const w=["children","usePopper"],g=()=>{};function h(e={}){const t=(0,s.useContext)(u),[n,r]=(0,d.Z)(),o=(0,s.useRef)(!1),{flip:a,offset:l,rootCloseEvent:i,fixed:c=!1,placement:m,popperConfig:w={},enableEventListeners:h=!0,usePopper:x=!!t}=e,y=null==(null==t?void 0:t.show)?!!e.show:t.show;y&&!o.current&&(o.current=!0);const{placement:b,setMenu:C,menuElement:E,toggleElement:k}=t||{},N=(0,p.Z)(k,E,(0,v.ZP)({placement:m||b||"bottom-start",enabled:x,enableEvents:null==h?y:h,offset:l,flip:a,fixed:c,arrowElement:n,popperConfig:w})),P=Object.assign({ref:C||g,"aria-labelledby":null==k?void 0:k.id},N.attributes.popper,{style:N.styles.popper}),S={show:y,placement:b,hasShown:o.current,toggle:null==t?void 0:t.toggle,popper:x?N:null,arrowProps:x?Object.assign({ref:r},N.attributes.arrow,{style:N.styles.arrow}):{}};return(0,f.Z)(E,(e=>{null==t||t.toggle(!1,e)}),{clickTrigger:i,disabled:!y}),[P,S]}function x(e){let{children:t,usePopper:n=!0}=e,r=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,w);const[o,s]=h(Object.assign({},r,{usePopper:n}));return(0,m.jsx)(m.Fragment,{children:t(o,s)})}x.displayName="DropdownMenu";var y=x;const b={prefix:String(Math.round(1e10*Math.random())),current:0},C=s.createContext(b),E=s.createContext(!1);let k=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),N=new WeakMap;const P="function"==typeof s.useId?function(e){let t=s.useId(),[n]=(0,s.useState)("function"==typeof s.useSyncExternalStore?s.useSyncExternalStore(j,S,D):(0,s.useContext)(E));return e||`${n?"react-aria":`react-aria${b.prefix}`}-${t}`}:function(e){let t=(0,s.useContext)(C);t!==b||k||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=function(e=!1){let t=(0,s.useContext)(C),n=(0,s.useRef)(null);if(null===n.current&&!e){var r,o;let e=null===(o=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===o||null===(r=o.ReactCurrentOwner)||void 0===r?void 0:r.current;if(e){let n=N.get(e);null==n?N.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,N.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function S(){return!1}function D(){return!0}function j(e){return()=>{}}const O=e=>{var t;return"menu"===(null==(t=e.getAttribute("role"))?void 0:t.toLowerCase())},R=()=>{};function T(){const e=P(),{show:t=!1,toggle:n=R,setToggle:r,menuElement:o}=(0,s.useContext)(u)||{},a=(0,s.useCallback)((e=>{n(!t,e)}),[t,n]),l={id:e,ref:r||R,onClick:a,"aria-expanded":!!t};return o&&O(o)&&(l["aria-haspopup"]=!0),[l,{show:t,toggle:n}]}function Z({children:e}){const[t,n]=T();return(0,m.jsx)(m.Fragment,{children:e(t,n)})}Z.displayName="DropdownToggle";var $=Z;const _=(e,t=null)=>null!=e?String(e):t||null;var I=s.createContext(null);const M=s.createContext(null);M.displayName="NavContext";var L=M,K=n(16616),A=n(27445);const F=["eventKey","disabled","onClick","active","as"];function B({key:e,href:t,active:n,disabled:r,onClick:o}){const a=(0,s.useContext)(I),l=(0,s.useContext)(L),{activeKey:i}=l||{},u=_(e,t),d=null==n&&null!=e?_(i)===u:n;return[{onClick:(0,c.Z)((e=>{r||(null==o||o(e),a&&!e.isPropagationStopped()&&a(u,e))})),"aria-disabled":r||void 0,"aria-selected":d,[(0,A.PB)("dropdown-item")]:""},{isActive:d}]}const W=s.forwardRef(((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:a=K.ZP}=e,l=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,F);const[i]=B({key:n,href:l.href,disabled:r,onClick:o,active:s});return(0,m.jsx)(a,Object.assign({},l,{ref:t},i))}));W.displayName="DropdownItem";var U=W,z=n(9418);function H(){const e=function(){const[,e]=(0,s.useReducer)((e=>e+1),0);return e}(),t=(0,s.useRef)(null),n=(0,s.useCallback)((n=>{t.current=n,e()}),[e]);return[t,n]}function G({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${(0,A.PB)("dropdown-item")}]`,focusFirstItemOnShow:d,placement:p="bottom-start",children:f}){const v=(0,z.Z)(),[w,g]=function(e,t,n){const r=(0,s.useRef)(void 0!==e),[o,a]=(0,s.useState)(t),l=void 0!==e,i=r.current;return r.current=l,!l&&i&&o!==t&&a(t),[l?e:o,(0,s.useCallback)(((...e)=>{const[t,...r]=e;let o=null==n?void 0:n(t,...r);return a(t),o}),[n])]}(t,e,r),[h,x]=H(),y=h.current,[b,C]=H(),E=b.current,k=(0,i.Z)(w),N=(0,s.useRef)(null),P=(0,s.useRef)(!1),S=(0,s.useContext)(I),D=(0,s.useCallback)(((e,t,n=(null==t?void 0:t.type))=>{g(e,{originalEvent:t,source:n})}),[g]),j=(0,c.Z)(((e,t)=>{null==n||n(e,t),D(!1,t,"select"),t.isPropagationStopped()||null==S||S(e,t)})),R=(0,s.useMemo)((()=>({toggle:D,placement:p,show:w,menuElement:y,toggleElement:E,setMenu:x,setToggle:C})),[D,p,w,y,E,x,C]);y&&k&&!w&&(P.current=y.contains(y.ownerDocument.activeElement));const T=(0,c.Z)((()=>{E&&E.focus&&E.focus()})),Z=(0,c.Z)((()=>{const e=N.current;let t=d;if(null==t&&(t=!(!h.current||!O(h.current))&&"keyboard"),!1===t||"keyboard"===t&&!/^key.+$/.test(e))return;const n=(0,a.Z)(h.current,o)[0];n&&n.focus&&n.focus()}));(0,s.useEffect)((()=>{w?Z():P.current&&(P.current=!1,T())}),[w,P,T,Z]),(0,s.useEffect)((()=>{N.current=null}));const $=(e,t)=>{if(!h.current)return null;const n=(0,a.Z)(h.current,o);let r=n.indexOf(e)+t;return r=Math.max(0,Math.min(r,n.length)),n[r]};return function(e,t,n,r=!1){const o=(0,c.Z)(n);(0,s.useEffect)((()=>{const n="function"==typeof e?e():e;return n.addEventListener(t,o,r),()=>n.removeEventListener(t,o,r)}),[e])}((0,s.useCallback)((()=>v.document),[v]),"keydown",(e=>{var t,n;const{key:r}=e,o=e.target,s=null==(t=h.current)?void 0:t.contains(o),a=null==(n=b.current)?void 0:n.contains(o);if(/input|textarea/i.test(o.tagName)&&(" "===r||"Escape"!==r&&s||"Escape"===r&&"search"===o.type))return;if(!s&&!a)return;if(!("Tab"!==r||h.current&&w))return;N.current=e.type;const i={originalEvent:e,source:e.type};switch(r){case"ArrowUp":{const t=$(o,-1);return t&&t.focus&&t.focus(),void e.preventDefault()}case"ArrowDown":if(e.preventDefault(),w){const e=$(o,1);e&&e.focus&&e.focus()}else g(!0,i);return;case"Tab":(0,l.ZP)(o.ownerDocument,"keyup",(e=>{var t;("Tab"!==e.key||e.target)&&null!=(t=h.current)&&t.contains(e.target)||g(!1,i)}),{once:!0});break;case"Escape":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),g(!1,i)}})),(0,m.jsx)(I.Provider,{value:j,children:(0,m.jsx)(u.Provider,{value:R,children:f})})}G.displayName="Dropdown",G.Menu=y,G.Toggle=$,G.Item=U;var Y=G,q=n(80638),J=n(65456);const Q=s.createContext({});Q.displayName="DropdownContext";var V=Q,X=n(46304);const ee=s.forwardRef((({className:e,bsPrefix:t,as:n="hr",role:r="separator",...s},a)=>(t=(0,X.vE)(t,"dropdown-divider"),(0,m.jsx)(n,{ref:a,className:o()(e,t),role:r,...s}))));ee.displayName="DropdownDivider";var te=ee;const ne=s.forwardRef((({className:e,bsPrefix:t,as:n="div",role:r="heading",...s},a)=>(t=(0,X.vE)(t,"dropdown-header"),(0,m.jsx)(n,{ref:a,className:o()(e,t),role:r,...s}))));ne.displayName="DropdownHeader";var re=ne;n(14313),n(399),n(89864),new WeakMap;const oe=["onKeyDown"],se=s.forwardRef(((e,t)=>{let{onKeyDown:n}=e,r=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,oe);const[o]=(0,K.FT)(Object.assign({tagName:"a"},r)),s=(0,c.Z)((e=>{o.onKeyDown(e),null==n||n(e)}));return(a=r.href)&&"#"!==a.trim()&&"button"!==r.role?(0,m.jsx)("a",Object.assign({ref:t},r,{onKeyDown:n})):(0,m.jsx)("a",Object.assign({ref:t},r,o,{onKeyDown:s}));var a}));se.displayName="Anchor";var ae=se;const le=s.forwardRef((({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:s,active:a,as:l=ae,...i},c)=>{const u=(0,X.vE)(e,"dropdown-item"),[d,p]=B({key:n,href:i.href,disabled:r,onClick:s,active:a});return(0,m.jsx)(l,{...i,...d,ref:c,className:o()(t,u,p.isActive&&"active",r&&"disabled")})}));le.displayName="DropdownItem";var ie=le;const ce=s.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},s)=>(t=(0,X.vE)(t,"dropdown-item-text"),(0,m.jsx)(n,{ref:s,className:o()(e,t),...r}))));ce.displayName="DropdownItemText";var ue=ce,de=n(14140),pe=n(72080);n(65719);const fe=s.createContext(null);fe.displayName="InputGroupContext";var ve=fe;const me=s.createContext(null);me.displayName="NavbarContext";var we=me;function ge(e,t){return e}function he(e,t,n){let r=e?n?"bottom-start":"bottom-end":n?"bottom-end":"bottom-start";return"up"===t?r=e?n?"top-start":"top-end":n?"top-end":"top-start":"end"===t?r=e?n?"left-end":"right-end":n?"left-start":"right-start":"start"===t?r=e?n?"right-end":"left-end":n?"right-start":"left-start":"down-centered"===t?r="bottom":"up-centered"===t&&(r="top"),r}n(56784);const xe=s.forwardRef((({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:a=!0,show:l,renderOnMount:i,as:c="div",popperConfig:u,variant:d,...p},f)=>{let v=!1;const w=(0,s.useContext)(we),g=(0,X.vE)(e,"dropdown-menu"),{align:x,drop:y,isRTL:b}=(0,s.useContext)(V);n=n||x;const C=(0,s.useContext)(ve),E=[];if(n)if("object"==typeof n){const e=Object.keys(n);if(e.length){const t=e[0],r=n[t];v="start"===r,E.push(`${g}-${t}-${r}`)}}else"end"===n&&(v=!0);const k=he(v,y,b),[N,{hasShown:P,popper:S,show:D,toggle:j}]=h({flip:a,rootCloseEvent:r,show:l,usePopper:!w&&0===E.length,offset:[0,2],popperConfig:u,placement:k});if(N.ref=(0,pe.Z)(ge(f),N.ref),(0,de.Z)((()=>{D&&(null==S||S.update())}),[D]),!P&&!i&&!C)return null;"string"!=typeof c&&(N.show=D,N.close=()=>null==j?void 0:j(!1),N.align=n);let O=p.style;return null!=S&&S.placement&&(O={...p.style,...N.style},p["x-placement"]=S.placement),(0,m.jsx)(c,{...p,...N,style:O,...(E.length||w)&&{"data-bs-popper":"static"},className:o()(t,g,D&&"show",v&&`${g}-end`,d&&`${g}-${d}`,...E)})}));xe.displayName="DropdownMenu";var ye=xe,be=n(98269);const Ce=s.forwardRef((({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:a=be.Z,...l},i)=>{const c=(0,X.vE)(e,"dropdown-toggle"),d=(0,s.useContext)(u);void 0!==r&&(l.bsPrefix=r);const[p]=T();return p.ref=(0,pe.Z)(p.ref,ge(i)),(0,m.jsx)(a,{className:o()(n,c,t&&`${c}-split`,(null==d?void 0:d.show)&&"show"),...p,...l})}));Ce.displayName="DropdownToggle";var Ee=Ce;const ke=s.forwardRef(((e,t)=>{const{bsPrefix:n,drop:r="down",show:a,className:l,align:i="start",onSelect:c,onToggle:u,focusFirstItemOnShow:d,as:p="div",navbar:f,autoClose:v=!0,...w}=(0,q.Ch)(e,{show:"onToggle"}),g=(0,s.useContext)(ve),h=(0,X.vE)(n,"dropdown"),x=(0,X.SC)(),y=(0,J.Z)(((e,t)=>{var n,r;(null==(n=t.originalEvent)||null==(n=n.target)?void 0:n.classList.contains("dropdown-toggle"))&&"mousedown"===t.source||(t.originalEvent.currentTarget!==document||"keydown"===t.source&&"Escape"!==t.originalEvent.key||(t.source="rootClose"),r=t.source,(!1===v?"click"===r:"inside"===v?"rootClose"!==r:"outside"!==v||"select"!==r)&&(null==u||u(e,t)))})),b=he("end"===i,r,x),C=(0,s.useMemo)((()=>({align:i,drop:r,isRTL:x})),[i,r,x]),E={down:h,"down-centered":`${h}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return(0,m.jsx)(V.Provider,{value:C,children:(0,m.jsx)(Y,{placement:b,show:a,onSelect:c,onToggle:y,focusFirstItemOnShow:d,itemSelector:`.${h}-item:not(.disabled):not(:disabled)`,children:g?w.children:(0,m.jsx)(p,{...w,ref:t,className:o()(l,a&&"show",E[r])})})})}));ke.displayName="Dropdown";var Ne=Object.assign(ke,{Toggle:Ee,Menu:ye,Item:ie,ItemText:ue,Divider:te,Header:re})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2591],{26328:function(e,t,i){"use strict";i.r(t),i.d(t,{AwaitingReviewView:function(){return P}});var n=i(21161),o=i(21679),r=i(57857),s=i(31647),a=i(70763),c=i(13809),l=i(45390),u=i(29457),p=i(85847),d=i(48404),h=i(19226),f=i(14129),v=i(97463),y=i(69072),g=i(82405),m=i(39090),b=i(65351),w=i(95061),C=i(71010),S=i.n(C);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function V(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,k(n.key),n)}}function k(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(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,i){return t=E(t),function(e,t){if(t&&("object"==O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,T()?Reflect.construct(t,i||[],E(e).constructor):t.apply(e,i))}(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&&_(e,t)}(t,e),i=t,(C=[{key:"initialize",value:function(){this.bindListeners(),this.contentUpdatesDataService=o.u.getInstance(l.Or.ContentUpdates,this),this.videoDataService=o.u.getInstance(l.Or.Video,this)}},{key:"name",get:function(){return"AwaitingReviewView"}},{key:"title",get:function(){return r.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.awaitingReview"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white rounded"}},{key:"template",get:function(){return S()}},{key:"regions",value:function(){return{header:{el:".header-region",replaceElement:!0},leftNav:{el:".left-nav-region",replaceElement:!0},listHeader:{el:".list-header-region",replaceElement:!0,partialLoading:u.LP.AwaitingReviewHeader},videos:{el:".video-list-region",replaceElement:!0,partialLoading:u.LP.VideoGroupList}}}},{key:"bindListeners",value:function(){this.listenTo(l.Vk.CONTENT_UPDATES,"".concat(l.M_.VIDEOS_TO_REVIEW,":sync"),this.render),this.listenTo(l.Vk.CONTENT_UPDATES,"".concat(l.M_.LIBRARY_REVIEW_SETTINGS,":sync"),this.render),this.listenTo(l.Vk.CONTENT_UPDATES,"".concat(l.M_.LIBRARY_REVIEW_SETTINGS,":error"),this.render),this.listenTo(l.Vk.RESTRICTED_VIDEO,"".concat(l.M_.VIDEOS_TO_REVIEW,":invalidate"),this.fetchVideos),this.listenTo(this.channelName,"approve:all",this.approveAllVideos),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"approveAllVideos",value:function(){this.contentUpdatesDataService.approveAllVideos(n.bind(this.fetchVideos,this))}},{key:"redirectToPastReleases",value:function(){s.Q.C$.trigger({application:l.OV.CONTENT_UPDATES,action:l.eX.ContentUpdates.PAST_RELEASES},{replace:!0})}},{key:"getContentClassName",value:function(){var e="".concat(b.Z.content," border-start ").concat(b.Z.contentWithLeftNav);return this.videoCollection&&!this.videoCollection.length?e+=" d-inline-flex justify-content-center align-items-center":e+=" d-inline-block",e}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new a.t(this.videoCollection.map((function(e){return new p.n({id:e.get("id")})}))))}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new v.u({activeTab:m.JI.AwaitingReview,reviewEnabled:this.reviewSetting.get("reviewPeriod")})):this.renderPartialLoading("header")}},{key:"renderLeftNav",value:function(){this.reviewSetting&&this.showChildView("leftNav",new y.m({supportSiteUrl:this.config.get("supportSiteUrl"),currentUser:this.currentUser}))}},{key:"renderListHeader",value:function(){this.videoCollection?this.videoCollection.length&&this.showChildView("listHeader",new f.U({collection:this.videoCollection,channelName:this.channelName})):this.renderPartialLoading("listHeader")}},{key:"renderVideos",value:function(){this.groupedVideoCollection?this.showChildView("videos",new g.D({collection:this.groupedVideoCollection,childOptions:{videoItemComponentType:c.UC.AwaitingReview,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.libraries},emptyStateType:u.ub.AwaitingReview,emptyStateOptions:{heading:r.T.getPhrase(this.lang,"emptyStateHeading"),description:r.T.getPhrase(this.lang,"emptyStateDescription",{classNames:"disable-review info-link"})}})):this.renderPartialLoading("videos")}},{key:"fetchVideos",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&(this.setVideosWithMetadata(),this.groupedVideoCollection=m.hp.groupVideosByHostedLibrary(this.videoCollection))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(i){var n=t.videosWithMetadata.get(e);n&&(n.set(i.toJSON()),n.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:d.p.config,currentUser:h.K.currentUser,libraries:w.T.libraries}}},{key:"onBeforeRender",value:function(){this.reviewSetting=this.contentUpdatesDataService.getLibraryReviewSettings(),this.fetchVideos(),this.reviewSetting&&!this.reviewSetting.get("reviewPeriod")&&this.redirectToPastReleases()}},{key:"viewOptions",value:function(){return{contentClass:this.getContentClassName()}}},{key:"onRender",value:function(){this.renderHeader(),this.renderLeftNav(),this.renderListHeader(),this.renderVideos()}}])&&V(i.prototype,C),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,C}(s.Q.G7)},13809:function(e,t,i){"use strict";i.d(t,{UC:function(){return n.U}});var n=i(58688);i(58780),i(14898)},80867:function(e,t,i){"use strict";i.d(t,{Y:function(){return E}});var n=i(31647),o=i(52076),r=i(70065),s=i(50028),a=i(80758),c=i(10101),l=i(58688),u=i(37071),p=i(45390),d=i(29457),h=i(25887),f=i(30606),v=i.n(f);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 g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function b(e,t,i){return t&&m(e.prototype,t),i&&m(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function w(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=y(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function C(e,t,i){return t=O(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,S()?Reflect.construct(t,i||[],O(e).constructor):t.apply(e,i))}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 V(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&&k(e,t)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var T=function(e){function t(e){return g(this,t),C(this,t,[e])}return V(t,e),b(t,[{key:"name",get:function(){return"VideoItemListComponent"}},{key:"childView",get:function(){return u.j}},{key:"childViewOptions",get:function(){var e=this;return function(t,i){return{componentType:t.get("status")===s.X.Processing?l.U.ProcessingVideo:e.options.videoItemComponentType,videoWithMetadata:e.options.videosWithMetadata&&e.options.videosWithMetadata.get(t.get("id")),allowBulk:e.options.allowBulk,collectionIdentifier:e.options.collectionIdentifier,application:e.options.application,pendingItems:e.options.pendingItems,config:e.options.config,sourceMetadataOptions:e.options.sourceMetadataOptions,collectionViewChannel:e.options.collectionViewChannel,customerHasLocalCache:e.options.customerHasLocalCache,customerHasExchange:e.options.customerHasExchange,customerHasCustomLibrary:e.options.customerHasCustomLibrary,analyticsOptions:e.options.analyticsOptions,videoCollectionSource:e.options.videoCollectionSource,currentUser:e.options.currentUser,playerApiUrl:e.options.playerApiUrl,createViewKey:e.options.createViewKey,isLastItem:!e.options.hasCursors&&i===e.collection.length-1,libraries:e.options.libraries,products:e.options.products}}}}])}(n.Q.$W),E=function(e){function t(e){return g(this,t),C(this,t,[e])}return V(t,e),b(t,[{key:"name",get:function(){return"VideoListView"}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"template",get:function(){return v()}},{key:"defaults",get:function(){return{videoItemComponentType:l.U.Base,allowBulk:!1,emptyState:d.ub.Default,videoCollectionSource:h.x_.Folder}}},{key:"behaviors",get:function(){var e=[{behaviorClass:c.Im,selector:".lazy-img",minBrowserSupportVersion:p.v9}];return this.options.showEmptyState&&e.push({behaviorClass:a.o,region:"videos",type:this.options.emptyStateType,componentOptions:this.options.emptyStateOptions,emptyStateComponents:p.aW}),e}},{key:"regions",value:function(){return{videos:".videos-region"}}},{key:"onRender",value:function(){var e=new T({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,videoItemComponentType:this.options.videoItemComponentType,allowBulk:this.options.allowBulk,collectionIdentifier:this.collectionIdentifier,application:this.options.application,pendingItems:this.options.pendingItems,config:this.options.config,sourceMetadataOptions:this.options.sourceMetadataOptions,collectionViewChannel:this.options.collectionViewChannel,customerHasLocalCache:this.options.customerHasLocalCache,customerHasExchange:this.options.customerHasExchange,customerHasCustomLibrary:this.options.customerHasCustomLibrary,analyticsOptions:o.k.mergeOptions(this.options.analyticsOptions,{location:r.LZ.VideoListItem,entity:r.py.Video}),videoCollectionSource:this.options.videoCollectionSource,currentUser:this.options.currentUser,playerApiUrl:this.options.playerApiUrl,createViewKey:this.options.createViewKey,hasCursors:this.options.hasCursors,libraries:this.options.libraries,products:this.options.products});this.showChildView("videos",e)}}])}(n.Q.wA)},71010:function(e,t,i){var n=i(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,o){var r;return e.propertyIsEnumerable,'<div class="header-region"></div>\n<div class="left-nav-region"></div><div class="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.contentClass:r,t))+'">\n<div class="list-header-region"></div>\n<div class="video-list-region"></div>\n</div>'},useData:!0})},30606:function(e,t,i){var n=i(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,o){return'<div class="videos-region"></div>'},useData:!0})}}]);
|