@clickview/lite 0.38.3 → 0.39.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/{3189-lite-a05a498d85.chunk.css → 1338-lite-628693aee8.chunk.css} +1 -0
- package/dist/css/{140-lite-523778436b.chunk.css → 140-lite-f8a5c5e19f.chunk.css} +1 -1
- package/dist/css/{1437-lite-4c1d1802af.chunk.css → 1437-lite-cec7d8a7f9.chunk.css} +1 -1
- package/dist/css/{1725-lite-6efa9a8c08.chunk.css → 1725-lite-b32369e5cf.chunk.css} +1 -1
- package/dist/css/1891-lite-e608a32581.chunk.css +2 -0
- package/dist/css/2118-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/{3154-lite-7f76765a11.chunk.css → 2137-lite-436881d235.chunk.css} +1 -0
- package/dist/css/{2199-lite-75b9144dfc.chunk.css → 2199-lite-7b7c0497c5.chunk.css} +1 -1
- package/dist/css/{2405-lite-9f291e9fd0.chunk.css → 2405-lite-9d203955c3.chunk.css} +1 -1
- package/dist/css/{2902-lite-e063f649da.chunk.css → 2425-lite-65d64df834.chunk.css} +2 -1
- package/dist/css/{298-lite-14ce8c0390.chunk.css → 298-lite-5e55d4ad59.chunk.css} +1 -1
- package/dist/css/{5177-lite-8601f9a468.chunk.css → 3091-lite-839710dba2.chunk.css} +5 -1
- package/dist/css/{778-lite-5b142e0290.chunk.css → 3224-lite-0a8b9c213d.chunk.css} +1 -0
- package/dist/css/{3849-lite-55e825457e.chunk.css → 3297-lite-9434e825f9.chunk.css} +1 -0
- package/dist/css/3468-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/3533-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/3667-lite-8ba8aa82f7.chunk.css +3 -0
- package/dist/css/{274-lite-543971c74b.chunk.css → 4448-lite-1c52af153d.chunk.css} +1 -0
- package/dist/css/4541-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/{4612-lite-b59f3b3265.chunk.css → 4612-lite-a106deee07.chunk.css} +1 -1
- package/dist/css/{4617-lite-ed371d2824.chunk.css → 4617-lite-8b43dd7f87.chunk.css} +1 -1
- package/dist/css/482-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/{2767-lite-8717f8b322.chunk.css → 4858-lite-24d9e93ce4.chunk.css} +5 -5
- package/dist/css/{5268-lite-5189588330.chunk.css → 4942-lite-9928406dd3.chunk.css} +1 -1
- package/dist/css/{7018-lite-5b142e0290.chunk.css → 5052-lite-0a8b9c213d.chunk.css} +1 -0
- package/dist/css/{510-lite-b97d0f723f.chunk.css → 510-lite-d242fbab3b.chunk.css} +1 -1
- package/dist/css/{2468-lite-d142a5d975.chunk.css → 5219-lite-c1bbb47cd6.chunk.css} +1 -0
- package/dist/css/{5236-lite-d5795216f8.chunk.css → 5236-lite-b94979db17.chunk.css} +1 -1
- package/dist/css/{6330-lite-5189588330.chunk.css → 5268-lite-9928406dd3.chunk.css} +1 -1
- package/dist/css/{7761-lite-c005d83db5.chunk.css → 5373-lite-6bc5010289.chunk.css} +1 -0
- package/dist/css/{4537-lite-9a89e8d83f.chunk.css → 5446-lite-12b14f303a.chunk.css} +1 -0
- package/dist/css/{4441-lite-edb697b2a0.chunk.css → 6102-lite-3c257e8573.chunk.css} +1 -0
- package/dist/css/6285-lite-142edc84bc.chunk.css +2 -0
- package/dist/css/{6290-lite-cbc4dea7ce.chunk.css → 6290-lite-db69416b93.chunk.css} +1 -1
- package/dist/css/{9484-lite-5189588330.chunk.css → 6330-lite-9928406dd3.chunk.css} +1 -1
- package/dist/css/6465-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/6689-lite-095fb21a01.chunk.css +4 -0
- package/dist/css/{6817-lite-b97d0f723f.chunk.css → 6817-lite-d242fbab3b.chunk.css} +1 -1
- package/dist/css/{9746-lite-107e54be03.chunk.css → 6875-lite-725d515e15.chunk.css} +1 -0
- package/dist/css/7112-lite-7b8bd5ac32.chunk.css +3 -0
- package/dist/css/{316-lite-983fc2b64e.chunk.css → 7115-lite-e1537f9cc8.chunk.css} +1 -0
- package/dist/css/7128-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/{7167-lite-e7bc934b47.chunk.css → 7167-lite-57eef5ef59.chunk.css} +1 -1
- package/dist/css/7172-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/{9523-lite-95a488394c.chunk.css → 7381-lite-87886604f5.chunk.css} +1 -0
- package/dist/css/{7409-lite-3b312b926d.chunk.css → 7409-lite-c2751280e2.chunk.css} +1 -1
- package/dist/css/{613-lite-a05a498d85.chunk.css → 7762-lite-628693aee8.chunk.css} +1 -0
- package/dist/css/{7818-lite-02acf4690b.chunk.css → 7818-lite-6dc93ba4b5.chunk.css} +1 -1
- package/dist/css/8025-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/{2809-lite-739697ccef.chunk.css → 8091-lite-143b6cbcb9.chunk.css} +1 -0
- package/dist/css/{5729-lite-f010538129.chunk.css → 8142-lite-dc99ef3c5b.chunk.css} +1 -0
- package/dist/css/{8621-lite-76dde2eb8d.chunk.css → 8243-lite-cf049db762.chunk.css} +1 -2
- package/dist/css/8383-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/{1786-lite-d477731bf6.chunk.css → 8581-lite-2e903f649e.chunk.css} +1 -0
- package/dist/css/{8820-lite-57008e3940.chunk.css → 8820-lite-eae33bc9b0.chunk.css} +1 -1
- package/dist/css/8935-lite-49010f6115.chunk.css +4 -0
- package/dist/css/9060-lite-b8fe011ecf.chunk.css +1 -0
- package/dist/css/{9455-lite-a1c3df8800.chunk.css → 9455-lite-415a17f328.chunk.css} +1 -1
- package/dist/css/{4942-lite-5189588330.chunk.css → 9484-lite-9928406dd3.chunk.css} +1 -1
- package/dist/css/{lite-app-a3c4a51ddd.css → lite-app-c613eea2e3.css} +3 -2
- package/dist/languages/en.json +1 -1
- package/dist/scripts/121-6adcdbe14c-lite.chunk.js +1 -0
- package/dist/scripts/1276-f59b01d62d-lite.chunk.js +2 -0
- package/dist/scripts/{1285-1336fddb06-lite.chunk.js → 1285-eb54dc7f6e-lite.chunk.js} +1 -1
- package/dist/scripts/1338-0ff78f1556-lite.chunk.js +1 -0
- package/dist/scripts/140-c1f3da4db7-lite.chunk.js +1 -0
- package/dist/scripts/1437-07de23067a-lite.chunk.js +1 -0
- package/dist/scripts/1518-7c91f22a72-lite.chunk.js +1 -0
- package/dist/scripts/{1544-119f5b1f8a-lite.chunk.js → 1544-8370fd073c-lite.chunk.js} +1 -1
- package/dist/scripts/{1617-3e95f69565-lite.chunk.js → 1617-317f0aa92c-lite.chunk.js} +1 -1
- package/dist/scripts/{1725-520995f74d-lite.chunk.js → 1725-d79ad3925c-lite.chunk.js} +1 -1
- package/dist/scripts/{1750-45839f639e-lite.chunk.js → 1750-c45f9551c9-lite.chunk.js} +1 -1
- package/dist/scripts/1799-2173a61c22-lite.chunk.js +1 -0
- package/dist/scripts/{1853-0350fb05d9-lite.chunk.js → 1853-ae5414d16a-lite.chunk.js} +1 -1
- package/dist/scripts/{1863-60eb6d1648-lite.chunk.js → 1863-56e36d3ffe-lite.chunk.js} +1 -1
- package/dist/scripts/1890-f07da5a2f9-lite.chunk.js +2 -0
- package/dist/scripts/{1891-1b31ad68e9-lite.chunk.js → 1891-a18efd9d76-lite.chunk.js} +1 -1
- package/dist/scripts/{2118-607920882f-lite.chunk.js → 2118-bfd05a9f66-lite.chunk.js} +2 -2
- package/dist/scripts/{3154-35dfd725d4-lite.chunk.js → 2137-b435905b1a-lite.chunk.js} +1 -1
- package/dist/scripts/{2178-e330a0ab4b-lite.chunk.js → 2178-25cbb45d13-lite.chunk.js} +2 -2
- package/dist/scripts/2199-808418d88f-lite.chunk.js +1 -0
- package/dist/scripts/{2258-52d031c9ab-lite.chunk.js → 2258-0f10ec2c0b-lite.chunk.js} +1 -1
- package/dist/scripts/{2261-8286c361a4-lite.chunk.js → 2261-8139c40996-lite.chunk.js} +1 -1
- package/dist/scripts/2425-22fe094fef-lite.chunk.js +2 -0
- package/dist/scripts/2857-da11ac17a4-lite.chunk.js +1 -0
- package/dist/scripts/{298-cb2a9ada3f-lite.chunk.js → 298-b562929d0f-lite.chunk.js} +1 -1
- package/dist/scripts/{3020-8690825911-lite.chunk.js → 3020-606d214f91-lite.chunk.js} +1 -1
- package/dist/scripts/3042-899ed573ff-lite.chunk.js +1 -0
- package/dist/scripts/{3067-29c874cdfb-lite.chunk.js → 3067-1a0a7132fb-lite.chunk.js} +1 -1
- package/dist/scripts/3091-c565b916c4-lite.chunk.js +2 -0
- package/dist/scripts/{3108-376eba18f4-lite.chunk.js → 3108-9b7d32f3ff-lite.chunk.js} +1 -1
- package/dist/scripts/{3170-0135dadbe0-lite.chunk.js → 3170-aaea271b98-lite.chunk.js} +1 -1
- package/dist/scripts/{3171-9eda288c67-lite.chunk.js → 3171-17e61c2989-lite.chunk.js} +1 -1
- package/dist/scripts/3224-e3e007b11a-lite.chunk.js +1 -0
- package/dist/scripts/3285-44deebb0d3-lite.chunk.js +1 -0
- package/dist/scripts/{3849-8446e937c2-lite.chunk.js → 3297-98a0c09762-lite.chunk.js} +1 -1
- package/dist/scripts/{3389-887f04d2a7-lite.chunk.js → 3389-15fd0419b5-lite.chunk.js} +1 -1
- package/dist/scripts/{3468-e14b3df728-lite.chunk.js → 3468-29b36cc55a-lite.chunk.js} +1 -1
- package/dist/scripts/3530-bf38479cc0-lite.chunk.js +1 -0
- package/dist/scripts/3545-ba87db78d2-lite.chunk.js +1 -0
- package/dist/scripts/{3645-f97f7b9f25-lite.chunk.js → 3645-bedb82c8e6-lite.chunk.js} +2 -2
- package/dist/scripts/{3667-10b9ef4a18-lite.chunk.js → 3667-48395666c8-lite.chunk.js} +2 -2
- package/dist/scripts/{3715-c040c861db-lite.chunk.js → 3715-bdea312297-lite.chunk.js} +1 -1
- package/dist/scripts/3836-aef010fdd4-lite.chunk.js +1 -0
- package/dist/scripts/{7115-5d43884d9f-lite.chunk.js → 3879-ffae5bec22-lite.chunk.js} +1 -1
- package/dist/scripts/{389-c6a1746a87-lite.chunk.js → 389-bfa9b36082-lite.chunk.js} +1 -1
- package/dist/scripts/{4182-630503aae7-lite.chunk.js → 4182-353f62fb7f-lite.chunk.js} +1 -1
- package/dist/scripts/{4436-8e9e241463-lite.chunk.js → 4436-51648117e3-lite.chunk.js} +1 -1
- package/dist/scripts/4448-944f695cad-lite.chunk.js +1 -0
- package/dist/scripts/{4541-eff56d2c36-lite.chunk.js → 4541-0976258fb1-lite.chunk.js} +1 -1
- package/dist/scripts/{4617-d005df7a81-lite.chunk.js → 4617-252104d00d-lite.chunk.js} +1 -1
- package/dist/scripts/{4632-8299902c6f-lite.chunk.js → 4632-50b9c0526c-lite.chunk.js} +1 -1
- package/dist/scripts/{4690-af08248dbb-lite.chunk.js → 4690-e2da13ba4a-lite.chunk.js} +1 -1
- package/dist/scripts/4778-9bb572ef6c-lite.chunk.js +2 -0
- package/dist/scripts/{482-62a2a6822d-lite.chunk.js → 482-3f07d195b3-lite.chunk.js} +1 -1
- package/dist/scripts/4858-eff0d39151-lite.chunk.js +1 -0
- package/dist/scripts/{4942-e31587e199-lite.chunk.js → 4942-047e886378-lite.chunk.js} +1 -1
- package/dist/scripts/5052-3de62505cf-lite.chunk.js +1 -0
- package/dist/scripts/{5173-e1c8a64adb-lite.chunk.js → 5173-8046faf648-lite.chunk.js} +1 -1
- package/dist/scripts/5219-42503b57a5-lite.chunk.js +1 -0
- package/dist/scripts/{5229-fed729d13a-lite.chunk.js → 5229-779a37e308-lite.chunk.js} +1 -1
- package/dist/scripts/{5236-523db7b855-lite.chunk.js → 5236-973a555387-lite.chunk.js} +1 -1
- package/dist/scripts/{5268-ca61cdaa42-lite.chunk.js → 5268-184c87503d-lite.chunk.js} +1 -1
- package/dist/scripts/{7761-114e0b6fc1-lite.chunk.js → 5373-4b1a0e8164-lite.chunk.js} +1 -1
- package/dist/scripts/{5385-d99e576260-lite.chunk.js → 5385-7d9679388d-lite.chunk.js} +1 -1
- package/dist/scripts/{5438-d22d11b4e2-lite.chunk.js → 5438-cfbcef9300-lite.chunk.js} +1 -1
- package/dist/scripts/{4537-68a80b4786-lite.chunk.js → 5446-4bef2feb09-lite.chunk.js} +1 -1
- package/dist/scripts/5582-9291d61fd4-lite.chunk.js +1 -0
- package/dist/scripts/{5595-4707c79270-lite.chunk.js → 5595-75ab5474c6-lite.chunk.js} +1 -1
- package/dist/scripts/{5606-23495d289a-lite.chunk.js → 5606-dc06115baf-lite.chunk.js} +1 -1
- package/dist/scripts/5622-0a42a0e828-lite.chunk.js +2 -0
- package/dist/scripts/{578-d75d1aa83f-lite.chunk.js → 578-08c269bda8-lite.chunk.js} +1 -1
- package/dist/scripts/{5877-02b34b9648-lite.chunk.js → 5877-cb1c7ab483-lite.chunk.js} +1 -1
- package/dist/scripts/5940-020733eb84-lite.chunk.js +1 -0
- package/dist/scripts/5986-ea7b8baf09-lite.chunk.js +1 -0
- package/dist/scripts/6086-addbf8db6d-lite.chunk.js +2 -0
- package/dist/scripts/{4441-5b76a9f7bb-lite.chunk.js → 6102-82dc97f3ce-lite.chunk.js} +2 -2
- package/dist/scripts/{6274-7545674bdd-lite.chunk.js → 6274-8c46dddf65-lite.chunk.js} +1 -1
- package/dist/scripts/{6290-67b721f9a6-lite.chunk.js → 6290-dd4f914ba1-lite.chunk.js} +1 -1
- package/dist/scripts/{6433-bef61de133-lite.chunk.js → 6433-68b97716af-lite.chunk.js} +2 -2
- package/dist/scripts/6450-96d9bf35b8-lite.chunk.js +1 -0
- package/dist/scripts/{6465-348969a976-lite.chunk.js → 6465-61cf2b85c9-lite.chunk.js} +1 -1
- package/dist/scripts/{6480-69f86ad437-lite.chunk.js → 6480-9f349c058a-lite.chunk.js} +1 -1
- package/dist/scripts/{6572-d500d16bea-lite.chunk.js → 6572-61f7f5d180-lite.chunk.js} +1 -1
- package/dist/scripts/{6689-c5c4ff32e3-lite.chunk.js → 6689-5c386914b7-lite.chunk.js} +1 -1
- package/dist/scripts/{6863-36262af814-lite.chunk.js → 6863-99a60899db-lite.chunk.js} +1 -1
- package/dist/scripts/{9746-f220145c9d-lite.chunk.js → 6875-54de49f6b5-lite.chunk.js} +1 -1
- package/dist/scripts/{689-7508786cdb-lite.chunk.js → 689-a1463346ae-lite.chunk.js} +1 -1
- package/dist/scripts/6891-0816e4bac9-lite.chunk.js +1 -0
- package/dist/scripts/{691-2230cb8c9a-lite.chunk.js → 691-10227e7ab5-lite.chunk.js} +2 -2
- package/dist/scripts/{6930-88c1dee24a-lite.chunk.js → 6930-acee48749a-lite.chunk.js} +1 -1
- package/dist/scripts/{7052-83dfcb1239-lite.chunk.js → 7052-e4bc676de1-lite.chunk.js} +2 -2
- package/dist/scripts/{7112-1407c686a2-lite.chunk.js → 7112-325fadf04c-lite.chunk.js} +1 -1
- package/dist/scripts/7115-1af7674d12-lite.chunk.js +1 -0
- package/dist/scripts/7117-a32215aec1-lite.chunk.js +1 -0
- package/dist/scripts/{7128-6e370bc351-lite.chunk.js → 7128-8b836ec9a6-lite.chunk.js} +1 -1
- package/dist/scripts/{7167-3be7677953-lite.chunk.js → 7167-1b4efc8500-lite.chunk.js} +1 -1
- package/dist/scripts/717-b4f9ce0b5d-lite.chunk.js +1 -0
- package/dist/scripts/{7172-fe011a4165-lite.chunk.js → 7172-deb7138a6f-lite.chunk.js} +1 -1
- package/dist/scripts/{7178-c0fe72577c-lite.chunk.js → 7178-3cc2fe9a90-lite.chunk.js} +1 -1
- package/dist/scripts/7293-cac9446943-lite.chunk.js +1 -0
- package/dist/scripts/{7338-a5d6a68d8e-lite.chunk.js → 7338-f80bb3e898-lite.chunk.js} +1 -1
- package/dist/scripts/{7351-5421b6e5c1-lite.chunk.js → 7351-1a566b7381-lite.chunk.js} +1 -1
- package/dist/scripts/{9523-d1769fc0b7-lite.chunk.js → 7381-82e659ca76-lite.chunk.js} +1 -1
- package/dist/scripts/{7422-f3c089f530-lite.chunk.js → 7422-3f94d7269f-lite.chunk.js} +2 -2
- package/dist/scripts/7432-ec35cf6efe-lite.chunk.js +1 -0
- package/dist/scripts/7703-f7eae24544-lite.chunk.js +1 -0
- package/dist/scripts/{7708-9ed643e056-lite.chunk.js → 7708-674ceff2d6-lite.chunk.js} +1 -1
- package/dist/scripts/{7715-595e47f98a-lite.chunk.js → 7715-07afe4bf1a-lite.chunk.js} +1 -1
- package/dist/scripts/{7734-db37269bb7-lite.chunk.js → 7734-1f323dbabf-lite.chunk.js} +1 -1
- package/dist/scripts/{3189-445815a541-lite.chunk.js → 7762-a06e891473-lite.chunk.js} +1 -1
- package/dist/scripts/{7855-f51632f802-lite.chunk.js → 7855-45891acd29-lite.chunk.js} +1 -1
- package/dist/scripts/7888-6b3e36e4ee-lite.chunk.js +1 -0
- package/dist/scripts/{7925-29ca2fc37a-lite.chunk.js → 7925-57d521e18d-lite.chunk.js} +1 -1
- package/dist/scripts/8001-d04e531678-lite.chunk.js +1 -0
- package/dist/scripts/{8025-cb0d9813cc-lite.chunk.js → 8025-95d2709346-lite.chunk.js} +1 -1
- package/dist/scripts/{8046-83031188a6-lite.chunk.js → 8046-dbbb3e20c8-lite.chunk.js} +1 -1
- package/dist/scripts/{2809-8325f280e9-lite.chunk.js → 8091-98ed8cd1ee-lite.chunk.js} +1 -1
- package/dist/scripts/8142-6f184a5eca-lite.chunk.js +1 -0
- package/dist/scripts/{8621-4d7cf152a1-lite.chunk.js → 8243-2cbe84dab3-lite.chunk.js} +1 -1
- package/dist/scripts/{8323-cd37057445-lite.chunk.js → 8323-cf60927523-lite.chunk.js} +2 -2
- package/dist/scripts/{841-00ef719dad-lite.chunk.js → 841-200f39fd79-lite.chunk.js} +2 -2
- package/dist/scripts/8581-f7e79f1c9f-lite.chunk.js +1 -0
- package/dist/scripts/{8830-c319ec2f37-lite.chunk.js → 8830-6ee11769ab-lite.chunk.js} +1 -1
- package/dist/scripts/{8935-b3a92d0a86-lite.chunk.js → 8935-a917bc6ae2-lite.chunk.js} +1 -1
- package/dist/scripts/{8944-c441b9095c-lite.chunk.js → 8944-391c70bb36-lite.chunk.js} +1 -1
- package/dist/scripts/{9016-acde20f11b-lite.chunk.js → 9016-9dca147239-lite.chunk.js} +2 -2
- package/dist/scripts/{9060-9bc6f6d466-lite.chunk.js → 9060-f95dee5dc4-lite.chunk.js} +1 -1
- package/dist/scripts/{9151-f4da1a8a5f-lite.chunk.js → 9151-f1cd4209b2-lite.chunk.js} +1 -1
- package/dist/scripts/{9220-f6806c7c46-lite.chunk.js → 9220-4fa5492b21-lite.chunk.js} +1 -1
- package/dist/scripts/{9226-eef66f2fc7-lite.chunk.js → 9226-d624008536-lite.chunk.js} +1 -1
- package/dist/scripts/{9230-8d7875945e-lite.chunk.js → 9230-3dc593c14d-lite.chunk.js} +2 -2
- package/dist/scripts/{9254-130731e6f1-lite.chunk.js → 9254-d74490ff03-lite.chunk.js} +1 -1
- package/dist/scripts/9371-7fc2cf96c6-lite.chunk.js +2 -0
- package/dist/scripts/9433-3f0c1223e1-lite.chunk.js +1 -0
- package/dist/scripts/{9455-7cab3a3c5e-lite.chunk.js → 9455-e3cb3d1ad3-lite.chunk.js} +1 -1
- package/dist/scripts/{9478-193a5376c5-lite.chunk.js → 9478-c359b1b4b9-lite.chunk.js} +2 -2
- package/dist/scripts/{9484-cfdaf1f938-lite.chunk.js → 9484-acc36952b1-lite.chunk.js} +1 -1
- package/dist/scripts/{9657-631eda8030-lite.chunk.js → 9657-6d5c6cc173-lite.chunk.js} +1 -1
- package/dist/scripts/{9674-2aed0bd452-lite.chunk.js → 9674-5573f1bafa-lite.chunk.js} +1 -1
- package/dist/scripts/9708-5fb031138b-lite.chunk.js +1 -0
- package/dist/scripts/{9843-73cc2916af-lite.chunk.js → 9843-3cc8dfbe83-lite.chunk.js} +1 -1
- package/dist/scripts/{9894-d2d5d63baf-lite.chunk.js → 9894-bb11518991-lite.chunk.js} +2 -2
- package/dist/scripts/9894-bb11518991-lite.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/9899-11266eafb0-lite.chunk.js +1 -0
- package/dist/scripts/bundle-f7d6ab316d.min.js +2 -0
- package/dist/scripts/{bundle-bc95ba1058.min.js.LICENSE.txt → bundle-f7d6ab316d.min.js.LICENSE.txt} +0 -4
- package/dist/scripts/{polyfills-02090a38a6.min.js → polyfills-5c0684cd85.min.js} +2 -2
- package/dist/scripts/polyfills-5c0684cd85.min.js.LICENSE.txt +1 -0
- package/package.json +1 -1
- package/dist/css/1891-lite-ff35c99cb7.chunk.css +0 -2
- package/dist/css/2118-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/3468-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/3533-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/3667-lite-c160f399ef.chunk.css +0 -3
- package/dist/css/4541-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/482-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/6285-lite-d714304d0d.chunk.css +0 -2
- package/dist/css/6465-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/6689-lite-ed8e07dd89.chunk.css +0 -4
- package/dist/css/7112-lite-a4bcbd8002.chunk.css +0 -3
- package/dist/css/7128-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/7172-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/8025-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/8383-lite-5d3ec54337.chunk.css +0 -1
- package/dist/css/8935-lite-dda85abf44.chunk.css +0 -4
- package/dist/css/9060-lite-5d3ec54337.chunk.css +0 -1
- package/dist/scripts/121-dc954449b7-lite.chunk.js +0 -1
- package/dist/scripts/140-f3e0bd71e1-lite.chunk.js +0 -1
- package/dist/scripts/1437-3dd3f436b4-lite.chunk.js +0 -1
- package/dist/scripts/1518-488d8f565a-lite.chunk.js +0 -1
- package/dist/scripts/1786-458f227c92-lite.chunk.js +0 -1
- package/dist/scripts/1890-fac67abcd4-lite.chunk.js +0 -2
- package/dist/scripts/2199-702074efad-lite.chunk.js +0 -1
- package/dist/scripts/2468-eaf3b390f5-lite.chunk.js +0 -1
- package/dist/scripts/274-d5752bca21-lite.chunk.js +0 -1
- package/dist/scripts/2767-769164beb0-lite.chunk.js +0 -1
- package/dist/scripts/2857-0a9c7ef438-lite.chunk.js +0 -1
- package/dist/scripts/2902-9ba47555e9-lite.chunk.js +0 -2
- package/dist/scripts/2977-f3b6f64b66-lite.chunk.js +0 -1
- package/dist/scripts/3042-5f0de0d4d0-lite.chunk.js +0 -1
- package/dist/scripts/316-1efbcc6ea5-lite.chunk.js +0 -1
- package/dist/scripts/3285-65ca51c87c-lite.chunk.js +0 -1
- package/dist/scripts/3530-f0954afbaa-lite.chunk.js +0 -1
- package/dist/scripts/3545-0aa848282b-lite.chunk.js +0 -1
- package/dist/scripts/3836-31dcc99bda-lite.chunk.js +0 -1
- package/dist/scripts/5177-0ab4eedd6f-lite.chunk.js +0 -2
- package/dist/scripts/5582-674b7f4844-lite.chunk.js +0 -1
- package/dist/scripts/5622-f78998bbe6-lite.chunk.js +0 -2
- package/dist/scripts/5729-538592d697-lite.chunk.js +0 -1
- package/dist/scripts/5940-d941246815-lite.chunk.js +0 -1
- package/dist/scripts/5986-353ceba4fa-lite.chunk.js +0 -1
- package/dist/scripts/6057-3c43af21b1-lite.chunk.js +0 -1
- package/dist/scripts/6086-ab856f75f4-lite.chunk.js +0 -2
- package/dist/scripts/613-09cc35983c-lite.chunk.js +0 -1
- package/dist/scripts/6450-5f09ed3ad3-lite.chunk.js +0 -1
- package/dist/scripts/6891-d4b2c9546b-lite.chunk.js +0 -1
- package/dist/scripts/7018-2308f5533a-lite.chunk.js +0 -1
- package/dist/scripts/7117-823b47ea37-lite.chunk.js +0 -1
- package/dist/scripts/717-94af4ef519-lite.chunk.js +0 -1
- package/dist/scripts/7293-82873b74bf-lite.chunk.js +0 -1
- package/dist/scripts/7432-e84ce758c3-lite.chunk.js +0 -1
- package/dist/scripts/7703-317893bc5c-lite.chunk.js +0 -1
- package/dist/scripts/778-fdade2c78d-lite.chunk.js +0 -1
- package/dist/scripts/7888-d27466192e-lite.chunk.js +0 -1
- package/dist/scripts/8771-4f43107eb8-lite.chunk.js +0 -1
- package/dist/scripts/9371-bb4cc49518-lite.chunk.js +0 -2
- package/dist/scripts/9433-049851ed26-lite.chunk.js +0 -1
- package/dist/scripts/9899-a5b1af36cc-lite.chunk.js +0 -1
- package/dist/scripts/bundle-bc95ba1058.min.js +0 -2
- /package/dist/scripts/{1890-fac67abcd4-lite.chunk.js.LICENSE.txt → 1276-f59b01d62d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2118-607920882f-lite.chunk.js.LICENSE.txt → 1890-f07da5a2f9-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2178-e330a0ab4b-lite.chunk.js.LICENSE.txt → 2118-bfd05a9f66-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2902-9ba47555e9-lite.chunk.js.LICENSE.txt → 2178-25cbb45d13-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2405-14ce3cbd9b-lite.chunk.js → 2405-74ec9699da-lite.chunk.js} +0 -0
- /package/dist/scripts/{3645-f97f7b9f25-lite.chunk.js.LICENSE.txt → 2425-22fe094fef-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3667-10b9ef4a18-lite.chunk.js.LICENSE.txt → 3091-c565b916c4-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3533-e56162a288-lite.chunk.js → 3533-cd97db4253-lite.chunk.js} +0 -0
- /package/dist/scripts/{4441-5b76a9f7bb-lite.chunk.js.LICENSE.txt → 3645-bedb82c8e6-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4942-e31587e199-lite.chunk.js.LICENSE.txt → 3667-48395666c8-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4612-e4e8d96b51-lite.chunk.js → 4612-5384785b06-lite.chunk.js} +0 -0
- /package/dist/scripts/{5177-0ab4eedd6f-lite.chunk.js.LICENSE.txt → 4778-9bb572ef6c-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5236-523db7b855-lite.chunk.js.LICENSE.txt → 4942-047e886378-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{510-f841a63c5a-lite.chunk.js → 510-743d18905d-lite.chunk.js} +0 -0
- /package/dist/scripts/{5268-ca61cdaa42-lite.chunk.js.LICENSE.txt → 5236-973a555387-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5622-f78998bbe6-lite.chunk.js.LICENSE.txt → 5268-184c87503d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6086-ab856f75f4-lite.chunk.js.LICENSE.txt → 5622-0a42a0e828-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6433-bef61de133-lite.chunk.js.LICENSE.txt → 6086-addbf8db6d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7052-83dfcb1239-lite.chunk.js.LICENSE.txt → 6102-82dc97f3ce-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6285-6d3952c42e-lite.chunk.js → 6285-d4f09be8e7-lite.chunk.js} +0 -0
- /package/dist/scripts/{6330-fc002f75ea-lite.chunk.js → 6330-813415573a-lite.chunk.js} +0 -0
- /package/dist/scripts/{7112-1407c686a2-lite.chunk.js.LICENSE.txt → 6433-68b97716af-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6817-eef444a47e-lite.chunk.js → 6817-1b546cc527-lite.chunk.js} +0 -0
- /package/dist/scripts/{691-2230cb8c9a-lite.chunk.js.LICENSE.txt → 691-10227e7ab5-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8323-cd37057445-lite.chunk.js.LICENSE.txt → 7052-e4bc676de1-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{841-00ef719dad-lite.chunk.js.LICENSE.txt → 7112-325fadf04c-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7409-20c97f763c-lite.chunk.js → 7409-e35cf01d04-lite.chunk.js} +0 -0
- /package/dist/scripts/{7422-f3c089f530-lite.chunk.js.LICENSE.txt → 7422-3f94d7269f-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7818-3f658380ac-lite.chunk.js → 7818-a93236c6a9-lite.chunk.js} +0 -0
- /package/dist/scripts/{8935-b3a92d0a86-lite.chunk.js.LICENSE.txt → 8323-cf60927523-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8383-09bcc4fbe8-lite.chunk.js → 8383-ff9fec4934-lite.chunk.js} +0 -0
- /package/dist/scripts/{9230-8d7875945e-lite.chunk.js.LICENSE.txt → 841-200f39fd79-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8820-8bd16f9b98-lite.chunk.js → 8820-ed1c3eff8a-lite.chunk.js} +0 -0
- /package/dist/scripts/{9371-bb4cc49518-lite.chunk.js.LICENSE.txt → 8935-a917bc6ae2-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9016-acde20f11b-lite.chunk.js.LICENSE.txt → 9016-9dca147239-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9478-193a5376c5-lite.chunk.js.LICENSE.txt → 9230-3dc593c14d-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9484-cfdaf1f938-lite.chunk.js.LICENSE.txt → 9371-7fc2cf96c6-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9894-d2d5d63baf-lite.chunk.js.LICENSE.txt → 9478-c359b1b4b9-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{polyfills-02090a38a6.min.js.LICENSE.txt → 9484-acc36952b1-lite.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[316],{84963:(e,t,n)=>{n.d(t,{r:()=>u});var a=n(32735),r=n(23481),o=n(83914),i=n(76177),l=n(35223);const c={tag:"XRj8d",tooltip:"X6mLk"};var s="specialEventCalendar.comingSoonTag";function u(e){return a.createElement(i.u,{title:r.T.getPhrase(s,"tooltip"),spanHackClassName:"d-block ".concat(c.tooltip),spanHack:!0},a.createElement("div",{className:"d-flex text-dark align-items-center ".concat(c.tag," ").concat(e.className)},a.createElement(o.x,{svgName:l.vn.Timer}),!e.onlyIcon&&r.T.getPhrase(s,"comingSoon")))}},73679:(e,t,n)=>{n.d(t,{s:()=>i});var a=n(32735),r=n(36848);const o={dateItem:"I3SBm",label:"PRORs",body:"RfiM_",bodyDay:"ZOVny",bodyRange:"vYhXN",bodyMonth:"mYslO",month:"EPkkQ"};function i(e){var t;return a.createElement(r.F,{appLink:null===(t=e.getAppLink)||void 0===t?void 0:t.call(e),className:"text-decoration-none text-center bg-white text-dark border border-3 border-light-blue rounded-3 d-block fw-semibold ".concat(e.className),analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions},a.createElement("div",{className:"position-relative ".concat(o.dateItem)},a.createElement("div",{className:"bg-light-blue py-1 ".concat(o.label," d-flex align-items-center justify-content-center")},e.label?e.label:a.createElement(a.Fragment,null," ")),a.createElement("div",{className:"".concat(function(){switch(e.body.type){case"range":return o.bodyRange;case"day":return o.bodyDay;case"month":return o.bodyMonth}}()," ").concat(o.body," my-2")},e.body.text),a.createElement("div",{className:"mb-0 ".concat(o.month)},e.month)))}},83657:(e,t,n)=>{n.d(t,{e:()=>s});var a=n(32735),r=n(79014),o=n(10874),i=n(76177),l=n(42735),c=n(86509);function s(e){var t=a.useMemo((function(){return e.actions.sort((function(e,t){return e.order-t.order}))}),[e.actions]),n=[],s=[];t.forEach((function(e){e.button?n.push(e):s.push(e)}));var u="d-flex";return e.className&&(u+=" ".concat(e.className)),n.length||s.length?a.createElement("div",{className:u},a.createElement(a.Fragment,null,a.createElement("span",{className:"d-flex align-items-center"},n.length?n.map((function(e,t){return a.createElement(a.Fragment,{key:t},function(){if(e.label){var t=r.q.isFunction(e.label)?e.label:function(){return a.createElement(a.Fragment,null,e.label)};return a.createElement(l.K,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,tooltip:e.tooltip,showSpinner:e.showSpinner,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},t())}var n=a.createElement(o.h,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled});return e.tooltip?a.createElement(i.u,{title:e.tooltip,spanHack:!0},n):n}())})):a.createElement(a.Fragment,null),e.sortComponent&&e.sortComponent,s.length?a.createElement(c.m,{actions:s,dropdownToggleClassName:e.actionsDropdownClassName,dropdownToggleSvgSize:e.dropdownToggleSvgSize}):a.createElement(a.Fragment,null)))):a.createElement(a.Fragment,null)}},86509:(e,t,n)=>{n.d(t,{m:()=>v});var a=n(32735),r=n(79014),o=n(81886),i=n(45157),l=n(49985),c=n(36848),s=n(83914),u=n(76177),m=n(35223);const d={dropdownToggle:"UCAnJ"};function p(e){var t="dropdown-item";return e&&(t+=" ".concat(e)),t}function f(e){var t=r.q.isFunction(e.action.label)?e.action.label:function(){return a.createElement(a.Fragment,null,e.action.label)};if(e.action.appLink)return a.createElement(c.F,{appLink:e.action.appLink,onClick:e.action.onClick,className:p(e.action.className),analyticsData:e.action.analyticsData,analyticsOptions:e.action.analyticsOptions,openInNewTab:e.action.openInNewTab,disabled:e.action.disabled},t());function n(t){t.preventDefault(),e.action.analyticsData&&e.action.analyticsOptions&&l.k.logUserAction(e.action.analyticsData,e.action.analyticsOptions),r.q.isFunction(e.action.onClick)&&e.action.onClick(),e.action.href&&o.Q.Ab.PageLoad(e.action.href,e.action.openInNewTab)}return e.action.href?a.createElement("a",{className:p(e.action.className),onClick:n,href:e.action.href},t()):a.createElement("span",{className:"cursor-pointer ".concat(p(e.action.className)),onClick:n,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&n(e)}},t())}function v(e){if(!e.actions||!e.actions.length)return a.createElement(a.Fragment,null);var t="dropdown";e.className&&(t+=" ".concat(e.className));var n="actions-dropdown-".concat(i.Y.getRandomInt()),r="dropdown-toggle px-0 ".concat(d.dropdownToggle);return e.dropdownToggleClassName&&(r+=" ".concat(e.dropdownToggleClassName)),a.createElement("div",{className:t},a.createElement("button",{className:r,type:"button",id:n,"data-bs-toggle":"dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},a.createElement(s.x,{svgName:m.vn.More,size:e.dropdownToggleSvgSize})),a.createElement("div",{className:"dropdown-menu dropdown-menu-end dropdown-menu-right","aria-labelledby":n},e.actions.map((function(e,t){return e.tooltip?a.createElement(u.u,{key:t,title:e.tooltip,spanHack:!0},a.createElement(f,{action:e})):a.createElement(f,{key:t,action:e})}))))}v.defaultProps={dropdownToggleClassName:"btn btn-light",dropdownToggleSvgSize:s.S.Small}},89043:(e,t,n)=>{n.d(t,{p:()=>C,v:()=>I});var a=n(32735),r=n(110),o=n(12788),i={renderInPortalIfExists:function(e,t){return t?(0,o.createPortal)(e,t):e}},l=n(84963),c=n(73679),s=n(83657),u=n(23481),m=n(36848),d=n(83914),p=n(35223),f="shared.backButton";function v(e){var t=Object.assign({textShadow:!0},e),n=t.backToName,r=t.appLink,o=t.color,i=t.extraClasses,l=t.textShadow,c=n?u.T.getPhrase(f,"backTo",{backToName:n}):u.T.getPhrase(f,"back"),s="black"===o?"":"text-white",v=l?"text-shadow":"";return a.createElement(m.F,{appLink:r,className:"d-inline-flex align-items-center h5 mb-0 ".concat(i," ").concat(s," ").concat(v)},a.createElement(d.x,{svgName:p.vn.ChevronLeft,size:d.S.Medium}),a.createElement("span",{className:"ms-1"},c))}v.defaultProps={color:"black",extraClasses:""};var g=n(83345),b=n(10587),h=n(94232),y=n(54610),E=n(79967),N=n(67453);const S={bannerContent:"sSCTB",actionsContainer:"Z5WI2",container:"M51HJ",logoContainer:"vkeJk",specialEventContainer:"rOxDc",headingLarge:"_8pnV",heading:"JXVBH"};var k="".concat(b.y[y.__.Banners].width,":").concat(b.y[y.__.Banners].height);function w(e){return e.length<160?"h1":S.headingLarge}var C=a.memo((function(e){var t,n=e.heading,o=e.banner,u=e.imageCdnUrl,m=e.actions,d=e.sortComponent,p=e.blockColourClass,f=e.specialEvent,b=a.useContext(h.n),C=(0,E.k)().xxl?1920:1200,I=a.useMemo((function(){if(!f||e.showComingSoon)return!1;var t=r.O.format(new Date,"YYYY-MM-DD");return f.endDate?f.startDate<=t&&f.endDate>=t:f.startDate===t}),[f]),L=e.imageOptions||{width:C,ratio:k,resizeType:y.Nq.Cover},A=!!o&&!!u&&N.j.createBannerUrl(o,{fallbackBaseUrl:u,fallbackCategoryName:n,type:y.__.Banners},L),x={className:"banner banner-header ".concat(e.bannerClassName),style:A?{backgroundImage:"url('".concat(A,"')")}:{}};!o&&p&&(delete x.style,x.className+=" ".concat(p));var O=e.detailsComponent;return i.renderInPortalIfExists(a.createElement("header",Object.assign({},x),a.createElement("div",{className:"container ".concat(S.container," position-relative inner-banner")},e.backButtonAppLink&&a.createElement("div",{className:"pt-3"},a.createElement(v,{appLink:e.backButtonAppLink,backToName:e.backButtonText,extraClasses:e.backButtonClasses,color:"white"})),a.createElement("div",{className:"".concat(S.bannerContent)},!!f&&a.createElement("div",{className:"position-relative ".concat(S.specialEventContainer)},a.createElement(c.s,{body:{type:f.endDate?"range":"day",text:f.endDate?"".concat(r.O.format(f.startDate,"DD"),"-").concat(r.O.format(f.endDate,"DD")):r.O.format(f.startDate,"DD")},month:r.O.format(f.startDate,"MMMM")})),a.createElement("div",null,I&&a.createElement("div",{className:"rounded-pill py-1 px-2 my-1 me-1 fw-semibold bg-light-blue lh-1 d-inline-block"},a.createElement(g.x,{namespace:"shared.bannerHeader",phrase:"onToday"})),e.showComingSoon&&a.createElement(l.r,{className:"pe-2 fw-semibold mb-1 rounded-pill justify-content-start text-nowrap"}),a.createElement("h1",{className:"text-white text-shadow ".concat(S.heading," ").concat(w(n))},n,O&&a.createElement(O,null))),!!m&&a.createElement("div",{className:S.actionsContainer},a.createElement(s.e,{actions:m,sortComponent:d,actionsDropdownClassName:e.actionsDropdownClassName}))),!!(null===(t=e.logo)||void 0===t?void 0:t.url)&&a.createElement("div",{className:S.logoContainer},a.createElement("img",{src:N.j.createUrl(e.logo.url,{size:y.h2.Small}),className:"rounded-circle"})))),null==b?void 0:b.container)}),(function(e,t){var n,a;return e.actions===t.actions&&e.heading===t.heading&&(null===(n=e.logo)||void 0===n?void 0:n.url)===(null===(a=t.logo)||void 0===a?void 0:a.url)}));function I(){var e=a.useContext(h.n);return i.renderInPortalIfExists(a.createElement("div",{className:"partial-banner partial-loading-background ".concat(S.banner)}),null==e?void 0:e.container)}},49935:(e,t,n)=>{n.d(t,{Oo:()=>m,b2:()=>d});var a=n(32735),r=n(36848),o=n(86764),i=n(3747),l=n(5859),c=n(35223),s=n(83914),u=function(e){var t=e.breadcrumb,n=t.name,o=t.appLink,i=t.active,l=e.withBackIcon;return a.createElement("li",{className:"breadcrumb-item".concat(i?" active":"")},i?a.createElement("strong",null,n):a.createElement(r.F,{appLink:o},l&&a.createElement(s.x,{svgName:c.vn.ChevronLeft,size:s.S.Small}),a.createElement("span",{className:l?"ms-2":""},n)))},m=function(e){var t=e.breadcrumbs,n=(0,i.a)(o.r.XS),r=null==t?void 0:t.length;return!r||n&&r<2?a.createElement(a.Fragment,null):n?a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},a.createElement(u,{breadcrumb:t[r-2],withBackIcon:!0}))):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},t.map((function(e,t){return a.createElement(u,{key:t,breadcrumb:e})}))))},d=a.memo((function(e){var t=e.numItems,n=void 0===t?3:t;return(0,i.a)(o.r.XS)?a.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},l.u.getPartialLoadingItems({numItems:n}).map((function(e,t){var n=e.width;return a.createElement("li",{key:t,className:"breadcrumb-item"},a.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:n},dangerouslySetInnerHTML:{__html:" "}}))}))))}))},47770:(e,t,n)=>{n.d(t,{K:()=>c});var a=n(32735),r=n(68050),o=n(69111),i=n(94495),l=n(91028);function c(e){return a.createElement(a.Fragment,null,a.createElement(i.B,{name:e.name,description:e.description}),a.createElement(r.Z,{className:"mb-n2"},e.content.map((function(t){return a.createElement(o.Z,{className:"position-relative pb-2",key:t.id,xs:12,sm:6,lg:e.hasTableOfContents?6:4,xl:4},a.createElement(l.V,{data:t,getChildAppLink:function(t){var n,a;return null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.classification)||void 0===a?void 0:a.call(n,t)},analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,isLarge:!0}))}))))}},65163:(e,t,n)=>{n.d(t,{QL:()=>a.Q});var a=n(16450);n(14244)},2192:(e,t,n)=>{n.d(t,{M:()=>g,Q:()=>b});var a=n(32735),r=n(45157),o=n(36848),i=n(60376),l=n(5465),c=n(83914),s=n(83345),u=n(54610),m=n(67453),d=n(35223),p=n(92038),f=function(e){var t=e.name,n=e.multiline,r="".concat(p.Z.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),o="";return n?o+=" ".concat(p.Z.clamped," clamp-2"):(r+=" text-nowrap",o+=" text-truncate"),a.createElement("div",{className:r},a.createElement("small",{className:"text-muted"},a.createElement(s.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),a.createElement("p",{className:"".concat(p.Z.name," h6")},a.createElement("span",{className:o},t)))},v=function(e){var t=e.name,n=e.multiline,r=e.subtitle,o="px-3 d-flex flex-column justify-content-center",i="".concat(p.Z.name," h6");return n?i+=" clamp-3 text-start":(o+=" text-nowrap text-truncate",i+=" text-truncate mb-0 pb-1"),a.createElement("div",{className:o},r&&a.createElement("div",{className:"text-secondary clamp-1 ".concat(p.Z.text)},r),a.createElement("div",{className:i,title:t},t))};function g(e){var t=m.j.createUrl(e.coverUrl,{size:e.isLarge?u.h2.Medium:u.h2.Small}),n={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:e.subtitle};return a.createElement("div",{className:"border d-flex position-relative ".concat(e.className," ").concat(p.Z.widgetItem," ").concat(e.isSelected?"border-success border-2":""),id:"".concat(e.data.id,"-").concat(r.Y.getRandomInt())},e.isSelected&&a.createElement("div",{className:"".concat(p.Z.selectedMask," border-2")}),a.createElement("div",{className:"".concat(p.Z.imagePanel," ").concat(e.isLarge?p.Z.large:"")},e.isSelected&&!e.hideCheckmark&&a.createElement("div",{className:p.Z.selected},a.createElement(i.f,{svgName:d.vn.Check,svgSize:c.S.Large,textVariant:"white",variant:"green"})),a.createElement("div",{className:"".concat(p.Z.image," ").concat(e.imageClassName),style:e.coverUrl?{backgroundImage:"url('".concat(t,"')")}:{}}),!e.hideFallback&&a.createElement(l.oy,{type:l.mS.Subject,extraClasses:e.isLarge?p.Z.large:""})),e.isComingSoon?a.createElement(f,Object.assign({},n)):a.createElement(v,Object.assign({},n)))}function b(e){var t,n=e.getChildAppLink?e.getChildAppLink(e.data):null;return a.createElement(a.Fragment,null,n?a.createElement(o.F,{className:p.Z.appLink,appLink:n,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLinkOptions:null===(t=e.getChildAppLinkOptions)||void 0===t?void 0:t.call(e)},a.createElement(g,Object.assign({},e))):a.createElement(g,Object.assign({},e)))}},43741:(e,t,n)=>{n.d(t,{M:()=>s,Q:()=>c});var a=n(32735),r=n(45157),o=n(5465),i=n(92038);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var c=function(){var e,t,n=(e=a.useState(r.Y.getRandomInt(5)+3+"rem"),t=1,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return a.createElement("div",{className:"border d-flex position-relative me-2 ".concat(i.Z.widgetItem)},a.createElement("div",{className:i.Z.imagePanel}),a.createElement("div",{className:"px-2",style:{width:n}}),a.createElement("div",{className:i.Z.partialIcon},a.createElement(o.oy,{type:o.mS.Subject})))},s=function(){return a.createElement("div",{className:"border d-flex position-relative me-2 ".concat(i.Z.widgetItem)},a.createElement("div",{className:"".concat(i.Z.partialLargeImage)}),a.createElement("div",{className:"px-2"}),a.createElement("div",{className:i.Z.partialIcon},a.createElement(o.oy,{type:o.mS.Subject,extraClasses:i.Z.partialLargeFallback})))}},91028:(e,t,n)=>{n.d(t,{V:()=>c});var a=n(32735),r=n(65858),o=n(2192),i=n(52641),l=n(2284),c=a.memo((function(e){var t,n,c,s,u,m=(null===(t=e.data)||void 0===t?void 0:t.status)===l.W.ComingSoon,d=function(e,t){var n;if((null==t?void 0:t.length)>=i._.MULTI_PRESENTATION_THRESHOLD)return null===(n=null==t?void 0:t.find((function(t){return t.id===e})))||void 0===n?void 0:n.name}(e.data.presentationId,null==e?void 0:e.availablePresentations),p=Object.assign(Object.assign({},e.analyticsData),{id:null===(n=e.data)||void 0===n?void 0:n.id,name:null===(c=e.data)||void 0===c?void 0:c.name,presentationId:e.data.presentationId,comingSoon:!!m}),f=Object.assign(Object.assign({location:r.LZ.ClassificationListItem},e.analyticsOptions),{actionType:r.Vw.Click,entity:r.py.Classification,descriptor:r._S.Cover});return a.createElement(o.Q,Object.assign({},e,{analyticsData:p,analyticsOptions:f,coverUrl:null===(s=e.data.cover)||void 0===s?void 0:s.url,subtitle:(null===(u=e.getSubtitle)||void 0===u?void 0:u.call(e,e.data))||d,isComingSoon:m}))}))},9513:(e,t,n)=>{n.d(t,{Ml:()=>r.M,Qh:()=>r.Q,Vz:()=>a.V});var a=n(91028),r=n(43741),o=(n(32735),n(65858));n(36848),n(83914),n(83345),n(35223),n(92038),o.Vw.Click,o.py.UserSetting,o._S.Tile,n(2786),o.Vw.Click,o.py.Url,o._S.Tile},2284:(e,t,n)=>{var a;n.d(t,{W:()=>a}),function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(a||(a={}))},25665:(e,t,n)=>{n.d(t,{k:()=>c});var a=n(99940),r=n(97395);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var l=function(e){return r._.urlBuilder("/api/domain/v1/subjects/classifications/following",{id:e})},c={follow:function(e,t,n){return{url:"/api/domain/v1/subjects/classifications/following",key:"follow:".concat(e.join(",")),type:a.k.POST,data:e,success:t,error:n,invalidationKeys:[].concat(o(e.map((function(e){return"classification:".concat(e)}))),["my:subject:preferences","classifications"])}},unfollow:function(e,t,n){return{url:l(e),key:"unfollow:".concat(e.join(",")),type:a.k.DELETE,success:t,error:n,invalidationKeys:[].concat(o(e.map((function(e){return"classification:".concat(e)}))),["my:subject:preferences","classifications"])}}}},81514:(e,t,n)=>{n.d(t,{V:()=>o});var a=n(86764),r=n(3747);function o(){var e=(0,r.a)(a.r.XS),t=(0,r.a)(a.r.SM),n=(0,r.a)(a.r.MD),o=(0,r.a)(a.r.LG),i=(0,r.a)(a.r.XL),l=(0,r.a)(a.r.XXL),c=a.r.LG;return e&&(c=a.r.XS),t&&(c=a.r.SM),n&&(c=a.r.MD),o&&(c=a.r.LG),i&&(c=a.r.XL),l&&(c=a.r.XXL),c}},69454:(e,t,n)=>{n.d(t,{T:()=>m});var a=n(75896),r=n(1048),o=n(55171);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var l=/\d/,c=function(e){var t,n,r=a.m.first(e),o=a.m.last(e);return r.name===o.name?r.name:"Advanced"===o.name?"lower"===(t=r.name.split(" "),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return i(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].toLowerCase()?"Lower Sec - Adv":"Upper Sec - Adv":"Lower - Upper Sec"},s=/([0-9]+)/gi,u=/\s|\+/gi,m={getSortedPresentationAudiences:function(e,t){var n=e.filter((function(e){return!!e})).map((function(e){return e.id.toString()}));return t.filter((function(e){return n.includes(e.masterId.toString())}))},getMergedPresentationAudienceString:function(e){var t,n,r,i="";switch(+a.m.first(e).presentationId){case o.e.PresentationIds.DEFAULT:case o.e.PresentationIds.AU_SECONDARY:case o.e.PresentationIds.US_ELEMENTARY:case o.e.PresentationIds.AU_PRIMARY:case o.e.PresentationIds.STREAMABLE_LEARNING:if(1===e.length)return e[0];i=function(e){var t=e.map((function(e){return e.name})).join(" "),n=t.split(" ").filter((function(e){return!isNaN(+e)})).map((function(e){return+e}))||[],a=t.split(" ").filter((function(e){return isNaN(+e)}))||[],r=e.find((function(e){return!l.test(e.name)})),o=a.find((function(e){return e!==(null==r?void 0:r.name)}));if(e.length>1&&(o+="s"),r&&n.length)return"".concat(o," ").concat(r.name.charAt(0)," - ").concat(n.pop());var i=function(e){var t,n,a,r,o=!1,i=[];for(e=e.sort((function(e,t){return e-t})),a=0;a<e.length;a++)r=a+1,o||(t=e[a]),n=e[r],e[a]+1===n?o=!0:o?(i.push("".concat(t," - ").concat(e[a])),o=!1):(i.push("".concat(e[a])),o=!1);return i}(n);return"".concat(o," ").concat(i.join(", "))}(e);break;case o.e.PresentationIds.SCOTLAND_PRIMARY:case o.e.PresentationIds.INTERNATIONAL_PRIMARY:case o.e.PresentationIds.INTERNATIONAL_SECONDARY:if(1===e.length)return e[0];i=function(e){var t=e.map((function(e){return e.name})),n={};t.forEach((function(e,t){if(0!==t){var a=e.split(" ");Object.keys(n).forEach((function(e){a.includes(e)||delete n[e]}))}else e.split(" ").forEach((function(e,t){n[e]=0===t?"start":"end"}))}));var a=Object.keys(n)[0],r=n[a];if(!a)return e[0].name;var o=e[0].name,i=e[e.length-1].name,l=function(e){return e.split(a)[0]},c="".concat(l(o)," - ").concat(l(i));return"start"===r?"".concat(a," ").concat(c):"".concat(c," ").concat(a)}(e);break;case o.e.PresentationIds.ENGLISH_SECONDARY:i=c(e);break;case o.e.PresentationIds.SCOTLAND_SECONDARY:t=e,n=a.m.first(t),r=a.m.last(t),i=n.name===r.name?n.name:"Senior Phase"===r.name?"".concat(n.name," - Senior"):"Third - Fourth Level";break;case o.e.PresentationIds.ENGLAND_PRIMARY:i=function(e){var t=a.m.first(e),n=a.m.last(e),r=a.m.first(t.name.split(" ")),o=a.m.first(n.name.split(" ")),i=t.name.split(" ").find((function(e){return!isNaN(+e)})),l=n.name.split(" ").find((function(e){return!isNaN(+e)}));if(t===n)return"Key"===r||"Reception"===r?t.name:"".concat(r," KS").concat(i);var c="",s="";return c="Reception"===r?"R":"KS".concat(i),s="KS".concat(l),"Lower"===r&&"Upper"===o?"L ".concat(c," - U ").concat(s):("Lower"===r&&(c="Lower ".concat(c)),"Upper"===o&&(s="Upper ".concat(s)),"Key"===o&&(s=n.name),"".concat(c," - ").concat(s))}(e);case o.e.PresentationIds.US_MIDDLE:case o.e.PresentationIds.US_HIGH:}return i?{name:i}:null},sortMembersWithDuplicateNamesByAudience:function(e){var t=function(e){return e.length?(e.forEach((function(e){var r=+a.m.first(e.name.match(s));if(!t)return t=e,void(n=r);r<n&&(t=e)})),t):null;var t,n},n={},r=[];return e.forEach((function(e){if(!n[e.name])return n[e.name]=1,void r.push(e);r.push(e),n[e.name]++;var a=r.splice(r.length-n[e.name]).sort((function(e,n){var a=t(e.subjectPresentationAudiences.data),r=t(n.subjectPresentationAudiences.data);if(!a&&r)return 1;if(!r)return-1;var o=a.name.localeCompare(r.name);return 0===o?o:o>0?-1:1}));r=r.concat(a)})),r},getActiveAudiencesFromParams:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.t.isObject(t)&&!r.t.isEmpty(t)&&e&&e.length&&m.shouldShowAudiences(e)){var n=t.a;if(n){"string"==typeof n&&(n=[n]);var a=function(e){return e.replace(u,"").toLowerCase()},o=n.reduce((function(e,t){return e[a(t)]=t,e}),{});return e.filter((function(e){return o[a(e.name)]}))}}},getAudienceParams:function(e){return(null==e?void 0:e.length)?{a:e.map((function(e){return e.name}))}:null},shouldShowAudiences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return!!e&&e.length>1}}},4399:(e,t,n)=>{n.d(t,{$7:()=>i,Dp:()=>l});var a=n(28400),r=n(14070),o=n(97291),i=function(e){return function(t){return{application:o.O.SUBJECT,action:r.e.Subjects.CLASSIFICATION,args:t?[t.id,a.m.slugify(t.name)]:[],params:e||{}}}},l=function(e){return{application:o.O.SUBJECT,action:r.e.Subjects.CLASSIFICATION_ALL,params:e?{presentationId:e}:{}}}},63191:(e,t,n)=>{n.r(t),n.d(t,{ClassificationsView:()=>Y,getBannerActions:()=>Z});var a=n(32735),r=n(70680),o=n(23481),i=n(57900),l=n(20354),c=n(2948),s=n(65858),u=n(89043),m=n(49935),d=n(47770),p=n(65163),f=n(9513),v=n(38143),g=n(2284),b=n(54610),h=n(86764),y=n(78479),E=n(42308),N=n(21750),S=n(39151),k=n(25665),w=n(31949),C=n(3747),I=n(79612),L=n(69454),A=n(35223),x=n(10144),O=n(99742),T=n(14070),D=n(97291),j=n(7179),P=n(86698),M=n(33192),F=n(4399);const U={classificationPane:"kx1WX"};function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var B=o.T.encloseNamespace("subjects.classifications");function Z(e,t,n,a){var r,o;if(!(null==e?void 0:e.id))return[];var i=!!(null===(o=null===(r=e.followers)||void 0===r?void 0:r.data)||void 0===o?void 0:o.length);return[{label:B(i?"unfollow":"follow"),onClick:t,svgName:i?A.vn.Check:A.vn.Bell,className:"btn follow-btn ".concat(i?"btn-outline-dark":"btn-dark"," me-2"),button:!0,tooltip:i||a?void 0:B("followBtnTooltip"),showSpinner:n}]}function Y(e){var t,n,o,A,_,Y,H,z,X,V=e.id,J=e.presentationId,K=R(a.useState(),2),Q=K[0],$=K[1],G=(0,r.I0)(),W=l.a.useBasicFetch(w.N.currentUser()),q=l.a.useBasicFetch(S.L.config()),ee=(0,P.y)(),te=ee.availablePresentations,ne=ee.hasPresentationsLoaded,ae=ee.canAccessPresentation,re=l.a.useBasicFetch(J&&N.x.presentationById(J)),oe=re.hasCompleted&&ne,ie=function(e,t,n,a){var r=l.a.useBasicFetch(n&&N.x.classification(n,a));return n?null==r?void 0:r.data:{name:x.i.getExploreAllTopicsTitle(null==e?void 0:e.name,t),banner:{url:x.i.getPresentationLevelImage(null==e?void 0:e.learningLevel,"topic-banner")}}}(null==re?void 0:re.data,null==te?void 0:te.length,V,null===(t=W.data)||void 0===t?void 0:t.id),le=V?N.x.children(V):N.x.topLevelTopics(J||(null===(n=re.data)||void 0===n?void 0:n.id)),ce=l.a.useBasicFetch(oe&&le),se=function(e){var t=l.a.useBasicFetch(e&&N.x.path(e));return e?null==t?void 0:t.data:[]}(V),ue=R((0,c.D)(v.g.AUDIENCE_FILTER,void 0,{storage:i.Z1.SessionStorage}),1)[0],me=V?B("pageTitleTopic",{title:null==ie?void 0:ie.name}):B("pageTitleSubject",{title:null===(o=re.data)||void 0===o?void 0:o.name});(0,I.M)({title:me,description:B("pageDescription",{title:V?null==ie?void 0:ie.name:null===(A=re.data)||void 0===A?void 0:A.name}),canonicalLink:M.f.getCanonicalLink(),allowIndexing:M.f.allowIndexing()}),(0,j.P)({id:V,app:"topics"});var de=(0,F.$7)(L.T.getAudienceParams(ue));a.useEffect((function(){$(!1)}),[null===(Y=null===(_=null==ie?void 0:ie.followers)||void 0===_?void 0:_.data)||void 0===Y?void 0:Y.length]);var pe=(0,C.a)(h.r.MDDown);var fe=(!V||!!ie)&&!!q.data&&!!te&&ce.data,ve=!!te&&!!se,ge=ae(null===(H=re.data)||void 0===H?void 0:H.id),be={presentationId:null===(z=re.data)||void 0===z?void 0:z.id,presentationName:null===(X=re.data)||void 0===X?void 0:X.name,currentClassificationName:null==ie?void 0:ie.name,widgetId:E.z.Classifications,templateId:y.f.CoverFixedPillListLarge},he=(null==ie?void 0:ie.status)===g.W.ComingSoon;return a.createElement("main",{className:"bg-white px-3"},fe?a.createElement(u.p,{heading:null==ie?void 0:ie.name,banner:null==ie?void 0:ie.banner,imageCdnUrl:q.data.imageCdnUrl,actions:he?[]:Z(ie,(function(){var e,t;$(!0);var n=(null===(t=null===(e=null==ie?void 0:ie.followers)||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)?k.k.unfollow:k.k.follow;l.a.fetch(G,n([null==ie?void 0:ie.id]))}),Q,pe),imageOptions:!V&&{size:b.h2.Large}}):a.createElement(u.v,null),a.createElement("div",{className:"py-3 mb-3 ".concat(ge?"border-bottom":"")},ge?ve?a.createElement(m.Oo,{breadcrumbs:function(){var e,t=[{name:B("discover"),appLink:{application:D.O.DASHBOARD,action:T.e.Dashboard.HOME}},{name:x.i.getExploreAllTopicsTitle(null===(e=re.data)||void 0===e?void 0:e.name,null==te?void 0:te.length),appLink:{application:D.O.SUBJECT,action:T.e.Subjects.CLASSIFICATION_ALL},active:!V}];return se.forEach((function(e){t.push({name:e.name,appLink:de(e)})})),V&&t.push({name:B("subview"),active:!0}),t}()}):a.createElement(m.b2,null):a.createElement(a.Fragment,null)),a.createElement("div",{className:U.classificationPane},fe?a.createElement(d.K,{analyticsData:be,content:null==ce?void 0:ce.data,analyticsOptions:{location:s.LZ.SlidingListItem},appLinks:{classification:de},imageCdnUrl:q.data.imageCdnUrl,resourceThumbnailFallbackImageUrl:O.W.Fallbacks.RESOURCE_THUMBNAIL}):a.createElement(p.QL,{partialLoadingComponent:f.Qh})))}},92038:(e,t,n)=>{n.d(t,{Z:()=>a});const a={appLink:"fFjKN",name:"A_by9",selectedMask:"xSQtR",widgetItem:"Ys9W_",text:"JfAoy",imagePanel:"aUNDc",partialLargeImage:"RuLxv",selected:"BViJb",image:"LkTep",dragHandle:"CJqvP",large:"R5clw",comingSoonPanel:"Wa2PG",editSubjectsItem:"gGNFD",allSubjectsItem:"IHdlJ",logoContainer:"Nzaes",draggingItem:"zUOye",partialLargeFallback:"FmJP9",partialIcon:"sdZuo"}},68050:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(95685),r=n.n(a),o=n(32735),i=n(46304),l=n(74512);const c=o.forwardRef((({bsPrefix:e,className:t,as:n="div",...a},o)=>{const c=(0,i.vE)(e,"row"),s=(0,i.pi)(),u=(0,i.zG)(),m=`${c}-cols`,d=[];return s.forEach((e=>{const t=a[e];let n;delete a[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const r=e!==u?`-${e}`:"";null!=n&&d.push(`${m}${r}-${n}`)})),(0,l.jsx)(n,{ref:o,...a,className:r()(t,c,...d)})}));c.displayName="Row";const s=c}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3285],{94644:(e,t,a)=>{a.d(t,{r:()=>u});var n=a(50242),i=a(81886),r=a(67058),d=a(14553),o=a(49267),s=a(49075),c={notFound:r.d,forbidden:{rating:d.q,yearLevel:d.q,region:o.a,privacy:d.q},badRequest:s._};function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var r;r="number"==typeof e?e:e.status;var d=Object.assign(Object.assign({},c),t);r&&i.Q.Ry.isStatusCodeError(r)&&(r!==n.o.NotFound?r!==n.o.Forbidden?a.badRequest||i.Q.Ry.throw(new d.badRequest):a.forbidden||i.Q.Ry.throw(new d.forbidden.privacy):a.notFound||i.Q.Ry.throw(new d.notFound))}}},91286:(e,t,a)=>{a.d(t,{v:()=>d});var n=a(32735),i=a(94644);function r(e){return e.map((function(e){return e.statusCode})).join(":")}function d(e,t,a){var d=Array.isArray(e)?e:[e];(0,n.useEffect)((function(){d.forEach((function(e){(0,i.r)(e.statusCode,t,a)}))}),[r(d),t,a])}},61995:(e,t,a)=>{a.d(t,{_:()=>d});var n=a(45593),i=a(21938),r=a(76867),d={notFound:i.W,forbidden:{rating:n.F,yearLevel:n.F,region:r.z,privacy:n.F},badRequest:r.z}},33285:(e,t,a)=>{a.r(t),a.d(t,{EmbeddedLcsVideoView:()=>C});var n=a(32735),i=a(81886),r=a(20354),d=a(60051),o=a(39151),s=a(47812),c=a(31949),u=a(1575),l=a(27995),v=a(91286),f=a(79612),h=a(14070),m=a(97291),p=a(49948),b=a(56017),g=a(33192),y=a(57245),F=a(45593),w=a(61995);function C(e){var t,a,C=r.a.useBasicFetch(c.N.currentUser()),q=r.a.useBasicFetch((null===(t=C.data)||void 0===t?void 0:t.isAuthenticated)&&u.R.video(e.id)),E=r.a.useBasicFetch(o.L.config()),R=r.a.useBasicFetch(s.k.createViewKey(e.id,d.f.MasterObject)),k=(0,p.l)((null===(a=C.data)||void 0===a?void 0:a.isAuthenticated)&&e.id);return(0,f.M)(b.C.getVideoMetadata({content:q.data,canonicalLink:g.f.getCanonicalLink({stripPresentationSlug:!0}),allowIndexing:!1})),(0,l.b)(q,{private:F.F}),(0,v.v)(q,w._),C.hasCompleted&&!C.data.isAuthenticated?(i.Q.C$.trigger({application:m.O.EMBED,action:h.e.Embed.LCS_LOGIN,args:[e.id],params:e.queryParams}),n.createElement(n.Fragment,null)):q.data&&C.hasCompleted&&E.hasCompleted&&R.hasCompleted&&k.hasCompleted?n.createElement(y._,{config:E.data,video:q.data,currentUser:C.data,viewKey:R.data,pointsOfInterest:k.items,embed:!0,showResources:!0,autoplay:"true"===e.queryParams.a,startTime:e.queryParams.t}):n.createElement(n.Fragment,null)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3530],{94644:(e,t,r)=>{r.d(t,{r:()=>u});var n=r(50242),a=r(81886),i=r(67058),c=r(14553),o=r(49267),l=r(49075),s={notFound:i.d,forbidden:{rating:c.q,yearLevel:c.q,region:o.a,privacy:c.q},badRequest:l._};function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var i;i="number"==typeof e?e:e.status;var c=Object.assign(Object.assign({},s),t);i&&a.Q.Ry.isStatusCodeError(i)&&(i!==n.o.NotFound?i!==n.o.Forbidden?r.badRequest||a.Q.Ry.throw(new c.badRequest):r.forbidden||a.Q.Ry.throw(new c.forbidden.privacy):r.notFound||a.Q.Ry.throw(new c.notFound))}}},91286:(e,t,r)=>{r.d(t,{v:()=>c});var n=r(32735),a=r(94644);function i(e){return e.map((function(e){return e.statusCode})).join(":")}function c(e,t,r){var c=Array.isArray(e)?e:[e];(0,n.useEffect)((function(){c.forEach((function(e){(0,a.r)(e.statusCode,t,r)}))}),[i(c),t,r])}},84062:(e,t,r)=>{r.d(t,{M:()=>y});var n=r(32735),a=r(17082),i=r(65858),c=r(38647),o=r(16714),l=r(97037),s=r(22902),u=r(67753),d=r(31908),v=r(26492),m=r(78166),p=r(57245);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e){var t,r,y=e.shareLink?i.LZ.PlaySharedInteractive:i.LZ.PlayInteractive,g=(t=n.useState(!0),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,c,o=[],l=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(s)throw a}}return o}}(t,r)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(t,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.")}()),b=g[0],h=g[1],E=d.M.isVideoTypeArchived(e.interactive),I=n.useMemo((function(){return(0,a.oD)()}),[]),P=(0,l.c)(y),w=P.setFavourite,S=P.canFavourite,A=(0,s.T)().hasPermissions;return n.createElement("div",{className:"px-3"},E&&n.createElement(v.T,{typeId:e.interactive.typeId,hasStudentExperience:!0}),n.createElement("div",{className:"mb-3"},n.createElement(p._,{config:e.config,video:e.interactive,currentUser:e.currentUser,shareLink:e.shareLink,viewKey:e.viewKey,startTime:e.startTime,onShowSummary:function(e){h(!e)},summaryPortalNode:I})),n.createElement("div",null,b&&n.createElement("h1",{className:"h3"},e.interactive.name,n.createElement(c.m,{tooltipPlacement:"right",className:"ps-1 mb-n1",video:e.interactive,yearGroups:e.yearGroups}))),n.createElement(a.t0,{node:I}),!A(o.C.StudentExperience)&&n.createElement(m.Z,{currentVideo:e.interactive,yearGroups:e.yearGroups,currentUser:e.currentUser,setFavourite:w,canFavourite:S,relatedVideos:e.relatedVideos,audiences:e.audiences,getVideoAppLink:function(t){var r;return u.W.getAppLink(t,{context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:null===(r=e.shareLink)||void 0===r?void 0:r.id,moviesAndTv:e.queryParams.mtv})},moviesAndTv:e.queryParams.mtv}))}},25758:(e,t,r)=>{r.d(t,{x:()=>F});var n=r(32735),a=r(17082),i=r(23481),c=r(28400),o=r(65858),l=r(83657),s=r(36848),u=r(83345),d=r(38647),v=r(11518),m=r(47862),p=r(10439),f=r(35429),y=r(5960),g=r(4594),b=r(58704),h=r(97037),E=r(67753),I=r(31908),P=r(47938),w=r(78166),S=r(14070),A=r(97291),N=r(65986),x=r(83914),C=r(83523),T=r(76177),k=r(35223),V=i.T.encloseNamespace("interactives.previewInteractive");function O(e){return n.createElement("div",{className:"alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center",role:"alert"},e.isArchived?n.createElement("div",{className:"d-flex align-items-center"},n.createElement(x.x,{svgName:k.vn.Archive,size:x.S.Standard,className:"me-2 svg-container"}),n.createElement("div",{className:"w-100"},n.createElement("p",{className:"fw-semibold mb-0"},V("archivedInfoTitle")),n.createElement("p",{className:"mb-1"},V("archivedInfo")))):n.createElement(u.x,{phrase:"alert"}),e.isPreviewPreventScrubbingEnabled&&n.createElement(T.u,{title:V("previewPreventScrubbingExplain"),trigger:"hover",spanHack:!0},n.createElement("div",{className:"d-flex mt-1 mt-lg-0"},n.createElement("div",{className:"me-2"},n.createElement(u.x,{phrase:"previewPreventScrubbing"})),n.createElement(C.Z,{on:e.isPreviewingPreventScrubbing,onClick:e.toggleStudentMode}))))}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var j="interactives.previewInteractive",q=i.T.encloseNamespace(j);function F(e){var t,r,i,x,C,T,k,V,F=e.shareId?o.LZ.PreviewSharedInteractive:o.LZ.PreviewInteractive,M=(0,f.g)(),_=(k=n.useState(!1),V=2,function(e){if(Array.isArray(e))return e}(k)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,c,o=[],l=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(s)throw a}}return o}}(k,V)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(e,t):void 0}}(k,V)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),R=_[0],U=_[1],G=I.M.getCanBeConsumed(e.interactive).canConsume,D=n.useMemo((function(){return(0,a.oD)()}),[]),Z=(0,N._)(N.i.PlayPage),Q=(0,h.c)(F),W=Q.setFavourite,B=Q.canFavourite;C=R,T=function(){var e,t,r;null===(r=null===(t=null===(e=M.playerRef)||void 0===e?void 0:e.current)||void 0===t?void 0:t.togglePreviewPreventScrubbing)||void 0===r||r.call(t)},n.useEffect((function(){T()}),[C]);var K,z,Y,$,H=(K=e.interactive)._parentClip||K._parentVideo;I.M.isClip(H)?(z=null===(r=null===(t=H.interactives)||void 0===t?void 0:t.data)||void 0===r?void 0:r.filter((function(t){return t.id.toString()!==e.interactive.id.toString()})),Y=H.name,$={application:A.O.CLIPS,action:S.e.Clips.PLAY_CLIP,args:[H.id,c.m.slugify(H.name)]}):(z=null===(x=null===(i=H.interactives)||void 0===i?void 0:i.data)||void 0===x?void 0:x.filter((function(t){return t.id.toString()!==e.interactive.id.toString()})),Y=H.name,$={application:A.O.VIDEOS,action:S.e.Videos.PLAY_VIDEO,args:[H.id,c.m.slugify(H.name)]});var X=e.interactive.status===y.X.Draft;return n.createElement(u.D.Provider,{value:j},n.createElement("div",{className:"px-4"},n.createElement(P.W,{restrictions:e.interactive._restrictions,yearGroups:e.yearGroups,objectId:e.interactive.id,objectTypeId:g.E.Interactive,canManageVideoAccess:e.canManageVideoAccess}),n.createElement(O,{isPreviewPreventScrubbingEnabled:e.isPreviewPreventScrubbingEnabled,isPreviewingPreventScrubbing:R,toggleStudentMode:function(){U(!R)},isArchived:I.M.isVideoTypeArchived(e.interactive)}),n.createElement("div",{className:"mb-3"},G&&n.createElement(p.r,{key:e.interactive.id,objectId:e.interactive.id,objectTypeId:e.interactive.typeId,shareId:e.shareId,startTime:e.queryParams.t,mode:"default",location:"play-page"})),n.createElement("div",{className:"d-flex justify-content-between align-items-center"},n.createElement("div",null,n.createElement("h1",{className:"h3 d-inline-block m-0 mb-2"},X&&n.createElement("span",{className:"badge draft-badge me-2 align-bottom"},"Draft"),e.interactive.name,n.createElement(d.m,{tooltipPlacement:"right",className:"ps-1 mb-n1",video:e.interactive,yearGroups:e.yearGroups})),I.M.canViewOriginalVideo(e.interactive)&&n.createElement("div",{className:"mb-1 me-3 clamp-1"},n.createElement(u.x,{phrase:"viewOriginal"})," ",n.createElement(s.F,{appLink:$,className:"text-info"},Y))),n.createElement(l.e,{actions:Z(e.interactive),actionsDropdownClassName:"btn btn-outline-dark"})),e.interactive.description&&n.createElement("p",null,e.interactive.description),n.createElement("div",{className:"mb-3"},n.createElement(a.t0,{node:D})),!!(null==z?void 0:z.length)&&n.createElement("div",{className:"pb-3"},n.createElement(v.kM,{name:q("otherInteractives",{count:z.length}),contents:b.z.Interactives,collection:z,prefetched:!0,getChildAppLink:function(e){return{application:A.O.INTERACTIVES,action:S.e.Interactives.VIEW_INTERACTIVE,args:[e.id,c.m.slugify(e.name)]}},childComponent:m.K,extraChildComponentProps:{video:H,questionsAppLink:{application:A.O.INTERACTIVES,action:S.e.Interactives.PREVIEW_QUESTIONS},imageCdnUrl:e.config.imageCdnUrl},analyticsData:{widgetId:"interactives"}})),n.createElement(w.Z,{currentVideo:e.interactive,yearGroups:e.yearGroups,setFavourite:W,canFavourite:B,currentUser:e.currentUser,audiences:e.audiences,relatedVideos:e.relatedVideos,getVideoAppLink:function(t){return E.W.getAppLink(t,{context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv})},moviesAndTv:e.queryParams.mtv})))}},44110:(e,t,r)=>{r.d(t,{i:()=>c});var n=r(20354),a=r(89454),i=r(86698),c=function(){var e=(0,i.y)({redirectOnError:!0}).activePresentation;return n.a.useBasicFetch(!!e&&a.O.presentationAudiences(e.id))}},53073:(e,t,r)=>{r.d(t,{f:()=>s});var n=r(20354),a=r(16714),i=r(12754),c=r(31949),o=r(22902),l=r(15311);function s(){var e=(0,o.T)().hasPermissions,t=(0,l.r)().hasProduct,r=n.a.useBasicFetch(c.N.currentUser());return!e(a.C.StudentExperience)&&t(i.x.Primary)&&r.data.isAuthenticated}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3545],{74696:(e,t,a)=>{a.d(t,{S:()=>s});var n=a(32735),r=a(68050),i=a(69111),c=a(9977),o=a(79967);const l={partialOptions:"Gufgq",partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function s(e){return n.createElement("div",{className:"mx-2"},Array(e.numVideos).fill(null).map((function(t,a){return n.createElement("div",{className:"d-flex",key:a},e.allowBulkActions&&n.createElement("div",{className:"form-check pe-3 pe-sm-2 mx-0 mx-md-2"}),n.createElement(u,Object.assign({},e)))})))}function u(e){var t=(0,o.k)(),a="sm"===c.O.getSize(t,"md"),s=e.withReordering&&!t.xs;return n.createElement(r.Z,{className:"".concat(a?"":"py-2"," flex-grow-1")},n.createElement(i.Z,Object.assign({},c.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(a?"pb-2 pe-1":"mb-1 pe-3 pe-md-2")}),n.createElement(r.Z,null,!!s&&n.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},n.createElement("div",{className:"partial-loading-background ".concat(l.partialDragHandle)})),n.createElement(i.Z,{xs:c.O.getThumbnailColSize(s)},n.createElement("div",{className:"partial-loading-background ".concat(a?"rounded":"rounded-3"," ").concat(l.partialThumbnail)})))),n.createElement(i.Z,Object.assign({},c.O.getDetailsColumns(),{className:a?"pb-2":"px-2"}),n.createElement("div",{className:"partial-loading-background mb-1 ".concat(l.partialName)}),n.createElement("div",{className:"partial-loading-background ".concat(l.partialDescription)})))}s.defaultProps={numVideos:15}},64254:(e,t,a)=>{a.r(t),a.d(t,{CuratedDashboardWidgetView:()=>O});var n=a(32735),r=a(23481),i=a(20354),c=a(65858),o=a(4632),l=a(51365),s=a(183),u=a(1666),d=a(80889),m=a(31949),p=a(97037),g=a(79612),v=a(67753),f=a(65986),h=a(44110),b=a(97816),y=a(56017),k=a(33192),E=a(82431),N=a(74696);const w={partialHeading:"RSm4L"};function A(){return n.createElement("div",{className:"px-3"},n.createElement("div",{className:"partial-loading-background mb-2 ".concat(w.partialHeading)}),n.createElement(N.S,null))}var x=r.T.encloseNamespace("dashboard.dashboardWidget");function O(e){var t,a,r=e.widgetId,N=(0,p.c)(c.LZ.VideoThumbnail),w=N.setFavourite,O=N.canFavourite,C=(0,f._)(f.i.VideoItem),j=i.a.useBasicFetch(r&&d._.dashboardWidgetContent(r)),S=i.a.useBasicFetch(m.N.currentUser()),D=i.a.useBasicFetch(S.data.isAuthenticated&&u.h.yearGroups(S.data.customerId)),P=null===(t=j.data)||void 0===t?void 0:t.content;(0,b.V)(P,{hasCurriculumLinks:!0}),(0,g.M)(y.C.getDefaultMetadata({title:null===(a=j.data)||void 0===a?void 0:a.name,phraseContext:{phraseHandler:x,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:k.f.getCanonicalLink({stripPresentationSlug:!0}),allowIndexing:k.f.allowIndexing()}));var I=(0,h.i)();return j.data&&(null==P?void 0:P.length)?n.createElement(l.M.Provider,{value:C},n.createElement("div",{className:"px-3"},n.createElement("h1",{className:"h2 mb-2"},j.data.name),n.createElement(o.E4,{videos:P,yearGroups:D.data,getVideoAppLink:function(t){return v.W.getAppLink(t,{context:s.Q.Widget,contextId:e.widgetId})},getSubTextAppLink:function(e){return E.j.getSeriesAppLink(e.series)},setFavourite:w,canFavourite:O,presentationAudiences:I.data}))):n.createElement(A,null)}},87821:(e,t,a)=>{a.d(t,{p:()=>r});var n=a(53806),r={userVideoHistory:function(e,t,a,r){var i="video:history",c="{gateway}/v1/users/me/watch-history";return e&&(i+=":".concat(e),c+="?cursor=".concat(e)),{key:i,url:c,formatData:function(e){return{data:e.data.map((function(e){var t=n.utc(e.lastTimeWatched).local().format(),a=n(t).format("YYYY-MM-DD");return Object.assign(Object.assign({},e),{lastTimeWatched:t,lastDateWatched:a})})),pagination:e.pagination}},success:t,error:a,always:r}},videoHistory:function(e,t,a,n,r){var i=e.sort().map((function(e){return"videoId=".concat(e)}));return{key:"video:history:videos:".concat(i.join("&")),url:"{gateway}/v1/videos/history?".concat(i.join("&")),normalizeOptions:{namespace:t},formatData:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.videoId,lastProgressPoint:e.lastProgressPoint}})):e},success:a,error:n,always:r}}}},41063:(e,t,a)=>{a.d(t,{b:()=>c});var n=a(16714),r=a(22902),i=a(37802);function c(){var e=(0,r.T)().hasPermissions;return(0,i.r)(null).manageVideoAccess&&e(n.C.ManageVideoAccess)}},44110:(e,t,a)=>{a.d(t,{i:()=>c});var n=a(20354),r=a(89454),i=a(86698),c=function(){var e=(0,i.y)({redirectOnError:!0}).activePresentation;return n.a.useBasicFetch(!!e&&r.O.presentationAudiences(e.id))}},97816:(e,t,a)=>{a.d(t,{V:()=>p});var n=a(32735),r=a(20354),i=a(21750),c=a(63419),o=a(31949),l=a(1575),s=a(87821);function u(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var m={ratings:!1,favourites:!1,watchHistory:!1,hasCurriculumLinks:!1};function p(e){var t,a,d,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},g=Object.assign(Object.assign({},m),p),v=g.ratings,f=g.favourites,h=g.watchHistory,b=g.hasCurriculumLinks,y=r.a.useBasicFetch(o.N.currentUser()),k=e&&(Array.isArray(e)?e.filter(Boolean).map((function(e){return e.id})):e.data.filter(Boolean).map((function(e){return e.id}))),E=y.data;t=n.useMemo((function(){if(!(null==E?void 0:E.isAuthenticated))return[];var e=[];return v&&(e=[].concat(u(e),[!!(null==k?void 0:k.length)&&l.R.videoRatings(k,p.flightNamespace)])),f&&(e=[].concat(u(e),[!!(null==k?void 0:k.length)&&E&&c.P.isFavourited(E.id,k,p.flightNamespace)])),h&&(e=[].concat(u(e),[!!(null==k?void 0:k.length)&&E&&s.p.videoHistory(k,p.flightNamespace)])),b&&(e=[].concat(u(e),[!!(null==k?void 0:k.length)&&i.x.hasCurriculumLinks(k,null,p.flightNamespace)])),e.filter(Boolean)}),[null==k?void 0:k.length]),a=!!e,d=r.a.useGetFetch(),n.useEffect((function(){a&&t.length&&t.forEach((function(e){d(e)}))}),[t.length])}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3836,121],{86877:(e,t,n)=>{n.d(t,{Z:()=>f});var o=n(23481);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}function a(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}function u(e,t,n){return t=l(t),function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var f=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,t,[e])}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"FileTypeError"}},{key:"lang",get:function(){return"upload.fileType"}},{key:"dialogOptions",get:function(){return{title:o.T.getPhrase(this.lang,"heading"),text:o.T.getPhrase(this.lang,"body"),buttons:[{text:o.T.getPhrase(this.lang,"okay"),className:"btn btn-dark",success:!0},{text:o.T.getPhrase(this.lang,"close"),className:"btn btn-link",close:!0}]}}}])&&i(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(n(47663).S)},90121:(e,t,n)=>{n.r(t),n.d(t,{BaseVideoUploadService:()=>ye,LearningResourceUploadService:()=>ge,SubtitleUploadService:()=>he,UploadType:()=>le});var o,r=n(48088),i=n(39479),a=n(46865),u=n(79976),c=n(37433),l=n(54149),s=n(71365),f=n(23481),p=n(70794),d=n(81886),y=n(49985),h=n(65858),g=n(29555);!function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(o||(o={}));var b=n(86877),v=n(6339),m=n(52003),w=n(60735),O=n(53301),S=n.n(O),P=n(47663);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function j(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,T(o.key),o)}}function T(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=k(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:String(t)}function U(e,t,n){return t=_(t),function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,E()?Reflect.construct(t,n||[],_(e).constructor):t.apply(e,n))}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var L="upload.internetConnectivityError",R=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),U(this,t,[f.T.getPhrase(L,"title")])}var n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:f.T.getPhrase(L,"heading"),text:f.T.getPhrase(L,"body"),buttons:[{text:f.T.getPhrase(L,"okay"),className:"btn btn-outline-dark",success:!0}]}}}])&&j(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(P.S),C=n(44331);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function A(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,D(o.key),o)}}function D(e){var t=function(e,t){if("object"!=x(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=x(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:String(t)}function F(e,t,n){return t=N(t),function(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,V()?Reflect.construct(t,n||[],N(e).constructor):t.apply(e,n))}function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(V=function(){return!!e})()}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function z(e,t){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},z(e,t)}var B="upload.slowInternetError",M=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),F(this,t,[f.T.getPhrase(B,"title")])}var n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SlowInternetError"}},{key:"dialogOptions",get:function(){return{title:f.T.getPhrase(B,"heading"),text:f.T.getPhrase(B,"body"),buttons:[{text:f.T.getPhrase(B,"okay"),className:"btn btn-outline-dark",success:!0}]}}}])&&A(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(P.S);function Q(e){return Q="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},Q(e)}function q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Y(o.key),o)}}function Y(e){var t=function(e,t){if("object"!=Q(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Q(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Q(t)?t:String(t)}function W(e,t,n){return t=K(t),function(e,t){if(t&&("object"===Q(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,Z()?Reflect.construct(t,n||[],K(e).constructor):t.apply(e,n))}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Z=function(){return!!e})()}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}var J=[],G=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=W(this,t,[e])).slowInternetTimeout={},n.showSlowInternetTimeout=!0,n}var n,o,a;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&&H(e,t)}(t,e),n=t,o=[{key:"name",get:function(){return"DropzoneWrapper"}},{key:"initialize",value:function(e){var t=this.options.loggingEnabled,n=r.Radio.channel(e.channelName),o=this;this.dropzone=new(S())(document.createElement("div"),{url:function(e){return e[0].cvUpload.ingestUrl},chunking:this.options.chunkingEnabled,chunkSize:this.options.chunkSize,forceChunking:!0,autoProcessQueue:!0,maxFilesize:this.options.maxFileSize,acceptedFiles:this.options.acceptedFiles,paramName:"content",timeout:18e4,init:function(){var e=this;t&&(i.each(J,(function(t){e.on(t,(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];var r=n[0]instanceof File?n[0].name:n[0];console.info(t,r,n)}))})),this.on("uploadprogress",(function(e,t,r){var i=r/e.size*100;n.trigger("progress",o.getId(e),i,r)})),this.on("success",(function(e){var t=e.upload.chunks,o=i.last(t),r=o.xhr;r||(r=o.file.xhr);var a=JSON.parse(r.response);e.cvUpload.fileId=a.id,n.trigger("upload:success",e,a)})),this.on("error",(function(e,t,n){n&&0===n.status?d.Q.Ry.throw(new R):"canceled"!==e.status&&d.Q.Ry.throw(new C.n(f.T.getPhrase("upload.services","uploadError",{fileName:e.name,message:t.message})))})),this.on("sending",(function(e){window.clearTimeout(o.slowInternetTimeout[e.path]),o.showSlowInternetTimeout&&(o.slowInternetTimeout[e.path]=window.setTimeout((function(){o.showSlowInternetTimeout&&d.Q.Ry.throw(new M),o.showSlowInternetTimeout=!1}),3e4))})),this.on("complete",(function(e){return window.clearTimeout(o.slowInternetTimeout[e.path])})))},params:function(e,t,n){if(n)return{chunk_index:n.index,upload_length:n.file.size}},addedfile:function(){},thumbnail:function(){},uploadprogress:function(){}})}},{key:"getId",value:function(e){return e.upload.uuid}},{key:"addFile",value:function(e){this.dropzone.addFile(e)}},{key:"removeFile",value:function(e){this.dropzone.removeFile(e)}},{key:"start",value:function(){this.dropzone.processQueue()}},{key:"destroy",value:function(){this.dropzone.destroy()}}],a=[{key:"isValidFile",value:function(e,t){return S().isValidFile(e,t)}}],o&&q(n.prototype,o),a&&q(n,a),Object.defineProperty(n,"prototype",{writable:!1}),t}(d.Q.t6);function $(e){return $="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},$(e)}function X(e,t,n){return(t=oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,oe(o.key),o)}}function ne(e,t,n){return t&&te(e.prototype,t),n&&te(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oe(e){var t=function(e,t){if("object"!=$(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=$(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$(t)?t:String(t)}function re(e,t,n){return t=ae(t),function(e,t){if(t&&("object"===$(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,ie()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}function ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ie=function(){return!!e})()}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function ue(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&&ce(e,t)}function ce(e,t){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ce(e,t)}var le,se=function(e){function t(){var e;return ee(this,t),(e=re(this,t,[{dataProvider:s.u.getInstance(c.R.Ajax),cache:s.u.getInstance(a.p.Fifo),alertService:s.u.getInstance(u.P.ALERT)}])).incrementingUploadId=0,e}return ue(t,e),ne(t,[{key:"name",get:function(){return"UploadDataService"}},{key:"channelName",get:function(){return"private:upload:data:service"}},{key:"requestUploads",value:function(e,t,n,o,r){var a=this,u=this.chain();i.each(t,(function(t){a.incrementingUploadId++,u.create({resource:e,eventPrefix:"request:upload:".concat(a.incrementingUploadId),data:a.getFileUploadRequest(t,n),callback:function(e){o(t,e)},errorHandler:a.alertService.error("Something went wrong while we were uploading your video. Please try again.")})})),u.func((function(){r()})).run()}},{key:"cancelUpload",value:function(e,t,n){this.create({resource:"/api/upload/cancel",eventPrefix:"cancel:upload",data:{uploadId:e,ingestUrl:t},callback:n})}},{key:"getFileUploadRequest",value:function(e,t){var n=e.name.split(".");return{name:n.join("."),extension:n.length>1?n.pop():"",fileSize:e.size,fileLifestyle:t}}},{key:"onDestroy",value:function(){s.u.releaseInstance(c.R.Ajax).releaseInstance(a.p.Fifo)}}]),t}(l.B);!function(e){e[e.Video=0]="Video",e[e.LearningResource=1]="LearningResource",e[e.Subtitle=2]="Subtitle"}(le||(le={}));var fe=X(X(X({},le.Video,"video/*"),le.LearningResource,v.l.RESOURCES),le.Subtitle,v.l.SUBTITLES),pe=X(X(X({},le.Video,m.Q4.VIDEO_UPLOAD),le.LearningResource,m.Q4.RESOURCE_UPLOAD),le.Subtitle,m.Q4.SUBTITLE_UPLOAD),de=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ee(this,t),re(this,t,[Object.assign({uploadUrl:"/api/upload"},e)])}return ue(t,e),ne(t,[{key:"initialize",value:function(){this.uploadDataService=new se,this.progressViewModel=p.r.get("upload:progress:".concat(this.uploadType)),this.bindListeners()}},{key:"channelName",get:function(){return pe[this.uploadType]}},{key:"lang",get:function(){return"uploadShared.services"}},{key:"initUploader",value:function(e,t){if(!this.uploader){var n=4194304;e&&n<e&&(n=e),t&&n>t&&(n=t),this.uploader=new G({chunkingEnabled:!0,loggingEnabled:!0,chunkSize:n,maxFileSize:53687091200,acceptedFiles:this.getAcceptedFiles(),channelName:this.channelName})}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"progress",this.onProgress),this.listenTo(this.channelName,"upload:success",this.onSuccess)}},{key:"onProgress",value:function(e,t,n){var o=this.collection.get(e);o&&(o.set({progress:t>100?100:t,totalUploaded:n}),this.setOverallProgress())}},{key:"isUploading",value:function(){return!!this.getCollection().length}},{key:"getCollection",value:function(){return this.collection||(this.collection=new d.Q.FE),this.collection}},{key:"setOverallProgress",value:function(){var e=this,t=0,n=0,o=this.getCollection();if(o.length){o.each((function(e){t+=e.get("totalUploaded")||0,n+=e.get("file").size||0}));var r=t/n*100,i=r>=100,a=function(){e.progressViewModel.set({progress:i?100:r,done:i})};i?window.setTimeout(a,2e3):a()}else this.progressViewModel.set({progress:0})}},{key:"isValidFile",value:function(e){return G.isValidFile(e,this.getAcceptedFiles())}},{key:"addFiles",value:function(e,t){var n=this;i.any(e,(function(e){return!n.isValidFile(e)}))?d.Q.Ry.throw(new b.Z(f.T.getPhrase(this.lang,"invalidFileType"))):this.requestUploads(e,t)}},{key:"requestUploads",value:function(e,t){var n=this,o=this.isUploading(),i=this.getCollection();this.uploadDataService.requestUploads(this.options.uploadUrl,e,this.fileLifestyle,(function(e,t){n.initUploader(1024*t.minChunkSize,1024*t.maxChunkSize),e.cvUpload={uploadId:t.uploadId,ingestUrl:t.ingestUrl},n.uploader.addFile(e);var o=e.name;n.uploadType===le.Video&&(o=o.replace(/\.[^/.]+$/,"")),i.add(Object.assign({id:n.uploader.getId(e),file:e,name:o},n.getAdditionalFileInfo(e,t)),{at:i.length-1})}),(function(){t&&y.k.logUserAction({uploadCount:e.length},t),r.Radio.channel(n.channelName).trigger(g.S.FILES_ADDED,e,o)}))}},{key:"addFile",value:function(e,t){this.addFiles([e],t)}},{key:"cancelUpload",value:function(e){var t=this,n=this.getCollection(),o=n.get(e);if(o){var i=o.get("file");this.uploader.removeFile(i),n.remove(o),this.uploadDataService.cancelUpload(i.cvUpload.uploadId,i.cvUpload.ingestUrl,(function(){y.k.logUserAction(o.toJSON(),{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Discard,descriptor:h.yh.Single,location:h.LZ.MyUploads}),r.Radio.channel(t.channelName).trigger(g.S.UPLOAD_CANCELLED)})),this.setOverallProgress()}}},{key:"onSuccess",value:function(e,t){var n=this.uploader.getId(e),o=this.getCollection().get(n);o.set("fileInfo",t),y.k.logUserAction({id:e.cvUpload.uploadId},{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Complete,descriptor:h.yh.Single,location:h.LZ.VideoUpload}),r.Radio.channel(this.channelName).trigger(g.S.UPLOAD_COMPLETE,o)}},{key:"cancelAllUploads",value:function(){var e=this,t=this.getCollection().map((function(e){return e.get("id")}));i.each(t,(function(t){return e.cancelUpload(t)}))}},{key:"getAcceptedFiles",value:function(){return fe[this.uploadType]}},{key:"getAdditionalFileInfo",value:function(e,t){return{}}}]),t}(d.Q.t6),ye=function(e){function t(){return ee(this,t),re(this,t,arguments)}return ue(t,e),ne(t,[{key:"uploadType",get:function(){return le.Video}},{key:"name",get:function(){return w.D.VideoUpload}},{key:"fileLifestyle",get:function(){return o.Temporary}}]),t}(de),he=function(e){function t(){return ee(this,t),re(this,t,arguments)}return ue(t,e),ne(t,[{key:"uploadType",get:function(){return le.Subtitle}},{key:"name",get:function(){return w.D.SubtitleUpload}},{key:"fileLifestyle",get:function(){return o.Permanent}}]),t}(de),ge=function(e){function t(){return ee(this,t),re(this,t,arguments)}return ue(t,e),ne(t,[{key:"uploadType",get:function(){return le.LearningResource}},{key:"name",get:function(){return w.D.ResourceUpload}},{key:"fileLifestyle",get:function(){return o.Permanent}}]),t}(de)},6339:(e,t,n)=>{n.d(t,{l:()=>p,v:()=>d});var o=n(39479),r=["pdf"],i=["doc","docx","dotx","dot","rtf","docm","odt"],a=["csv","txt"],u=["xls","xlt","xlsx"],c=["jpg","tif","png","bmp","gif","jpeg"],l=["zip","rar"],s=["ppt","pot","pps","pptx"],f=["srt"],p={IMAGES:".".concat(c.join(",.")),RESOURCES:".".concat([].concat(i,u,s,r,a,c,l).join(",.")),SUBTITLES:".".concat(f.join(",."))},d={getResourceType:function(e){var t=e.toLowerCase();return o.contains(i,t)?"document":o.contains(u,t)?"excel":o.contains(s,t)?"powerpoint":o.contains(r,t)?"pdf":o.contains(a,t)?"text":o.contains(c,t)?"image":o.contains(l,t)?"archive":o.contains(f,t)?"subtitle":""}}},3836:(e,t,n)=>{n.r(t),n.d(t,{VideoUploadService:()=>E});var o,r=n(48088),i=n(79976),a=n(60139),u=n(71365),c=n(23481),l=n(29555),s=n(90121);!function(e){e[e.Upload=1]="Upload",e[e.Tv=2]="Tv"}(o||(o={}));var f,p,d=n(65728);!function(e){e[e.ExternalOnly=0]="ExternalOnly",e[e.EmbeddedOnly=1]="EmbeddedOnly"}(f||(f={})),function(e){e[e.IosApp=1]="IosApp",e[e.AndroidApp=2]="AndroidApp",e[e.WinApp=3]="WinApp",e[e.LibraryPublisher=4]="LibraryPublisher",e[e.ExchangeClient=5]="ExchangeClient",e[e.Online=6]="Online",e[e.Tinder=7]="Tinder",e[e.Cloud247=8]="Cloud247",e[e.Livestream=9]="Livestream",e[e.Curator=10]="Curator",e[e.LibraryEditor=11]="LibraryEditor",e[e.Lite=12]="Lite"}(p||(p={}));var y=n(75795),h=n(14070),g=n(97291),b=n(57322),v=n(16800);function m(e){return m="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},m(e)}function w(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,O(o.key),o)}}function O(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:String(t)}function S(e,t,n){return t=j(t),function(e,t){if(t&&("object"===m(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,P()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function(){return!!e})()}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},k.apply(this,arguments)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}var U=c.T.encloseNamespace("upload.services"),E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),S(this,t,[e])}var n,c;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&&T(e,t)}(t,e),n=t,(c=[{key:"initialize",value:function(){k(j(t.prototype),"initialize",this).call(this),this.videoUploadDataService=u.u.getInstance(b.O.VideoUpload,this),this.pendingItemsService=u.u.getInstance(b.K.PendingItems,this),this.userDataService=u.u.getInstance(b.O.FlightUser,this),this.alertService=u.u.getInstance(i.P.ALERT,this),this.listenTo(this.channelName,l.S.FILES_ADDED,this.onUploadStart),this.listenTo(this.channelName,l.S.UPLOAD_COMPLETE,this.unlockNav),this.listenTo(this.channelName,l.S.UPLOAD_CANCELLED,this.unlockNav)}},{key:"onUploadStart",value:function(e){var t={type:a.NK.Success,heading:U("startUploadAlertHeading"),message:1===e.length?U("startUploadSingleAlertBody",{videoName:e[0].name}):U("startUploadMultipleAlertBody",{uploadCount:e.length})},n=y.O.getCurrentContext().appLink;!!v.Y.getMyVideosAppLinks().find((function(e){return n.application===e.application&&n.action===e.action}))||(t.appLinkText=U("startUploadAlertAppLinkText",{smartCount:e.length}),t.appLink={application:g.O.MY_VIDEOS,action:h.e.MyVideos.MY_VIDEOS},t.appLinkClassName="info-link"),this.alertService.createAlert(t)}},{key:"unlockNav",value:function(){this.getCollection().some((function(e){return e.get("progress")<100}))||r.Radio.channel(this.channelName).trigger(l.S.UNLOCK_NAV)}},{key:"getUpload",value:function(e){var t=this.uploader.getId(e);return this.getCollection().get(t)}},{key:"completeUpload",value:function(e,t){var n=this;e.set("sending",!0),this.userDataService.getCurrentUser((function(r){n.userDataService.getCustomerSettings(r.customerId,(function(i){n.userDataService.getWorkspace((function(a){n.videoUploadDataService.completeVideoUpload({id:e.get("id"),userId:r.id,customerId:r.customerId,libraryId:a.id,categoryId:e.get("categoryId")||null,pendingProcessOrigin:o.Upload,origin:p.Lite,fileId:t.id,subtitleOptions:{subtitleExtractOptions:f.EmbeddedOnly},video:{name:e.get("name"),description:e.get("description")},autoCaption:!!i[d.E.AutoCaptioning].value},(function(t){e.set("pendingProcessId",t.pendingProcessId),n.pendingItemsService.forceFetchPendingItems({resetTimeout:!0})}))}))}))}))}},{key:"onSuccess",value:function(e,n){var o=this;k(j(t.prototype),"onSuccess",this).call(this,e,n);var r=this.getUpload(e);r.get("editingMetadata")?this.listenToOnce(r,"change:editingMetadata",(function(){o.completeUpload(r,n)})):this.completeUpload(r,n)}},{key:"getAdditionalFileInfo",value:function(e,t){var n=y.O.getCurrentRoute().appLink;return n.application!==g.O.MY_VIDEOS||n.action!==h.e.MyVideos.MY_VIDEOS_FOLDER?{}:{categoryId:+n.args[0]}}}])&&w(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),t}(s.BaseVideoUploadService)}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5177-0ab4eedd6f-lite.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5177],{73758:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}n.d(t,{n:()=>a});var a=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n;return t=e,n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var o=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&o.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),o.length&&o.forEach((function(n){return t.deregisterListener(e,n)}))}}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}())},26733:(e,t,n)=>{n.d(t,{s:()=>O,R:()=>P});var r=n(32735),i=n(39202),o=n(97395),a=n(49985),s=n(65858),u=n(36848),c=n(75163),l=n(76177),f=n(71063),p=n(54610),h=n(4594),d=n(1164),y=n(79967),v=n(67453);const b={imageStyle:"I9E5O",item:"tqUFn",background:"s1dNr",thumbnailContainer:"EDiGi",teacherPack:"_tdVE",text:"g5NWS",hoverState:"xRYhX",atomGuide:"X39wU",studentActivity:"X9pMl",additionalMaterials:"qRVUo",userUploaded:"_18JaV",imageTypeResource:"KYtZL"};var g={width:200,resizeType:p.Nq.Cover};function m(e,t){var n,r,i;if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return v.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},g));var a=o._.safeUrlConcat(e,"/v1/previews");return"metadata"in t?t.metadata.type===d.L.Pdf?v.j.createResourceImage(a,t.url,g):t.metadata.type===d.L.Image?v.j.createUrl(t.url,{size:p.h2.Medium,resizeType:p.Nq.Cover}):(null===(i=t.pdf)||void 0===i?void 0:i.url)?v.j.createResourceImage(a,t.pdf.url,g):(t.metadata.type,d.L.Zip,"/images/zip-resource.png"):v.j.createResourceImage(a,t.url,Object.assign({},g))}function w(e){var t;return"metadata"in e?e.metadata.type===d.L.Pdf?p.__.Pdf:e.metadata.type===d.L.Image?p.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?p.__.Pdf:(e.metadata.type,d.L.Zip,p.__.Thumbnails):p.__.Link}function O(e){var t,n,i,o,a,u,f,p=null,h=0;"metadata"in e.data&&(p=e.data.metadata,h=null!==(i=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==i?i:0);var y="".concat(null!==(a=null===(o=e.theme)||void 0===o?void 0:o.containerClass)&&void 0!==a?a:""," pt-3 px-3 rounded-3 d-flex flex-column align-items-center")+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return b.atomGuide;case"student-activity":return b.studentActivity;case"teacher-pack":return b.teacherPack;case"additional-materials":return b.additionalMaterials;default:return b.userUploaded}}(null==p?void 0:p.resourceType)," ").concat(b.background," ").concat(e.applyHoverState?b.hoverState:""," ");return r.createElement("div",{className:y},!e.hideHeading&&r.createElement(l.u,{title:e.data.name},r.createElement("h3",{className:"text-center text-break h5 mb-3 ".concat(b.text)},r.createElement("span",{className:"clamp-1"},e.data.name))),r.createElement("div",{className:"".concat(null!==(f=null===(u=e.theme)||void 0===u?void 0:u.thumbnailContainerClass)&&void 0!==f?f:""," w-75 overflow-hidden ").concat(b.thumbnailContainer," ").concat(b.imageStyle)},r.createElement(c.Z,{data:m(e.imageCdnUrl,e.data),imageType:w(e.data),imageStyle:{transform:"rotate(".concat(h,"deg)")},alt:e.data.name,analyticsOptions:{location:s.LZ.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==p?void 0:p.type)===d.L.Image?"".concat(b.imageTypeResource," ").concat(b.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}O.defaultProps={preloadImage:!0,actionBehaviour:"normal"};var P=r.memo((function(e){var t,n,o,c,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,[]),p=(t=e.data,n=e.actionBehaviour,c=(0,y.k)(),"public"===n||!c.xs&&!c.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===d.L.Image||(t.metadata.type===d.L.Pdf?!!t.url:!!(null===(o=t.pdf)||void 0===o?void 0:o.url)))),v=Object.assign(Object.assign({},e.analyticsData),e.data),g=Object.assign(Object.assign({},e.analyticsOptions),{actionType:s.Vw.Click,entity:e.data.typeId===h.E.Resource?s.py.Resource:s.py.Link});function m(){a.k.logUserAction(v,g)}var w,P=!!e.data.url;return l.applyHoverState=p||P,r.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(b.item," ").concat(f.M.RESOURCE_ITEM_SELECTOR)},(w="d-block no-decoration","link"===e.data.type?r.createElement("a",{href:e.data.url,target:"_blank",className:w,onClick:m},r.createElement(O,Object.assign({},l))):p?"public"===e.actionBehaviour?r.createElement("div",{className:"".concat(w," cursor-pointer d-inline"),onClick:function(){m(),i.C$.trigger(e.getAppLink(e.data))}},r.createElement(O,Object.assign({},l))):r.createElement(u.F,{appLink:e.getAppLink(e.data),className:w,analyticsData:v,analyticsOptions:g},r.createElement(O,Object.assign({},l))):P?r.createElement("a",{href:e.data.url,className:w,onClick:m},r.createElement(O,Object.assign({},l))):r.createElement("div",{className:w},r.createElement(O,Object.assign({},l)))))}))},65100:(e,t,n)=>{n.r(t),n.d(t,{ClickViewPlayer:()=>xr});var r=n(32735),i=n(51482),o=(n(16852),n(93861));function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:String(t)}function c(e,t,n){return t=p(t),function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},f.apply(this,arguments)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var d=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=c(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}var n,r;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&&h(e,t)}(t,e),n=t,(r=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){f(p(t.prototype),"handleClick",this).call(this,null)}}])&&s(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Button"));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 v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:String(t)}function g(e,t,n){return t=w(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,m()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}d.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",d);var P=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=g(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&v(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));function S(e){return S="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},S(e)}function k(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,j(r.key),r)}}function j(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:String(t)}function C(e,t,n){return t=T(t),function(e,t){if(t&&("object"===S(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,E()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}o.Z.registerPlugin("createClipButtonPlugin",P);var _=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),C(this,t,arguments)}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,(r=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&k(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("PictureInPictureToggle"));function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function M(e){var t=function(e,t){if("object"!=x(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:String(t)}function L(e,t,n){return t=A(t),function(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D()?Reflect.construct(t,n||[],A(e).constructor):t.apply(e,n))}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}function N(){return N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},N.apply(this,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}o.Z.registerComponent("PictureInPictureToggle",_);var B=o.Z.getComponent("PlayToggle"),F=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=L(this,t,[e,n])).pictureInPictureEnabled=!1,r.options=n,r.bindFunctions(),r}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(t,e),n=t,(r=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){var e=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var n=t.children().findIndex((function(e){var t;return"fullscreentoggle"===(null===(t=e.name())||void 0===t?void 0:t.toLowerCase())}));-1===n&&(n=t.children().length-1),t.addChild("pictureInPictureToggle",{},n);var r=t.getChild("pictureInPictureToggle");null==r||r.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("playerresize",e.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var e=this.player.el().getBoundingClientRect();0!==e.width&&(e.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new B(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var e;this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(e=this.options)||void 0===e?void 0:e.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,N(A(t.prototype),"dispose",this).call(this)}}])&&R(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",F);var U=n(23035),Z=n(42892),z=n(73758);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H(r.key),r)}}function H(e){var t=function(e,t){if("object"!=G(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:String(t)}function Y(e,t,n){return t=X(t),function(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $(e)}(e,W()?Reflect.construct(t,n||[],X(e).constructor):t.apply(e,n))}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(W=function(){return!!e})()}function $(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(){return Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=X(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Q.apply(this,arguments)}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var K=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Y(this,t,[e,n])).hasBuffered=!1,r.hasPlayed=!1,r.eventsService=z.n,r.pointOfInterest=n.pointOfInterest,r.onMouseOver=r.onMouseOver.bind($(r)),r.onMouseLeave=r.onMouseLeave.bind($(r)),r.onGlancePointOfInterestMouseEnter=r.onGlancePointOfInterestMouseEnter.bind($(r)),r.onGlancePointOfInterestMouseLeave=r.onGlancePointOfInterestMouseLeave.bind($(r)),r.initialize(),r}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(Q(X(t.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,n,r){return Q(X(t.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},n),{className:this.buildCSSClass()}),r)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var e=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/e*100+"%"}},{key:"updateBuffered",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasBuffered){this.hasBuffered=t;var n="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(n):this.removeClass(n)}}},{key:"updatePlaybackProgress",value:function(e){var t=this.getPointOfInterestTime()<=e;if(t!==this.hasPlayed){this.hasPlayed=t;var n="cv-point-of-interest-indicator-played";t?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(e){var t="cv-point-of-interest-indicator-hidden";e?this.removeClass(t):this.addClass(t)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(e){e.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var e;null===(e=this.getTimeTooltip())||void 0===e||e.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var e=this.getTimeTooltip();null==e||e.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var e,t,n=null===(e=this.getSeekBar())||void 0===e?void 0:e.el();if(n){var r=o.Z.dom.findPosition(n),i=this.getPointOfInterestTime()/this.player().duration();null===(t=this.getMouseTimeDisplay())||void 0===t||t.update(r,i)}}},{key:"showMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var e;null===(e=this.getMouseTimeDisplay())||void 0===e||e.removeForceShow()}},{key:"getSeekBar",value:function(){var e;return null===(e=this.player().controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var e;return null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var e;return null===(e=this.getMouseTimeDisplay())||void 0===e?void 0:e.getChild("TimeTooltip")}}])&&q(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Component"));function ee(e){return ee="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},ee(e)}function te(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,ne(r.key),r)}}function ne(e){var t=function(e,t){if("object"!=ee(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ee(t)?t:String(t)}function re(e,t,n){return t=ae(t),function(e,t){if(t&&("object"===ee(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,ie()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}function ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ie=function(){return!!e})()}function oe(){return oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ae(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},oe.apply(this,arguments)}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}var ue=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=re(this,t,[e,n])).pointsOfInterestVisible=n.pointsOfInterestVisible,r.toggle(r.pointsOfInterestVisible),r}var n,r;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&&se(e,t)}(t,e),n=t,(r=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){o.Z.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var i=oe(ae(t.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},r);return i.children[1].appendChild(this.toggleEl),i}}])&&te(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("MenuItem"));function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function le(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,fe(r.key),r)}}function fe(e){var t=function(e,t){if("object"!=ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:String(t)}function pe(e,t,n){return t=de(t),function(e,t){if(t&&("object"===ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ye(e)}(e,he()?Reflect.construct(t,n||[],de(e).constructor):t.apply(e,n))}function he(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(he=function(){return!!e})()}function de(e){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},de(e)}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ve(e,t){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ve(e,t)}o.Z.registerComponent("PointsOfInterestMenuItem",ue);var be=o.Z.getPlugin("plugin"),ge="cvplayer-points-of-interest",me=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=pe(this,t,[e])).pointOfInterestIndicators=[],r.enabled=!0,r.pointsOfInterest=null==n?void 0:n.pointsOfInterest,r.initialize=r.initialize.bind(ye(r)),r.updateBuffered=r.updateBuffered.bind(ye(r)),r.updatePlaybackProgress=r.updatePlaybackProgress.bind(ye(r)),r.player.one("loadedmetadata",(function(){return r.player.ready(r.initialize)})),r}var n,r;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&&ve(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.pointsOfInterest&&(Z.S.hasLocalStorage()&&"false"===Z.S.get(ge)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var e=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("progress",e.updateBuffered),null===(n=e.player)||void 0===n||n.off("timeupdate",e.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(e){Z.S.set(ge,e.toString()),this.pointOfInterestIndicators.forEach((function(t){return t.toggleVisibility(e)}))}},{key:"setupTrack",value:function(){var e=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(t){e.addCue({startTime:t.startTime,endTime:t.endTime,text:t.description})})),e.trigger({type:"loadeddata",target:e})}},{key:"createPointOfInterestIndicators",value:function(){var e,t=this,n=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");this.pointsOfInterest.forEach((function(e){var r=new K(t.player,{pointOfInterest:e});t.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var e;(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:ue,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updateBuffered((0,U.b)(e.player))}))}},{key:"updatePlaybackProgress",value:function(){var e=this;this.pointOfInterestIndicators.forEach((function(t){return t.updatePlaybackProgress(e.player.currentTime())}))}}])&&le(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(be);o.Z.registerPlugin("pointsOfInterestPlugin",me),n(93262);var we=n(65858),Oe=n(86086),Pe=n(12399),Se=n(6156);function ke(e){return ke="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},ke(e)}function je(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,Ce(r.key),r)}}function Ce(e){var t=function(e,t){if("object"!=ke(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ke(t)?t:String(t)}var Ee=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions()}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.schedule=this.schedule.bind(this),this.every=this.every.bind(this),this.trigger=this.trigger.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)}},{key:"schedule",value:function(e){return this.task=e,this}},{key:"every",value:function(e){return this.intervalInMilliseconds=e,this}},{key:"trigger",value:function(){var e;return null===(e=this.task)||void 0===e||e.call(this,this),this}},{key:"start",value:function(){var e=this;return this.intervalId||(this.intervalId=setInterval((function(){return e.trigger()}),this.intervalInMilliseconds)),this}},{key:"stop",value:function(){return this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this}}])&&je(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Te(e){return Te="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},Te(e)}function Ie(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,_e(r.key),r)}}function _e(e){var t=function(e,t){if("object"!=Te(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:String(t)}var xe={reconnectIntervalInMilliseconds:3e3,heartbeatEnabled:!1,heartbeatIntervalInMillseconds:1e4,heartbeatMessage:""},Re=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xe;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bindFunctions(),this.url=t,this.options=Object.assign(Object.assign({},xe),r),this.webSocket=this.connect(),this.heartbeat=(new Ee).schedule((function(){return n.send(n.options.heartbeatMessage)})).every(this.options.heartbeatIntervalInMillseconds)}var t,n;return t=e,(n=[{key:"bindFunctions",value:function(){this.cleanup=this.cleanup.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleMessage=this.handleMessage.bind(this),this.handleClose=this.handleClose.bind(this),this.handleError=this.handleError.bind(this),this.connect=this.connect.bind(this),this.send=this.send.bind(this),this.dipose=this.dipose.bind(this)}},{key:"cleanup",value:function(){this.heartbeat.stop(),this.webSocket.removeEventListener("error",this.handleError),this.webSocket.removeEventListener("message",this.handleMessage),this.webSocket.removeEventListener("open",this.handleOpen),this.webSocket.removeEventListener("close",this.handleClose)}},{key:"handleOpen",value:function(e){var t;null===(t=this.onOpen)||void 0===t||t.call(this,e),this.options.heartbeatEnabled&&this.heartbeat.start()}},{key:"handleMessage",value:function(e){var t;null===(t=this.onMessage)||void 0===t||t.call(this,e)}},{key:"handleClose",value:function(e){var t,n=this;null===(t=this.onClose)||void 0===t||t.call(this,e),this.cleanup(),setTimeout((function(){n.webSocket=n.connect()}),this.options.reconnectIntervalInMilliseconds)}},{key:"handleError",value:function(e){var t;null===(t=this.onError)||void 0===t||t.call(this,e),this.handleClose()}},{key:"connect",value:function(){var e=new WebSocket(this.url);return e.addEventListener("open",this.handleOpen),e.addEventListener("message",this.handleMessage),e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),e}},{key:"send",value:function(e){this.webSocket.send(e)}},{key:"dipose",value:function(){this.cleanup(),this.webSocket.close()}}])&&Ie(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Me=n(95569),Le=function(){var e,t;return null!==(t=null===(e=window.crypto)||void 0===e?void 0:e.randomUUID())&&void 0!==t?t:Math.random().toString()},De=n(35884);function Ne(e){return Ne="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},Ne(e)}function Ae(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,Ve(r.key),r)}}function Ve(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:String(t)}var Be,Fe=function(){function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._timerStartedAt=0,this.position=0,this.duration=void 0,this.playing=!1,this.mute=!1,this.videoSource="",this.subtitleSource="",this.subtitles=!1,this.volume=0,this.title=t,this.device=n,this.ready=!1,this.playbackFinished=!1,this.debounced=De.l.withDebouncedSetters(this,2e3),De.l.withTimestampedSetters(this)}var t,n;return t=e,(n=[{key:"position",get:function(){return this._position+this.getTimerDurationInSeconds()},set:function(e){this._position=e,this.restartTimer()}},{key:"playing",get:function(){return this._playing},set:function(e){this._playing=e,e?this.restartTimer():(this._position+=this.getTimerDurationInSeconds(),this.stopTimer())}},{key:"restartTimer",value:function(){this._timerStartedAt=Date.now()}},{key:"stopTimer",value:function(){this._timerStartedAt=0}},{key:"getTimerDurationInSeconds",value:function(){return this._timerStartedAt?(Date.now()-this._timerStartedAt)/1e3:0}}])&&Ae(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ue(e){return Ue="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},Ue(e)}function Ze(){Ze=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Ue(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=E(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:h,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Ue(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function ze(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,Ge(r.key),r)}}function Ge(e){var t=function(e,t){if("object"!=Ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ue(t)?t:String(t)}function qe(e,t,n){return t=We(t),function(e,t){if(t&&("object"===Ue(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,He()?Reflect.construct(t,n||[],We(e).constructor):t.apply(e,n))}function He(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(He=function(){return!!e})()}function Ye(){return Ye="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=We(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ye.apply(this,arguments)}function We(e){return We=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},We(e)}function $e(e,t){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$e(e,t)}!function(e){e.Update="update",e.Volume="volume",e.Playing="playing",e.Paused="paused",e.NewChapter="new_chapter",e.Stopped="stopped",e.Ready="ready",e.Mute="mute",e.Finished="finished",e.Subtitles="subtitles"}(Be||(Be={}));var Qe=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Xe=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=qe(this,t)).client=e,r.localState=new Fe(n.title,n.device),r.bindFunctions(),r.initialize(),r}var n,r;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(e,t)}(t,e),n=t,(r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleClientConnected=this.handleClientConnected.bind(this),this.handleDisconnectMessage=this.handleDisconnectMessage.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handleUpdateMessage=this.handleUpdateMessage.bind(this),this.handleVolumeMessage=this.handleVolumeMessage.bind(this),this.handlePlayingMessage=this.handlePlayingMessage.bind(this),this.handlePausedMessage=this.handlePausedMessage.bind(this),this.handleFinishedMessage=this.handleFinishedMessage.bind(this),this.handleNewChapterMessage=this.handleNewChapterMessage.bind(this),this.handleStoppedMessage=this.handleStoppedMessage.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){var e=this;this.client.on("dispose",this.dispose),this.client.on("connected",this.handleClientConnected),this.client.on("message",this.handleDisconnectMessage).filter((function(t){return t.source===e.getDevice().id&&"disconnect"===t.message.type})),this.client.on("message",this.handleAllVideoMessages).filter((function(t){return t.source===e.getDevice().id&&"video_event"===t.message.type}))}},{key:"dispose",value:function(){this.client.off("dispose",this.dispose),this.client.off("connected",this.handleClientConnected),this.client.off("message",this.handleDisconnectMessage),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch((function(e){return console.error(e)})),Ye(We(t.prototype),"dispose",this).call(this)}},{key:"handleClientConnected",value:function(){return Qe(this,void 0,void 0,Ze().mark((function e(){return Ze().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.client.joinRoom(this.getDevice().id);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),this.trigger("error",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})))}},{key:"handleDisconnectMessage",value:function(){this.dispose()}},{key:"handleAllVideoMessages",value:function(e){var t=this.localState.debounced,n=e.message.payload.params||{};switch(e.message.payload.event){case Be.Update:this.handleUpdateMessage(t,n);break;case Be.NewChapter:this.handleNewChapterMessage(t,n);break;case Be.Volume:this.handleVolumeMessage(t,n);break;case Be.Playing:this.handlePlayingMessage(t);break;case Be.Paused:this.handlePausedMessage(t);break;case Be.Finished:this.handleFinishedMessage(t);break;case Be.Stopped:this.handleStoppedMessage()}}},{key:"handleUpdateMessage",value:function(e,t){e.duration!==t.duration&&(e.duration=t.duration,this.trigger("durationchange",Se.j.void)),e.position!==t.position&&(e.position=t.position,this.trigger("positionchange",Se.j.void)),e.subtitles!==t.subtitles&&(e.subtitles=t.subtitles,this.trigger("subtitleschange",Se.j.void))}},{key:"handleVolumeMessage",value:function(e,t){e.volume!==t.level&&(e.volume=t.level,e.mute=0===t.level,this.trigger("volumechange",Se.j.void))}},{key:"handlePlayingMessage",value:function(e){!0!==e.playing&&(e.playing=!0,e.playbackFinished=!1,this.trigger("playingchange",Se.j.void))}},{key:"handlePausedMessage",value:function(e){!1!==e.playing&&(e.playing=!1,this.trigger("playingchange",Se.j.void))}},{key:"handleFinishedMessage",value:function(e){!0!==e.playbackFinished&&(e.playing=!1,e.playbackFinished=!0,this.trigger("playingchange",Se.j.void))}},{key:"handleNewChapterMessage",value:function(e,t){var n,r=(null!==(n=t.queue)&&void 0!==n?n:[]).find((function(t){return t.url===e.videoSource}));if(!r)return console.info("The device is no longer playing the source we loaded - disposing the session"),void this.dispose();e.subtitleSource!==r.suburl&&(e.subtitleSource=r.suburl,this.trigger("subtitleschange",Se.j.void))}},{key:"handleStoppedMessage",value:function(){this.dispose()}},{key:"loadSource",value:function(e,t){return Qe(this,void 0,void 0,Ze().mark((function n(){var r,i;return Ze().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.localState.videoSource!==e||this.localState.subtitleSource!==t){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,r=this.getDevice().id,i=this.getPosition(),this.localState.videoSource=e,this.localState.subtitleSource=t,this.localState.ready=!1,n.next=10,this.client.joinRoom(r);case 10:return n.next=12,this.client.loadQueue({title:this.getTitle(),roomId:r,videoSource:e,subtitleSource:t});case 12:this.localState.ready=!0,this.trigger("sourceloaded",Se.j.void),i>0&&this.seek(i),t&&this.setSubtitles(t),n.next=22;break;case 18:n.prev=18,n.t0=n.catch(2),console.error(n.t0),this.trigger("error",new Error("Could not load video on Vivi device"));case 22:case"end":return n.stop()}}),n,this,[[2,18]])})))}},{key:"play",value:function(){this.localState.ready&&!0!==this.localState.playing&&(this.localState.playing=!0,this.client.play(this.getDevice().id),this.trigger("playingchange",Se.j.void))}},{key:"pause",value:function(){this.localState.ready&&!1!==this.localState.playing&&(this.localState.playing=!1,this.client.pause(this.getDevice().id),this.trigger("playingchange",Se.j.void))}},{key:"seek",value:function(e){this.localState.ready&&this.localState.position!==e&&(this.localState.position=e,this.client.seek(this.getDevice().id,e),this.trigger("positionchange",Se.j.void))}},{key:"setVolume",value:function(e){this.localState.ready&&this.localState.volume!==e&&(this.localState.volume=e,this.client.setVolume(this.getDevice().id,e),this.trigger("volumechange",Se.j.void))}},{key:"setMuted",value:function(e){this.localState.ready&&this.localState.mute!==e&&(this.localState.mute=e,this.client.setMuted(this.getDevice().id,e),this.trigger("volumechange",Se.j.void))}},{key:"setSubtitles",value:function(e){return Qe(this,void 0,void 0,Ze().mark((function t(){var n;return Ze().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.localState.ready){t.next=2;break}return t.abrupt("return");case 2:if(!e){t.next=5;break}return t.next=5,this.loadSource(this.localState.videoSource,e);case 5:n=!!e,this.localState.subtitles!==n&&(this.localState.subtitles=n,this.client.setSubtitles(this.getDevice().id,n),this.trigger("subtitleschange",Se.j.void));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"isPlaying",value:function(){return this.localState.playing}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackFinished}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){return this.localState.duration}},{key:"getVolume",value:function(){return this.localState.volume}},{key:"getMuted",value:function(){return this.localState.mute}},{key:"getSubtitles",value:function(){if(this.localState.subtitles)return this.localState.subtitleSource}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}])&&ze(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(Se.N);function Je(e){return Je="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},Je(e)}function Ke(){Ke=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Je(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=E(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:h,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Je(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function et(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,tt(r.key),r)}}function tt(e){var t=function(e,t){if("object"!=Je(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Je(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Je(t)?t:String(t)}function nt(e,t,n){return t=ot(t),function(e,t){if(t&&("object"===Je(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,rt()?Reflect.construct(t,n||[],ot(e).constructor):t.apply(e,n))}function rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rt=function(){return!!e})()}function it(){return it="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ot(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},it.apply(this,arguments)}function ot(e){return ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ot(e)}function at(e,t){return at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},at(e,t)}var st=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ut=1e4,ct=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=nt(this,t)).options=e,n.accessToken="",n.devices=[],n.devicesFingerprint="",n.deviceDiscovery=new Ee,n.bindFunctions(),n.initialize(),n}var n,r,i;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&&at(e,t)}(t,e),n=t,i=[{key:"createAckId",value:function(){return Le()}},{key:"calculateFingerprint",value:function(e){return e.map((function(e){return e.id})).sort().join(",")}}],(r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.sendMessage=this.sendMessage.bind(this),this.sendMessageDebounced=(0,Me.Ds)(this.sendMessage,500,!0),this.beginDeviceDiscovery=this.beginDeviceDiscovery.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.authenticateWithVivi=this.authenticateWithVivi.bind(this),this.getRoomList=this.getRoomList.bind(this),this.joinRoom=this.joinRoom.bind(this),this.query=this.query.bind(this),this.loadQueue=this.loadQueue.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.stop=this.stop.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.setMuted=this.setMuted.bind(this),this.setSubtitles=this.setSubtitles.bind(this)}},{key:"initialize",value:function(){var e=this;this.webSocket=new Re(this.options.url.toString()),this.webSocket.onMessage=function(t){return e.trigger("message",JSON.parse(t.data))},this.webSocket.onOpen=function(){return st(e,void 0,void 0,Ke().mark((function e(){return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.options.fetchAccessToken();case 3:return this.accessToken=e.sent,e.next=6,this.authenticateWithVivi();case 6:this.beginDeviceDiscovery(),this.trigger("connected",Se.j.void),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),this.trigger("error",new Error("Could not connect to Vivi"));case 14:case"end":return e.stop()}}),e,this,[[0,10]])})))}}},{key:"sendMessage",value:function(e){var t;null===(t=this.webSocket)||void 0===t||t.send(JSON.stringify(e))}},{key:"beginDeviceDiscovery",value:function(){var e=this;this.deviceDiscovery.every(1e4).schedule((function(){return st(e,void 0,void 0,Ke().mark((function e(){var n,r;return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getRoomList();case 3:if(n=e.sent,(r=t.calculateFingerprint(n))!==this.devicesFingerprint){e.next=7;break}return e.abrupt("return");case 7:this.devices=n.map((function(e){return{id:e.id,name:e.name,type:Pe.Y.Vivi,status:Pe.L.Available}})),this.devicesFingerprint=r,this.trigger("deviceschange",Se.j.void),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.warn(e.t0);case 15:case"end":return e.stop()}}),e,this,[[0,12]])})))})).trigger().start()}},{key:"dispose",value:function(){var e;this.deviceDiscovery.stop(),null===(e=this.webSocket)||void 0===e||e.dipose(),it(ot(t.prototype),"dispose",this).call(this)}},{key:"canCastToDevice",value:function(e){return e===Pe.Y.Vivi}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(e){return new Xe(this,e)}},{key:"authenticateWithVivi",value:function(){return st(this,void 0,void 0,Ke().mark((function e(){return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{token:this.accessToken,type:"identify_video_api"}}),e.next=3,this.one("message",(function(e){return"video_api_identified"===e.message.type})).timeout(ut).catch((function(){throw new Error("Failed to authenticate with Vivi")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getRoomList",value:function(){return st(this,void 0,void 0,Ke().mark((function e(){var t;return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:"relay",message:{type:"video_api_rooms"}}),e.next=3,this.one("message",(function(e){return"video_api_rooms"===e.message.type})).timeout(ut).catch((function(){throw new Error("Failed to fetch rooms")}));case 3:return t=e.sent,e.abrupt("return",t.message.rooms||[]);case 5:case"end":return e.stop()}}),e,this)})))}},{key:"joinRoom",value:function(e){return st(this,void 0,void 0,Ke().mark((function t(){return Ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:"relay",message:{destination_type:"box",new_destination:e,token:this.accessToken,type:"connect"}}),t.next=3,this.one("message",(function(t){return t.source===e&&"connect"===t.message.type||"error"===t.message.type&&"already_connected"===t.message.error_type||void 0})).timeout(ut).catch((function(){throw new Error("Failed to join room")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"query",value:function(e){return st(this,void 0,void 0,Ke().mark((function n(){var r;return Ke().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:r,name:"query"}}),n.next=4,this.one("message",(function(e){return e.message.ack_id===r})).timeout(ut).catch((function(){throw new Error("Failed to fetch query")}));case 4:return n.abrupt("return",n.sent);case 5:case"end":return n.stop()}}),n,this)})))}},{key:"loadQueue",value:function(e){var n=e.roomId,r=e.title,i=e.videoSource,o=e.subtitleSource;return st(this,void 0,void 0,Ke().mark((function e(){return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.sendMessage({destination:n,message:{type:"message_with_ack",ack_id:t.createAckId(),name:"queue_load",payload:{urls:[{title:r,url:i,suburl:o}]}}}),e.next=3,this.one("message",(function(e){var t;return e.source===n&&"ready"===(null===(t=e.message.payload)||void 0===t?void 0:t.event)})).timeout(ut).catch((function(){throw new Error("Failed to load media")}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(e){return st(this,void 0,void 0,Ke().mark((function t(){return Ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_play",payload:{}}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(ut).catch((function(){throw new Error("Failed to play video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"pause",value:function(e){return st(this,void 0,void 0,Ke().mark((function t(){return Ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_pause"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"paused"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(ut).catch((function(){throw new Error("Failed to pause video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"stop",value:function(e){return st(this,void 0,void 0,Ke().mark((function t(){return Ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"video_stop"}}),t.next=3,this.one("message",(function(t){var n;return t.source===e&&"stopped"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(ut).catch((function(){throw new Error("Failed to stop video")}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"seek",value:function(e,t){return st(this,void 0,void 0,Ke().mark((function n(){return Ke().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"video_seek",payload:{position:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"playing"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(ut).catch((function(){throw new Error("Failed to seek video")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setVolume",value:function(e,t){return st(this,void 0,void 0,Ke().mark((function n(){return Ke().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.sendMessageDebounced({destination:e,message:{type:"message",name:"set_volume",payload:{volume:t}}})){n.next=4;break}return n.next=4,this.one("message",(function(t){var n;return t.source===e&&"volume"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(ut).catch((function(){throw new Error("Failed to set volume")}));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"setMuted",value:function(e,t){return st(this,void 0,void 0,Ke().mark((function n(){return Ke().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.sendMessage({destination:e,message:{type:"message",name:"set_mute",payload:{mute:t}}}),n.next=3,this.one("message",(function(t){var n;return t.source===e&&"mute"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(ut).catch((function(){throw new Error("Failed to set mute")}));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"setSubtitles",value:function(e,n){return st(this,void 0,void 0,Ke().mark((function r(){var i;return Ke().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=t.createAckId(),this.sendMessage({destination:e,message:{type:"message_with_ack",ack_id:i,name:"set_subtitles",payload:{subtitles:n}}}),r.next=4,this.one("message",(function(t){var n;return t.source===e&&"subtitles"===(null===(n=t.message.payload)||void 0===n?void 0:n.event)})).timeout(ut).catch((function(){throw new Error("Failed to set subtitles")}));case 4:case"end":return r.stop()}}),r,this)})))}}])&&et(n.prototype,r),i&&et(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(Se.N);function lt(e){return lt="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},lt(e)}function ft(e){return function(e){if(Array.isArray(e))return pt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pt(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pt(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 ht(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,dt(r.key),r)}}function dt(e){var t=function(e,t){if("object"!=lt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lt(t)?t:String(t)}function yt(e,t,n){return t=gt(t),function(e,t){if(t&&("object"===lt(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,vt()?Reflect.construct(t,n||[],gt(e).constructor):t.apply(e,n))}function vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(vt=function(){return!!e})()}function bt(){return bt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=gt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},bt.apply(this,arguments)}function gt(e){return gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gt(e)}function mt(e,t){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mt(e,t)}var wt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=yt(this,t)).instanceId=e,n.clients=[],n.bindFunctions(),n}var n,r,i;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&&mt(e,t)}(t,e),n=t,i=[{key:"getOrCreateInstance",value:function(e){if(!e)throw new Error("instanceId is required");return this.instances[e]||(this.instances[e]=new t(e)),this.instances[e]}},{key:"disposeAndRemoveInstance",value:function(e){e.dispose(),delete this.instances[e.instanceId]}},{key:"isActive",value:function(){return Object.keys(this.instances).length>0}}],(r=[{key:"bindFunctions",value:function(){this.addClient=this.addClient.bind(this),this.hasInstanceOfClient=this.hasInstanceOfClient.bind(this),this.startCastSession=this.startCastSession.bind(this),this.gatherAndPublishDevices=this.gatherAndPublishDevices.bind(this),this.dispose=this.dispose.bind(this)}},{key:"addClient",value:function(e){var t=this;e.on("deviceschange",this.gatherAndPublishDevices),e.on("error",(function(e){return t.trigger("error",e)})),this.clients.push(e)}},{key:"hasInstanceOfClient",value:function(e){return this.clients.some((function(t){return t instanceof e}))}},{key:"startCastSession",value:function(e){var t=this;if(this.castSession){if(this.castSession.getDevice().id===e.device.id)return void console.info("A session with device ".concat(e.device.id," already exists - this is a no-op"));this.castSession.dispose()}var n=this.clients.find((function(t){return t.canCastToDevice(e.device.type)}));n&&(this.castSession=n.startCastSession(e),this.castSession.on("error",(function(e){t.castSession.dispose(),t.trigger("error",e)})),this.castSession.on("dispose",(function(){t.castSession=void 0,t.trigger("castsessionchange",void 0)})),this.trigger("castsessionchange",this.castSession))}},{key:"getCastSession",value:function(){return this.castSession}},{key:"gatherAndPublishDevices",value:function(){var e=this.clients.map((function(e){return e.getDevices()})).reduce((function(e,t){return[].concat(ft(e),ft(t))}),[]);this.trigger("deviceschange",e)}},{key:"dispose",value:function(){var e;null===(e=this.castSession)||void 0===e||e.dispose(),this.clients.forEach((function(e){return e.dispose()})),this.castSession=void 0,this.clients=[],bt(gt(t.prototype),"dispose",this).call(this)}}])&&ht(n.prototype,r),i&&ht(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(Se.N);wt.instances={};var Ot=n(30050),Pt=n(98115);function St(e){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},St(e)}function kt(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,jt(r.key),r)}}function jt(e){var t=function(e,t){if("object"!=St(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=St(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==St(t)?t:String(t)}function Ct(e,t,n){return t=_t(t),function(e,t){if(t&&("object"===St(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tt(e)}(e,Et()?Reflect.construct(t,n||[],_t(e).constructor):t.apply(e,n))}function Et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Et=function(){return!!e})()}function Tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function It(){return It="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_t(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},It.apply(this,arguments)}function _t(e){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_t(e)}function xt(e,t){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xt(e,t)}var Rt=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Ct(this,t,[e,n])).isVisible=r.isVisible.bind(Tt(r)),r}var n,r;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&&xt(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return It(_t(t.prototype),"createEl",this).call(this,"li",{className:"vjs-menu-item cv-device-menu-item",innerHTML:'\n <span class="cv-device-icon '.concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[this.options_.type],'"></span>\n <span class="vjs-menu-item-text">').concat(this.options_.label,"</span>\n ")})}},{key:"handleClick",value:function(){this.options_.onClick()}},{key:"show",value:function(){It(_t(t.prototype),"show",this).call(this)}},{key:"hide",value:function(){It(_t(t.prototype),"hide",this).call(this)}},{key:"isVisible",value:function(){return!It(_t(t.prototype),"hasClass",this).call(this,"vjs-hidden")}}])&&kt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("MenuItem"));function Mt(e){return Mt="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},Mt(e)}function Lt(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,Dt(r.key),r)}}function Dt(e){var t=function(e,t){if("object"!=Mt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mt(t)?t:String(t)}function Nt(e,t,n){return t=Bt(t),function(e,t){if(t&&("object"===Mt(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,At()?Reflect.construct(t,n||[],Bt(e).constructor):t.apply(e,n))}function At(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(At=function(){return!!e})()}function Vt(){return Vt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Vt.apply(this,arguments)}function Bt(e){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bt(e)}function Ft(e,t){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ft(e,t)}var Ut=o.Z.getComponent("MenuButton"),Zt=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Nt(this,t,[e,n])).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.className="cv-devices-menu-button",r.searchText="",r.devices=[],r.castSession=void 0,r.bindFunctions(),r.bindEventListeners(),r}var n,r;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&&Ft(e,t)}(t,e),n=t,r=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.setDevices=this.setDevices.bind(this),this.setCastSession=this.setCastSession.bind(this),this.setSearchText=this.setSearchText.bind(this),this.getDeviceMenuItems=this.getDeviceMenuItems.bind(this),this.render=this.render.bind(this),this.removeMenuItems=this.removeMenuItems.bind(this),this.addMenuItemsForDevices=this.addMenuItemsForDevices.bind(this),this.shouldShowSearchInput=this.shouldShowSearchInput.bind(this),this.toggleSearchInput=this.toggleSearchInput.bind(this),this.toggleDeviceMenuItems=this.toggleDeviceMenuItems.bind(this),this.toggleEmptyStatePlaceholder=this.toggleEmptyStatePlaceholder.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("button"),n=function(t){e.menu.handleBlur(t)};t.addEventListener("blur",n),this.one("dispose",(function(){t.removeEventListener("blur",n)}))}},{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Ut.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-devices-button ".concat(Vt(Bt(t.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=this,t=[];return this.headingItem=new Ot.Z(this.player_,{label:this.localize("Select a device"),selectable:!1}),this.searchInputItem=new Pt.Z(this.player_,{menuButton:this,search:function(t){return e.setSearchText(t)},className:"cv-devices-search-input"}),this.emptyPlaceholder=new Pt.C(this.player_,{label:"No devices found",selected:!1,selectable:!1,multiSelectable:!1}),this.headingItem.show(),this.searchInputItem.hide(),this.emptyPlaceholder.show(),t.push(this.headingItem,this.searchInputItem,this.emptyPlaceholder),t}},{key:"pressButton",value:function(){var e;Vt(Bt(t.prototype),"pressButton",this).call(this),this.shouldShowSearchInput()&&(null===(e=this.searchInputItem)||void 0===e||e.focus())}},{key:"setDevices",value:function(e){this.devices=e,this.render()}},{key:"setCastSession",value:function(e){this.castSession=e,this.render()}},{key:"setSearchText",value:function(e){this.searchText=e,this.render()}},{key:"getDeviceMenuItems",value:function(){return this.menu.children_.filter((function(e){return e instanceof Rt}))}},{key:"render",value:function(){this.removeMenuItems(this.getDeviceMenuItems()),this.addMenuItemsForDevices(this.devices),this.toggleSearchInput(),this.toggleDeviceMenuItems(),this.toggleEmptyStatePlaceholder()}},{key:"removeMenuItems",value:function(e){var t=this;e.forEach((function(e){t.menu.removeChild(e),e.dispose()}))}},{key:"addMenuItemsForDevices",value:function(e){var t=this;e.sort((function(e,t){return"".concat(e.type,"-").concat(e.name).localeCompare("".concat(t.type,"-").concat(t.name))})).forEach((function(e){var n=new Rt(t.player(),{id:e.id,label:e.name,selected:!1,multiSelectable:!1,selectable:!0,available:e.status===Pe.L.Available,type:e.type,onClick:function(){t.options_.onDeviceMenuItemClick(n,e)}});t.menu.addItem(n)}))}},{key:"shouldShowSearchInput",value:function(){return this.getDeviceMenuItems().length>=20}},{key:"toggleSearchInput",value:function(){this.shouldShowSearchInput()?(this.headingItem.hide(),this.searchInputItem.show(),this.menu.addClass("vertical-fill")):(this.headingItem.show(),this.searchInputItem.hide(),this.menu.removeClass("vertical-fill"))}},{key:"toggleDeviceMenuItems",value:function(){var e=this,t=this.getDeviceMenuItems(),n=this.shouldShowSearchInput(),r=this.searchText.toLowerCase();t.forEach((function(t){var i,o=e.devices.find((function(e){return e.id===t.options_.id}));if(o){var a=o.status===Pe.L.Available,s=!n||-1!==o.name.toLowerCase().indexOf(r),u=o.id===(null===(i=e.castSession)||void 0===i?void 0:i.getDevice().id);a?t.enable():t.disable(),s?t.show():t.hide(),u?t.selected(!0):t.selected(!1)}}))}},{key:"toggleEmptyStatePlaceholder",value:function(){var e=this.getDeviceMenuItems();e.filter((function(e){return e.isVisible()})).length?this.emptyPlaceholder.hide():this.emptyPlaceholder.show(),e.length?this.emptyPlaceholder.setLabel(this.localize("No matching results")):this.emptyPlaceholder.setLabel(this.localize("No devices found"))}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){var e,t;return null!==(t=null===(e=this.castSession)||void 0===e?void 0:e.getDevice().name)&&void 0!==t?t:" "}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){this.handleClick()}},{key:"handleClick",value:function(){Vt(Bt(t.prototype),"handleClick",this).call(this,null),this.options_.onClick()}}],r&&Lt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(Ut);Zt.prototype.controlText_="Devices",o.Z.registerComponent("DevicesButton",Zt);var zt=n(10463);function Gt(e){return Gt="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},Gt(e)}function qt(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,Ht(r.key),r)}}function Ht(e){var t=function(e,t){if("object"!=Gt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gt(t)?t:String(t)}function Yt(e,t,n){return t=Qt(t),function(e,t){if(t&&("object"===Gt(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,Wt()?Reflect.construct(t,n||[],Qt(e).constructor):t.apply(e,n))}function Wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wt=function(){return!!e})()}function $t(){return $t="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Qt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},$t.apply(this,arguments)}function Qt(e){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qt(e)}function Xt(e,t){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xt(e,t)}var Jt=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Yt(this,t,[null,e])}var n,r;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&&Xt(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return $t(Qt(t.prototype),"createEl",this).call(this,"div",{className:"cv-devices-tech"})}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"setDevice",value:function(e){this.device=e,this.update()}},{key:"update",value:function(){var e,t,n,r,i=this;this.el_.innerHTML='\n <div class="cv-devices-content">\n <p>'.concat(this.localize("Currently playing on"),'</p>\n <h2><span class="cv-device-icon ').concat({vivi:"cv-vivi-icon","apple-tv":"cv-apple-icon"}[null!==(t=null===(e=this.device)||void 0===e?void 0:e.type)&&void 0!==t?t:Pe.Y.Vivi],'"></span>').concat(null!==(r=null===(n=this.device)||void 0===n?void 0:n.name)&&void 0!==r?r:"",'</h2>\n </div>\n <div class="cv-devices-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var o=document.createElement("button"),a=function(e){e.stopPropagation(),i.options_.onStopCasting()};o.onclick=a,o.ontouchstart=a,o.className="stop-casting-button",o.innerHTML=this.localize("Stop casting"),this.el_.querySelector(".cv-devices-content").appendChild(o)}},{key:"play",value:function(){}}])&&qt(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Component"));function Kt(e){return Kt="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},Kt(e)}function en(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,tn(r.key),r)}}function tn(e){var t=function(e,t){if("object"!=Kt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kt(t)?t:String(t)}function nn(e,t,n){return t=an(t),function(e,t){if(t&&("object"===Kt(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,rn()?Reflect.construct(t,n||[],an(e).constructor):t.apply(e,n))}function rn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rn=function(){return!!e})()}function on(){return on="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=an(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},on.apply(this,arguments)}function an(e){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},an(e)}function sn(e,t){return sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sn(e,t)}var un=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=nn(this,t,[e,n])).featuresVolumeControl=!0,r.featuresPlaybackRate=!1,r.movingMediaElementInDOM=!1,r.featuresFullscreenResize=!0,r.featuresTimeupdateEvents=!0,r.featuresProgressEvents=!1,r.featuresNativeTextTracks=!1,r.featuresNativeAudioTracks=!1,r.featuresNativeVideoTracks=!1,r.featuresMuteControl=!0,r.featuresSourceset=!1,r.videojsPlayer=(0,o.Z)(r.options_.playerId),r.bindFunctions(),r.bindEventListeners(),r.ready((function(){r.setSource(r.options_.source)})),r.triggerReady(),r}var n,r,i;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&&sn(e,t)}(t,e),n=t,i=[{key:"canPlayType",value:function(){return""}},{key:"canPlaySource",value:function(e,t){var n;return!!wt.getOrCreateInstance(null!==(n=null==t?void 0:t.instanceId)&&void 0!==n?n:"").getCastSession()}},{key:"isSupported",value:function(){return wt.isActive()}}],(r=[{key:"bindFunctions",value:function(){this.bindEventListeners=this.bindEventListeners.bind(this),this.onTextTrackChanged=this.onTextTrackChanged.bind(this),this.getSelectedTextTrack=this.getSelectedTextTrack.bind(this),this.setSelectedTextTrack=this.setSelectedTextTrack.bind(this),this.showUI=this.showUI.bind(this),this.hideUI=this.hideUI.bind(this),this.dispose=this.dispose.bind(this),this.setSource=this.setSource.bind(this),this.getCastSession=this.getCastSession.bind(this)}},{key:"bindEventListeners",value:function(){var e=this,t=this.getCastSession();t&&(this.textTracks().on("change",this.onTextTrackChanged),this.videojsPlayer.one("ended",(function(){t.dispose()})),t.on("durationchange",(function(){e.trigger("durationchange")})),t.on("dispose",(function(){e.trigger("ended"),e.hideUI()})),t.on("playingchange",(function(){t.isPlaying()?(e.trigger("play"),e.trigger("playing")):e.trigger("pause")})),t.on("volumechange",(function(){e.trigger("volumechange")})),t.on("sourceloaded",(function(){e.trigger("loadeddata")})),t.on("subtitleschange",(function(){e.setSelectedTextTrack(t.getSubtitles())})))}},{key:"onTextTrackChanged",value:function(){var e,t=this.getSelectedTextTrack();null===(e=this.getCastSession())||void 0===e||e.setSubtitles(null==t?void 0:t.src)}},{key:"getSelectedTextTrack",value:function(){return zt.O.findTrackByPredicate(this.videojsPlayer.player_,(function(e){return"showing"===e.mode&&!!e.src}))}},{key:"setSelectedTextTrack",value:function(e){zt.O.forEachTrack(this.videojsPlayer.player_,(function(t){t.src===e?t.mode="showing":t.mode="hidden"}))}},{key:"showUI",value:function(e){this.ui&&(this.ui.setPoster(this.options_.poster),this.ui.setDevice(e),this.ui.show())}},{key:"hideUI",value:function(){var e;null===(e=this.ui)||void 0===e||e.hide()}},{key:"dispose",value:function(){this.textTracks().off("change",this.onTextTrackChanged);var e=this.getCastSession();e&&e.dispose(),on(an(t.prototype),"cleanupAutoTextTracks",this).call(this),on(an(t.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){var e=this;return this.ui=this.ui||new Jt({onStopCasting:function(){var t;null===(t=e.getCastSession())||void 0===t||t.dispose()}}),this.ui.el()}},{key:"setSource",value:function(e){var t=this.getCastSession();if(t){this.showUI(t.getDevice()),this.trigger("loadstart");var n=this.getSelectedTextTrack();t.loadSource(e.src,null==n?void 0:n.src)}}},{key:"addRemoteTextTrack",value:function(e){return on(an(t.prototype),"addRemoteTextTrack",this).call(this,e,!0)}},{key:"getCastSession",value:function(){var e;return wt.getOrCreateInstance(null!==(e=this.options_.instanceId)&&void 0!==e?e:"").getCastSession()}},{key:"play",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.play()}},{key:"pause",value:function(){var e;null===(e=this.getCastSession())||void 0===e||e.pause()}},{key:"paused",value:function(){var e;return!1===(null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaying())}},{key:"ended",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.isPlaybackFinished())&&void 0!==t&&t}},{key:"setCurrentTime",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.seek(null!=e?e:0)}},{key:"currentTime",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getPosition())&&void 0!==t?t:0}},{key:"duration",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getDuration())&&void 0!==t?t:this.videojsPlayer.duration()}},{key:"volume",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getVolume())&&void 0!==t?t:1}},{key:"setVolume",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setVolume(e)}},{key:"muted",value:function(){var e,t;return null!==(t=null===(e=this.getCastSession())||void 0===e?void 0:e.getMuted())&&void 0!==t&&t}},{key:"setMuted",value:function(e){var t;null===(t=this.getCastSession())||void 0===t||t.setMuted(e)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return o.Z.createTimeRanges(0,this.duration())}},{key:"playbackRate",value:function(){return 1}},{key:"readyState",value:function(){return 4}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}}])&&en(n.prototype,r),i&&en(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("Tech"));function cn(e){return cn="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},cn(e)}function ln(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,fn(r.key),r)}}function fn(e){var t=function(e,t){if("object"!=cn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=cn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cn(t)?t:String(t)}function pn(e,t,n){return t=yn(t),function(e,t){if(t&&("object"===cn(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,hn()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function hn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(hn=function(){return!!e})()}function dn(){return dn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dn.apply(this,arguments)}function yn(e){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yn(e)}function vn(e,t){return vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vn(e,t)}o.Z.registerTech("devices",un);var bn=function(e){function t(e,n){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=pn(this,t,[e,n])).options=n,r.instanceId=null!==(o=null===(i=r.player.options_.devices)||void 0===i?void 0:i.instanceId)&&void 0!==o?o:"",r.bindFunctions(),r.initialize(),r}var n,r;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&&vn(e,t)}(t,e),n=t,(r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.onReady=this.onReady.bind(this),this.onDevicesChanged=this.onDevicesChanged.bind(this),this.onCastSessionChanged=this.onCastSessionChanged.bind(this),this.onDevicesError=this.onDevicesError.bind(this),this.addViviClient=this.addViviClient.bind(this),this.addAppleTvClient=this.addAppleTvClient.bind(this),this.reloadTech=this.reloadTech.bind(this),this.getSessionManager=this.getSessionManager.bind(this),this.dispose=this.dispose.bind(this)}},{key:"initialize",value:function(){this.player.ready(this.onReady)}},{key:"onReady",value:function(){var e=this,t=this.player.getChild("collapserator"),n=null==t?void 0:t.children().findIndex((function(e){return"CustomControlSpacer"===e.name()})),r=this.getSessionManager();if(t&&n&&-1!==n&&r){r.on("deviceschange",this.onDevicesChanged),r.on("castsessionchange",this.onCastSessionChanged),r.on("error",this.onDevicesError);var i={onClick:function(){e.addViviClient(r),e.addAppleTvClient(r)},onDeviceMenuItemClick:function(t,n){var i;r.startCastSession({device:n,title:e.options.title}),null===(i=e.options.analyticsService)||void 0===i||i.logUserAction(n,{actionType:we.Vw.Select,workflowPhase:we.eu.Complete,descriptor:we.UX.ChangeDevice,entity:we.py.Device,eventVersion:we.eq.V3})}};this.devicesButton=t.addChild("DevicesButton",i,n+1)}}},{key:"onDevicesChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setDevices(e)}},{key:"onCastSessionChanged",value:function(e){var t;null===(t=this.devicesButton)||void 0===t||t.setCastSession(e),this.reloadTech(),e?(this.player.addClass("cv-device-casting"),this.player.addClass("cv-device-".concat(e.getDevice().type)),this.player.isFullscreen()&&this.player.exitFullscreen()):(this.player.removeClass("cv-device-casting"),this.player.removeClass("cv-device-".concat(Pe.Y.AppleTv)),this.player.removeClass("cv-device-".concat(Pe.Y.Vivi)))}},{key:"onDevicesError",value:function(e){this.player.error(e.message),this.player.pause()}},{key:"addViviClient",value:function(e){if(this.options.viviEnabled&&this.options.viviApi&&this.options.fetchViviAccessToken&&!e.hasInstanceOfClient(ct)){var t=new ct({url:this.options.viviApi,fetchAccessToken:this.options.fetchViviAccessToken});e.addClient(t)}}},{key:"addAppleTvClient",value:function(e){if(this.options.appleTvEnabled&&this.options.fetchOnlineApiAccessToken&&this.options.trackingCode&&this.options.userId&&!e.hasInstanceOfClient(Oe.w)){var t=new Oe.w({fetchAccessToken:this.options.fetchOnlineApiAccessToken,trackingCode:this.options.trackingCode,userId:this.options.userId});e.addClient(t)}}},{key:"reloadTech",value:function(){var e=this.player,t=e.currentSources(),n=e.volume(),r=e.muted(),i=e.currentTime(),o=e.paused();e.src(t),e.one("playing",(function(){e.volume(n),e.muted(r),e.currentTime(i),o?e.pause():e.play()}))}},{key:"getSessionManager",value:function(){if(this.instanceId)return wt.getOrCreateInstance(this.instanceId)}},{key:"dispose",value:function(){var e=this.getSessionManager();e&&(e.off("deviceschange",this.onDevicesChanged),e.off("castsessionchange",this.onCastSessionChanged),e.off("error",this.onDevicesError),wt.disposeAndRemoveInstance(e),dn(yn(t.prototype),"dispose",this).call(this))}}])&&ln(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));function gn(e){return gn="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},gn(e)}function mn(){mn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function b(){}function g(){}function m(){}var w={};c(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(x([])));P&&P!==n&&r.call(P,a)&&(w=P);var S=m.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(i,o,a,s){var u=f(e[i],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==gn(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=E(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?y:h,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function x(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(gn(t)+" is not iterable")}return g.prototype=m,i(S,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(j.prototype),c(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function wn(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 On(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,Pn(r.key),r)}}function Pn(e){var t=function(e,t){if("object"!=gn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=gn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gn(t)?t:String(t)}function Sn(e,t,n){return t=Cn(t),function(e,t){if(t&&("object"===gn(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,kn()?Reflect.construct(t,n||[],Cn(e).constructor):t.apply(e,n))}function kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(kn=function(){return!!e})()}function jn(){return jn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Cn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},jn.apply(this,arguments)}function Cn(e){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cn(e)}function En(e,t){return En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},En(e,t)}o.Z.registerPlugin("devicesPlugin",bn);var Tn=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Sn(this,t,[e,n])}var n,r;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&&En(e,t)}(t,e),n=t,(r=[{key:"getPlayerOptions",value:function(){var e,n=jn(Cn(t.prototype),"getPlayerOptions",this).call(this);return this.areDevicesEnabled()?Object.assign(Object.assign({},n),{techOrder:["devices"].concat((e=n.techOrder,function(e){if(Array.isArray(e))return wn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return wn(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),devices:{instanceId:Le()}}):n}},{key:"configurePlugins",value:function(){var e;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(e=this.options.pointsOfInterest)||void 0===e?void 0:e.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(e){console.log("failed to register plugins",e)}}},{key:"setNextVideo",value:function(e,t,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(e,t,n)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var n,r,i,o,a,s,u,c,l,f,p=this,h=Object.create(null,{additionalSetup:{get:function(){return jn(Cn(t.prototype),"additionalSetup",p)}}});return u=this,c=void 0,l=void 0,f=mn().mark((function t(){var u;return mn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(h.additionalSetup.call(this,e),this.options.showResources&&e.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:e.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==e.mediaType){t.next=7;break}if(null!==(u=e.additionalData)){t.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:u.startTime,endTime:u.endTime});case 7:this.areDevicesEnabled()&&this.player.devicesPlugin({viviEnabled:null===(n=this.options.devicesConfig)||void 0===n?void 0:n.viviEnabled,viviApi:null===(r=this.options.devicesConfig)||void 0===r?void 0:r.viviApi,fetchViviAccessToken:null===(i=this.options.devicesConfig)||void 0===i?void 0:i.fetchViviAccessToken,appleTvEnabled:null===(o=this.options.devicesConfig)||void 0===o?void 0:o.appleTvEnabled,fetchOnlineApiAccessToken:null===(a=this.options.devicesConfig)||void 0===a?void 0:a.fetchOnlineApiAccessToken,trackingCode:null===(s=this.options.devicesConfig)||void 0===s?void 0:s.trackingCode,userId:parseInt(e.viewerId),title:e.title,analyticsService:this.analyticsService});case 8:case"end":return t.stop()}}),t,this)})),new(l||(l=Promise))((function(e,t){function n(e){try{i(f.next(e))}catch(e){t(e)}}function r(e){try{i(f.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(n,r)}i((f=f.apply(u,c||[])).next())}))}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&On(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(i.r),In=n(63816),_n=n(14735);function xn(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 Rn(e){var t,n,i,o=r.useRef(e.player.duration()-e.player.currentTime()),a=(n=r.useState(o.current),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(n,i)||function(e,t){if(e){if("string"==typeof e)return xn(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xn(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],u=a[1];function c(){var t=e.player.duration()-e.player.currentTime();u(t),t>o.current&&(o.current=t)}if(r.useEffect((function(){return e.player.on("timeupdate",c),function(){e.player.off("timeupdate",c)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var l=Math.ceil(s),f=1===l?"second":"seconds";return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-up-next-container"},r.createElement("div",{className:"cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"),r.createElement("div",{className:"cv-up-next-heading"},"Up next in ",l," ",f,":"),r.createElement("div",{className:"cv-up-next-image cursor-pointer",onClick:e.onPlayNext,style:{backgroundImage:"url(".concat(null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl,")")}}),r.createElement("div",{className:"cv-up-next-title"},e.nextVideo.name)))}function Mn(e){return Mn="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},Mn(e)}function Ln(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,Dn(r.key),r)}}function Dn(e){var t=function(e,t){if("object"!=Mn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Mn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mn(t)?t:String(t)}function Nn(e,t,n){return t=Bn(t),function(e,t){if(t&&("object"===Mn(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,An()?Reflect.construct(t,n||[],Bn(e).constructor):t.apply(e,n))}function An(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(An=function(){return!!e})()}function Vn(){return Vn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Vn.apply(this,arguments)}function Bn(e){return Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bn(e)}function Fn(e,t){return Fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fn(e,t)}o.Z.registerComponent("UpNext",(0,_n.Z)((function(e,t){return r.createElement(Rn,Object.assign({player:e},t))})));var Un=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Nn(this,t,[e,n])).playNext=e.nextVideoPlugin().getShouldPlayNext(),r.toggle(r.playNext),r}var n,r;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&&Fn(e,t)}(t,e),n=t,(r=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,o.Z.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"toggleOff",value:function(){this.playNext=!1,o.Z.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext,!0)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,n,r){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var i=Vn(Bn(t.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Play next video</span>\n <span class="cv-toggle-container"></span>'},r);return i.children[1].appendChild(this.toggleEl),i}}])&&Ln(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("MenuItem"));function Zn(e){return Zn="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},Zn(e)}function zn(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,Gn(r.key),r)}}function Gn(e){var t=function(e,t){if("object"!=Zn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Zn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zn(t)?t:String(t)}function qn(e,t,n){return t=$n(t),function(e,t){if(t&&("object"===Zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Yn(e)}(e,Hn()?Reflect.construct(t,n||[],$n(e).constructor):t.apply(e,n))}function Hn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Hn=function(){return!!e})()}function Yn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wn(){return Wn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$n(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Wn.apply(this,arguments)}function $n(e){return $n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$n(e)}function Qn(e,t){return Qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qn(e,t)}o.Z.registerComponent("NextVideoMenuItem",Un);var Xn="cv-persisttest",Jn="cv-play-next-video",Kn=o.Z.getPlugin("plugin"),er=(o.Z.getComponent("MenuItem"),o.Z.getComponent("NextVideoMenuItem")),tr=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=qn(this,t,[e])).setShouldPlayNext=n.setShouldPlayNext.bind(Yn(n)),n.getShouldPlayNext=n.getShouldPlayNext.bind(Yn(n)),n.getChapterTrack=n.getChapterTrack.bind(Yn(n)),n.onTimeUpdate=n.onTimeUpdate.bind(Yn(n)),n.hasLocalStorage=n.testHasLocalStorage(),n.shouldPlayNextVideo=!1,n.hasLocalStorage){var r=window.localStorage.getItem(Jn);n.shouldPlayNextVideo="true"===r}return e.ready((function(){n.initialize()})),n}var n,r;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&&Qn(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.player.isDisposed()||this.bindListeners()}},{key:"getChapterTrack",value:function(){return zt.O.getTrack(this.player,"chapters",null)}},{key:"setNextVideo",value:function(e,t,n){var r;this.nextVideo=e,this.callback=n,t&&this.setShouldPlayNext(!0),(null===(r=this.player.getChild("collapserator"))||void 0===r?void 0:r.getChild("cogButton")).addItem({index:0,ctor:er,name:"NextVideoMenuItem"})}},{key:"getShouldPlayNext",value:function(){return this.shouldPlayNextVideo}},{key:"setShouldPlayNext",value:function(e,t){this.shouldPlayNextVideo=e,this.hasLocalStorage&&t&&window.localStorage.setItem(Jn,e.toString())}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.hideUpNext(),Wn($n(t.prototype),"dispose",this).call(this)}},{key:"onTimeUpdate",value:function(){var e,t;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();if(!(this.player.duration()<=0||this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint)){var n=this.getChapterTrack(),r=(null===(e=null==n?void 0:n.activeCues)||void 0===e?void 0:e.length)&&n.activeCues[0];"credits"===(null===(t=null==r?void 0:r.text)||void 0===t?void 0:t.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext()}}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&(this.player.removeChild(e),e.dispose())}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem(Xn,"persistPlayNext"),window.localStorage.removeItem(Xn),!0}catch(e){return!1}}}])&&zn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(Kn);o.Z.registerPlugin("nextVideoPlugin",tr);var nr=n(26733);function rr(e){return rr="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},rr(e)}function ir(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,or(r.key),r)}}function or(e){var t=function(e,t){if("object"!=rr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rr(t)?t:String(t)}function ar(e,t,n){return t=ur(t),function(e,t){if(t&&("object"===rr(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,sr()?Reflect.construct(t,n||[],ur(e).constructor):t.apply(e,n))}function sr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(sr=function(){return!!e})()}function ur(e){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ur(e)}function cr(e,t){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cr(e,t)}function lr(e){return r.createElement("div",{className:"cv-resource-item"},r.createElement(nr.s,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var fr=(0,_n.Z)((function(e,t){return r.createElement(lr,Object.assign({},t))})),pr=function(e){function t(e,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=ar(this,t,[e,n]);var i=new fr(e,{resource:n.resource,imageCdnUrl:n.imageCdnUrl});return r.addChild(i),r}var n,r;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&&cr(e,t)}(t,e),n=t,(r=[{key:"createEl",value:function(){return o.Z.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&ir(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("ClickableComponent"));function hr(e){return hr="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},hr(e)}function dr(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,yr(r.key),r)}}function yr(e){var t=function(e,t){if("object"!=hr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hr(t)?t:String(t)}function vr(e,t,n){return t=mr(t),function(e,t){if(t&&("object"===hr(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,br()?Reflect.construct(t,n||[],mr(e).constructor):t.apply(e,n))}function br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(br=function(){return!!e})()}function gr(){return gr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mr(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},gr.apply(this,arguments)}function mr(e){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mr(e)}function wr(e,t){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wr(e,t)}var Or=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=vr(this,t,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}var n,r;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&&wr(e,t)}(t,e),n=t,(r=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(gr(mr(t.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(gr(mr(t.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){gr(mr(t.prototype),"update",this).call(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",gr(mr(t.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new pr(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=o.Z.dom.createEl("iframe"),this.downloadIframe.style.display="none",o.Z.dom.appendContent(o.Z.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){gr(mr(t.prototype),"handleClick",this).call(this,null)}}])&&dr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getComponent("MenuButton"));function Pr(e){return Pr="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},Pr(e)}function Sr(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,kr(r.key),r)}}function kr(e){var t=function(e,t){if("object"!=Pr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pr(t)?t:String(t)}function jr(e,t,n){return t=Er(t),function(e,t){if(t&&("object"===Pr(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,Cr()?Reflect.construct(t,n||[],Er(e).constructor):t.apply(e,n))}function Cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cr=function(){return!!e})()}function Er(e){return Er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Er(e)}function Tr(e,t){return Tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tr(e,t)}Or.prototype.controlText_="Resources",o.Z.registerComponent("ResourcesButton",Or);var Ir=function(e){function t(e,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=jr(this,t,[e,n])).options=n,e.ready((function(){return r.onReady()})),r}var n,r;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&&Tr(e,t)}(t,e),n=t,(r=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&Sr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("resourcesPlugin",Ir);var _r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function xr(e){var t=e.className,n=void 0===t?"":t,i=e.playerApi,o=e.onReady,a=e.onDispose,s=_r(e,["className","playerApi","onReady","onDispose"]),u=r.useRef();return r.useEffect((function(){if(u){var e=new Tn(u.current,Object.assign(Object.assign({},s),{playerApi:i}));return o&&e.ready((function(){o((0,In.G)(e))})),a&&e.one("dispose",a),function(){null==e||e.dispose()}}}),[e.viewKey]),r.createElement("div",{ref:u,className:n})}}}]);
|