@clickview/lite 0.3.2-dev.1 → 0.3.2-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.
Files changed (299) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/103-lite-8a36197c3f.chunk.css +2 -0
  3. package/dist/css/12-lite-41e92d8437.chunk.css +4 -0
  4. package/dist/css/{13-lite-e57f926ef6.chunk.css → 13-lite-3c72ed5e11.chunk.css} +1 -1
  5. package/dist/css/{23-lite-294884c12b.chunk.css → 19-lite-bee693899f.chunk.css} +4 -2
  6. package/dist/css/{38-lite-fb1813b688.chunk.css → 38-lite-4ad41356ae.chunk.css} +1 -1
  7. package/dist/css/47-lite-ce5bae2361.chunk.css +10 -0
  8. package/dist/css/48-lite-779644fde0.chunk.css +8 -0
  9. package/dist/css/49-lite-4e4352acf4.chunk.css +8 -0
  10. package/dist/css/{49-lite-9ded6392ef.chunk.css → 50-lite-eca4630db4.chunk.css} +1 -1
  11. package/dist/css/{50-lite-9ded6392ef.chunk.css → 51-lite-eca4630db4.chunk.css} +1 -1
  12. package/dist/css/{51-lite-a1d810b25e.chunk.css → 52-lite-4e9baa2a6b.chunk.css} +1 -1
  13. package/dist/css/{53-lite-9ded6392ef.chunk.css → 53-lite-eca4630db4.chunk.css} +1 -1
  14. package/dist/css/{54-lite-9ded6392ef.chunk.css → 54-lite-eca4630db4.chunk.css} +1 -1
  15. package/dist/css/{57-lite-2ff62b3253.chunk.css → 57-lite-6189dbfc64.chunk.css} +1 -1
  16. package/dist/css/66-lite-7853821195.chunk.css +8 -0
  17. package/dist/css/72-lite-e1f502e461.chunk.css +6 -0
  18. package/dist/css/{lite-app-e69468fb69.css → lite-app-db53d0d18a.css} +1 -1
  19. package/dist/en.json +1 -1
  20. package/dist/scripts/{0-43a9acdcb4-lite.chunk.js → 0-eae6e7c5d6-lite.chunk.js} +3 -3
  21. package/dist/scripts/{1-cbfe6f9a12-lite.chunk.js → 1-42955f09f9-lite.chunk.js} +1 -1
  22. package/dist/scripts/{10-3cce95c029-lite.chunk.js → 10-2c9fc7c5d3-lite.chunk.js} +4 -4
  23. package/dist/scripts/{100-5ae8377f65-lite.chunk.js → 100-50d0b6e821-lite.chunk.js} +1 -1
  24. package/dist/scripts/{101-8ecab4af76-lite.chunk.js → 101-fae9609a18-lite.chunk.js} +1 -1
  25. package/dist/scripts/{102-61ba3099f2-lite.chunk.js → 102-a7761e7419-lite.chunk.js} +1 -1
  26. package/dist/scripts/103-c2b534845e-lite.chunk.js +1 -0
  27. package/dist/scripts/104-c9dddccf82-lite.chunk.js +1 -0
  28. package/dist/scripts/{103-f916411eed-lite.chunk.js → 105-a407fbaa84-lite.chunk.js} +1 -1
  29. package/dist/scripts/106-4b5badaaff-lite.chunk.js +1 -0
  30. package/dist/scripts/{104-53846a675b-lite.chunk.js → 107-0aafc4f9af-lite.chunk.js} +1 -1
  31. package/dist/scripts/108-2ac8398c20-lite.chunk.js +1 -0
  32. package/dist/scripts/{106-aea0134ae4-lite.chunk.js → 109-423116cbc1-lite.chunk.js} +1 -1
  33. package/dist/scripts/{11-b447c600b2-lite.chunk.js → 11-196340fe8c-lite.chunk.js} +1 -1
  34. package/dist/scripts/{107-5dd48517f7-lite.chunk.js → 110-1c6dc91028-lite.chunk.js} +1 -1
  35. package/dist/scripts/{108-5528865d88-lite.chunk.js → 111-0b9a250a8a-lite.chunk.js} +1 -1
  36. package/dist/scripts/{109-da11e23f81-lite.chunk.js → 112-b223625ef6-lite.chunk.js} +1 -1
  37. package/dist/scripts/{110-ee19e889ce-lite.chunk.js → 113-e3405afb47-lite.chunk.js} +1 -1
  38. package/dist/scripts/114-a61168ca7c-lite.chunk.js +1 -0
  39. package/dist/scripts/{114-9d1d96bff3-lite.chunk.js → 115-0364ffd4f2-lite.chunk.js} +1 -1
  40. package/dist/scripts/{115-a22e5a0e88-lite.chunk.js → 116-9629d678fa-lite.chunk.js} +1 -1
  41. package/dist/scripts/117-5274661650-lite.chunk.js +1 -0
  42. package/dist/scripts/{117-a53695bc6a-lite.chunk.js → 118-94513581d6-lite.chunk.js} +1 -1
  43. package/dist/scripts/{118-101ca9d4c1-lite.chunk.js → 119-3b1df0ccc3-lite.chunk.js} +1 -1
  44. package/dist/scripts/12-09016f4623-lite.chunk.js +1 -0
  45. package/dist/scripts/{119-c10b36e765-lite.chunk.js → 120-e60ce68384-lite.chunk.js} +1 -1
  46. package/dist/scripts/{120-5045a8697c-lite.chunk.js → 121-78dcb258fe-lite.chunk.js} +1 -1
  47. package/dist/scripts/122-115f5bcb6f-lite.chunk.js +1 -0
  48. package/dist/scripts/{121-c0c5ffca7e-lite.chunk.js → 123-367e8815b0-lite.chunk.js} +1 -1
  49. package/dist/scripts/{122-29a3ccf7f5-lite.chunk.js → 124-b4d00e6426-lite.chunk.js} +1 -1
  50. package/dist/scripts/{123-1c0fcd5320-lite.chunk.js → 125-a64d53e794-lite.chunk.js} +1 -1
  51. package/dist/scripts/{124-6652821f0b-lite.chunk.js → 126-5ef90e844f-lite.chunk.js} +1 -1
  52. package/dist/scripts/{125-5cbc13deda-lite.chunk.js → 127-a67cda0c4b-lite.chunk.js} +1 -1
  53. package/dist/scripts/{126-4d60a9edf5-lite.chunk.js → 128-d3f7a98bea-lite.chunk.js} +1 -1
  54. package/dist/scripts/{127-b7f08819fa-lite.chunk.js → 129-7c50845f41-lite.chunk.js} +1 -1
  55. package/dist/scripts/13-62db4e6f7a-lite.chunk.js +1 -0
  56. package/dist/scripts/{129-799a4b65d6-lite.chunk.js → 130-a692c063c3-lite.chunk.js} +1 -1
  57. package/dist/scripts/{130-a99721faff-lite.chunk.js → 131-137b056d4c-lite.chunk.js} +1 -1
  58. package/dist/scripts/{132-9930081dbf-lite.chunk.js → 132-c106cb216b-lite.chunk.js} +1 -1
  59. package/dist/scripts/{133-cadb6befb0-lite.chunk.js → 133-bd46c123b7-lite.chunk.js} +1 -1
  60. package/dist/scripts/{135-9cb4afa5a2-lite.chunk.js → 134-aa3d01dc7a-lite.chunk.js} +1 -1
  61. package/dist/scripts/{136-851cefe199-lite.chunk.js → 135-8cdadafa5b-lite.chunk.js} +1 -1
  62. package/dist/scripts/{137-b26972cc2f-lite.chunk.js → 136-24111a87e9-lite.chunk.js} +1 -1
  63. package/dist/scripts/{138-19c943dffc-lite.chunk.js → 137-056c924197-lite.chunk.js} +1 -1
  64. package/dist/scripts/{139-022a76dce4-lite.chunk.js → 138-094172cc71-lite.chunk.js} +1 -1
  65. package/dist/scripts/{140-bb12177b31-lite.chunk.js → 139-f7ffb035c4-lite.chunk.js} +1 -1
  66. package/dist/scripts/{14-b3fe0ac518-lite.chunk.js → 14-926d7b0d4a-lite.chunk.js} +1 -1
  67. package/dist/scripts/{141-7f0f8539dc-lite.chunk.js → 140-920fb746c5-lite.chunk.js} +1 -1
  68. package/dist/scripts/{142-02764b7874-lite.chunk.js → 141-15118ac6ca-lite.chunk.js} +1 -1
  69. package/dist/scripts/142-2ec7ba739f-lite.chunk.js +1 -0
  70. package/dist/scripts/{144-b5ab7e1bf8-lite.chunk.js → 143-d28310671b-lite.chunk.js} +1 -1
  71. package/dist/scripts/144-cb2f0b9845-lite.chunk.js +1 -0
  72. package/dist/scripts/{145-e3a4c77864-lite.chunk.js → 145-63a3535e9f-lite.chunk.js} +1 -1
  73. package/dist/scripts/{146-acd67d9e89-lite.chunk.js → 146-21c4d5de12-lite.chunk.js} +1 -1
  74. package/dist/scripts/{147-cefc37d555-lite.chunk.js → 147-7577c17690-lite.chunk.js} +1 -1
  75. package/dist/scripts/{148-60c027c923-lite.chunk.js → 148-ad84c0c299-lite.chunk.js} +1 -1
  76. package/dist/scripts/{149-de8906c3dc-lite.chunk.js → 149-59e17d3314-lite.chunk.js} +1 -1
  77. package/dist/scripts/{15-9a41b7e834-lite.chunk.js → 15-c7ab406bef-lite.chunk.js} +1 -1
  78. package/dist/scripts/{150-f12ff39722-lite.chunk.js → 150-8e3bb3d214-lite.chunk.js} +1 -1
  79. package/dist/scripts/{151-741072b408-lite.chunk.js → 151-086b5a3a45-lite.chunk.js} +1 -1
  80. package/dist/scripts/{152-00e66755af-lite.chunk.js → 152-39537c55d6-lite.chunk.js} +1 -1
  81. package/dist/scripts/{153-a19c20537d-lite.chunk.js → 153-c3aaa3d595-lite.chunk.js} +1 -1
  82. package/dist/scripts/{154-a5d2a89526-lite.chunk.js → 154-2283893bfc-lite.chunk.js} +1 -1
  83. package/dist/scripts/{155-1d896013f7-lite.chunk.js → 155-c29112afd4-lite.chunk.js} +1 -1
  84. package/dist/scripts/{156-c28aa9bb1c-lite.chunk.js → 156-dc92b11377-lite.chunk.js} +1 -1
  85. package/dist/scripts/{157-2d0132d5c1-lite.chunk.js → 157-d623d01881-lite.chunk.js} +1 -1
  86. package/dist/scripts/{158-3ee6683cda-lite.chunk.js → 158-2aba4f8b76-lite.chunk.js} +1 -1
  87. package/dist/scripts/{159-7ef0a0b841-lite.chunk.js → 159-3650e9f273-lite.chunk.js} +1 -1
  88. package/dist/scripts/{16-66b1b9e98e-lite.chunk.js → 16-92684069bd-lite.chunk.js} +1 -1
  89. package/dist/scripts/160-bfe9457116-lite.chunk.js +1 -0
  90. package/dist/scripts/{161-bc86ce600f-lite.chunk.js → 161-5aff7673f2-lite.chunk.js} +1 -1
  91. package/dist/scripts/{162-873e27dde7-lite.chunk.js → 162-ddcbe28cc5-lite.chunk.js} +1 -1
  92. package/dist/scripts/{163-7da3b04e3d-lite.chunk.js → 163-25ef577414-lite.chunk.js} +1 -1
  93. package/dist/scripts/{164-7eb08cf33d-lite.chunk.js → 164-ee7d756a64-lite.chunk.js} +1 -1
  94. package/dist/scripts/{165-7e568952a9-lite.chunk.js → 165-0913400d60-lite.chunk.js} +1 -1
  95. package/dist/scripts/{166-7ab339784d-lite.chunk.js → 166-c0958ca3fd-lite.chunk.js} +1 -1
  96. package/dist/scripts/{167-36845d47f5-lite.chunk.js → 167-75a21ee903-lite.chunk.js} +1 -1
  97. package/dist/scripts/{168-1b29c53a37-lite.chunk.js → 168-d8224f65f5-lite.chunk.js} +1 -1
  98. package/dist/scripts/{169-1a70e96a65-lite.chunk.js → 169-48d39c6f02-lite.chunk.js} +1 -1
  99. package/dist/scripts/{17-cfa9b4accd-lite.chunk.js → 17-d3ef182a4f-lite.chunk.js} +1 -1
  100. package/dist/scripts/{170-098310e27a-lite.chunk.js → 170-c96a48dfb7-lite.chunk.js} +1 -1
  101. package/dist/scripts/{171-8c2416ff67-lite.chunk.js → 171-e8ebb83933-lite.chunk.js} +1 -1
  102. package/dist/scripts/{172-9a0d91528b-lite.chunk.js → 172-54162a9ae2-lite.chunk.js} +1 -1
  103. package/dist/scripts/{173-ab225db575-lite.chunk.js → 173-96e11e9906-lite.chunk.js} +1 -1
  104. package/dist/scripts/{174-88ebd94453-lite.chunk.js → 174-7212ebabfc-lite.chunk.js} +1 -1
  105. package/dist/scripts/{175-af04fd66eb-lite.chunk.js → 175-9173607567-lite.chunk.js} +1 -1
  106. package/dist/scripts/{176-ad00311fe5-lite.chunk.js → 176-1ab4025cf5-lite.chunk.js} +1 -1
  107. package/dist/scripts/{177-5685dbe140-lite.chunk.js → 177-7b50107f5d-lite.chunk.js} +1 -1
  108. package/dist/scripts/{178-48ae7d3690-lite.chunk.js → 178-19388b53dd-lite.chunk.js} +1 -1
  109. package/dist/scripts/{179-e61a403359-lite.chunk.js → 179-f46b6c8570-lite.chunk.js} +1 -1
  110. package/dist/scripts/18-1e71027c74-lite.chunk.js +1 -0
  111. package/dist/scripts/{180-e3dccc1541-lite.chunk.js → 180-1d2b0695ae-lite.chunk.js} +1 -1
  112. package/dist/scripts/{181-cd6ccd2c69-lite.chunk.js → 181-827af70d7c-lite.chunk.js} +1 -1
  113. package/dist/scripts/{182-a4c4c11511-lite.chunk.js → 182-97aa6a9342-lite.chunk.js} +1 -1
  114. package/dist/scripts/{183-4d29737f45-lite.chunk.js → 183-d7ddcc4f7b-lite.chunk.js} +1 -1
  115. package/dist/scripts/{184-d3af7534ff-lite.chunk.js → 184-7f31e37240-lite.chunk.js} +1 -1
  116. package/dist/scripts/{185-5644fa2827-lite.chunk.js → 185-9d6c748466-lite.chunk.js} +1 -1
  117. package/dist/scripts/{186-01f599d7f7-lite.chunk.js → 186-02a6eb68c9-lite.chunk.js} +1 -1
  118. package/dist/scripts/{187-77de14009a-lite.chunk.js → 187-7a21cc407e-lite.chunk.js} +1 -1
  119. package/dist/scripts/{188-ef9858326c-lite.chunk.js → 188-a0ed6844ef-lite.chunk.js} +1 -1
  120. package/dist/scripts/{189-816c3e90b6-lite.chunk.js → 189-9b20a89928-lite.chunk.js} +1 -1
  121. package/dist/scripts/19-134a91c703-lite.chunk.js +1 -0
  122. package/dist/scripts/{190-e5c275ae5a-lite.chunk.js → 190-9651703b7e-lite.chunk.js} +1 -1
  123. package/dist/scripts/191-3902dbb494-lite.chunk.js +1 -0
  124. package/dist/scripts/{192-d1c6d55205-lite.chunk.js → 192-5a5f30bf6b-lite.chunk.js} +1 -1
  125. package/dist/scripts/{193-a7ad703d51-lite.chunk.js → 193-2aaee7ca8d-lite.chunk.js} +1 -1
  126. package/dist/scripts/{194-53ac2502f0-lite.chunk.js → 194-6e4873be24-lite.chunk.js} +1 -1
  127. package/dist/scripts/{195-082197f6bc-lite.chunk.js → 195-874a3eee10-lite.chunk.js} +1 -1
  128. package/dist/scripts/{196-b8c8eb8b47-lite.chunk.js → 196-0abeb8dd3e-lite.chunk.js} +1 -1
  129. package/dist/scripts/{197-4c4d7b6fb7-lite.chunk.js → 197-d86f039e98-lite.chunk.js} +1 -1
  130. package/dist/scripts/{2-c330fdc496-lite.chunk.js → 2-d4afb29d7c-lite.chunk.js} +1 -1
  131. package/dist/scripts/20-c12c18da57-lite.chunk.js +1 -0
  132. package/dist/scripts/{20-05c9951f81-lite.chunk.js → 21-3256b43ecd-lite.chunk.js} +1 -1
  133. package/dist/scripts/{21-a43aa3d8d0-lite.chunk.js → 22-17e7a60d5f-lite.chunk.js} +1 -1
  134. package/dist/scripts/{22-dd2c4aa07b-lite.chunk.js → 23-3c3c47e303-lite.chunk.js} +1 -1
  135. package/dist/scripts/{24-368b7f06ce-lite.chunk.js → 24-e729a060c7-lite.chunk.js} +1 -1
  136. package/dist/scripts/{25-e7347e6810-lite.chunk.js → 25-45f349ee55-lite.chunk.js} +1 -1
  137. package/dist/scripts/{26-daf48652ae-lite.chunk.js → 26-37b48ccffc-lite.chunk.js} +1 -1
  138. package/dist/scripts/{27-1623d3b6d9-lite.chunk.js → 27-fe8a2ca3da-lite.chunk.js} +1 -1
  139. package/dist/scripts/28-84f40f73b8-lite.chunk.js +1 -0
  140. package/dist/scripts/{29-1d702145bb-lite.chunk.js → 29-50b86e3bfd-lite.chunk.js} +1 -1
  141. package/dist/scripts/{3-58bac39f88-lite.chunk.js → 3-d2ca297555-lite.chunk.js} +1 -1
  142. package/dist/scripts/{30-f2e303d085-lite.chunk.js → 30-f5f8ff33c0-lite.chunk.js} +1 -1
  143. package/dist/scripts/{31-69920edfb4-lite.chunk.js → 31-e53cb24377-lite.chunk.js} +1 -1
  144. package/dist/scripts/{32-3eb614d426-lite.chunk.js → 32-1f9d2d7991-lite.chunk.js} +1 -1
  145. package/dist/scripts/35-c9e2dd5868-lite.chunk.js +1 -0
  146. package/dist/scripts/36-880d8ba8ab-lite.chunk.js +1 -0
  147. package/dist/scripts/{37-e2d212315b-lite.chunk.js → 37-25fa9777d7-lite.chunk.js} +3 -3
  148. package/dist/scripts/38-d0e7155d49-lite.chunk.js +1 -0
  149. package/dist/scripts/{39-3df2029728-lite.chunk.js → 39-a78b059877-lite.chunk.js} +1 -1
  150. package/dist/scripts/{4-45822890d3-lite.chunk.js → 4-bcacab0023-lite.chunk.js} +1 -1
  151. package/dist/scripts/{40-1b58e93ae8-lite.chunk.js → 40-c2a2dc6ec4-lite.chunk.js} +1 -1
  152. package/dist/scripts/{41-2e2000f933-lite.chunk.js → 41-62c4a770bc-lite.chunk.js} +1 -1
  153. package/dist/scripts/{42-99d324c639-lite.chunk.js → 42-5113580448-lite.chunk.js} +1 -1
  154. package/dist/scripts/{43-cdb7a587eb-lite.chunk.js → 43-4a28de4a92-lite.chunk.js} +1 -1
  155. package/dist/scripts/{44-1d6d2bd1c7-lite.chunk.js → 44-8a3ab51f7a-lite.chunk.js} +1 -1
  156. package/dist/scripts/45-0dc3140807-lite.chunk.js +1 -0
  157. package/dist/scripts/{46-5e60c88871-lite.chunk.js → 46-c138352e08-lite.chunk.js} +1 -1
  158. package/dist/scripts/47-502310a661-lite.chunk.js +1 -0
  159. package/dist/scripts/48-162a27f08f-lite.chunk.js +1 -0
  160. package/dist/scripts/49-2c51d14806-lite.chunk.js +1 -0
  161. package/dist/scripts/5-acba4840d4-lite.chunk.js +1 -0
  162. package/dist/scripts/50-fdf35e6c94-lite.chunk.js +1 -0
  163. package/dist/scripts/51-b032ee77f0-lite.chunk.js +1 -0
  164. package/dist/scripts/52-e86e71d220-lite.chunk.js +1 -0
  165. package/dist/scripts/53-ba39cf343d-lite.chunk.js +1 -0
  166. package/dist/scripts/54-350580addb-lite.chunk.js +1 -0
  167. package/dist/scripts/55-003f09b4ea-lite.chunk.js +1 -0
  168. package/dist/scripts/{56-18a07167ed-lite.chunk.js → 56-0e952c62ef-lite.chunk.js} +1 -1
  169. package/dist/scripts/57-f64fbe0478-lite.chunk.js +1 -0
  170. package/dist/scripts/{58-2b035dd95a-lite.chunk.js → 58-e42a3396ed-lite.chunk.js} +1 -1
  171. package/dist/scripts/59-876453f912-lite.chunk.js +1 -0
  172. package/dist/scripts/6-1af67b7f29-lite.chunk.js +1 -0
  173. package/dist/scripts/{60-71ffb117b5-lite.chunk.js → 60-64e6e36fed-lite.chunk.js} +1 -1
  174. package/dist/scripts/61-54fa4f710b-lite.chunk.js +1 -0
  175. package/dist/scripts/{62-e8b3e93b28-lite.chunk.js → 62-e6e714132b-lite.chunk.js} +1 -1
  176. package/dist/scripts/{63-996db892da-lite.chunk.js → 63-2fb672b8ae-lite.chunk.js} +1 -1
  177. package/dist/scripts/{64-fb6112cb25-lite.chunk.js → 64-a65528f473-lite.chunk.js} +1 -1
  178. package/dist/scripts/{65-39e53f816c-lite.chunk.js → 65-37744b66f5-lite.chunk.js} +1 -1
  179. package/dist/scripts/66-ec467f5943-lite.chunk.js +1 -0
  180. package/dist/scripts/{67-cfef8097a9-lite.chunk.js → 67-e193095387-lite.chunk.js} +1 -1
  181. package/dist/scripts/{68-a5ec4a1329-lite.chunk.js → 68-6a83cfeeed-lite.chunk.js} +1 -1
  182. package/dist/scripts/{69-b35e5e59ed-lite.chunk.js → 69-55c55e0e58-lite.chunk.js} +1 -1
  183. package/dist/scripts/{7-b36f83588c-lite.chunk.js → 7-a41be6b510-lite.chunk.js} +1 -1
  184. package/dist/scripts/{71-8835b1054b-lite.chunk.js → 70-53869d3dc8-lite.chunk.js} +2 -2
  185. package/dist/scripts/{72-123694b35c-lite.chunk.js → 71-e5035c1eb4-lite.chunk.js} +1 -1
  186. package/dist/scripts/72-cbabc1a93b-lite.chunk.js +1 -0
  187. package/dist/scripts/{73-5e30a147f6-lite.chunk.js → 73-e39695e565-lite.chunk.js} +1 -1
  188. package/dist/scripts/{74-51baf9b117-lite.chunk.js → 74-06703299b0-lite.chunk.js} +1 -1
  189. package/dist/scripts/{75-bec7b9251b-lite.chunk.js → 75-2cfa3c773a-lite.chunk.js} +2 -2
  190. package/dist/scripts/{76-21acf82304-lite.chunk.js → 76-8f57bcfbea-lite.chunk.js} +1 -1
  191. package/dist/scripts/{77-6fb4b124db-lite.chunk.js → 77-e2a796d6c1-lite.chunk.js} +1 -1
  192. package/dist/scripts/{78-0b13658c76-lite.chunk.js → 78-53982437fe-lite.chunk.js} +1 -1
  193. package/dist/scripts/{79-b4a13bc1b6-lite.chunk.js → 79-46e1d5c42b-lite.chunk.js} +1 -1
  194. package/dist/scripts/8-9bf1102f82-lite.chunk.js +1 -0
  195. package/dist/scripts/{80-054d45963f-lite.chunk.js → 80-7e8cc44068-lite.chunk.js} +1 -1
  196. package/dist/scripts/{81-8a9b58036e-lite.chunk.js → 81-6f0b2311f2-lite.chunk.js} +1 -1
  197. package/dist/scripts/{82-e2cb1f5496-lite.chunk.js → 82-d7dc598fe4-lite.chunk.js} +1 -1
  198. package/dist/scripts/{83-069025b5ef-lite.chunk.js → 83-6274c8c3ac-lite.chunk.js} +1 -1
  199. package/dist/scripts/{84-4768540499-lite.chunk.js → 84-a927c123f3-lite.chunk.js} +1 -1
  200. package/dist/scripts/{85-c8ef619c01-lite.chunk.js → 85-c5e4424b51-lite.chunk.js} +1 -1
  201. package/dist/scripts/86-10645c4766-lite.chunk.js +1 -0
  202. package/dist/scripts/{87-ddb60ed41d-lite.chunk.js → 87-8a5482a4f4-lite.chunk.js} +1 -1
  203. package/dist/scripts/{88-7685a0c4dd-lite.chunk.js → 88-b0f535564f-lite.chunk.js} +1 -1
  204. package/dist/scripts/{89-65dbdbc3bb-lite.chunk.js → 89-62dfd77c66-lite.chunk.js} +1 -1
  205. package/dist/scripts/{9-5fb1e00e4e-lite.chunk.js → 9-e9ccb5a437-lite.chunk.js} +1 -1
  206. package/dist/scripts/{90-296ddb9eb4-lite.chunk.js → 90-33673410ee-lite.chunk.js} +1 -1
  207. package/dist/scripts/91-0c521d63a0-lite.chunk.js +1 -0
  208. package/dist/scripts/{92-2d4f27a263-lite.chunk.js → 92-542c254f0e-lite.chunk.js} +1 -1
  209. package/dist/scripts/{93-e52bb4946e-lite.chunk.js → 93-6b9927dedf-lite.chunk.js} +1 -1
  210. package/dist/scripts/{94-dfe06a09fd-lite.chunk.js → 94-294cf04fd0-lite.chunk.js} +1 -1
  211. package/dist/scripts/{95-8b33ab7817-lite.chunk.js → 95-803b7e035c-lite.chunk.js} +1 -1
  212. package/dist/scripts/{96-e27212afe8-lite.chunk.js → 96-4dcbeccd61-lite.chunk.js} +1 -1
  213. package/dist/scripts/{97-402d2be784-lite.chunk.js → 97-f47fdf1672-lite.chunk.js} +1 -1
  214. package/dist/scripts/{98-fe1851eecc-lite.chunk.js → 98-31ef93237c-lite.chunk.js} +1 -1
  215. package/dist/scripts/{99-1bb9d1d1d8-lite.chunk.js → 99-4d5f7377dd-lite.chunk.js} +1 -1
  216. package/dist/scripts/{bundle-fa940a9db5.min.js → bundle-edc6bfab23.min.js} +13 -13
  217. package/dist/scripts/polyfills-81cebcaf4d.min.js +1 -0
  218. package/package.json +61 -61
  219. package/typings/libs/google-api.d.ts +17 -3
  220. package/dist/css/105-lite-37878093ed.chunk.css +0 -2
  221. package/dist/css/12-lite-f22a7db2bf.chunk.css +0 -2
  222. package/dist/css/47-lite-2503796b18.chunk.css +0 -10
  223. package/dist/css/48-lite-24f38ed0cc.chunk.css +0 -8
  224. package/dist/css/52-lite-1dc73d883b.chunk.css +0 -8
  225. package/dist/css/66-lite-e860778eaa.chunk.css +0 -8
  226. package/dist/css/70-lite-f209658b71.chunk.css +0 -6
  227. package/dist/scripts/105-6d26cc02af-lite.chunk.js +0 -1
  228. package/dist/scripts/111-fa5bdbb90f-lite.chunk.js +0 -1
  229. package/dist/scripts/112-49c1bbdcba-lite.chunk.js +0 -1
  230. package/dist/scripts/113-8b884a1fec-lite.chunk.js +0 -1
  231. package/dist/scripts/116-8e440bb732-lite.chunk.js +0 -1
  232. package/dist/scripts/12-682c1aced5-lite.chunk.js +0 -1
  233. package/dist/scripts/128-46ced126c2-lite.chunk.js +0 -1
  234. package/dist/scripts/13-7ad357672b-lite.chunk.js +0 -1
  235. package/dist/scripts/131-d7ee920934-lite.chunk.js +0 -1
  236. package/dist/scripts/134-6fbe02ad24-lite.chunk.js +0 -1
  237. package/dist/scripts/143-4ee3aeaa95-lite.chunk.js +0 -1
  238. package/dist/scripts/160-24fb88f07e-lite.chunk.js +0 -1
  239. package/dist/scripts/18-23cde2ed9c-lite.chunk.js +0 -1
  240. package/dist/scripts/19-cf37eadc61-lite.chunk.js +0 -1
  241. package/dist/scripts/191-51b6f06480-lite.chunk.js +0 -1
  242. package/dist/scripts/23-76fe71bbff-lite.chunk.js +0 -1
  243. package/dist/scripts/28-ae24eadd9c-lite.chunk.js +0 -1
  244. package/dist/scripts/35-461fa01f32-lite.chunk.js +0 -1
  245. package/dist/scripts/36-38e0bff0cf-lite.chunk.js +0 -1
  246. package/dist/scripts/38-b1968cec91-lite.chunk.js +0 -1
  247. package/dist/scripts/45-b290e02294-lite.chunk.js +0 -1
  248. package/dist/scripts/47-353223ddb2-lite.chunk.js +0 -1
  249. package/dist/scripts/48-06964fe926-lite.chunk.js +0 -1
  250. package/dist/scripts/49-8a7bc0a2e3-lite.chunk.js +0 -1
  251. package/dist/scripts/5-0770c322bd-lite.chunk.js +0 -1
  252. package/dist/scripts/50-0a72d2a954-lite.chunk.js +0 -1
  253. package/dist/scripts/51-36f2c90b40-lite.chunk.js +0 -1
  254. package/dist/scripts/52-5fe8975a04-lite.chunk.js +0 -1
  255. package/dist/scripts/53-db22eab00e-lite.chunk.js +0 -1
  256. package/dist/scripts/54-e9fa73f1f3-lite.chunk.js +0 -1
  257. package/dist/scripts/55-294dac0371-lite.chunk.js +0 -1
  258. package/dist/scripts/57-a4bb8cae74-lite.chunk.js +0 -1
  259. package/dist/scripts/59-e6e101b98e-lite.chunk.js +0 -1
  260. package/dist/scripts/6-414960c15a-lite.chunk.js +0 -1
  261. package/dist/scripts/61-6ce313a82c-lite.chunk.js +0 -1
  262. package/dist/scripts/66-2581b5593f-lite.chunk.js +0 -1
  263. package/dist/scripts/70-e45d9bb915-lite.chunk.js +0 -1
  264. package/dist/scripts/8-37700f2a98-lite.chunk.js +0 -1
  265. package/dist/scripts/86-fb2c201412-lite.chunk.js +0 -1
  266. package/dist/scripts/91-4938db7bf6-lite.chunk.js +0 -1
  267. package/dist/scripts/polyfills-655e009c6f.min.js +0 -1
  268. /package/dist/css/{113-lite-3559f40d65.chunk.css → 104-lite-3559f40d65.chunk.css} +0 -0
  269. /package/dist/css/{103-lite-f22a7db2bf.chunk.css → 105-lite-f22a7db2bf.chunk.css} +0 -0
  270. /package/dist/css/{116-lite-f476beb875.chunk.css → 106-lite-f476beb875.chunk.css} +0 -0
  271. /package/dist/css/{111-lite-3b9c83579c.chunk.css → 108-lite-3b9c83579c.chunk.css} +0 -0
  272. /package/dist/css/{106-lite-f22a7db2bf.chunk.css → 110-lite-f22a7db2bf.chunk.css} +0 -0
  273. /package/dist/css/{107-lite-f22a7db2bf.chunk.css → 111-lite-f22a7db2bf.chunk.css} +0 -0
  274. /package/dist/css/{108-lite-f22a7db2bf.chunk.css → 112-lite-f22a7db2bf.chunk.css} +0 -0
  275. /package/dist/css/{110-lite-4ed16e028d.chunk.css → 113-lite-4ed16e028d.chunk.css} +0 -0
  276. /package/dist/css/{112-lite-f376252ddc.chunk.css → 114-lite-f376252ddc.chunk.css} +0 -0
  277. /package/dist/css/{114-lite-93d7a92eba.chunk.css → 115-lite-93d7a92eba.chunk.css} +0 -0
  278. /package/dist/css/{115-lite-f22a7db2bf.chunk.css → 116-lite-f22a7db2bf.chunk.css} +0 -0
  279. /package/dist/css/{131-lite-f476beb875.chunk.css → 117-lite-f476beb875.chunk.css} +0 -0
  280. /package/dist/css/{117-lite-7ab95ddac2.chunk.css → 118-lite-7ab95ddac2.chunk.css} +0 -0
  281. /package/dist/css/{118-lite-1e90b333ab.chunk.css → 119-lite-1e90b333ab.chunk.css} +0 -0
  282. /package/dist/css/{119-lite-5450629a32.chunk.css → 120-lite-5450629a32.chunk.css} +0 -0
  283. /package/dist/css/{122-lite-602832f68a.chunk.css → 124-lite-602832f68a.chunk.css} +0 -0
  284. /package/dist/css/{123-lite-e8d0ed4921.chunk.css → 125-lite-e8d0ed4921.chunk.css} +0 -0
  285. /package/dist/css/{125-lite-42a5dcfa34.chunk.css → 127-lite-42a5dcfa34.chunk.css} +0 -0
  286. /package/dist/css/{126-lite-4a91cb7ba9.chunk.css → 128-lite-4a91cb7ba9.chunk.css} +0 -0
  287. /package/dist/css/{129-lite-9fcbe98fe1.chunk.css → 130-lite-9fcbe98fe1.chunk.css} +0 -0
  288. /package/dist/css/{130-lite-30208db4b8.chunk.css → 131-lite-30208db4b8.chunk.css} +0 -0
  289. /package/dist/css/{135-lite-c5e12d3f1d.chunk.css → 134-lite-c5e12d3f1d.chunk.css} +0 -0
  290. /package/dist/css/{136-lite-6e036f7110.chunk.css → 135-lite-6e036f7110.chunk.css} +0 -0
  291. /package/dist/css/{137-lite-efd9c7cfc9.chunk.css → 136-lite-efd9c7cfc9.chunk.css} +0 -0
  292. /package/dist/css/{138-lite-bca705add4.chunk.css → 137-lite-bca705add4.chunk.css} +0 -0
  293. /package/dist/css/{143-lite-30208db4b8.chunk.css → 140-lite-30208db4b8.chunk.css} +0 -0
  294. /package/dist/css/{19-lite-0dcf823806.chunk.css → 20-lite-0dcf823806.chunk.css} +0 -0
  295. /package/dist/css/{20-lite-a9eafe29ad.chunk.css → 21-lite-a9eafe29ad.chunk.css} +0 -0
  296. /package/dist/css/{21-lite-669fc3db49.chunk.css → 22-lite-669fc3db49.chunk.css} +0 -0
  297. /package/dist/css/{22-lite-4a8376d820.chunk.css → 23-lite-4a8376d820.chunk.css} +0 -0
  298. /package/dist/css/{71-lite-5a4ef89e6a.chunk.css → 70-lite-5a4ef89e6a.chunk.css} +0 -0
  299. /package/dist/css/{72-lite-649e1dbeab.chunk.css → 71-lite-649e1dbeab.chunk.css} +0 -0
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[36,6,17],{1118:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(4),a=n(123),o=n(284),i=n(104),c=n(396),l=n(397),u={notFound:o.a,forbidden:{rating:c.a,yearLevel:c.a,region:l.a,privacy:c.a},badRequest:i.a};function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o;o="number"==typeof e?e:e.status;var i=Object.assign(Object.assign({},u),t);o&&r.a.ErrorHelper.isStatusCodeError(o)&&(o!==a.a.NotFound?o!==a.a.Forbidden?n.badRequest||r.a.ErrorHelper.throw(new i.badRequest):n.forbidden||r.a.ErrorHelper.throw(new i.forbidden.privacy):n.notFound||r.a.ErrorHelper.throw(new i.notFound))}}},1134:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),a=n(1118);function o(e){return e.map((function(e){return e.statusCode})).join(":")}function i(e,t,n){var i=Array.isArray(e)?e:[e];Object(r.useEffect)((function(){i.forEach((function(e){Object(a.a)(e.statusCode,t,n)}))}),[o(i),t,n])}},1137:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(10),a=n(23),o=n(219),i=n(189),c=n(1140),l=n(250);function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f={ratings:!1,favourites:!1,watchHistory:!1,hasCurriculumLinks:!1};function d(e,t){var n=r.a.useGetResponse(null==t?void 0:t.key),a=r.a.useGetFetch();e&&t&&n.shouldFetch&&a(t)}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},f),t),s=n.ratings,p=n.favourites,m=n.watchHistory,h=n.hasCurriculumLinks,v=r.a.useBasicFetch(a.a.currentUser()),y=e&&(Array.isArray(e)?e.filter(Boolean).map((function(e){return e.id})):e.data.filter(Boolean).map((function(e){return e.id}))),g=v.data;if(null==g?void 0:g.isAuthenticated){var b=[];s&&(b=[].concat(u(b),[!!(null==y?void 0:y.length)&&o.a.videoRatings(y,t.flightNamespace)])),p&&(b=[].concat(u(b),[!!(null==y?void 0:y.length)&&g&&l.a.isFavourited(g.id,y,t.flightNamespace)])),m&&(b=[].concat(u(b),[!!(null==y?void 0:y.length)&&g&&c.a.videoHistory(y,t.flightNamespace)])),h&&(b=[].concat(u(b),[!!(null==y?void 0:y.length)&&i.a.hasCurriculumLinks(y,t.flightNamespace)])),b.forEach((function(t){return d(!!e,t)}))}}},1140:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(70),a={userVideoHistory:function(e,t,n,a){var o="video:history",i="{gateway}/v1/users/me/watch-history";return e&&(o+=":".concat(e),i+="?cursor=".concat(e)),{key:o,url:i,formatData:function(e){return{data:e.data.map((function(e){var t=r.utc(e.lastTimeWatched).local().format(),n=r(t).format("YYYY-MM-DD");return Object.assign(Object.assign({},e),{lastTimeWatched:t,lastDateWatched:n})})),pagination:e.pagination}},success:t,error:n,always:a}},videoHistory:function(e,t,n,r,a){var o=e.sort().map((function(e){return"videoId=".concat(e)}));return{key:"video:history:videos:".concat(o.join("&")),url:"{gateway}/v1/videos/history?".concat(o.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:n,error:r,always:a}}}},1141:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),a=n.n(r),o=n(35),i=n(46),c=n(220),l=n(1143),u=n.n(l);function s(e){return a.a.createElement(a.a.Fragment,null,Array(e.numVideos).fill(null).map((function(t,n){return a.a.createElement(f,Object.assign({key:n},e))})))}function f(e){var t=Object(c.a)(),n=t===i.a.XS,r=t===i.a.SM||t===i.a.MD,l=e.withReordering&&!n;return a.a.createElement(o.Row,{className:"py-2"},a.a.createElement(o.Col,{xs:n?12:r?4:3,className:"flex-column align-items-flex-start mb-1"},a.a.createElement(o.Row,null,!!l&&a.a.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},a.a.createElement("div",{className:"partial-loading-background ".concat(u.a.partialDragHandle)})),a.a.createElement(o.Col,{xs:l?10:12},a.a.createElement("div",{className:"partial-loading-background rounded ".concat(u.a.partialThumbnail)})))),a.a.createElement(o.Col,{xs:n?12:r?8:9},a.a.createElement("div",{className:"partial-loading-background ".concat(u.a.partialSeriesLink)}),a.a.createElement("div",{className:"partial-loading-background mb-1 ".concat(u.a.partialName)}),a.a.createElement("div",{className:"partial-loading-background ".concat(u.a.partialDescription)}),a.a.createElement("div",{className:"partial-loading-background ".concat(u.a.partialBadges)}),a.a.createElement("div",{className:"partial-loading-background ".concat(u.a.partialActions)})))}s.defaultProps={numVideos:15}},1143:function(e,t,n){e.exports={partialName:"_7KNC2",partialDescription:"Vk_wR",partialThumbnail:"_3peRZ",partialDragHandle:"_1F7_f"}},1148:function(e,t,n){"use strict";n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return L}));var r=n(0),a=n(4),o=n(8),i=n(71),c=n(41),l=n(1192),u=n(1174),s=n(1245),f=n(220),d=n(290),p=n(279),m=n(1163),h=n(414),v=n(57),y=n(64),g=n(21),b=n(1240),w=n(32),E=n(31),x=n(1154),I=n(1267),S=n(1155),k=n(1266),O=n.n(k);function C(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(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 N(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}var j=12;function L(e){var t,n=e.type,k=e.analyticsData,N=void 0===k?{}:k;n===p.WidgetType.ResourcesTile&&(n=p.WidgetType.Row);var L=C(r.useState(null),2),T=L[0],A=L[1],P=C(r.useState(null),2),_=P[0],F=P[1],R=C(r.useState(0),2),U=R[0],M=R[1],D=C(r.useReducer(S.a,S.b,S.c),2),G=D[0],q=D[1],B=r.useRef(null),V=C(Object(d.a)(),2),z=V[0],W=V[1],H=C(r.useState(!1),2),Y=H[0],Q=H[1],K=C(r.useState(!1),2),X=K[0],$=K[1];Object(I.i)(e.controlsRef,q);var J=Object(h.a)({prevent:!e.lazyLoad}),Z=J.ref,ee=J.inView,te=Object(f.a)(),ne=e.forcedMediaQuery||te,re=G.offset===G.collection.length;r.useEffect((function(){q({type:m.a.Resize,payload:{mediaQuery:ne,type:n,contents:e.contents,collection:G.collection,fullCollection:G.fullCollection}})}),[ne]),r.useEffect((function(){if(e.prefetched){var t=e.collection,r=t;e.limitTotalItems&&(r=t.length>j?t.slice(0,j):t),q({type:m.a.Init,payload:{mediaQuery:ne,type:n,contents:e.contents,collection:r,fullCollection:t}})}}),[null===(t=e.collection)||void 0===t?void 0:t.length,e.prefetched]);var ae=Object(I.j)(e,q,ne,ee);r.useEffect((function(){var t=e.prefetched?e.collection:ae.data;if(t){var n=c.a.isFunction(e.setData)?e.setData(t):t,r=n;e.limitTotalItems&&(r=n.length>j?n.slice(0,j):n),n.length===G.collection.length&&(i.a.isEqual(n,G.collection)||q({type:m.a.Update,payload:{collection:r,fullCollection:n}}))}}),[null==ae?void 0:ae.data,e.collection,G,e.prefetched]);var oe={type:G.type,size:G.currentSize,collectionSize:G.collection.length,contents:e.contents},ie=Object(I.a)(e,(null==ae?void 0:ae.data)||e.collection);if(null==ae?void 0:ae.hasError)return r.createElement(r.Fragment,null);if(!e.prefetched&&!(null==ae?void 0:ae.data)){var ce=e.partialComponent||x.a;return r.createElement("div",{ref:Z},r.createElement(ce,null))}if(!G.collection.length||G.collection.length<e.minimumItemCount)return r.createElement(r.Fragment,null);var le=e.childComponent,ue=function(t){return Object.assign({id:null==ie?void 0:ie.id,name:null==ie?void 0:ie.name,direction:t===m.a.Next?"right":"left"},e.analyticsData)},se=function(){var t;return!(!e.appLink||!re)&&(e.limitTotalItems&&(null===(t=G.fullCollection)||void 0===t?void 0:t.length)>j)}();return r.createElement("div",{className:"mx-n".concat(e.paddingSize)},r.createElement("div",{className:"pb-3 px-".concat(e.paddingSize," ").concat(e.paddingTopSize?"pt-".concat(e.paddingTopSize):""," overflow-hidden-x ie-scrollbar-fix")},!e.hideName&&r.createElement("div",{className:"mb-1"},r.createElement(v.a,{appLink:Object(I.b)(e.appLink,ie),analyticsData:Object.assign({id:null==ie?void 0:ie.id,name:null==ie?void 0:ie.name},e.analyticsData),analyticsOptions:b.a.getSliderHeadingAnalyticsOptions()},r.createElement("h2",{className:"".concat(O.a.heading," ").concat(e.appLink?O.a.link:""," h4 mb-0 d-inline-block align-top pl-1")},ie.name,!!e.appLink&&r.createElement(y.a,{svgName:g.b.ChevronRight,size:y.b.Small})),e.settingsAppLink&&r.createElement(v.a,{appLink:e.settingsAppLink},r.createElement(y.a,{svgName:g.b.Cog,className:"d-inline-block svg-container cursor-pointer",title:o.a.getPhrase("shared.fixedWidget","preferencesTooltip"),tooltipPlacement:"right"}))),ie.description&&r.createElement("p",{className:"text-truncate pl-1 description"},ie.description)),r.createElement("div",{ref:z,className:"position-relative ".concat(e.hideBleedingContent?"overflow-hidden-x":"")},!e.hideBleedingContent&&!Y&&r.createElement("div",{className:O.a.leftOverflowGradient}),r.createElement(u.a,{direction:u.b.Left,onClick:function(){q({type:m.a.Previous}),E.a.logUserAction(ue(m.a.Previous),b.a.getSliderAnalyticsOptions()),c.a.isFunction(e.onClickPrevious)&&e.onClickPrevious()},hide:Object(I.g)(Y,W,G.offset,G.viewableItems,G.collection.length),contents:e.contents,className:e.leftWidgetButtonClassName,hideExtendedClickableArea:e.hideExtendedClickableArea}),r.createElement(s.a,{position:G.position,positionType:l.a.Percentage,onTouchMove:Object(I.e)(G,B,_,F,T,A,M),onTouchEnd:Object(I.d)(B,A,U,M,q),ref:B,percentageDragged:U},G.collection.map((function(t,n){return r.createElement(le,Object.assign({key:"".concat(t.id,":").concat(n),data:t,collectionAppLink:e.appLink,getAppLink:e.getChildAppLink,context:oe,preloadImage:Object(I.f)(G)(t),thumbnailSize:e.thumbnailSize||w.b.Medium,analyticsData:Object.assign({widgetId:ie.id,widgetName:ie.name,itemIndex:n},N),analyticsOptions:Object.assign(Object.assign({},null==e?void 0:e.analyticsOptions),b.a.getSliderItemAnalyticsOptions()),forcedMediaQuery:e.forcedMediaQuery,onHover:function(e){window.setTimeout((function(){!function(e,t){if(G.collection.length===G.viewableItems)return Q(e),void $(e);t+1!==G.collection.length?0!==t?(t+1-G.offset%G.viewableItems)%G.viewableItems!=0?(t-G.offset%G.viewableItems)%G.viewableItems!=0||Q(e):$(e):Q(e):$(e)}(e,n)}),e?0:200)}},e.extraChildComponentProps))}))),r.createElement(u.a,{direction:u.b.Right,onClick:function(){se?a.a.AppLinkHelper.trigger(Object(I.b)(e.appLink,ie)):(q({type:m.a.Next}),E.a.logUserAction(ue(m.a.Next),b.a.getSliderAnalyticsOptions()),c.a.isFunction(e.onClickNext)&&e.onClickNext())},hide:Object(I.h)(X,W,G.offset,G.viewableItems,G.collection.length,se),contents:e.contents,hoverText:se&&o.a.getPhrase("shared.fixedWidget","seeMore"),className:e.rightWidgetButtonClassName,hideExtendedClickableArea:e.hideExtendedClickableArea}),!e.hideBleedingContent&&!X&&r.createElement("div",{className:O.a.rightOverflowGradient}))))}L.defaultProps={type:p.WidgetType.Row,minimumItemCount:0,paddingSize:"3",extraChildComponentProps:{}}},1149:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(15),a={createViewKey:function(e,t,n){var a={mediaId:e.toString(),mediaIdType:t};return n&&(a.shareContextId=n),{url:"/api/player/create-view-key",key:"view:key:".concat(e,":").concat(t),type:r.a.POST,data:a,expiryTime:28800}}}},1150:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Share="share",e.MasterObject="masterobject"}(r||(r={}))},1154:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),a=n(46),o=n(220),i=n(1266),c=n.n(i);var l=function(e){var t=e.colSize;return r.createElement("div",{className:"col-".concat(t," px-1")},r.createElement("div",{className:"".concat(c.a.partialItem," mx-1 partial-loading-background rounded")}))};function u(e){for(var t,n=(t=Object(o.a)())===a.a.XS?{itemCount:2,colSize:6}:t===a.a.SM?{itemCount:3,colSize:4}:{itemCount:4,colSize:3},i=n.itemCount,u=n.colSize,s=[],f=0;f<i;f++)s.push(r.createElement(l,{key:f,colSize:u}));return r.createElement("div",{className:"widget pb-3"},r.createElement("div",{className:"".concat(c.a.partialHeading," mx-1 mb-1 partial-loading-background")}),!e.hideDescription&&r.createElement("div",{className:"".concat(c.a.partialDescription," mx-1 my-1 partial-loading-background")}),r.createElement("div",{className:"row no-gutters mx-n1"},s))}},1155:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return u}));var r=n(46),a=n(1163),o=n(279),i=n(1267),c={offset:0,viewableItems:4,position:0,collection:[],fullCollection:[],currentSize:r.a.LG,type:o.WidgetType.Row};function l(e,t){var n,r,o=t.type,c=t.payload,l=void 0===c?{}:c;switch(o){case a.a.Next:return Object.assign(Object.assign({},e),function(e){var t=e.collection,n=e.viewableItems,r=e.offset,a=e.position,o=t.length-r;return o%n==0||o>n?{position:a-100,offset:r+n}:o<n?{position:a-o/n*100,offset:r+o}:{position:a,offset:r}}(e));case a.a.Previous:return Object.assign(Object.assign({},e),function(e){var t=e.viewableItems,n=e.offset,r=e.position,a=n-t;return a%t==0||a>t?{position:r+100,offset:n-t}:a<t?{position:r+a/t*100,offset:n-a}:{position:r,offset:n}}(e));case a.a.JumpToIndex:return Object.assign(Object.assign({},e),{offset:l.offset,position:-100*(l.offset-1)});case a.a.Resize:var s=Object(i.c)(l.contents)(l.mediaQuery,l.type,null===(n=l.collection)||void 0===n?void 0:n.length);return Object.assign(Object.assign({},e),{currentSize:l.mediaQuery,position:0,offset:s,viewableItems:s,type:l.type,fullCollection:l.fullCollection});case a.a.Init:var f=Object(i.c)(l.contents)(l.mediaQuery,l.type,null===(r=l.collection)||void 0===r?void 0:r.length);return u(Object.assign(Object.assign({},e),{collection:l.collection,currentSize:l.mediaQuery,offset:f,viewableItems:f,type:l.type,fullCollection:l.fullCollection}));case a.a.Update:return Object.assign(Object.assign({},e),{collection:l.collection,fullCollection:l.fullCollection});default:return e}}function u(e){return Object.assign(Object.assign({},c),e)}},1156:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.Correct=0]="Correct",e[e.Incorrect=1]="Incorrect",e[e.AwaitingMarking=2]="AwaitingMarking",e[e.Answered=3]="Answered",e[e.UnAnswered=4]="UnAnswered",e[e.NotApplicable=5]="NotApplicable"}(r||(r={}))},1163:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Init="init",e.Next="next",e.Previous="previous",e.Resize="resize",e.Drag="drag",e.Update="update",e.JumpToIndex="jump-to-index"}(r||(r={}))},1164:function(e,t,n){"use strict";var r=n(1148);n.d(t,"a",(function(){return r.a}));n(1155);var a=n(1154);n.d(t,"b",(function(){return a.a}))},1167:function(e,t,n){"use strict";var r=n(1233);n.d(t,"InteractiveMode",(function(){return r.a}));n(1270),n(1271),n(1272),n(1273),n(1274),n(1275),n(1276)},1174:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return u}));var r,a=n(0),o=n(64),i=n(21),c=n(1183),l=n.n(c);!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(r||(r={}));var u=a.memo((function(e){var t,n,c=e.direction===r.Left,u=c?i.b.ChevronLeft:i.b.ChevronRight,s=(e.contents,t=c,n=l.a.topPos,n+=t?" "+l.a.left:" "+l.a.right);return e.hide?a.createElement(a.Fragment,null):a.createElement(a.Fragment,null,a.createElement("div",{role:"button",className:"".concat(s," ").concat(l.a.button," ").concat(e.className||""),onClick:e.onClick},e.hoverText&&a.createElement("span",{className:"pl-3 pr-2 ".concat(l.a.hoverText)},e.hoverText),a.createElement(o.a,{svgName:u,size:o.b.Medium,className:"svg-container d-inline-block ".concat(l.a.chevron)})),e.useGradientBackdrop&&a.createElement("div",{className:c?l.a.gradientLeft:l.a.gradientRight}),!e.hideExtendedClickableArea&&a.createElement("div",{role:"button",onClick:e.onClick,className:c?l.a.extendedClickableAreaLeft:l.a.extendedClickableAreaRight}))}))},1180:function(e,t,n){"use strict";var r=n(0),a=n.n(r),o=n(4),i=n(408),c=n(8),l=n(82),u=n(47);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})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var a=h(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return m(this,n)}}function m(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)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=c.a.encloseNamespace("shared.videoRatingAccess");function y(e){return u.a.isClip(e)?v("clipTitle"):u.a.isInteractive(e)?v("interactiveTitle"):v("videoTitle")}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(o,e);var t,n,r,a=p(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,y(e))).video=e,t}return t=o,(n=[{key:"name",get:function(){return"VideoRatingAccessError"}},{key:"heading",get:function(){return y(this.video)}},{key:"description",get:function(){return e=this.video,u.a.isClip(e)?v("clipDescription"):u.a.isInteractive(e)?v("interactiveDescription"):v("videoDescription");var e}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(l.a);n.d(t,"a",(function(){return w}));var b={"rating-not-allowed":g,private:i.a},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;a.a.useEffect((function(){var n;if(e.hasCompleted){var r=e.data;if(r){var a=u.a.getCanBeConsumed(r);if(!(null==a?void 0:a.value)){var i=Object.assign(Object.assign({},b),t)[null!==(n=null==a?void 0:a.reason)&&void 0!==n?n:"private"];o.a.ErrorHelper.throw(new i(r))}}}}),[e.hasCompleted])}},1182:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Videos="videos",e.FeedVideos="feed videos",e.Series="series",e.Subjects="subjects",e.Playlists="playlists",e.UserChannels="user channels",e.Interactives="interactives",e.Clips="clips",e.Resources="resources",e.Libraries="Libraries",e.Folders="Folders"}(r||(r={}))},1183:function(e,t,n){e.exports={left:"_789pr",right:"_1P8qt",button:"_24q_F",hoverText:"p-vNG",chevron:"_3M27X",gradientLeft:"_3fkiw",gradientRight:"_2RDDy",extendedClickableAreaRight:"_13dgy",extendedClickableAreaLeft:"_37LtK",videoTopPos:"_1XTRO",topPos:"_3_p_J"}},1192:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Percentage="%",e.Pixels="px"}(r||(r={}))},1193:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),a=n.n(r),o=n(45),i=n(249),c=n(280),l=n(1226),u=n.n(l);function s(e){var t,n,r;if(!e.owner&&!e.isClickViewContent)return a.a.createElement(a.a.Fragment,null);if(e.isClickViewContent)return a.a.createElement("small",{className:"clamp-1 d-flex align-items-center"},a.a.createElement("div",{className:"svg-container sm ml-n1 ".concat(u.a.cvIcon)},a.a.createElement(i.c,null)),a.a.createElement("em",null,a.a.createElement(o.b,{namespace:"shared.videoOwnerText",phrase:"clickViewContent"})));var l=c.a.getDisplayName(e.owner);if(!l)return a.a.createElement(a.a.Fragment,null);var s=null===(n=null===(t=e.owner.customers)||void 0===t?void 0:t.data)||void 0===n?void 0:n[0],f=null!==(r=null==s?void 0:s.name)&&void 0!==r?r:"";return f&&(l+=", "),a.a.createElement("small",{className:"clamp-1"},l,f&&a.a.createElement("em",null,f))}},1208:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),a=n.n(r),o=function(){function e(e){if(38===e.keyCode||40===e.keyCode)return e.preventDefault(),!1}a.a.useEffect((function(){return window.addEventListener("keydown",e,!1),function(){window.removeEventListener("keydown",e,!1)}}),[])}},1209:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(0),a=n(1106),o=n(8),i=n(31),c=n(251),l=n(15),u=n(41),s=n(1210),f=n.n(s);function d(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=null,h=!1;function v(e){var t=d(r.useState(m),2),n=t[0],s=t[1];if(m||h||(h=!0,Object(c.ajaxRequest)({resource:"/api/integrations/token/immersive-reader",type:l.a.GET,success:function(e){m=e,s(e),window.setTimeout((function(){m=null,h=!1}),9e5)},error:function(){}})),!n)return r.createElement(r.Fragment,null);return e.title||(e.title=o.a.getPhrase("shared.immersiveReader","titleFallback")),r.createElement("span",{className:"".concat(f.a.button," ").concat(e.className||""),onClick:function(){u.a.isFunction(e.onLaunch)&&e.onLaunch(),i.a.logUserAction(e.analyticsData,e.analyticsOptions);var t={title:e.title,chunks:[{content:e.text,mimeType:e.html?"text/html":"text/plain"}]},r=n.subdomain,o=n.token,c={uiZIndex:5e3,onExit:function(){u.a.isFunction(e.onExit)&&e.onExit()}};a.launchAsync(o,r,t,c)}},r.createElement("svg",{viewBox:"0 0 40 37"},r.createElement("path",{d:"M37.4,0.9 L37.4,9.6 L35.4,9.6 L35.4,2.9 L24.4,2.9 C22.9,3.3 20,4.5 20,6 L20,17.2 L18,17.2 L18,6 C18,5 15.6,3.6 13.8,2.9 L2,2.9 L2,29 L12.4,29 L12.4,31 L0,31 L0,0.9 L14.1,0.9 L14.3,1 C15,1.2 17.5,2.2 18.9,3.7 C20.5,1.9 23.5,1.1 23.9,1 L24.1,1 L37.4,1 L37.4,0.9 Z",fill:"#000000"}),r.createElement("path",{d:"M27.4,37 L25.8,37 L18.4,29.4 L14,29.4 L14,21 L18.4,20.9 L26.1,13 L27.4,13 L27.4,37 Z M16,27.4 L19.2,27.4 L25.3,33.7 L25.3,16.6 L19.2,22.9 L15.9,22.9 L15.9,27.4 L16,27.4 Z",fill:"#0197F2"}),r.createElement("path",{d:"M31.3,32.7 L29.6,31.7 C29.6,31.7 31.7,28.3 31.7,25.2 C31.7,21.9 29.6,18.5 29.6,18.4 L31.3,17.4 C31.4,17.6 33.7,21.3 33.7,25.2 C33.7,28.8 31.4,32.6 31.3,32.7 Z",fill:"#0197F2"}),r.createElement("path",{d:"M36.4,36.2 L34.8,35 C34.8,35 38,30.8 38,25.2 C38,19.6 34.8,15.4 34.8,15.4 L36.4,14.2 C36.5,14.4 40,19 40,25.3 C40,31.5 36.5,36 36.4,36.2 Z",fill:"#0197F2"})))}},1210:function(e,t,n){e.exports={button:"TRYB2"}},1211:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),a=n.n(r),o=n(51),i=n(1169),c=n(1172),l=n(1141),u=n(45),s=n(47),f=n(2),d=n(1157),p=n(6),m=function(e){return{application:f.a.DEFAULT,action:p.a.Default.SERIES,args:[e.id,o.a.slugify(e.name)]}};function h(e){var t,n=Object(d.b)(d.a.VideoItem);if(!(null===(t=e.currentUser)||void 0===t?void 0:t.isAuthenticated))return a.a.createElement(a.a.Fragment,null);if(e.relatedVideos.hasError)return a.a.createElement(a.a.Fragment,null);if(e.relatedVideos.hasCompleted&&!e.relatedVideos.videos.length)return a.a.createElement(a.a.Fragment,null);if(!e.relatedVideos.isFetching&&!e.relatedVideos.hasCompleted)return a.a.createElement(a.a.Fragment,null);var r=!s.a.isInteractive(e.currentVideo);return a.a.createElement(i.a.Provider,{value:n},a.a.createElement("div",{className:e.className},a.a.createElement("h2",{className:"h4 mb-0"},a.a.createElement(u.b,{namespace:"shared.relatedVideos",phrase:r?"upNext":"relatedVideos"})),e.relatedVideos.isFetching?a.a.createElement(l.a,null):a.a.createElement(c.c,{videos:e.relatedVideos.videos,getSeriesAppLink:m,getVideoAppLink:e.getVideoAppLink,setFavourite:e.setFavourite})))}},1212:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(10),a=n(47),o=n(289),i=n(219),c=n(222),l=n(108);function u(e,t,n,u){var s=Object(c.a)().hasProduct;var f,d=r.a.useBasicFetch(e&&(null==t?void 0:t.isAuthenticated)&&s(l.a.Primary)?(n&&u||!a.a.isVideo(e)||!a.a.hasSeries(e)||(n=o.a.Series,u=e.series.id),i.a.relatedVideos(e.id,t.id,n,u)):null);return{videos:(f=d.data,f?f.filter((function(e){var t;return null===(t=a.a.getCanBeConsumed(e))||void 0===t?void 0:t.value})):f),hasCompleted:d.hasCompleted,isFetching:d.isFetching,hasError:d.hasError}}},1215:function(e,t,n){"use strict";var r=n(0),a=n.n(r),o=n(78),i=n(47),c=n(66),l=10;function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(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 s(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}n.d(t,"a",(function(){return f}));var f=function(e,t){var n=t.t,r=u(Object(o.a)(c.a.WEB_PLAYER_DATA),2),s=r[0],f=r[1];a.a.useEffect((function(){var t;if(e){var r=i.a.getVideoProgress(e),a=n&&+n||r,o=(null===(t=s.video)||void 0===t?void 0:t.id)!==e.id,c=Number.isInteger(a)&&a!==s.startTime;if(o||c){if(!a)return void f("startTime",0);if(n)return void f("startTime",+n);if(r>=e.duration/1e3-l)return void f("startTime",0);f("startTime",a)}}}),[e,n])}},1224:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.AddToPlaylist="115005679748",e.LibraryEditor="360001974533",e.VideoAccess="360000153947",e.AddFromOnline="360011718234",e.UploadToLibraryEditor="360012069334",e.PublisherArchive="360011150174",e.PBTErrorCodes="360012421153",e.ManuelReview="360020004534",e.LibraryReview="360000163788",e.PublisherServer="360023108873",e.MigrationOptions="360023109033",e.Integrations="4407268725529",e.Classrooms="4405362551833",e.MakeInteractive="4405370510873"}(r||(r={}))},1225:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(0),a=n.n(r),o=n(57),i=n(1153),c=n(1147),l=n(45),u=n(1193),s=n(32),f=n(1),d=n(1227),p=n.n(d),m=a.a.memo((function(e){var t,n=Object.assign(Object.assign({},e.questionsAppLink),{args:[e.data.id]});return a.a.createElement("div",{className:"flex-shrink-0 px-1 ".concat(p.a.item)},a.a.createElement("div",{className:"row m-0 border rounded p-2 h-100"},a.a.createElement("div",{className:"col-6 p-0"},a.a.createElement(i.a,{video:e.data,appLink:e.getAppLink(e.data),type:"static",imageOptions:{size:s.b.Small},textPosition:c.a.Independent,preload:!0,analyticsOptions:{location:f.LocationContext.SlidingListItem}})),a.a.createElement("div",{className:"col-6 p-0"},a.a.createElement("div",{className:"pl-2"},a.a.createElement(o.a,{appLink:e.getAppLink(e.data)},a.a.createElement("h3",{className:"h6 mb-1"},a.a.createElement("span",{className:"clamp-2"},e.data.name))),a.a.createElement(u.a,{owner:e.data.owner,isClickViewContent:null===(t=e.data._isClickViewContent)||void 0===t?void 0:t.value}),a.a.createElement(o.a,{className:"info-link",appLink:n},a.a.createElement(l.b,{namespace:"shared.interactiveWidgetItem",phrase:"previewQuestions"}))))))}))},1226:function(e,t,n){e.exports={cvIcon:"_1YOaq"}},1227:function(e,t,n){e.exports={item:"_2An5o",thumbnail:"Wvc5s",smallItemIconWidth:"_2IdDd",smallItemInfoWidth:"_1Iat7",smallProgressBarContainer:"_17I8T"}},1233:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.View=0]="View",e[e.Create=1]="Create"}(r||(r={}))},1240:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),a={getSliderAnalyticsOptions:function(){return{actionType:r.UserAction.Click,location:r.LocationContext.SlidingList,entity:r.EntityType.Widget,descriptor:r.ClickDescriptor.Slide}},getSliderItemAnalyticsOptions:function(){return{location:r.LocationContext.SlidingListItem}},getSliderHeadingAnalyticsOptions:function(){return{actionType:r.UserAction.Click,location:r.LocationContext.SlidingList,entity:r.EntityType.Widget,descriptor:r.ClickDescriptor.Title}}}},1242:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),a=n.n(r),o=n(122),i=n(64),c=n(21);function l(e){return a.a.createElement(o.a,{title:e.tooltipText,spanHack:!0,spanHackClassName:"d-inline-block"},a.a.createElement(i.a,{svgName:c.b.Info}))}},1245:function(e,t,n){"use strict";var r=n(0),a=n(252),o=n(1192),i=n(41),c=new Image;c.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";var l=function(e){e.dataTransfer.setDragImage&&i.a.isFunction(e.dataTransfer.setDragImage)&&e.dataTransfer.setDragImage(c,0,0)};n.d(t,"a",(function(){return s}));var u=a.a.isTouchScreen(),s=r.forwardRef((function(e,t){var n,a,i,c,s=e.children,f=e.positionType,d=e.onDrag,p=e.onDragEnd,m=e.onTouchMove,h=e.onTouchEnd,v=e.percentageDragged,y=e.position,g=void 0===y?0:y;return r.createElement("div",Object.assign({className:"d-flex flex-nowrap position-relative w-100",style:(a=g,i=f,c=v,i===o.a.Percentage&&c&&(a-=c),{transform:"translate3d(".concat(a).concat(i,", 0px, 0px)"),transition:"transform .4s ease-in-out"}),ref:t},(n={},d&&p&&(n.draggable=!0,n.onDragEnd=p,n.onDragStart=l,n.onDragOver=d),m&&h&&u&&(n.onTouchMoveCapture=m,n.onTouchEndCapture=h),n)),s)}))},1266:function(e,t,n){e.exports={leftOverflowGradient:"u_MPi",rightOverflowGradient:"_38ooL",partialHeading:"OVsdA",partialDescription:"_1HtA2",partialItem:"_3G2hG",largePartialItem:"NnK8O",heading:"BQnCC",link:"ph0Qy"}},1267:function(e,t,n){"use strict";n.d(t,"j",(function(){return d})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return v})),n.d(t,"e",(function(){return C})),n.d(t,"d",(function(){return N})),n.d(t,"g",(function(){return j})),n.d(t,"h",(function(){return L})),n.d(t,"i",(function(){return T}));var r=n(0),a=n(71),o=n(51),i=n(41),c=n(46),l=n(1163),u=n(1182),s=n(279),f=n(1148);function d(e,t,n,o){var c,u=e.fetch,s=e.setData,d=e.type,p=e.collection,m=e.prefetched,h=e.contents,v=p;v&&!a.a.isEmpty(v)||m||(c=u(o),v=c.data);var y=i.a.isFunction(s)&&v?s(v):v,g=y;return r.useEffect((function(){v&&!a.a.isEmpty(v)&&(e.limitTotalItems&&(g=y.length>f.b?y.slice(0,f.b):y),t({type:l.a.Init,payload:{collection:g,fullCollection:y,mediaQuery:n,type:d,contents:h}}))}),[null==y?void 0:y.length]),c}function p(e){for(var t=e.offset,n=e.viewableItems,r=e.collection,a=t,o=[],i=0;i<a+n;i++)o.push(i);return function(e){var t=r.indexOf(e);return o.includes(t)}}function m(e,t){if(e)return Object.assign(Object.assign({},e),{args:e.args||[t.id,o.a.slugify(t.name)]})}function h(e,t){var n=e.name,r=e.description,a={};return Array.isArray(t)?{name:n,description:r}:(e.name&&(a.name=n),e.description&&(a.description=r),Object.assign(Object.assign({},t),a))}function v(e){switch(e){case u.a.Playlists:return y;case u.a.Videos:return b;case u.a.FeedVideos:return w;case u.a.Subjects:return E;case u.a.UserChannels:return x;case u.a.Interactives:return I;case u.a.Clips:return S;case u.a.Resources:return k;case u.a.Libraries:case u.a.Folders:return g;case u.a.Series:default:return O}}function y(e,t,n){var r=5;return e===c.a.XS?r=2:e===c.a.SM?r=3:e===c.a.MD&&(r=4),n<r&&(r=n),r}function g(e,t,n){var r=3;return e===c.a.XS||e===c.a.SM?r=1:e===c.a.MD?r=2:e===c.a.LG&&(r=3),n<r&&(r=n),r}function b(e,t,n){var r=4;return e===c.a.XS?r=2:e===c.a.SM?r=3:e===c.a.MD?r=4:e!==c.a.LG&&e!==c.a.XL&&e!==c.a.XXL||(r=t===s.WidgetType.LargeRow||n<4?3:4),n<r&&(r=n),r}function w(e,t,n){return 1}function E(e,t,n){var r=6;return e===c.a.SM||e===c.a.XS?r=3:e===c.a.MD?r=4:e===c.a.LG?r=5:e!==c.a.XL&&e!==c.a.XXL||(r=6),n<r&&(r=n),r}function x(e,t,n){var r=6;return e===c.a.XS?r=2:e===c.a.SM?r=3:e===c.a.MD||e===c.a.LG?r=4:e!==c.a.XL&&e!==c.a.XXL||(r=6),n<r&&(r=n),r}function I(e,t,n){var r=3;return e!==c.a.MD&&e!==c.a.SM||(r=2),e===c.a.XS&&(r=1),n<Math.ceil(r)&&(r=n),r}function S(e,t,n){var r=3;return e!==c.a.MD&&e!==c.a.SM||(r=2),e===c.a.XS&&(r=1),n<Math.ceil(r)&&(r=n),r}function k(e,t,n){var r=4;return e===c.a.SM&&(r=3),e===c.a.XS&&(r=2),n<r&&(r=n),r}function O(e,t,n){var r=4;return e===c.a.XS?r=2:e===c.a.SM&&(r=3),n<r&&(r=n),r}function C(e,t,n,r,a,o,i){return function(c){var l=c.touches.item(0).clientX;a||(t.current.style.transition="",r(t.current.getBoundingClientRect().width),o(l));var u=(a-l)/n*100;(u<0&&e.offset===e.viewableItems||u>0&&e.offset===e.collection.length)&&(u=0),i(u)}}function N(e,t,n,r,a){return function(){if(e.current.style.transition="transform .4s ease-in-out",t(null),Math.abs(n)>=7.5){var o=n>0?l.a.Next:l.a.Previous;a({type:o})}r(0)}}function j(e,t,n,r,a){return!!e||(a<=r||(!t||n===r))}function L(e,t,n,r,a,o){return!!e||(a<=r||n!==r&&(!t||!o&&a<=n))}function T(e,t){r.useEffect((function(){e&&!e.current&&(e.current={jumpToIndex:function(e){return t({type:l.a.JumpToIndex,payload:{offset:e+1}})}})}),[null==e?void 0:e.current])}},1270:function(e,t){},1271:function(e,t){},1272:function(e,t){},1273:function(e,t){},1274:function(e,t){},1275:function(e,t){},1276:function(e,t){},1279:function(e,t,n){e.exports={uncheckedBackground:"_3OcAr"}},1280:function(e,t,n){"use strict";var r=n(0),a=n.n(r),o=n(4),i=n(29),c=(n(825),n(826),n(3)),l=n(101),u=n(1167),s=n(1139);n(1381);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=m(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}}).apply(this,arguments)}function m(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var a=g(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(o,e);var t,n,r,a=v(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=a.call(this,e,t)).timepoint_=t.timepoint,n.time_=t.timepoint.visibleAt/1e3;var r=t.timepoint.interactions[0];r||n.hide();var i=s.a.getTypeInfo(r.typeId).bgClassName;return n.$(".vjs-icon-placeholder").classList.add(i),n.controlText(r.name),n.update(),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(p(g(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return p(g(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),Object.assign(Object.assign({},n),{tabIndex:0}))}},{key:"update",value:function(){var e=this.player_.duration(),t=this.time_/e;this.el().style.left=100*t+"%",t>100||t<0?this.hide():this.show()}},{key:"handleClick",value:function(e){e.stopPropagation(),this.player_.currentTime(this.time_)}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(c.a.getComponent("Button"));n(1382);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e){return function(e){if(Array.isArray(e))return x(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)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(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 x(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 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,r.key,r)}}function S(){return(S="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=k(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}}).apply(this,arguments)}function k(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=L(e)););return e}function O(e,t){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=L(e);if(t){var a=L(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return N(this,n)}}function N(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(o,e);var t,n,r,a=C(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=a.call(this,e,t)).track_=t.track,n.interactive_=t.interactive,n.onDurationChange=n.onDurationChange.bind(j(n)),n.createInteractionItems=n.createInteractionItems.bind(j(n)),n.createInteractionItems(),n.track_.on("cv:cuechange",n.createInteractionItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.track_.off("cv:cuechange"),n.player_.off("durationchange",n.onDurationChange)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(S(L(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return S(L(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"createInteractionItems",value:function(){var e,t=this;if(this.track_){E(this.children_).forEach((function(e){t.removeChild(e)}));for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],a=this.getTimepointById(r.text);a&&(null===(e=a.interactions)||void 0===e?void 0:e.length)&&this.addChild(new b(this.player_,{timepoint:a}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(e){var t;return null===(t=this.interactive_.timepoints)||void 0===t?void 0:t.find((function(t){return t.id.toString()===e.toString()}))}}])&&I(t.prototype,n),r&&I(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(c.a.getComponent("Component")),A=n(294),P=n(1233);function _(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(e,t)}(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 F(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}var R=n(404),U=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function M(e){return!!(null==e?void 0:e.toString().startsWith("new_"))}function D(e){e.error,e.hasChanges,e.submitted,e.spinner;return U(e,["error","hasChanges","submitted","spinner"])}var G=n(344);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})(e)}function B(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */B=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==q(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},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,r.key,r)}}var z=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},W=function(){return"/api/domain/v1/interactions/bulk"},H=function(e){return"/api/domain/v1/interactions/bulk/".concat(e)},Y=function(e){return"/api/domain/v1/interactions/".concat(e)},Q=function(){return"/api/domain/v1/timepoints"},K=function(e){return"/api/domain/v1/timepoints/".concat(e)},X=function(e){return"/api/domain/v1/timepoints/".concat(e)},$={},J=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"saveInteraction",value:function(e){return z(this,void 0,void 0,B().mark((function t(){var n,r,a,o,i;return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=M(e.id),r=n?W():H(e.id),a={name:e.name,data:e.data,timepointId:e.timepointId,interactiveId:e.interactiveId,typeId:e.typeId,actionableItems:e.actionableItems,order:e.order},n||(a.id=e.id),o=n?G.a.post(r,JSON.stringify(a),$):G.a.put(r,JSON.stringify(a),$),t.next=7,o;case 7:i=t.sent,n&&(e.id=i.id);case 9:case"end":return t.stop()}}),t)})))}},{key:"deleteInteraction",value:function(e){return z(this,void 0,void 0,B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,G.a.delete(Y(e),$);case 2:case"end":return t.stop()}}),t)})))}},{key:"saveTimepoint",value:function(e){return z(this,void 0,void 0,B().mark((function t(){var n,r;return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={interactiveId:e.interactiveId,shouldPause:1,visibleAt:e.visibleAt},t.next=3,G.a.post(Q(),JSON.stringify(n),$);case 3:r=t.sent,e.id=r.id;case 5:case"end":return t.stop()}}),t)})))}},{key:"updateTimepoint",value:function(e){return z(this,void 0,void 0,B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,G.a.put(X(e.id),JSON.stringify(e),$);case 2:case"end":return t.stop()}}),t)})))}},{key:"deleteTimepoint",value:function(e){return z(this,void 0,void 0,B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,G.a.delete(K(e),$);case 2:case"end":return t.stop()}}),t)})))}}])&&V(t.prototype,n),r&&V(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()),Z=n(412),ee=n(279),te=n(247);function ne(e){var t=e.error;return e.error?a.a.createElement("p",{className:"mt-2 small text-danger"},t):a.a.createElement(a.a.Fragment,null)}var re=n(136);function ae(e){return(ae="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 oe(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */oe=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==ae(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}var ie=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},ce=/[.\?!,;:\-''\(\)]/g;function le(e){for(var t=e.split("");t.length&&t[0].match(ce);)t.shift();for(;t.length&&t[t.length-1].match(ce);)t.pop();return t.join("")}function ue(e,t){for(var n=e.split(""),r=[],a=[];n.length&&n[0].match(ce);)r.push(n.shift());for(;n.length&&n[n.length-1].match(ce);)a.unshift(n.pop());return r.join("")+t+a.join("")}function se(e){return e.map((function(e){if(!e.selected)return e.text;var t=le(e.text).length,n=new Array(t).fill("_").join("");return ue(e.text,n)})).join(" ")}function fe(e){return e.map((function(e){var t;return e.selected?null===(t=ue(e.text,"{".concat(e.order,"}")))||void 0===t?void 0:t.trim():e.text})).join(" ")}var de=n(1260),pe=n(1242);function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function he(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */he=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==me(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}var ve=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))};var ye=n(30);function ge(e){var t=a.a.useRef(null);function n(){e.onChange(Object.assign(Object.assign({},e.answer),{isCorrect:!e.answer.isCorrect}))}return a.a.createElement("li",{className:"p-1 my-1 w-100 bg-white d-flex align-items-center border rounded"},a.a.createElement("div",{className:"custom-control ".concat(e.isTrueOrFalse?"custom-radio":"custom-checkbox"),onKeyDown:function(e){return"Enter"===e.key&&n()}},a.a.createElement("input",{id:"multiple-choice--".concat(e.answer.order),type:e.isTrueOrFalse?"radio":"checkbox",className:"custom-control-input mr-2",name:"multiple-choice-answer",checked:e.answer.isCorrect,onChange:n,disabled:!e.answer.name}),a.a.createElement("label",{ref:t,htmlFor:"multiple-choice--".concat(e.answer.order),className:"cursor-pointer custom-control-label"})),e.isTrueOrFalse?a.a.createElement("label",{className:"mb-0",htmlFor:"multiple-choice--".concat(e.answer.order)},e.answer.name):a.a.createElement("input",{placeholder:"Answer",onChange:function(t){e.onChange(Object.assign(Object.assign({},e.answer),{name:t.target.value}))},value:e.answer.name,className:"border-0 outline-none w-100",autoComplete:"off"}))}n(1383);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function we(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */we=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==be(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}var Ee=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))};function xe(e){var t;if(!(null===(t=e.question)||void 0===t?void 0:t.trim()))return"Please provide a question";if(!e.answers.find((function(e){return e.isCorrect})))return"Please select the correct answer";var n=e.answers.filter((function(e){var t;return!!(null===(t=e.name)||void 0===t?void 0:t.trim())}));if(n.length<2)return"Please provide at least two answers";var r=!1,a={};return n.forEach((function(e){r||(a[e.name]?r=!0:a[e.name]=!0)})),r?"There are duplicates in your answers":null}function Ie(e,t){var n;return Ee(this,void 0,void 0,we().mark((function r(){return we().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.name=null===(n=e.question)||void 0===n?void 0:n.trim(),t.actionableItems=e.answers.filter((function(e){var t;return!!(null===(t=e.name)||void 0===t?void 0:t.trim())})),e.feedback&&(t.data.feedback=e.feedback),r.next=5,J.saveInteraction(t);case 5:case"end":return r.stop()}}),r)})))}function Se(e){var t=e.state,n=void 0===t?function(e){var t,n=e.typeId===ee.InteractionTypeId.TrueOrFalse,r=null===(t=e.actionableItems)||void 0===t?void 0:t.map((function(e){return{order:e.order,name:e.name,isCorrect:e.isCorrect}}));return(null==r?void 0:r.length)?!n&&(null==r?void 0:r.length)<4&&r.push({order:r.length,name:"",isCorrect:!1}):r=[{order:0,name:n?"True":"",isCorrect:!1},{order:1,name:n?"False":"",isCorrect:!1}],{question:e.name||"",answers:r,feedback:e.data.feedback||""}}(e.interaction):t,r=e.setState,o=e.interaction,i=e.optionsPortalNode,c=e.showFeedback,l=o.typeId===ee.InteractionTypeId.TrueOrFalse;function u(e){var t=n.answers.map((function(t){return t.order!==e.order?Object.assign(Object.assign({},t),{isCorrect:!l&&t.isCorrect}):e}));if(t.find((function(e){return!e.name}))&&(t=function(e){var t=e.find((function(e){return!e.name}));if(e.length>2)return e.filter((function(e){return e.order!==t.order})).map((function(e,t){return Object.assign(Object.assign({},e),{order:t})}));return e.map((function(e){return e.order!==t.order?e:Object.assign(Object.assign({},e),{isCorrect:!1})}))}(t)),!l&&t.length<4&&!t.find((function(e){return!e.name}))){var a=ye.a.last(t);t.push({name:"",order:a.order+1,isCorrect:!1})}r(Object.assign(Object.assign({},n),{answers:t}))}return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("div",{className:"form-group"},a.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},a.a.createElement("label",{className:"cv-interaction-field-label mb-0",htmlFor:"multiple-choice-question"},"Question"),a.a.createElement(te.b,{node:i})),a.a.createElement("input",{id:"multiple-choice-question",className:"form-control",placeholder:"Enter your question here",value:n.question,onChange:function(e){r(Object.assign(Object.assign({},n),{question:e.target.value}))},autoComplete:"off"}),!n.question&&a.a.createElement(ne,{error:n.error})),a.a.createElement("div",{className:"form-group"},a.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"multiple-choice-answer"},"Answers"),n.answers.map((function(e){return a.a.createElement(ge,{key:e.order,answer:e,onChange:u,isTrueOrFalse:l})})),n.question&&a.a.createElement(ne,{error:n.error})),c&&l&&a.a.createElement("div",{className:"form-group mb-0"},a.a.createElement("label",{className:"cv-true-or-false-feedback-label cv-interaction-field-label",htmlFor:"true-or-false-feedback"},"Feedback  ",a.a.createElement("span",{className:"text-muted"},"(optional)")," ",a.a.createElement(pe.a,{tooltipText:"Provide answer feedback for your students"})),a.a.createElement(de.a,{id:"true-or-false-feedback",className:"form-control",minRows:2,value:n.feedback||"",onChange:function(e){r(Object.assign(Object.assign({},n),{feedback:e.target.value}))},placeholder:"Give feedback for this question"})))}var ke=n(418),Oe=n(32),Ce=n(427);function Ne(){return a.a.createElement("svg",{viewBox:"0 0 43 38",className:"cv-upload-image-icon"},a.a.createElement("g",{transform:"translate(-1193.000000, -185.000000)"},a.a.createElement("g",{transform:"translate(1183.000000, 173.000000)"},a.a.createElement("path",{d:"M49.875,12.9166667 C51.3247475,12.9166667 52.5,14.0732644 52.5,15.5 L52.5,46.5 C52.5,47.9267356 51.3247475,49.0833333 49.875,49.0833333 L13.125,49.0833333 C11.6752525,49.0833333 10.5,47.9267356 10.5,46.5 L10.5,15.5 C10.5,14.0732644 11.6752525,12.9166667 13.125,12.9166667 L49.875,12.9166667 Z M49.875,15.5 L13.125,15.5 L13.125,46.5 L49.875,46.5 L49.875,15.5 Z M35.5085905,22.5470241 L45.7260956,38.0470241 C46.1206004,38.6454897 45.9474325,39.445375 45.3393142,39.8336178 C44.731196,40.2218607 43.9184093,40.0514415 43.5239044,39.4529759 L34.3641741,25.5576247 L29.9489593,31.7425222 C29.4803332,32.3989804 28.5233602,32.4806343 27.9469223,31.9133463 L26.3920049,30.38311 L19.425,39.525 C18.9900758,40.0956942 18.167399,40.211354 17.5875,39.7833333 C17.007601,39.3553127 16.8900758,38.5456942 17.325,37.975 L25.2,27.6416667 C25.6792326,27.0128323 26.6132966,26.9475041 27.1780777,27.5033204 L28.6987913,28.9998957 L33.3335357,22.5074778 C33.8680838,21.758675 35.0025121,21.7793009 35.5085905,22.5470241 Z M21,19.375 C23.1746212,19.375 24.9375,21.1098966 24.9375,23.25 C24.9375,25.3901034 23.1746212,27.125 21,27.125 C18.8253788,27.125 17.0625,25.3901034 17.0625,23.25 C17.0625,21.1098966 18.8253788,19.375 21,19.375 Z M21,21.9583333 C20.2751263,21.9583333 19.6875,22.5366322 19.6875,23.25 C19.6875,23.9633678 20.2751263,24.5416667 21,24.5416667 C21.7248737,24.5416667 22.3125,23.9633678 22.3125,23.25 C22.3125,22.5366322 21.7248737,21.9583333 21,21.9583333 Z",id:"Combined-Shape"}))))}function je(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Le(e,t)}(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 Le(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 Te(e){var t=je(a.a.useState(!1),2),n=t[0],r=t[1],o=je(a.a.useState(0),2),i=o[0],c=o[1];return a.a.useEffect((function(){0===i&&n&&r(!1)}),[i,n,r]),a.a.createElement("div",{onDragOver:function(e){e.preventDefault(),e.stopPropagation()},onDragEnter:function(e){e.preventDefault(),e.stopPropagation(),c((function(e){return e+1})),e.dataTransfer.items&&e.dataTransfer.items.length>0&&!n&&r(!0)},onDragLeave:function(e){e.preventDefault(),e.stopPropagation(),c((function(e){return e-1}))},onDrop:function(t){t.preventDefault(),t.stopPropagation(),r(!1),i>0&&c(0),t.dataTransfer.files&&t.dataTransfer.files.length>0&&(e.onDropImage(t.dataTransfer.files),t.dataTransfer.clearData())},className:n?"cv-image-upload-mask":""},e.children)}n(1384);function Ae(e){return(Ae="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 Pe(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Pe=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==Ae(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}var _e=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))};var Fe=n(1335),Re=n(1551),Ue=n(1558),Me={styleToHTML:function(e){return"SUPERSCRIPT"===e?{start:"<sup>",end:"</sup>"}:"SUBSCRIPT"===e?{start:"<sub>",end:"</sub>"}:void 0},entityToHTML:function(e,t){return"LINK"===e.type?a.a.createElement("a",{href:e.data.url},t):t},htmlToStyle:function(e,t,n){return"sup"===e?n.add("SUPERSCRIPT"):"sub"===e?n.add("SUBSCRIPT"):n},htmlToEntity:function(e,t,n){if("a"===e)return n("LINK","MUTABLE",{url:t.href})}};function De(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}(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 Ge(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 qe(e){var t=De(a.a.useState(""),2),n=t[0],r=t[1],o=De(a.a.useState(""),2),i=o[0],c=o[1];return a.a.createElement("div",{"aria-haspopup":"true","aria-expanded":e.expanded,"aria-label":"rdw-color-picker"},a.a.createElement("div",{className:"rdw-option-wrapper cv-annotation-toolbar-option cv-annotation-link",onClick:e.onExpandEvent}," "),e.expanded&&a.a.createElement("div",{className:"rdw-link-modal",onClick:function(e){return e.stopPropagation()}},a.a.createElement("div",{className:"form-group"},a.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"cv-annotation-url"},"URL"),a.a.createElement("input",{id:"cv-annotation-url",className:"form-control",onChange:function(e){return r(e.target.value)},value:n,placeholder:"Enter URL",autoComplete:"off"})),a.a.createElement("div",{className:"form-group"},a.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"cv-annotation-text"},"Text"),a.a.createElement("input",{id:"cv-annotation-text",className:"form-control",onChange:function(e){return c(e.target.value)},value:i,placeholder:"Enter Text",autoComplete:"off"})),a.a.createElement(re.a,{onClick:function(){return e.onChange("link",i||n,n,"_blank")},className:"btn btn-dark"},"Add")))}n(1389);function Be(e){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ze(e,t)}(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 ze(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 We(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */We=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==Be(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}var He,Ye,Qe,Ke=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))};function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $e=(Xe(He={},ee.InteractionTypeId.Annotation,(function(e){var t=e.state,n=void 0===t?function(e){var t;return{annotation:(null===(t=e.data)||void 0===t?void 0:t.annotation)||""}}(e.interaction):t,r=e.setState,o=e.interaction,i=e.optionsPortalNode,c=Ve(a.a.useState(function(){var e=o.data.annotation;if(e){var t=Object(Ue.a)(Me)(e);return Fe.EditorState.createWithContent(t)}return Fe.EditorState.createEmpty()}()),2),l=c[0],u=c[1],s=Ve(a.a.useState(null),2),f=s[0],d=s[1];return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("div",{className:"form-group"},a.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},a.a.createElement("label",{className:"cv-interaction-field-label mb-0",onClick:function(){return null==f?void 0:f.focusEditor()}},"Annotation"),a.a.createElement(te.b,{node:i})),a.a.createElement("div",{className:"cv-annotation ".concat(function(){if(!l)return!1;var e=l.getCurrentContent();return e.hasText()||"unstyled"!==e.getBlockMap().first().getType()}()?"Editor--hide-placeholder":"")},l&&a.a.createElement(Re.Editor,{editorState:l,onEditorStateChange:function(e){u(e);var t=e.getCurrentContent();if(t.hasText()){var a=Object(Ue.b)(Me)(t);r(Object.assign(Object.assign({},n),{annotation:a}))}else r(Object.assign(Object.assign({},n),{annotation:""}))},toolbarClassName:"cv-annotation-toolbar",editorClassName:"form-control cv-annotation-editor",ref:d,placeholder:"Enter your annotation here",toolbar:{options:["inline","list","link"],inline:{options:["bold","italic","underline","superscript","subscript"],bold:{className:"cv-annotation-toolbar-option cv-annotation-bold",icon:""},italic:{className:"cv-annotation-toolbar-option cv-annotation-italic",icon:""},underline:{className:"cv-annotation-toolbar-option cv-annotation-underline",icon:""},superscript:{className:"cv-annotation-toolbar-option cv-annotation-superscript",icon:""},subscript:{className:"cv-annotation-toolbar-option cv-annotation-subscript",icon:""}},list:{options:["unordered","ordered"],unordered:{className:"cv-annotation-toolbar-option cv-annotation-bullet-list",icon:""},ordered:{className:"cv-annotation-toolbar-option cv-annotation-number-list",icon:""}},link:{component:qe,options:["link"]}}}),a.a.createElement(ne,{error:n.error}))))})),Xe(He,ee.InteractionTypeId.Image,(function(e){var t=e.state,n=void 0===t?function(e){var t;return{url:(null===(t=e.data)||void 0===t?void 0:t.url)||"",caption:e.data.caption}}(e.interaction):t,r=e.setState,o=e.interaction,i=e.optionsPortalNode;Object(Ce.a)();var c=a.a.useRef(null);function l(e){e&&e[0]&&ke.a.onFileSelect(Oe.c.None,e,(function(e){Z.a.renderCropper({src:e.src,alt:"",onClickCrop:u})}))}function u(t){var a=t.split(",")[1];G.a.post("".concat(e.imageApi,"v2/thumbnails/base64"),'"'.concat(a,'"'),{tokenName:"gateway"}).then((function(e){r(Object.assign(Object.assign({},n),{url:e.location}))})).catch((function(){return alert("Something went wrong while trying to upload image. Please try again.")}))}return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("div",{className:"form-group"},a.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},a.a.createElement("label",{className:"cv-interaction-field-label mb-0"},"Image"),a.a.createElement(te.b,{node:i})),n.url?a.a.createElement("div",{className:"text-center"},a.a.createElement("div",{className:"cv-uploaded-image-container"},a.a.createElement("img",{className:"img img-fluid",src:n.url,alt:n.caption}),a.a.createElement(re.a,{className:"cv-remove-uploaded-image d-flex justify-content-center align-items-center",onClick:function(){r(Object.assign(Object.assign({},n),{url:""}))}},a.a.createElement("div",{className:"btn btn-link text-light"},"Remove")))):a.a.createElement(Te,{onDropImage:l},a.a.createElement("div",{className:"cv-image-interaction-upload-container rounded py-4 text-center"},a.a.createElement("div",{className:"svg-container xlg mb-2"},a.a.createElement(Ne,null)),a.a.createElement("p",{className:"mb-0"},"Drag and drop an image file or"),a.a.createElement(re.a,{type:"button",className:"text-underline d-inline-block",onClick:function(){c.current.value=null,c.current.click(null)}},"upload from your device"),a.a.createElement("input",{type:"file",autoComplete:"off",className:"file-select d-none",multiple:!1,accept:"image/jpg,image/jpeg,image/png",ref:c,onChange:function(e){return l(e.target.files)}}))),a.a.createElement(ne,{error:n.error})),a.a.createElement("div",{className:"form-group"},a.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"image-caption"},"Caption  ",a.a.createElement("span",{className:"text-muted"},"(optional)")),a.a.createElement("textarea",{id:"image-caption",className:"form-control",placeholder:"Caption your image",value:n.caption||o.data.caption||"",onChange:function(e){r(Object.assign(Object.assign({},n),{caption:e.target.value}))},rows:2})))})),Xe(He,ee.InteractionTypeId.MissingWord,(function(e){var t,n,r,o,i,c,l=e.state,u=void 0===l?(t=e.interaction,o=(null===(n=t.data)||void 0===n?void 0:n.sentence)||"",i=o.split(" ").filter(Boolean),c=i.map((function(e,t){return{text:e,order:t,selected:!1}})),null===(r=t.actionableItems)||void 0===r||r.forEach((function(e){var t=e.order,n=ue(i[t],e.name);i[t]=n,c[t].text=n,c[t].selected=!0})),{fullSentence:i.join(" "),sentence:o,preview:t.name,words:c}):l,s=e.setState,f=e.optionsPortalNode,d=!!u.sentence;return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("div",{className:"form-group"},a.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},a.a.createElement("label",{className:"cv-interaction-field-label mb-0",htmlFor:"missing-word-sentence"},"Sentence"),a.a.createElement(te.b,{node:f})),a.a.createElement("input",{id:"missing-word-sentence",className:"form-control",placeholder:"Enter your sentence here",value:u.fullSentence||"",onChange:function(e){var t=e.target.value,n=t.split(" ").filter(Boolean).map((function(e,t){return{text:e,order:t,selected:!1}}));s(Object.assign(Object.assign({},u),{fullSentence:t,sentence:fe(n),preview:se(n),words:n}))},autoComplete:"off"})),d&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"form-group"},a.a.createElement("label",{className:"cv-interaction-field-label"},"Select the missing word(s)"),a.a.createElement("ul",{className:"list-unstyled d-flex flex-wrap mx-n1 mb-n1"},u.words.map((function(e,t){var n;return(null===(n=le(e.text))||void 0===n?void 0:n.trim())?a.a.createElement("li",{key:"".concat(t,"-").concat(e.text)},a.a.createElement(re.a,{className:"rounded border p-2 mx-1 mb-1 cursor-pointer ".concat(e.selected?"bg-info text-white":"bg-white"),onClick:function(){return e=t,n=u.words.map((function(t){return t.order!==e?t:Object.assign(Object.assign({},t),{selected:!t.selected})})),void s(Object.assign(Object.assign({},u),{words:n,preview:se(n),sentence:fe(n)}));var e,n}},le(e.text))):a.a.createElement(a.a.Fragment,{key:"".concat(t,"-").concat(e.text)})})))),a.a.createElement("div",null,a.a.createElement("label",{className:"cv-interaction-field-label"},"Preview"),a.a.createElement("p",null,u.preview))),a.a.createElement(ne,{error:u.error}))})),Xe(He,ee.InteractionTypeId.MultipleChoice,Se),Xe(He,ee.InteractionTypeId.ShortAnswer,(function(e){var t=e.state,n=void 0===t?function(e){return{question:e.name,suggestedResponse:e.data.suggestedResponse||""}}(e.interaction):t,r=e.setState,o=e.interaction,i=e.optionsPortalNode,c=e.showFeedback;return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("div",{className:"form-group"},a.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},a.a.createElement("label",{className:"cv-interaction-field-label mb-0",htmlFor:"short-answer-question"},"Question"),a.a.createElement(te.b,{node:i})),a.a.createElement("input",{id:"short-answer-question",className:"form-control",onChange:function(e){r(Object.assign(Object.assign({},n),{question:e.target.value}))},value:n.question||o.data.text||"",placeholder:"Enter your question here",autoComplete:"off"}),a.a.createElement(ne,{error:n.error})),c&&a.a.createElement("div",{className:"form-group"},a.a.createElement("label",{className:"cv-interaction-field-label",htmlFor:"short-answer-suggested-response"},"Suggested Response  ",a.a.createElement("span",{className:"text-muted"},"(optional)")," ",a.a.createElement(pe.a,{tooltipText:"Provide a suggested response for your students"})),a.a.createElement(de.a,{id:"short-answer-suggested-response",className:"form-control",minRows:2,value:n.suggestedResponse||"",onChange:function(e){r(Object.assign(Object.assign({},n),{suggestedResponse:e.target.value}))},placeholder:"Give a suggested response for this question"})))})),Xe(He,ee.InteractionTypeId.TrueOrFalse,Se),He);var Je=(Xe(Ye={},ee.InteractionTypeId.Annotation,(function(e){var t;return(null===(t=e.annotation)||void 0===t?void 0:t.trim())?null:"Please provide an annotation"})),Xe(Ye,ee.InteractionTypeId.Image,(function(e){return e.url?null:"Please upload an image"})),Xe(Ye,ee.InteractionTypeId.MissingWord,(function(e){var t;return(null===(t=e.sentence)||void 0===t?void 0:t.trim())?e.words.find((function(e){return e.selected}))?null:"Please select a missing word":"Please provide a sentence"})),Xe(Ye,ee.InteractionTypeId.MultipleChoice,xe),Xe(Ye,ee.InteractionTypeId.ShortAnswer,(function(e){var t;return(null===(t=e.question)||void 0===t?void 0:t.trim())?null:"Please provide a question"})),Xe(Ye,ee.InteractionTypeId.TrueOrFalse,xe),Ye);var Ze=(Xe(Qe={},ee.InteractionTypeId.Annotation,(function(e,t){var n;return Ke(this,void 0,void 0,We().mark((function r(){return We().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.name="Annotation",t.data.annotation=null===(n=e.annotation)||void 0===n?void 0:n.trim(),t.actionableItems=[{name:"Answer"}],r.next=5,J.saveInteraction(t);case 5:case"end":return r.stop()}}),r)})))})),Xe(Qe,ee.InteractionTypeId.Image,(function(e,t){var n,r;return _e(this,void 0,void 0,Pe().mark((function a(){return Pe().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t.data.url=e.url,t.name=(null===(n=e.caption)||void 0===n?void 0:n.trim())||"Image",t.data.caption=null===(r=e.caption)||void 0===r?void 0:r.trim(),t.actionableItems=[{name:"Answer"}],a.next=6,J.saveInteraction(t);case 6:case"end":return a.stop()}}),a)})))})),Xe(Qe,ee.InteractionTypeId.MissingWord,(function(e,t){return ie(this,void 0,void 0,oe().mark((function n(){var r;return oe().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.data.sentence=fe(e.words),t.name=e.preview,r=e.words.filter((function(e){return e.selected})),t.actionableItems=r.map((function(e){return{name:le(e.text),order:e.order,isCorrect:!0}})),n.next=6,J.saveInteraction(t);case 6:case"end":return n.stop()}}),n)})))})),Xe(Qe,ee.InteractionTypeId.MultipleChoice,Ie),Xe(Qe,ee.InteractionTypeId.ShortAnswer,(function(e,t){var n,r;return ve(this,void 0,void 0,he().mark((function a(){return he().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t.name=null===(n=e.question)||void 0===n?void 0:n.trim(),t.data.suggestedResponse=null===(r=e.suggestedResponse)||void 0===r?void 0:r.trim(),t.actionableItems=[{name:"Answer"}],a.next=5,J.saveInteraction(t);case 5:case"end":return a.stop()}}),a)})))})),Xe(Qe,ee.InteractionTypeId.TrueOrFalse,Ie),Qe);function et(e){return Ze[e]}var tt=n(1209),nt=n(1),rt=["A","B","C","D"];function at(e){if(!e.enableImmersiveReader)return a.a.createElement(a.a.Fragment,null);var t=e.interaction,n=e.className,r=s.a.getTypeInfo(t.typeId),o=r.name,i=r.typeName,c="";switch(t.typeId){case ee.InteractionTypeId.Annotation:c=t.data.annotation;break;case ee.InteractionTypeId.Image:c=t.data.caption;break;case ee.InteractionTypeId.MissingWord:c=t.data.sentence.replace(/{([^{}]*)}/g,(function(){return"<u>&nbsp;&nbsp;&nbsp;&nbsp;</u>"}));break;case ee.InteractionTypeId.MultipleChoice:c=t.name,t.actionableItems.map((function(e,t){return c+="<br />".concat(rt[t],": ").concat(e.name)}));break;case ee.InteractionTypeId.ShortAnswer:c=t.name;break;case ee.InteractionTypeId.TrueOrFalse:c="True or false: ".concat(t.name)}var l=t.typeId===ee.InteractionTypeId.Annotation||t.typeId===ee.InteractionTypeId.MissingWord||t.typeId===ee.InteractionTypeId.MultipleChoice;return a.a.createElement(tt.a,{title:o,text:c,html:l,className:"pr-2 ".concat(n||""),analyticsData:{id:t.interactiveId,type:i},analyticsOptions:{location:nt.LocationContext.InteractivePlayer,entity:nt.EntityType.Interactive,actionType:nt.UserAction.Click,descriptor:nt.ClickDescriptor.LaunchImmersiveReader}})}n(1390);function ot(e){var t=e.error;return e.error?a.a.createElement("p",{className:"mt-2 small text-danger"},t):a.a.createElement(a.a.Fragment,null)}var it,ct,lt=n(1156);function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function st(){return lt.a.NotApplicable}function ft(e,t){var n=e.actionableItems.filter((function(e){return e.isCorrect}));return n.every((function(e){return!t(e.id)}))?lt.a.UnAnswered:n.every((function(e){var n;return e.name.trim().toLowerCase()===(null===(n=t(e.id))||void 0===n?void 0:n.trim().toLowerCase())}))?lt.a.Correct:lt.a.Incorrect}function dt(e,t){return e.actionableItems.every((function(e){return!t(e.id)}))?lt.a.UnAnswered:e.actionableItems.filter((function(e){return e.isCorrect})).every((function(e){return t(e.id)===e.name}))?lt.a.Correct:lt.a.Incorrect}function pt(e,t){var n;return e.actionableItems.forEach((function(e){var r=t(e.id);n=r?r.status!==it.Correct?r.status!==it.Incorrect?lt.a.AwaitingMarking:lt.a.Incorrect:lt.a.Correct:lt.a.UnAnswered})),n}function mt(e,t){return function(n){var r=t.attempts.find((function(t){return t.id===e.id}));return null==r?void 0:r.answers.find((function(e){return e.id===n}))}}function ht(e,t){var n=mt(e,t);return dt(e,(function(e){var t=n(e);return null==t?void 0:t.text}))}!function(e){e[e.Incorrect=0]="Incorrect",e[e.Correct=1]="Correct",e[e.PendingReview=2]="PendingReview"}(it||(it={}));var vt=(ut(ct={},ee.InteractionTypeId.Annotation,st),ut(ct,ee.InteractionTypeId.Image,st),ut(ct,ee.InteractionTypeId.MissingWord,(function(e,t){var n=mt(e,t);return ft(e,(function(e){var t=n(e);return null==t?void 0:t.text}))})),ut(ct,ee.InteractionTypeId.MultipleChoice,ht),ut(ct,ee.InteractionTypeId.ShortAnswer,(function(e,t){return pt(e,mt(e,t))})),ut(ct,ee.InteractionTypeId.TrueOrFalse,ht),ct);var yt={notApplicable:st,awaitingMarking:function(){return lt.a.AwaitingMarking},isMissingWordCorrect:ft,isMultipleChoiceCorrect:dt,isShortAnswerMarkedCorrect:pt,isInteractionCorrect:function(e,t){return(0,vt[e.typeId])(e,t)}};n(1391);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})(e)}var bt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};var wt=n(280),Et=n(64),xt=n(21),It=n(394),St=n(1392),kt=n.n(St),Ot=["A","B","C","D"];function Ct(e){var t=1===e.interaction.actionableItems.filter((function(e){return e.isCorrect})).length;function n(t,n){e.onSelectAnswer&&e.onSelectAnswer(t,n)}return a.a.createElement(a.a.Fragment,null,e.interaction.actionableItems.map((function(r,o){var i=e.getSelectedAnswer(r.id);if(e.onlyShowSelectedAnswer&&!i)return a.a.createElement(a.a.Fragment,{key:o});var c=i?"bg-info text-white":e.unCheckedBackground,l=function(){return a.a.createElement(a.a.Fragment,null,Ot[o])};e.showFeedback&&(c=r.isCorrect?"bg-success text-white":"bg-danger text-white ".concat(kt.a.incorrect),e.hideFeedbackIcons||(l=function(){return a.a.createElement(a.a.Fragment,null,r.isCorrect?a.a.createElement(Et.a,{size:Et.b.Small,svgName:xt.b.Check}):a.a.createElement(Et.a,{size:Et.b.Small,svgName:xt.b.Close}))}));var u=e.showFeedback?{}:{role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&n(r,!i)}};return a.a.createElement(a.a.Fragment,{key:o},a.a.createElement("input",{id:r.id,type:t?"radio":"checkbox",name:"multiple-choice",checked:!!i,onChange:function(){return n(r,!i)},disabled:e.showFeedback,hidden:!0,tabIndex:-1}),a.a.createElement("label",Object.assign({className:"\n d-block\n rounded-lg\n shadow-sm\n mb-2\n ".concat("sm"===e.size?"p-2":"p-3","\n d-flex\n justify-content-between\n position-relative\n ").concat(e.showFeedback?"":"cursor-pointer","\n ").concat(kt.a.answer,"\n ").concat(c),key:o,htmlFor:r.id},u),a.a.createElement("span",{className:"d-inline-block mr-3 cv-multiple-choice-bullet"},a.a.createElement(l,null)),a.a.createElement("span",{className:"flex-grow-1 pr-4"},r.name),!e.onlyShowSelectedAnswer&&a.a.createElement("span",{className:kt.a.avatarContainer},i&&a.a.createElement(It.a,{imageCdnUrl:e.imageApi,initials:e.userInitials,imageUrl:e.userAvatar}))))})))}Ct.defaultProps={size:"lg",unCheckedBackground:"bg-white"};n(1393);function Nt(e){return(Nt="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 jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};var Tt=n(1394),At=n.n(Tt);function Pt(e){function t(t){e.onSelectAnswer&&e.onSelectAnswer(t)}return a.a.createElement("div",{className:"d-flex ".concat(e.className?e.className:""," ").concat("sm"===e.size?"mx-n1":"mx-n2")},e.interaction.actionableItems.map((function(n,r){var o=e.getSelectedAnswer(n.id),i=o?"bg-info text-white":e.unCheckedBackground,c=function(){return a.a.createElement(a.a.Fragment,null)};e.showFeedback&&(i=n.isCorrect?"bg-success text-white":"bg-danger text-white ".concat(At.a.incorrect),e.hideFeedbackIcons||(c=function(){return a.a.createElement(a.a.Fragment,null,n.isCorrect?a.a.createElement(Et.a,{size:Et.b.Small,svgName:xt.b.Check}):a.a.createElement(Et.a,{size:Et.b.Small,svgName:xt.b.Close}))}));var l=e.showFeedback?{}:{role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&t(n)}};return a.a.createElement("label",Object.assign({key:r,htmlFor:n.id,className:"\n d-inline-block\n rounded-lg\n shadow-sm\n my-0\n position-relative\n overflow-hidden\n ".concat("sm"===e.size?"p-4 mx-1 h5":"p-5 mx-2 h4","\n ").concat(e.showFeedback?"":"cursor-pointer","\n ").concat(i)},l),a.a.createElement("input",{id:n.id,type:"radio",name:"multiple-choice",checked:!!o,onChange:function(){return t(n)},disabled:e.showFeedback,hidden:!0}),n.name,a.a.createElement("span",{className:"position-absolute p-2 ".concat(At.a.feedback)},a.a.createElement(c,null)),a.a.createElement("span",{className:"".concat(At.a.avatarContainer).concat("sm"===e.size?" ".concat(At.a.avatarContainerSmall):"")},o&&a.a.createElement(It.a,{imageCdnUrl:e.imageApi,initials:e.userInitials,imageUrl:e.userAvatar})))})))}Pt.defaultProps={size:"lg",unCheckedBackground:"bg-white"};var _t,Ft,Rt,Ut,Mt;function Dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gt=function(){return!0},qt=function(){return!1},Bt=(Dt(_t={},ee.InteractionTypeId.Annotation,qt),Dt(_t,ee.InteractionTypeId.Image,qt),Dt(_t,ee.InteractionTypeId.MissingWord,Gt),Dt(_t,ee.InteractionTypeId.MultipleChoice,Gt),Dt(_t,ee.InteractionTypeId.ShortAnswer,(function(e){return!!e.data.suggestedResponse})),Dt(_t,ee.InteractionTypeId.TrueOrFalse,Gt),_t);function Vt(e){return Bt[e]}var zt=(Dt(Ft={},ee.InteractionTypeId.Annotation,(function(e){var t=e.interaction.data.annotation.replace(/<(a)(.*?)>/g,'<$1 target="_blank" $2>');return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("div",{className:"mb-2",dangerouslySetInnerHTML:{__html:t}}),a.a.createElement(at,{interaction:e.interaction,enableImmersiveReader:e.enableImmersiveReader}))})),Dt(Ft,ee.InteractionTypeId.Image,(function(e){var t=e.interaction,n=e.recalculateScroll,r=a.a.useCallback((function(e){e&&(e.onload=function(){n()})}),[]);return a.a.createElement("div",{className:"cv-interactive-question cv-image-interactive"},a.a.createElement("div",{className:"cv-image-container text-center"},a.a.createElement("img",{className:"img-fluid shadow-lg",src:t.data.url,ref:r}),t.data.caption&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",{className:"mt-3"},t.data.caption,a.a.createElement(at,{interaction:e.interaction,className:"ml-2",enableImmersiveReader:e.enableImmersiveReader})))))})),Dt(Ft,ee.InteractionTypeId.MissingWord,(function(e){var t=e.state,n=e.setState,r=e.interaction,o=e.showFeedback,i=r.data.sentence.replace(/{([^{}]*)}/g,(function(e,t){return"{".concat("cv-missing-word-").concat(t,"}")})).split(/{([^{}]*)}/g);function c(e,r){if(r.stopPropagation(),r.target.value){var a,o,i;n((a={},o=e.id,i=r.target.value,o in a?Object.defineProperty(a,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[o]=i,a))}else{var c=t,l=e.id,u=(c[l],bt(c,["symbol"===gt(l)?l:l+""]));n(u,!0)}}return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("div",{className:"mb-2"},i.map((function(e,n){var i;if(!e.startsWith("cv-missing-word-"))return e;var l=e.replace("cv-missing-word-",""),u=r.actionableItems.find((function(e){return e.order.toString()===l}));if(u){var s,f,d=t[u.id]||"",p=(s=u.name,(f=document.createElement("canvas").getContext("2d")).font="17pt arial",f.measureText(s).width);if(o){var m=u.name.toLowerCase().toString()===(null===(i=t[u.id])||void 0===i?void 0:i.toLowerCase().toString());return a.a.createElement(a.a.Fragment,{key:n},!m&&a.a.createElement(a.a.Fragment,null,a.a.createElement("del",{className:"text-danger"},d)," "),a.a.createElement("span",{className:"text-success"},u.name))}return a.a.createElement("span",{className:"cv-missing-word-input-container",key:n},a.a.createElement("input",{style:{width:p/16+"rem"},onChange:function(e){return c(u,e)},value:d,disabled:!!t.submitted,className:"cv-missing-word-input",autoComplete:"off"}))}}))),a.a.createElement(ot,{error:t.error}),a.a.createElement(at,{interaction:e.interaction,enableImmersiveReader:e.enableImmersiveReader}))})),Dt(Ft,ee.InteractionTypeId.MultipleChoice,(function(e){var t=e.state,n=e.setState,r=e.interaction,o=e.showFeedback,i=e.imageApi,c=e.currentUser,l=1===r.actionableItems.filter((function(e){return e.isCorrect})).length;return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("p",null,r.name,a.a.createElement(at,{interaction:e.interaction,className:"ml-2",enableImmersiveReader:e.enableImmersiveReader})),!l&&a.a.createElement("p",{className:"text-muted"},a.a.createElement("small",null,"This question has multiple correct answers")),a.a.createElement(Ct,{interaction:r,showFeedback:o,onSelectAnswer:function(e,r){if(!t.submitted)if(l)n(jt({},e.id,e.name),!0);else if(r)n(jt({},e.id,e.name));else{var a=t,o=e.id,i=(a[o],Lt(a,["symbol"===Nt(o)?o:o+""]));n(i,!0)}},getSelectedAnswer:function(e){return t[e]},imageApi:i.toString(),userInitials:wt.a.getInitials(c.givenName,c.familyName),userAvatar:c.avatar}),a.a.createElement(ot,{error:t.error}))})),Dt(Ft,ee.InteractionTypeId.ShortAnswer,(function(e){var t=e.interaction,n=e.state,r=e.setState;return e.showFeedback?a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("p",null,t.name),a.a.createElement("label",{className:"cv-interaction-field-label"},"My answer"),a.a.createElement("p",null,n[t.actionableItems[0].id]),t.data.suggestedResponse&&a.a.createElement(a.a.Fragment,null,a.a.createElement("label",{className:"cv-interaction-field-label mt-1"},"Teacher's suggested answer"),a.a.createElement("p",null,t.data.suggestedResponse))):a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("p",null,t.name,a.a.createElement(at,{interaction:t,className:"ml-2",enableImmersiveReader:e.enableImmersiveReader})),a.a.createElement(de.a,{id:"short-answer-answer",className:"form-control mt-2",minRows:3,value:n[t.actionableItems[0].id]||"",onChange:function(e){var a,o,i;r(Object.assign(Object.assign({},n),(a={},o=t.actionableItems[0].id,i=e.target.value,o in a?Object.defineProperty(a,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[o]=i,a)))},disabled:!!n.submitted}),a.a.createElement(ot,{error:n.error}))})),Dt(Ft,ee.InteractionTypeId.TrueOrFalse,(function(e){var t=e.state,n=e.setState,r=e.interaction,o=e.showFeedback,i=e.imageApi,c=e.currentUser,l=r.actionableItems.find((function(e){return e.isCorrect}));return a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("p",null,r.name,a.a.createElement(at,{interaction:e.interaction,className:"ml-2",enableImmersiveReader:e.enableImmersiveReader})),a.a.createElement(Pt,{className:"justify-content-center",interaction:r,showFeedback:o,onSelectAnswer:function(e){var r,a,o;t.submitted||n((r={},a=e.id,o=e.name,a in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o,r),!0)},getSelectedAnswer:function(e){return t[e]},imageApi:i.toString(),userInitials:wt.a.getInitials(c.givenName,c.familyName),userAvatar:c.avatar}),o&&a.a.createElement("div",{className:"text-center px-5 mt-3"},a.a.createElement("p",null,"The answer is ",a.a.createElement("strong",null,l.name)),r.data.feedback&&a.a.createElement("p",null,r.data.feedback)),a.a.createElement(ot,{error:t.error}))})),Ft);function Wt(){return""}var Ht=(Dt(Rt={},ee.InteractionTypeId.Annotation,Wt),Dt(Rt,ee.InteractionTypeId.Image,Wt),Dt(Rt,ee.InteractionTypeId.MissingWord,(function(e,t){var n=Object.keys(e).filter((function(t){var n;return!!(null===(n=e[t])||void 0===n?void 0:n.trim())})).length;return n?n!==t.actionableItems.length?"Please fill in all of the missing words":null:"Please fill in the missing words"})),Dt(Rt,ee.InteractionTypeId.MultipleChoice,(function(e){return Object.keys(e).length?null:"Please choose an answer"})),Dt(Rt,ee.InteractionTypeId.ShortAnswer,(function(e){return Object.keys(e).filter((function(t){var n;return!!(null===(n=e[t])||void 0===n?void 0:n.trim())})).length?null:"Please provide an answer to the question"})),Dt(Rt,ee.InteractionTypeId.TrueOrFalse,(function(e){return Object.keys(e).length?null:"Please choose an answer"})),Rt);var Yt=(Dt(Ut={},ee.InteractionTypeId.Annotation,null),Dt(Ut,ee.InteractionTypeId.Image,null),Dt(Ut,ee.InteractionTypeId.MissingWord,(function(e,t,n){return n(t.id,Object.keys(e).map((function(t){return{actionableItemId:t,value:e[t].toString()}})))})),Dt(Ut,ee.InteractionTypeId.MultipleChoice,(function(e,t,n){return n(t.id,Object.keys(e).map((function(t){return{actionableItemId:t,value:e[t]}})))})),Dt(Ut,ee.InteractionTypeId.ShortAnswer,(function(e,t,n){return n(t.id,Object.keys(e).map((function(t){return{actionableItemId:t,value:e[t].toString()}})))})),Dt(Ut,ee.InteractionTypeId.TrueOrFalse,(function(e,t,n){return n(t.id,Object.keys(e).map((function(t){return{actionableItemId:t,value:e[t]}})))})),Ut);function Qt(e){return Yt[e]}var Kt=(Dt(Mt={},ee.InteractionTypeId.Annotation,yt.notApplicable),Dt(Mt,ee.InteractionTypeId.Image,yt.notApplicable),Dt(Mt,ee.InteractionTypeId.MissingWord,(function(e,t){return yt.isMissingWordCorrect(t,(function(t){return e[t]}))})),Dt(Mt,ee.InteractionTypeId.MultipleChoice,(function(e,t){return yt.isMultipleChoiceCorrect(t,(function(t){return e[t]}))})),Dt(Mt,ee.InteractionTypeId.ShortAnswer,yt.awaitingMarking),Dt(Mt,ee.InteractionTypeId.TrueOrFalse,(function(e,t){return t.actionableItems.filter((function(e){return e.isCorrect})).every((function(t){return e[t.id]===t.name}))?lt.a.Correct:lt.a.Incorrect})),Mt);function Xt(e){return Kt[e]}function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jt={interactions:{},timepoints:{}};function Zt(e,t){return"interaction"===t.type?{timepoints:e.timepoints,interactions:Object.assign(Object.assign({},e.interactions),$t({},t.id,t.value))}:"timepoint"===t.type?{interactions:e.interactions,timepoints:Object.assign(Object.assign({},e.timepoints),$t({},t.id,t.value))}:void 0}function en(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tn(e,t)}(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 tn(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}var nn={interactionIndex:0},rn=function(e){var t=e.mode,n=e.timepoint,r=e.latestSession,o=t===u.InteractiveMode.Create,i=en(a.a.useReducer(Zt,null,(function(){return function(e){return e?{timepoints:{},interactions:e.actions.reduce((function(e,t){var n;return e[t.interactionId]=Object.assign(Object.assign({},e[t.interactionId]),($t(n={},t.actionableItemId,t.data),$t(n,"submitted",!0),n)),e}),{})}:Jt}(r)})),2),c=i[0],l=i[1],s=h(null==n?void 0:n.id),f=null==n?void 0:n.interactions[s.interactionIndex],d="number"==typeof s.nextInteractionIndex?null==n?void 0:n.interactions[s.nextInteractionIndex]:null,p=v(null==f?void 0:f.id),m=v(null==d?void 0:d.id);function h(e){return e&&c.timepoints[e]||nn}function v(e){if(!e)return{};var t=c.interactions[e];return t||o?t:{}}function y(e,t,n){var r=v(e);l({type:"interaction",id:e,value:Object.assign(Object.assign({},n?{}:r),t)})}return{state:c,interaction:f,interactionState:p,timepointState:s,nextInteraction:d,nextInteractionState:m,getTimepointState:h,getInteractionState:v,updateTimepointState:function(e,t){var n=h(e);l({type:"timepoint",id:e,value:Object.assign(Object.assign({},n),t)})},updateInteractionState:y,clearTimepointState:function(e){l({type:"timepoint",id:e,value:void 0})},clearInteractionState:function(e){l({type:"interaction",id:e,value:void 0})},userUpdateInteractionState:function(e,t){y(f.id,Object.assign(Object.assign({},e),{hasChanges:!0,error:null}),t)}}};function an(e){return(an="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 on(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */on=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==an(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}var cn=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},ln=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},un=!1,sn=function(e){var t=e.interactive,n=e.timepoint,r=e.player,o=e.mode,i=e.resultsService,c=e.latestSession,l=e.analyticsService,f=ln(e,["interactive","timepoint","player","mode","resultsService","latestSession","analyticsService"]),d=rn({mode:o,timepoint:n,latestSession:c}),p=d.state,m=d.interaction,h=d.interactionState,v=d.timepointState,y=d.nextInteraction,g=d.nextInteractionState,b=ln(d,["state","interaction","interactionState","timepointState","nextInteraction","nextInteractionState"]),w=o===u.InteractiveMode.Create;function E(e){for(var n=0;n<t.timepoints.length;){for(var r=t.timepoints[n],a=0;a<r.interactions.length;){var o=r.interactions[a];if(o.id===e)return{localTimepoint:r,localInteraction:o};a++}n++}return{localInteraction:null,localTimepoint:null}}function x(e){var n=s.a.getTypeInfo(e.typeId);return{id:M(e.id)?void 0:e.id,typeId:e.typeId,type:n.typeName,interactiveId:t.id,timepointId:M(e.timepointId)?void 0:e.timepointId,order:e.order}}function I(e){return cn(this,void 0,void 0,on().mark((function n(){var r,a,o,i,c,u,s;return on().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=E(e),a=r.localInteraction,o=r.localTimepoint,a&&o){n.next=3;break}throw new Error("Could not find the interaction and timepoint for the interactionId ".concat(e));case 3:if(i=x(a),M(a.id)){n.next=10;break}return n.next=7,J.deleteInteraction(a.id);case 7:l.logUserAction(i,{actionType:nt.UserAction.Delete,entity:nt.EntityType.Interaction,workflowPhase:nt.WorkflowPhase.Complete}),n.next=11;break;case 10:l.logUserAction(i,{actionType:nt.UserAction.Create,entity:nt.EntityType.Interaction,workflowPhase:nt.WorkflowPhase.Discard});case 11:if(c=o.interactions.findIndex((function(e){return e.id===a.id})),o.interactions.splice(c,1),b.clearInteractionState(a.id),u=b.getTimepointState(o.id),c<u.interactionIndex&&b.updateTimepointState(o.id,{interactionIndex:u.interactionIndex-1}),!(o.interactions.length>0)){n.next=18;break}return n.abrupt("return");case 18:if(M(o.id)){n.next=21;break}return n.next=21,J.deleteTimepoint(o.id);case 21:s=t.timepoints.findIndex((function(e){return e.id===o.id})),t.timepoints.splice(s,1),f.removeCue(o.visibleAt/1e3),b.clearTimepointState(o.id);case 25:case"end":return n.stop()}}),n)})))}function S(e){if(m){var t=M(m.id);if(t||(null==h?void 0:h.hasChanges)||(null==v?void 0:v.hasChanges)){Z.a.render(a.a.createElement("p",null,"Do you want to discard your changes?"),{title:"Unsaved changes",success:function(){(null==v?void 0:v.hasChanges)&&j(!0),t?I(m.id):b.clearInteractionState(m.id),e&&e()},buttons:[{variant:"link",buttonText:"Cancel"},{variant:"danger",success:!0,buttonText:"Discard"}]})}else e&&e()}else e&&e()}function k(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(w)S((function(){b.updateTimepointState(n.id,{interactionIndex:e})}));else{var r=function(){b.updateTimepointState(n.id,{nextInteractionIndex:e}),window.requestAnimationFrame((function(){b.updateTimepointState(n.id,{nextInteractionIndex:e,slideIn:!0}),window.setTimeout((function(){b.updateTimepointState(n.id,{interactionIndex:e,nextInteractionIndex:null,slideIn:null})}),400)}))};t?S(r):r()}}function O(){v.interactionIndex+1>=n.interactions.length?f.continueInteractive():k(v.interactionIndex+1,!1)}function C(){t.timepoints.sort((function(e,t){return e.visibleAt>t.visibleAt?1:t.visibleAt>e.visibleAt?-1:0}))}function N(){k(n.interactions.length)}function j(e){(null==v?void 0:v.hasChanges)&&(e&&f.moveTimepoint(v.originalVisibleAt),b.updateTimepointState(n.id,{hasChanges:void 0,originalVisibleAt:void 0}),un=!1)}return{state:p,interaction:m,interactionState:h,timepointState:v,nextInteraction:y,nextInteractionState:g,skip:O,cancel:function(){return cn(this,void 0,void 0,on().mark((function e(){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null==h?void 0:h.hasChanges)){e.next=3;break}return S(),e.abrupt("return");case 3:return e.next=5,I(m.id);case 5:f.setOpen(!0);case 6:case"end":return e.stop()}}),e)})))},addAnotherQuestion:N,goToTimepoint:function(e,n){var a=function(e){for(var n=0;n<t.timepoints.length;){var r=t.timepoints[n];if(r.id===e)return r;n++}return null}(e),o=a.interactions.find((function(e){return e.id.toString()===n.toString()}));r.currentTime(a.visibleAt/1e3),b.updateTimepointState(a.id,{interactionIndex:a.interactions.indexOf(o)})},discardChanges:S,changeIndex:k,promptDelete:function(e){var t=x(E(e).localInteraction);l.logUserAction(t,{actionType:nt.UserAction.Delete,entity:nt.EntityType.Interaction,workflowPhase:nt.WorkflowPhase.Start}),Z.a.render(a.a.createElement("p",null,"Are you sure you want to delete this question?"),{title:"Delete question",success:function(){return I(e)},buttons:[{variant:"link",buttonText:"Cancel"},{variant:"danger",success:!0,buttonText:"Delete question"}]})},showTypeSelector:function(){r.pause(),f.setOpen(!0),n&&N()},cancelTypeSelector:function(){n?k(v.interactionIndex-1):(f.setOpen(!1),r.play())},deleteInteraction:I,saveInteraction:function(){return cn(this,void 0,void 0,on().mark((function e(){var t,r,a,o,i,c;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w){e.next=2;break}throw new Error("Should not be calling onClickSave while viewing an interactive");case 2:if(u=m.typeId,!(t=(0,Je[u])(b.getInteractionState(m.id),m))){e.next=7;break}return b.updateInteractionState(m.id,{error:t}),e.abrupt("return");case 7:if(b.updateInteractionState(m.id,{spinner:!0}),!M(n.id)){e.next=15;break}return r=n.id,e.next=12,J.saveTimepoint(n);case 12:f.updateCue(r,n.id),b.clearTimepointState(r),(null==v?void 0:v.hasChanges)&&(C(),j());case 15:return m.timepointId=n.id,a=m.id,o=et(m.typeId),e.next=20,o(b.getInteractionState(m.id),m);case 20:b.clearInteractionState(a),i=M(a),c=x(m),l.logUserAction(c,{actionType:i?nt.UserAction.Create:nt.UserAction.Edit,entity:nt.EntityType.Interaction,workflowPhase:i?nt.WorkflowPhase.Complete:nt.WorkflowPhase.Save});case 24:case"end":return e.stop()}var u}),e)})))},addInteraction:function(e){var a;r.pause();var o=(null==n?void 0:n.id)||"new_".concat(Math.round(Math.random()*Number.MAX_SAFE_INTEGER)),i={id:"new_".concat(Math.round(Math.random()*Number.MAX_SAFE_INTEGER)),timepointId:o,typeId:e,order:(null===(a=null==n?void 0:n.interactions)||void 0===a?void 0:a.length)||0,interactiveId:t.id,data:{}},c=x(i);if(l.logUserAction(c,{actionType:nt.UserAction.Create,entity:nt.EntityType.Interaction,workflowPhase:nt.WorkflowPhase.Start}),n)return n.interactions.push(i),void k(v.interactionIndex);var u=r.currentTime();t.timepoints||(t.timepoints=[]),t.timepoints.push({id:o,visibleAt:1e3*u,interactiveId:t.id,shouldPause:1,interactions:[i]}),C(),f.addCue(o)},submitInteractionAnswer:function(){return cn(this,void 0,void 0,on().mark((function e(){var r,a,c,s,d;return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o===u.InteractiveMode.View){e.next=2;break}throw new Error("Should not be calling onClickSubmit while creating an interactive");case 2:if(!h.submitted){e.next=8;break}if(!(v.interactionIndex>=n.interactions.length)){e.next=6;break}return f.continueInteractive(),e.abrupt("return");case 6:return k(v.interactionIndex+1),e.abrupt("return");case 8:if(r=D(h),p=m.typeId,!(a=(0,Ht[p])(r,m))){e.next=14;break}return b.updateInteractionState(m.id,{error:a}),e.abrupt("return");case 14:if(!i||!h.hasChanges){e.next=22;break}if(c=Qt(m.typeId),b.updateInteractionState(m.id,{spinner:!0}),!c){e.next=22;break}return e.next=20,c(r,m,i.save);case 20:s=x(m),l.logUserAction(s,{actionType:nt.UserAction.Answer,entity:nt.EntityType.Interaction});case 22:if(b.updateInteractionState(m.id,{submitted:!0,error:null,hasChanges:!1,spinner:!1}),t.immediateFeedback){e.next=26;break}return O(),e.abrupt("return");case 26:d=Vt(m.typeId),d(m)||O();case 29:case"end":return e.stop()}var p}),e)})))},userUpdateInteractionState:b.userUpdateInteractionState,updateTimepointTime:function(e){var a=r.duration(),o=function(e){for(var r=n.visibleAt+1e3*e,a=e>0,o=0;o<t.timepoints.length;o++){var i=t.timepoints[o];r<i.visibleAt-1e3||r>i.visibleAt+1e3||(r=a?i.visibleAt+1001:i.visibleAt-1001,o=0)}return r}(e);if(!(o/1e3>a||o<0)){var i=n.visibleAt;un||(un=!0,b.updateTimepointState(n.id,{originalVisibleAt:i,hasChanges:!0})),f.moveTimepoint(o)}},saveTimepoint:function(){return cn(this,void 0,void 0,on().mark((function e(){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!M(n.id)){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,J.updateTimepoint(n);case 4:C(),j();case 6:case"end":return e.stop()}}),e)})))},clearTimepointTimeState:j,reOrderQuestions:function(e){return cn(this,void 0,void 0,on().mark((function t(){var r,a;return on().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0;case 1:if(!(r<e.length)){t.next=7;break}return t.next=4,J.saveInteraction(Object.assign(Object.assign({},e[r]),{order:r}));case 4:r++,t.next=1;break;case 7:a=n.interactions[v.interactionIndex],n.interactions=e,b.updateTimepointState(n.id,{interactionIndex:e.indexOf(a)});case 10:case"end":return t.stop()}}),t)})))}}},fn=n(1395),dn=n.n(fn);function pn(e){var t="".concat(e.className," ").concat(dn.a.iconButton);e.children?t+=" ".concat(dn.a.iconWithText):t+=" ".concat(dn.a.iconOnly);var n=a.a.createElement(Et.a,{svgName:e.svgName,className:dn.a.svg});return a.a.createElement(re.a,{className:t,onClick:e.onClick},n,e.children)}function mn(e){var t=e.isCreate,n=e.open,r=e.showTypeSelector;return!t||n?a.a.createElement(a.a.Fragment,null):a.a.createElement(pn,{className:"btn btn-outline-dark cv-add-question",onClick:r,svgName:xt.b.Plus},"Add question")}var hn=n(1312),vn=n(405),yn=n(1224);function gn(e){return a.a.createElement("div",{className:"my-5 text-center"},a.a.createElement("h2",{className:"h3"},"Select an interaction to get started"),a.a.createElement("p",{className:"mb-0"},"Choose a point in the video and add a question to interact and engage your students."),!(!e.supportSiteUrl||!e.currentUser)&&a.a.createElement("a",{href:vn.a.getArticle(e.supportSiteUrl.toString(),yn.a.MakeInteractive,e.currentUser.countryCode,"articles"),target:"_blank",className:"btn btn-link text-info"},"How do I make interactives?"))}function bn(e){var t=e.isCreate,n=e.interactive,r=e.interaction,o=e.portalNode,i=e.goToTimepoint,c=e.promptDelete,l=e.supportSiteUrl,u=e.currentUser;if(!o)return a.a.createElement(a.a.Fragment,null);var s=n.timepoints.reduce((function(e,t){return e+t.interactions.length}),0);return a.a.createElement(te.a,{node:o},s?a.a.createElement(a.a.Fragment,null,a.a.createElement("h2",{className:"h4 mt-3"},"Question List (",s,")"),a.a.createElement(hn.a,{interactive:n,maxHeight:300,goToTimepoint:i,selectedInteractionId:null==r?void 0:r.id,onClickDelete:t?c:void 0})):t?a.a.createElement(gn,{currentUser:u,supportSiteUrl:l}):a.a.createElement(a.a.Fragment,null))}var wn=n(1573);function En(e,t){if(t===u.InteractiveMode.Create)return function(e){return $e[e]}(e);if(t===u.InteractiveMode.View)return function(e){return zt[e]}(e);throw new Error("Cannot find components for the mode ".concat(t))}var xn=n(293);n(1396);function In(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sn(e,t)}(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 Sn(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}var kn=[ee.InteractionTypeId.MissingWord,ee.InteractionTypeId.MultipleChoice,ee.InteractionTypeId.TrueOrFalse,ee.InteractionTypeId.ShortAnswer,ee.InteractionTypeId.Image,ee.InteractionTypeId.Annotation];function On(e){var t=e.addInteraction,n=e.cancelTypeSelector,r=e.player,o=e.timepoint,i=e.open,c=e.isCreate,l=e.interaction,u=In(a.a.useState(Object(xn.a)(r.currentTime()||0)),2),f=u[0],d=u[1];return a.a.useEffect((function(){var e=function(){d(Object(xn.a)(r.currentTime()))};return r.on("timeupdate",e),function(){return r.off("timeupdate",e)}}),[]),l||!c?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:"d-flex align-items-center justify-content-center h-100"},a.a.createElement("div",{className:"cv-interactive-type-selector d-flex flex-wrap justify-content-center align-items-center"},a.a.createElement("div",{className:"text-center font-weight-bold w-100 text-body mb-3 cv-add-question-copy"},o?"Add another question at:":"Add a question at:"," ",f),kn.map((function(e,n){var r=s.a.getTypeInfo(e),o=r.name,i=r.bgClassName,c=r.Svg;return a.a.createElement(re.a,{key:n,className:"cv-type-selector rounded py-2 m-1 ".concat(i),onClick:function(){return t(e)}},a.a.createElement("span",{className:"cv-create-type-icon mb-1"},a.a.createElement(c,null)),a.a.createElement("div",{className:"d-flex align-items-center justify-content-center cv-interaction-type-name px-1"},o))})),(o||i)&&a.a.createElement("div",{className:"text-center w-100 mt-2 ".concat(o?"":"cv-adding-first-cancel")},a.a.createElement(re.a,{className:"btn btn-link",onClick:n},"Cancel"))))}function Cn(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nn(e,t)}(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 Nn(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 jn(e){var t=e.typeId,n=e.currentIndex,r=e.numberOfInteractions,o=e.changeIndex,i=e.player,c=Cn(a.a.useState(Object(xn.a)(i.currentTime()||0)),2),l=c[0],u=c[1];a.a.useEffect((function(){var e=function(){u(Object(xn.a)(i.currentTime()))};return i.on("timeupdate",e),function(){return i.off("timeupdate",e)}}),[]);var f=s.a.getTypeInfo(t),d=f.name,p=f.bgClassName,m=n<r-1;var h=n>0;return a.a.createElement("div",{className:"text-center d-flex justify-content-between align-items-center p-1 ".concat(p)},a.a.createElement(re.a,{onClick:function(){h&&o(n-1)},className:h?"":"invisible"},a.a.createElement(Et.a,{size:Et.b.Medium,svgName:xt.b.ChevronLeft})),a.a.createElement("div",null,a.a.createElement("div",{className:"h6 mb-0"},d),r>1&&a.a.createElement("div",null,n+1," of ",r," at ",l)),a.a.createElement(re.a,{onClick:function(){m&&o(n+1)},className:m?"":"invisible"},a.a.createElement(Et.a,{size:Et.b.Medium,svgName:xt.b.ChevronRight})))}n(1397);function Ln(e){var t=e.typeId,n=s.a.getTypeInfo(t),r=n.name,o=n.prompt,i=n.bgClassName,c=n.Svg;return a.a.createElement("div",{className:"text-center text-body d-flex justify-content-between align-items-center px-3 pt-3"},a.a.createElement("div",{className:"d-flex align-items-center"},a.a.createElement("span",{className:"cv-interaction-icon rounded my-1 text-white ".concat(i)},a.a.createElement(c,null)),a.a.createElement("span",{className:"text-left flex-grow-1"},a.a.createElement("div",{className:"h5 ".concat(o?"":"mb-0")},a.a.createElement("strong",null,r)),o&&a.a.createElement("div",{className:"h6 mb-0"},o))))}function Tn(e){var t=e.isCreate,n=e.interaction,r=e.player,o=e.changeIndex,i=e.timepointState,c=e.timepoint;return t?a.a.createElement(jn,{typeId:n.typeId,changeIndex:o,player:r,currentIndex:i.interactionIndex,numberOfInteractions:c.interactions.length}):a.a.createElement(Ln,{typeId:n.typeId})}var An=n(35);function Pn(e){var t=e.interaction,n=e.interactionState,a=e.onClickContinue,o=e.onClickSave,i=e.onClickCancel,c=e.onClickAddAnother,l=e.onClickDiscard,u=M(t.id),s=!!(null==n?void 0:n.hasChanges),f=!!(null==n?void 0:n.spinner);return r.createElement("div",{className:"cv-timpoint-button-container"},u?r.createElement(re.a,{className:"btn btn-link",onClick:i},"Cancel"):s?r.createElement(re.a,{className:"btn btn-link",onClick:l},"Discard"):r.createElement(re.a,{className:"btn btn-link",onClick:c},"Add another question"),f?r.createElement(re.a,{className:"btn btn-dark ml-2 cv-interactive-spinner",onClick:function(){}},r.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):u?s?r.createElement(re.a,{className:"btn btn-dark ml-2",onClick:o},"Save"):r.createElement(re.a,{className:"btn btn-dark ml-2 disabled",onClick:function(){}},"Save"):s?r.createElement(re.a,{className:"btn btn-dark ml-2",onClick:o},"Save"):r.createElement(pn,{className:"btn btn-dark ml-2",onClick:a,svgName:xt.b.Play},"Continue"))}function _n(e){var t=e.typeId,n=e.interactionState,a=e.onClickSkip,o=e.numberOfInteractions,i=e.currentIndex,c=e.changeIndex,l=!!(null==n?void 0:n.submitted),u=!!(null==n?void 0:n.hasChanges),s=!!(null==n?void 0:n.spinner),f=!!Qt(t),d=i<o-1;function p(){d&&c(i+1)}var m=i>0;function h(){u&&e.onClickSubmit()}return r.createElement("div",{className:"cv-timpoint-button-container flex-wrap"},!l&&f&&r.createElement(re.a,{className:"btn btn-link",onClick:a},"Come back later"),o>1&&i>0&&r.createElement(pn,{className:"btn btn-dark ml-2 ".concat(m?"":"disabled"),onClick:function(){m&&c(i-1)},svgName:xt.b.ChevronUp}),s?r.createElement(re.a,{className:"btn btn-dark ml-2 cv-interactive-spinner",onClick:function(){}},r.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):l||!f?1===o||i===o-1?r.createElement(pn,{className:"btn btn-dark ml-2",onClick:a,svgName:xt.b.Play},"Continue"):r.createElement(re.a,{className:"btn btn-dark ml-2 ".concat(d?"":"disabled"),onClick:p},"Next"):r.createElement(re.a,{className:"btn btn-dark ml-2 ".concat(u?"":"disabled"),onClick:h},"Save"))}function Fn(e){var t=e.isCreate,n=e.interaction,r=e.interactionState,o=e.continueInteractive,i=e.saveInteraction,c=e.cancel,l=e.addAnotherQuestion,u=e.discardChanges,s=e.submitInteractionAnswer,f=e.skip,d=e.changeIndex,p=e.timepoint,m=e.currentIndex;return a.a.createElement(a.a.Fragment,null,t?a.a.createElement(Pn,{interaction:n,interactionState:r,onClickContinue:o,onClickSave:i,onClickCancel:c,onClickAddAnother:l,onClickDiscard:function(){return u()}}):a.a.createElement(_n,{typeId:n.typeId,interactionState:r,onClickSubmit:s,onClickSkip:f,changeIndex:d,currentIndex:m,numberOfInteractions:p.interactions.length}))}var Rn=n(1129);function Un(e){var t=e.timepoint,n=e.interaction,r=e.promptDelete,o=e.optionsPortalNode,i=e.setView;if(!n)return a.a.createElement(a.a.Fragment,null);var c=[];if(c.push({label:"Move time point",onClick:function(){return i("move")}}),t.interactions.length>1){var l=M(n.id);c.push({label:"Re-order questions",onClick:function(){return i("reorder")},className:l?"disabled":""})}return c.push({label:"Delete",onClick:function(){return r(n.id)},className:"text-danger"}),a.a.createElement(te.a,{node:o},!!n&&a.a.createElement(Rn.a,{actions:c}))}n(1398),n(1399);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})(e)}function Dn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Dn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==Mn(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}function Gn(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qn(e,t)}(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 qn(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}var Bn=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},Vn=null,zn=0,Wn=1;function Hn(e){var t=e.timepoint,n=e.updateTimepointTime,r=e.saveTimepoint,o=e.back,i=e.clearTimepointTimeState,c=Gn(a.a.useState(Object(xn.a)(t.visibleAt/1e3)),2),l=c[0],u=c[1],s=Gn(a.a.useState(!1),2),f=s[0],d=s[1];function p(e){n(e*Wn),u(Object(xn.a)(t.visibleAt/1e3)),2===++zn?Wn=5:4===zn?Wn=20:6===zn?Wn=60:8===zn&&(Wn=120),Vn||(Vn=window.setInterval((function(){return p(e)}),200),window.addEventListener("mouseup",m))}function m(){window.removeEventListener("mouseup",m),window.clearInterval(Vn),Vn=null,zn=0,Wn=1}return a.a.useEffect((function(){return m}),[]),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"cv-timepoint flex-grow-1"},a.a.createElement("div",{className:"cv-timepoint-padding"},a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("label",{className:"cv-interaction-field-label mb-0"},"Move time point"),a.a.createElement("div",{className:"text-center mt-3"},a.a.createElement(re.a,{className:"cv-left-arrow d-inline-block cursor-pointer",onClick:function(){},onMouseDown:function(){return p(-1)},onKeyDown:function(e){e.stopPropagation(),13===e.keyCode&&0===zn&&p(-1)},onKeyUp:m}),a.a.createElement("input",{className:"form-control text-center d-inline-block cv-move-timepoint-input",value:l,onChange:function(){},onKeyDown:function(e){e.stopPropagation(),37===e.keyCode&&0===zn&&p(-1),39===e.keyCode&&0===zn&&p(1)},onKeyUp:m}),a.a.createElement(re.a,{className:"cv-right-arrow d-inline-block cursor-pointer",onClick:function(){},onMouseDown:function(){return p(1)},onKeyDown:function(e){e.stopPropagation(),13===e.keyCode&&0===zn&&p(1)},onKeyUp:m}))))),a.a.createElement("div",{className:"cv-timpoint-button-container"},a.a.createElement(re.a,{className:"btn btn-link",onClick:function(){i(!0),o()}},"Cancel"),f?a.a.createElement(re.a,{className:"btn btn-dark ml-2 cv-interactive-spinner",onClick:function(){}},a.a.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):a.a.createElement(re.a,{className:"btn btn-dark",onClick:function(){return Bn(this,void 0,void 0,Dn().mark((function e(){return Dn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.next=3,r();case 3:o();case 4:case"end":return e.stop()}}),e)})))}},"Save")))}var Yn=n(1105),Qn=n(1400),Kn=n.n(Qn),Xn=n(1205);function $n(e){return($n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Jn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==$n(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}function Zn(e){return function(e){if(Array.isArray(e))return nr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tr(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 er(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||tr(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 tr(e,t){if(e){if("string"==typeof e)return nr(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)?nr(e,t):void 0}}function nr(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}var rr=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))};var ar=Object(Yn.SortableElement)((function(e){var t=e.interaction,n=s.a.getTypeInfo(t.typeId).bgClassName;return a.a.createElement("div",{className:"py-2 text-left"},a.a.createElement("span",{className:Kn.a.dragIcon},a.a.createElement(Et.a,{size:Et.b.Small,svgName:xt.b.Handle})),a.a.createElement(Xn.a,{interaction:t,iconClassName:"".concat(Kn.a.type," ").concat(n),questionClassName:"".concat(Kn.a.name," clamp-1")}))})),or=Object(Yn.SortableContainer)((function(e){var t=e.interactions,n=function(){var e=a.a.useRef();function t(){document.body.style.cursor="",document.removeEventListener("mouseup",t),e.current&&(e.current.style.cursor="grab")}return{ref:e,style:{cursor:"grab"},onMouseDown:function(){document.body.style.cursor="grabbing",document.addEventListener("mouseup",t),e.current&&(e.current.style.cursor="grabbing")},onMouseUp:t}}();return a.a.createElement("div",Object.assign({tabIndex:0},n),t.map((function(e,t){return a.a.createElement(ar,{key:e.id,index:t,interaction:e})})))}));function ir(e){var t=er(a.a.useState(!1),2),n=t[0],r=t[1],o=er(a.a.useState(Zn(e.interactions)),2),i=o[0],c=o[1],l=er(a.a.useState(!1),2),u=l[0],s=l[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"cv-timepoint flex-grow-1"},a.a.createElement("div",{className:"cv-timepoint-padding"},a.a.createElement("div",{className:"cv-interactive-question"},a.a.createElement("label",{className:"cv-interaction-field-label mb-0"},"Re-order questions"),a.a.createElement("div",{className:"text-center mt-3"},a.a.createElement(or,{onSortEnd:function(e){var t=e.oldIndex,n=e.newIndex;t!==n&&(c(Zn(function(e,t,n){for(;t<0;)t+=e.length;for(;n<0;)n+=e.length;if(n>=e.length)for(var r=n-e.length+1;r--;)e.push(void 0);return e.splice(n,0,e.splice(t,1)[0]),e}(i,t,n))),s(!0))},interactions:i,helperClass:Kn.a.dragging,lockAxis:"y"}))))),a.a.createElement("div",{className:"cv-timpoint-button-container"},a.a.createElement(re.a,{className:"btn btn-link",onClick:function(){c(Zn(e.interactions)),s(!1),e.back()}},"Cancel"),n?a.a.createElement(re.a,{className:"btn btn-dark ml-2 cv-interactive-spinner",onClick:function(){}},a.a.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):a.a.createElement(re.a,{className:"btn btn-dark ".concat(u?"":"disabled"),onClick:function(){return rr(this,void 0,void 0,Jn().mark((function t(){return Jn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u){t.next=2;break}return t.abrupt("return");case 2:return r(!0),t.next=5,e.reOrderQuestions(i);case 5:r(!1),e.back();case 7:case"end":return t.stop()}}),t)})))}},"Save")))}var cr=n(99),lr=n(46);function ur(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sr(e,t)}(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 sr(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 fr(e){var t=e.isCreate,n=e.interaction,r=e.mode,o=e.immediateFeedback,i=e.interactionState,c=e.shouldFocus,l=e.delayFocus,u=e.open,s=e.timepoint,f=e.userUpdateInteractionState,d=e.submitInteractionAnswer,p=e.saveInteraction,m=a.a.useRef(),h=a.a.useRef(),v=Object(cr.a)(lr.a.XLDown),y=!t||v;function g(){return!!m.current&&(!!c&&!!u)}function b(){m.current&&(m.current.focus(),x(!0))}var w=ur(a.a.useState(!1),2),E=w[0],x=w[1];a.a.useEffect((function(){g()&&(E||(l&&y?window.setTimeout((function(){g()&&b()}),400):b()))}),[m.current,E]);var I=ur(a.a.useState("question"),2),S=I[0],k=I[1],O=a.a.useMemo((function(){return Object(te.c)()}),[]),C=n?En(n.typeId,r):null,N=o;return t||(N=N&&(null==i?void 0:i.submitted)),a.a.createElement(a.a.Fragment,null,a.a.createElement(Un,Object.assign({optionsPortalNode:O,setView:k},e)),a.a.createElement(wn.a,{style:{height:"100%"},ref:h},a.a.createElement(On,Object.assign({},e)),!!n&&a.a.createElement("div",{className:"d-flex flex-column h-100"},a.a.createElement(Tn,Object.assign({},e)),"question"===S&&a.a.createElement(a.a.Fragment,null,a.a.createElement("form",{className:"cv-timepoint flex-grow-1",tabIndex:-1,onSubmit:function(e){e.preventDefault(),t?p():d()}},a.a.createElement("div",{className:"cv-timepoint-padding"},a.a.createElement("div",{ref:m,tabIndex:0}),a.a.createElement(C,Object.assign({state:i,setState:f,recalculateScroll:function(){h.current.recalculate()},showFeedback:N,optionsPortalNode:O},e)))),a.a.createElement(Fn,Object.assign({},e))),"move"===S&&a.a.createElement(Hn,Object.assign({back:function(){return k("question")}},e)),"reorder"===S&&a.a.createElement(ir,Object.assign({back:function(){return k("question")},interactions:s.interactions},e)))))}n(1401);function dr(e){var t=e.open,n=e.nextInteraction,r=e.nextInteractionState,o=e.timepointState,i=e.interaction,c=e.delayFocus,l=n&&o.nextInteractionIndex<o.interactionIndex,u=n&&o.nextInteractionIndex>o.interactionIndex,s=u&&o.slideIn,f=l&&o.slideIn;return a.a.createElement("div",{className:"cv-interactive ".concat(t?"cv-open":"")},l&&a.a.createElement("div",{className:"cv-prev-interaction ".concat(o.slideIn?"cv-slide-in":"")},a.a.createElement(fr,Object.assign({},e,{currentIndex:o.nextInteractionIndex,interaction:n,interactionState:r}))),a.a.createElement("div",{className:"\n cv-main-slide\n ".concat(s?"cv-slide-out-up":"","\n ").concat(f?"cv-slide-out-down":"","\n ").concat(n?"cv-transitioning":"","\n ")},a.a.createElement(fr,Object.assign({key:null==i?void 0:i.id},e,{currentIndex:o.interactionIndex,shouldFocus:i&&!l&&!u,delayFocus:c}))),u&&a.a.createElement("div",{className:"cv-next-interaction ".concat(o.slideIn?"cv-slide-in":"")},a.a.createElement(fr,Object.assign({},e,{currentIndex:o.nextInteractionIndex,interaction:n,interactionState:r}))))}n(1402);function pr(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mr(e,t)}(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 mr(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 hr(e){var t=e.player,n=e.resultsService,r=e.interactive,o=e.setShowSummary,i=pr(a.a.useState(!1),2),c=i[0],l=i[1],u=e.player.activePlugins_.activityStatusPlugin,s=e.player.activePlugins_.favouritePlugin;function f(){t.currentTime()>r.timepoints[r.timepoints.length-1].visibleAt/1e3+1?l(!0):l(!1)}if(a.a.useEffect((function(){if(n)return t.on("timeupdate",f),function(){return t.off("timeupdate",f)}}),[]),!c)return null;var d="btn btn-outline-dark cv-show-summary";return s&&(d+=" cv-has-favourite-plugin"),u&&(d+=" cv-has-activity-status-plugin"),a.a.createElement(re.a,{className:d,onClick:function(){o(!0),t.pause(),t.hide()}},t.gradePassbackPlugin().enabled?"Submit answers":"View summary")}var vr=n(1403),yr=n.n(vr);function gr(e){var t=e.interactive,n=e.duration;return n?a.a.createElement(a.a.Fragment,null,t.timepoints.map((function(t,r){if(!t.interactions.length)return a.a.createElement(a.a.Fragment,null);var o=s.a.getTypeInfo(t.interactions[0].typeId).bgClassName,i=t.visibleAt/1e3/n*100;return a.a.createElement("span",{key:r,className:"".concat(yr.a.interaction," ").concat(o),style:{left:"".concat(i,"%")},onClick:function(n){return r=t.id,a=t.interactions[0].id,n.stopPropagation(),void e.goToTimepoint(r,a);var r,a}})}))):a.a.createElement(a.a.Fragment,null)}var br=n(163),wr=n(406),Er=n(1404),xr=n.n(Er);function Ir(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sr(e,t)}(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 Sr(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 kr(e){var t=e.duration,n=e.progress,r=e.player,o=Ir(a.a.useState(n.length),2)[1],i=[];if(n.length){var c=n[0];i.push(c),n.forEach((function(e,t){0!==t&&(c.end.time+1>e.start.time&&c.start.time<e.start.time?c.end=e.end:(c=e,i.push(c)))}))}return a.a.useEffect((function(){var e=function(){o(n.length)};return r.on("progressflush",e),function(){return r.off("progressflush",e)}}),[]),a.a.createElement(a.a.Fragment,null,i.map((function(e,n){var r=e.start.time/t*100,o=100*(1-e.end.time/t);return a.a.createElement("span",{key:n,className:xr.a.progress,style:{left:"".concat(r,"%"),right:"".concat(o,"%")}})})))}function Or(e){return ye.a.last(e.results)}function Cr(e,t){return ye.a.findWhere(null==t?void 0:t.attempts,{id:e})}var Nr,jr=n(1279),Lr=n.n(jr);function Tr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ar=function(){return a.a.createElement(a.a.Fragment,null)},Pr=(Tr(Nr={},ee.InteractionTypeId.Annotation,Ar),Tr(Nr,ee.InteractionTypeId.Image,Ar),Tr(Nr,ee.InteractionTypeId.MissingWord,(function(e){var t=e.interaction.data.sentence.replace(/{([^{}]*)}/g,(function(e,t){return"{".concat("cv-missing-word-").concat(t,"}")})).split(/{([^{}]*)}/g),n="p-2";return e.reportsStyling||(n+=" border rounded"),a.a.createElement("div",{className:n},t.map((function(t,n){if(!t.startsWith("cv-missing-word-"))return t;var r=t.replace("cv-missing-word-",""),o=e.interaction.actionableItems.find((function(e){return e.order.toString()===r}));if(o){var i=e.answers.find((function(e){return e.id==o.id}));if(i){if(!e.showFeedback)return a.a.createElement("strong",{key:n,className:"text-info"},i.text);var c=i.status===it.Correct;return a.a.createElement(a.a.Fragment,{key:n},!c&&a.a.createElement(a.a.Fragment,null,a.a.createElement("del",{className:"text-danger"},a.a.createElement("strong",null,i.text))," "),a.a.createElement("strong",{className:"text-success"},o.name))}}})))})),Tr(Nr,ee.InteractionTypeId.MultipleChoice,(function(e){var t,n,r,o,i="my-2";return e.reportsStyling&&(i+=" mx-2"),a.a.createElement("div",{className:i},a.a.createElement(Ct,{interaction:e.interaction,showFeedback:e.showFeedback,getSelectedAnswer:function(t){var n=e.answers.find((function(e){return e.id==t}));return null==n?void 0:n.text},imageApi:e.imageCdnUrl,userInitials:e.anonymisedUserName?wt.a.getInitialsFromFullName(e.anonymisedUserName):wt.a.getInitials(null===(t=e.user)||void 0===t?void 0:t.name,null===(n=e.user)||void 0===n?void 0:n.surname),userAvatar:e.anonymisedUserName?null:null===(o=null===(r=e.user)||void 0===r?void 0:r.avatar)||void 0===o?void 0:o.url,onlyShowSelectedAnswer:!e.showAvatar,size:"sm",unCheckedBackground:e.showFeedback?"":"".concat(Lr.a.uncheckedBackground," text-white")}))})),Tr(Nr,ee.InteractionTypeId.TrueOrFalse,(function(e){var t,n,r,o,i="justify-content-start";return e.reportsStyling&&(i="justify-content-center"),a.a.createElement("div",{className:"my-2"},a.a.createElement(Pt,{className:i,interaction:e.interaction,showFeedback:e.showFeedback,hideFeedbackIcons:!e.showAvatar,getSelectedAnswer:function(t){var n=e.answers.find((function(e){return e.id==t}));return null==n?void 0:n.text},imageApi:e.imageCdnUrl,userInitials:e.anonymisedUserName?wt.a.getInitialsFromFullName(e.anonymisedUserName):wt.a.getInitials(null===(t=e.user)||void 0===t?void 0:t.name,null===(n=e.user)||void 0===n?void 0:n.surname),userAvatar:e.anonymisedUserName?null:null===(o=null===(r=e.user)||void 0===r?void 0:r.avatar)||void 0===o?void 0:o.url,size:"sm",unCheckedBackground:e.showFeedback?"":"".concat(Lr.a.uncheckedBackground," text-white")}))})),Tr(Nr,ee.InteractionTypeId.ShortAnswer,(function(e){var t=ye.a.first(e.answers);if(!t)return a.a.createElement(a.a.Fragment,null);var n="rounded p-2 mb-2";return e.reportsStyling||(n+=" bg-info text-white"),a.a.createElement("div",{className:n},t.text)})),Nr),_r=n(8).a.encloseNamespace("interactives.responseTypes");function Fr(){return a.a.createElement("p",{className:"p-2"},a.a.createElement("em",null,_r("noResponse")))}function Rr(e){return a.a.createElement(a.a.Fragment,null,e.correctness===lt.a.Correct&&a.a.createElement("div",{className:"ml-2 text-success"},a.a.createElement(Et.a,{svgName:xt.b.Check})),e.correctness===lt.a.Incorrect&&a.a.createElement("div",{className:"ml-2 text-danger"},a.a.createElement(Et.a,{svgName:xt.b.Close})))}function Ur(e){return a.a.createElement("div",{className:"d-flex align-items-center justify-content-between"},a.a.createElement("strong",null,e.anonymisedUserName||wt.a.getFullName(e.studentResults.user)),a.a.createElement(Rr,{correctness:e.correctness}))}function Mr(e){return e.correctness!==lt.a.AwaitingMarking?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:"d-flex justify-content-end mt-1"},a.a.createElement("div",{className:"d-flex flex-column justify-content-end cursor-pointer\n ".concat(e.markedStatus===it.Correct?"text-success":"")},a.a.createElement(Et.a,{svgName:e.markedStatus===it.Correct?xt.b.CheckCircle:xt.b.CheckCircleOutline,onClick:function(){return e.markInteraction(e.studentAttempt.answers,it.Correct)}})),a.a.createElement("div",{className:"d-flex flex-column justify-content-end cursor-pointer\n ".concat(e.markedStatus===it.Incorrect?" text-danger":"")},a.a.createElement(Et.a,{svgName:e.markedStatus===it.Incorrect?xt.b.CrossCircleFilled:xt.b.CrossCircle,onClick:function(){return e.markInteraction(e.studentAttempt.answers,it.Incorrect)}})))}var Dr=n(1405),Gr=n.n(Dr);function qr(e){var t,n,r,o,i,c=Pr[e.interaction.typeId];if(!c)return a.a.createElement(a.a.Fragment,null);var l=Or(e.studentResults),u=Cr(e.interaction.id,l),s=yt.isInteractionCorrect(e.interaction,l);return a.a.createElement("div",{className:"rounded ".concat(null!==(t=e.className)&&void 0!==t?t:"")},a.a.createElement("div",{className:"d-flex"},!!e.showStudentDetails&&a.a.createElement("div",{className:"mr-2"},a.a.createElement("div",{className:Gr.a.avatarContainer},a.a.createElement(It.a,{imageCdnUrl:e.imageCdnUrl,initials:e.anonymisedUserName?wt.a.getInitialsFromFullName(e.anonymisedUserName):wt.a.getInitials(null===(n=e.studentResults.user)||void 0===n?void 0:n.name,null===(r=e.studentResults.user)||void 0===r?void 0:r.surname),imageUrl:e.anonymisedUserName?null:null===(i=null===(o=e.studentResults.user)||void 0===o?void 0:o.avatar)||void 0===i?void 0:i.url}))),a.a.createElement("div",{className:"flex-grow-1"},!!e.showStudentDetails&&a.a.createElement(Ur,{studentResults:e.studentResults,correctness:s,anonymisedUserName:e.anonymisedUserName}),a.a.createElement("div",{className:"d-flex justify-content-between"},a.a.createElement("div",{className:"flex-grow-1 ".concat(e.responseComponentClass?e.responseComponentClass:"")},u?a.a.createElement(c,{interaction:e.interaction,answers:u.answers,imageCdnUrl:e.imageCdnUrl,user:e.studentResults.user,showFeedback:e.showFeedback,showAvatar:e.showAvatar,reportsStyling:e.reportsStyling}):a.a.createElement(Fr,null)),!e.showStudentDetails&&a.a.createElement(Rr,{correctness:s})))),a.a.createElement(Mr,{studentAttempt:u,correctness:s,markInteraction:e.markInteraction,markedStatus:e.markedStatus}))}var Br=n(1406),Vr=n.n(Br);function zr(e){var t=e.studentResults,n=e.interaction,r=e.timepoint,o=e.interactive,i=e.state,c=e.goToTimepoint,l=e.interactionNumber,u=e.imageCdnUrl,s=Or(t),f=Cr(n.id,s),d=i.interactions[n.id],p=Xt(n.typeId)(d||{},n),m=n.typeId!==ee.InteractionTypeId.Annotation&&n.typeId!==ee.InteractionTypeId.Image,h=m;n.typeId===ee.InteractionTypeId.MissingWord&&f&&(h=!1);var v=n.data.suggestedResponse||n.data.feedback;return a.a.createElement("li",{className:"mb-3 position-relative"},a.a.createElement("div",{className:"d-flex flex-wrap mb-2 cursor-pointer",onClick:function(){return c(r.id,n.id)}},o.immediateFeedback&&a.a.createElement("div",{className:Vr.a.feedback},!!f&&(p===lt.a.AwaitingMarking?a.a.createElement("span",{className:"text-muted font-italic"},"Waiting to be marked"):p===lt.a.Correct?a.a.createElement("span",{className:"text-success"},"Correct ",a.a.createElement(Et.a,{className:"svg-container align-middle",svgName:xt.b.Check})):p===lt.a.Incorrect&&a.a.createElement("span",{className:"text-danger"},"Incorrect ",a.a.createElement(Et.a,{className:"svg-container align-middle",svgName:xt.b.Close})))),a.a.createElement(Xn.a,{interaction:n,iconClassName:"flex-shrink-0",showQuestion:h,showTypeName:!0,questionClassName:"d-block w-100 mt-2",questionNumber:l})),m&&!f&&a.a.createElement("button",{className:"btn btn-dark",onClick:function(){return c(r.id,n.id)}},"Answer question"),f&&m&&a.a.createElement(qr,{interaction:n,studentResults:t,markedStatus:it.PendingReview,markInteraction:function(){},imageCdnUrl:u,showFeedback:o.immediateFeedback,showAvatar:!0}),o.immediateFeedback&&f&&v&&a.a.createElement("div",{className:"bg-light rounded p-2"},a.a.createElement("div",null,a.a.createElement("strong",null,n.typeId===ee.InteractionTypeId.TrueOrFalse?"Teacher's feedback":"Teacher's suggested response")),v))}var Wr=n(1407),Hr=n.n(Wr);function Yr(e){return function(e){if(Array.isArray(e))return Xr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Kr(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 Qr(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||Kr(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 Kr(e,t){if(e){if("string"==typeof e)return Xr(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)?Xr(e,t):void 0}}function Xr(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 $r(e){var t=e.showSummary,n=e.setShowSummary,r=e.state,o=e.interactive,i=e.player,c=e.progress,l=e.portalNode,u=a.a.useRef(),s=Qr(a.a.useState(!1),2),f=s[0],d=s[1];function p(){n(!1),i.show(),i.play()}function m(t,n){p(),e.goToTimepoint(t,n)}if(!l||!t)return a.a.createElement(a.a.Fragment,null);var h=function(e){var t=e.interactive,n=e.state,r=0,a=0,o=0,i=!1,c=[];return t.timepoints.forEach((function(e){e.interactions.forEach((function(e){var t=n.interactions[e.id],l=Xt(e.typeId)(t||{},e);l===lt.a.Correct&&r++,l!==lt.a.NotApplicable&&a++,l!==lt.a.NotApplicable&&(null==t?void 0:t.submitted)&&o++,l===lt.a.AwaitingMarking&&(i=!0);var u=D(t||{}),s=Object.keys(u).map((function(e){var t;return{id:e,text:null===(t=u[e])||void 0===t?void 0:t.toString()}}));s.length&&c.push({id:e.id,answeredAt:1,answers:s})}))})),{correctCount:r,total:a,answered:o,studentAttempts:c,awaitingMarking:i}}({interactive:o,state:r}),v=h.correctCount,y=h.total,g=h.answered,b=h.studentAttempts,w=h.awaitingMarking,E={name:e.currentUser.givenName,username:e.currentUser.username,user:{name:e.currentUser.givenName,surname:e.currentUser.familyName,avatar:{url:e.currentUser.avatar}},results:[{id:o.id,attempts:b}]},x=0,I=i.ended(),S=i.duration();return a.a.createElement(te.a,{node:l},a.a.createElement("div",{className:"row pb-3"},a.a.createElement("div",{className:"col-4 col-xs-12"},a.a.createElement(wr.a,{data:i.poster(),imageType:Oe.c.Thumbnails,imageOptions:{size:Oe.b.Medium}})),a.a.createElement("div",{className:"col-8 col-xs-12"},a.a.createElement("span",{className:"float-right"},a.a.createElement(br.a,{svgName:xt.b.Play,className:"btn btn-outline-dark",onClick:function(){p(),i.ended()&&i.currentTime(0)}},I?"Play again":"Continue watching"),i.gradePassbackPlugin().enabled&&(f?a.a.createElement(re.a,{className:"btn btn-dark ml-2",onClick:function(){}},a.a.createElement(An.Spinner,{as:"span",animation:"border",role:"status",size:"sm"})):a.a.createElement(br.a,{svgName:xt.b.Check,className:"btn btn-dark ml-2",onClick:function(){d(!0),i.gradePassbackPlugin().submit(v/y,!w)}},"Submit"))),a.a.createElement("h1",{className:"h3"},e.title),a.a.createElement("p",null))),a.a.createElement("div",{className:"border rounder px-2 mb-3"},a.a.createElement("div",{className:"cursor-pointer my-4 ".concat(Hr.a.bar),onClick:function(e){if(u.current){var t=u.current.getBoundingClientRect(),n=(e.pageX-t.left)/t.width*S;p(),i.currentTime(n)}},ref:u},a.a.createElement(kr,{duration:S,progress:c,interactive:o,player:i}),a.a.createElement(gr,{duration:S,interactive:o,goToTimepoint:m}))),a.a.createElement("h2",{className:"h4"},"My Answers"),a.a.createElement("div",{className:"d-flex justify-content-between"},a.a.createElement("span",null,o.immediateFeedback&&a.a.createElement("div",null,"Score: ",v,"/",y),a.a.createElement("div",{className:"mb-3"},"You have answered ",a.a.createElement("strong",{className:g!==y?"text-danger":""},g)," of ",a.a.createElement("strong",null,y)," questions"))),a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-7 col-12"},a.a.createElement("ul",{className:"list-unstyled"},o.timepoints.reduce((function(t,n){return[].concat(Yr(t),Yr(n.interactions.map((function(t){return x++,a.a.createElement(zr,{key:t.id,studentResults:E,interaction:t,timepoint:n,interactive:o,state:r,goToTimepoint:m,interactionNumber:x,imageCdnUrl:e.imageCdnUrl})}))))}),[])))))}function Jr(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zr(e,t)}(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 Zr(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 ea(e){var t=e.resultsService,n=e.player,r=e.onShowSummary,o=Jr(a.a.useState(!1),2),i=o[0],c=o[1];function l(e){c(e),r&&r(e)}function u(){l(!0),n.hide()}return a.a.useEffect((function(){if(t)return n.on("ended",u),function(){return n.off("ended",u)}}),[]),a.a.useEffect((function(){i&&n.isFullscreen()&&n.exitFullscreen()}),[i]),a.a.createElement(a.a.Fragment,null,a.a.createElement(hr,Object.assign({setShowSummary:l},e)),a.a.createElement($r,Object.assign({showSummary:i,setShowSummary:l},e)))}n(1408);var ta=n(1116);function na(e){var t,n,r,o=(t=e.interactive,r=0,null===(n=null==t?void 0:t.timepoints)||void 0===n||n.forEach((function(e){var t;return null===(t=e.interactions)||void 0===t?void 0:t.forEach((function(){return r++}))})),r>0),i=[];return e.onClickEditDetails&&i.push({label:"Edit details",svgName:xt.b.Edit,button:!0,className:"btn btn-outline-dark",onClick:e.onClickEditDetails}),e.onClickPublish&&i.push({label:"Publish",button:!0,className:"btn btn-dark ml-2".concat(o?"":" disabled"),disabled:!o,tooltip:o?"":"Interactives cannot be published without questions",onClick:function(){if(!o)return;e.onClickPublish&&e.onClickPublish()}}),i.length?a.a.createElement(te.a,{node:e.portalNode},a.a.createElement(ta.a,{actions:i})):a.a.createElement(a.a.Fragment,null)}var ra=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function aa(e){var t=e.title,n=e.player,r=e.track,o=e.mode,i=e.interactive,c=e.imageApi,l=e.supportSiteUrl,s=e.actionsPortalNode,f=e.questionListPortalNode,d=e.summaryPortalNode,p=e.resultsService,m=e.currentUser,h=e.progress,v=e.latestSession,y=e.clipOffset,g=e.analyticsService,b=e.enableImmersiveReader,w=function(e){var t=e.player,n=e.track,r=e.interactive,o=e.clipOffset,i=_(a.a.useState(!1),2),c=i[0],l=i[1],u=_(a.a.useState(!1),2),s=u[0],f=u[1],d=_(a.a.useState(null),2),p=d[0],m=d[1];function h(e){return o?e+o:e}function v(e){f(!!e&&c),l(e)}function y(){var e=n.activeCues;if(!e.length)return v(!1),void m(null);var a=r.timepoints.find((function(t){return t.id.toString()===e[0].text.toString()}));if(!a)return v(!1),void m(null);a.shouldPause&&(t.seeking()?t.one("play",(function(){return t.pause()})):t.pause()),v(!0),m(a)}function g(e){for(var t=0;t<n.cues.length;t++){var r=n.cues[t];if(r.text.toString()===e.toString())return r}}return a.a.useEffect((function(){return n.addEventListener("cuechange",y),function(){return n.removeEventListener("cuechange",y)}})),{open:c,setOpen:v,wasOpen:s,timepoint:p,continueInteractive:function(){v(!1),t.play()},updateCue:function(e,t){var n=g(e);n.text=t.toString(),n.originalCue_.text=t.toString()},addCue:function(e){var r=t.currentTime();n.addCue({startTime:h(r)-.001,endTime:h(r+1),text:e}),n.trigger("cv:cuechange"),t.paused()&&n.trigger("cuechange")},removeCue:function(e){e=h(e);for(var t=0;t<n.cues.length;){var r=n.cues[t];if(r.startTime<=e&&r.endTime>=e){n.removeCue(r),n.trigger("cv:cuechange"),n.trigger("cuechange");break}t++}},moveTimepoint:function(e){var r=g(p.id);if(r){var a=e/1e3;r.startTime=h(a),r.endTime=h(a+1),t.currentTime(a+.5,!0),p.visibleAt=e,n.trigger("cv:cuechange")}},getClipOffset:h}}({player:n,track:r,interactive:i,mode:o,clipOffset:y}),E=w.open,x=w.timepoint,I=w.wasOpen,S=ra(w,["open","timepoint","wasOpen"]),k=sn(Object.assign({mode:o,interactive:i,timepoint:x,player:n,resultsService:p,latestSession:v,analyticsService:g},S)),O=k.interaction,C=k.interactionState,N=k.nextInteraction,j=k.nextInteractionState,L=k.timepointState,T=k.state,A=ra(k,["interaction","interactionState","nextInteraction","nextInteractionState","timepointState","state"]);!function(e){var t,n=e.mode,r=e.player,o=e.timepoint,i=e.interaction,c=e.discardChanges,l=e.interactionState,s=e.timepointState,f=Object(R.a)(),d=n===u.InteractiveMode.Create;a.a.useEffect((function(){if(d){if(M(null==i?void 0:i.id)||(null==l?void 0:l.hasChanges)||(null==s?void 0:s.hasChanges))return f.lock({id:"interactive",title:"Are you sure you want to leave?",text:"Your interactive still has unsaved changes"}),void r.lock((function(e){c(e)}));r.unlock(),f.unlock("interactive")}}),[i,null==l?void 0:l.hasChanges,null===(t=null==o?void 0:o.interactions)||void 0===t?void 0:t.length,null==s?void 0:s.hasChanges])}({mode:o,player:n,timepoint:x,interaction:O,discardChanges:A.discardChanges,interactionState:C,timepointState:L});var F={mode:o,open:E,isCreate:o===P.a.Create,interaction:O,nextInteraction:N,timepoint:x,interactive:i,interactionState:C,nextInteractionState:j,timepointState:L,player:n};return a.a.createElement(a.a.Fragment,null,!!s&&a.a.createElement(na,{interactive:i,onClickEditDetails:e.onClickEditDetails,onClickPublish:e.onClickPublish,portalNode:s}),a.a.createElement(mn,Object.assign({},F,A)),a.a.createElement(dr,Object.assign({imageApi:c,currentUser:m,immediateFeedback:i.immediateFeedback,delayFocus:!I,enableImmersiveReader:b},F,A,S)),a.a.createElement(ea,Object.assign({title:t,currentUser:m,state:T,portalNode:d,progress:h,resultsService:p,imageCdnUrl:c.toString(),onShowSummary:e.onShowSummary},F,A)),a.a.createElement(bn,Object.assign({portalNode:f,supportSiteUrl:l,currentUser:m},F,A)))}c.a.registerComponent("Interactive",Object(A.a)((function(e,t){return a.a.createElement(aa,Object.assign({player:e},t))})));var oa=n(278),ia=n(283);function ca(e){var t=e.player;function n(){var e=t.getChild("ContinueSession");t.removeChild(e),e.dispose()}function r(){e.continue(!0),n()}var o=[{buttonText:"Start again",variant:"link",onClick:function(){e.continue(!1),n()}},{buttonText:"Continue",variant:"dark",onClick:r}];return a.a.createElement(oa.a,{title:"Continue interactive?",closePopup:r},a.a.createElement("p",null,"It looks like you've already started this interactive. Would you like to continue your attempt or start a new one?"),a.a.createElement(ia.a,{buttons:o}))}function la(e){return(la="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 ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sa(e,t){return(sa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pa(e);if(t){var a=pa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return da(this,n)}}function da(e,t){if(t&&("object"===la(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)}function pa(e){return(pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}c.a.registerComponent("ContinueSession",Object(A.a)((function(e,t){return a.a.createElement(ca,Object.assign({player:e},t))})));var ma=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sa(e,t)}(o,e);var t,n,r,a=fa(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,e)).enabled=!1,t.player.ready((function(){return t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){this.onReceiveMessage=this.onReceiveMessage.bind(this),window.addEventListener("message",this.onReceiveMessage,!1),window.parent.postMessage(JSON.stringify({type:"cv-app-loaded"}),"*")}},{key:"dispose",value:function(){window.removeEventListener("message",this.onReceiveMessage)}},{key:"onReceiveMessage",value:function(e){var t={};try{t=JSON.parse(e.data)}catch(e){return}"enable-grade-passback"===t.type&&(this.enabled=!0,window.removeEventListener("message",this.onReceiveMessage))}},{key:"submit",value:function(e,t){var n={type:"cv-lms-submit-score",data:{score:e,fullyGraded:t}};window.parent.postMessage(JSON.stringify(n),"*")}}])&&ua(t.prototype,n),r&&ua(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(c.a.getPlugin("plugin"));c.a.registerPlugin("gradePassbackPlugin",ma);n(1409);function ha(e){return(ha="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 va(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ya(e,t){return(ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ga(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wa(e);if(t){var a=wa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ba(this,n)}}function ba(e,t){if(t&&("object"===ha(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)}function wa(e){return(wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ea=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ya(e,t)}(o,e);var t,n,r,a=ga(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=a.call(this,e)).continueSession=!1,n.options=t,e.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){var e=this;this.player.gradePassbackPlugin(),l.a.useTrack(this.player,"metadata","interactive",this.onTrackLoaded.bind(this)),this.player.addClass("cv-interactive-plugin"),this.options.resultsService&&!this.options.latestSession&&(this.startSession=this.startSession.bind(this),this.player.one("play",this.startSession),this.on("dispose",(function(){e.player.off("play",e.startSession)})))}},{key:"startSession",value:function(){var e,t=null===(e=this.options.latestSession)||void 0===e?void 0:e.resultId;this.continueSession||(t=null),this.options.resultsService.start(t)}},{key:"onTrackLoaded",value:function(e){var t=this;this.options.resultsService&&this.options.latestSession?(this.player.pause(),this.player.addChild("ContinueSession",{continue:function(n){t.options.analyticsService.logUserAction({},{actionType:nt.UserAction.Click,entity:nt.EntityType.Interactive,descriptor:n?nt.InteractiveSessionDescriptor.ContinueSession:nt.InteractiveSessionDescriptor.NewSession}),t.continueSession=n,t.startSession(),t.addChildren(e),t.player.play()}})):this.addChildren(e)}},{key:"addChildren",value:function(e){this.player.addChild("Interactive",Object.assign(Object.assign({},this.options),{track:e,mode:this.options.mode||u.InteractiveMode.View,latestSession:this.continueSession&&this.options.latestSession})),this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new T(this.player,{interactive:this.options.interactive,track:e}))}}])&&va(t.prototype,n),r&&va(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(c.a.getPlugin("plugin"));c.a.registerPlugin("viewInteractivePlugin",Ea);var xa=n(134);function Ia(e){return(Ia="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 Sa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ka(e,t){return(ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Oa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Na(e);if(t){var a=Na(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ca(this,n)}}function Ca(e,t){if(t&&("object"===Ia(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)}function Na(e){return(Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ja=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ka(e,t)}(o,e);var t,n,r,a=Oa(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),a.call(this,"Could not connect to submit interactive results")}return t=o,(n=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:"Connection issues",text:"There seems to be an issue with your internet connection. Refresh the page to try again. ",buttons:[{text:"Refresh",className:"btn btn-dark",success:!0}]}}},{key:"onDone",value:function(){window.location.reload()}}])&&Sa(t.prototype,n),r&&Sa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(n(124).a);function La(e){return(La="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 Ta(e){return function(e){if(Array.isArray(e))return Aa(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)return;if("string"==typeof e)return Aa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Aa(e,t)}(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 Aa(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 Pa(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Pa=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==La(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}function _a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Fa=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},Ra=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cache=[],this.retryCount=0,this.options=t,this.connection=(new xa.a).withUrl("".concat(t.playerApi.origin,"/hubs/interactives"),{withCredentials:!1}).configureLogging(xa.c.Error).withAutomaticReconnect([0,2e3,1e4,3e4]).build(),this.connection.onreconnecting((function(){n.log("reconnecting"),n.isConnected=!1})),this.connection.onreconnected((function(){n.log("reconnected"),n.isConnected=!0,n.flush()})),this.connection.onclose((function(){n.log("connection closed"),n.isConnected=!1,n.reconnect()})),this.save=this.save.bind(this)}var t,n,r;return t=e,(n=[{key:"start",value:function(e){var t=this;this.isConnected||(e&&(this.resultId=e),this.log("starting"),this.connection.start().then((function(){return Fa(t,void 0,void 0,Pa().mark((function e(){return Pa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.log("connected"),this.retryCount=0,this.isConnected=!0,e.next=5,this.startSession();case 5:this.flush();case 6:case"end":return e.stop()}}),e,this)})))})).catch((function(){t.reconnect()})))}},{key:"stop",value:function(){return Fa(this,void 0,void 0,Pa().mark((function e(){return Pa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.flush();case 2:this.connection.stop();case 3:case"end":return e.stop()}}),e,this)})))}},{key:"log",value:function(){}},{key:"reconnect",value:function(){this.retryCount>=5?o.a.ErrorHelper.throw(new ja):(this.retryCount++,this.start())}},{key:"startSession",value:function(){return Fa(this,void 0,void 0,Pa().mark((function e(){var t,n,r,a,i,c,l;return Pa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.resultId){e.next=2;break}return e.abrupt("return");case 2:return t=this.options,n=t.interactiveId,r=t.mediaId,a=t.userId,i=t.customerId,c=t.shareId,e.prev=3,e.next=6,this.connection.invoke("startSession",n,r,a,i,c);case 6:l=e.sent,this.resultId=l.resultId,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),o.a.ErrorHelper.throw(new ja);case 13:case"end":return e.stop()}}),e,this,[[3,10]])})))}},{key:"flush",value:function(){return Fa(this,void 0,void 0,Pa().mark((function e(){var t=this;return Pa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isConnected&&this.resultId){e.next=2;break}return e.abrupt("return");case 2:if(this.cache.length){e.next=4;break}return e.abrupt("return");case 4:Ta(this.cache).forEach((function(e){return Fa(t,void 0,void 0,Pa().mark((function t(){return Pa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.connection.invoke("saveActions",this.resultId,e.interactionId,e.results);case 3:this.cache.splice(this.cache.indexOf(e),1),this.log("Saved result",e),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error("Failed to save results",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})))}));case 5:case"end":return e.stop()}}),e,this)})))}},{key:"save",value:function(e,t){return Fa(this,void 0,void 0,Pa().mark((function n(){var r;return Pa().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.resultId){n.next=2;break}throw new Error("Session has not started");case 2:return r=t.map((function(e){return{actionableItemId:+e.actionableItemId,value:e.value}})),this.cache.push({interactionId:e,results:r}),n.next=6,this.flush();case 6:case"end":return n.stop()}}),n,this)})))}}])&&_a(t.prototype,n),r&&_a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ua=function(e,t){var n,r=e.addTextTrack("metadata","interactive"),a=t.additionalData.interactive,o=null===(n=t.additionalData.clipData)||void 0===n?void 0:n.startTime;return a.timepoints.forEach((function(e){var t,n=e.visibleAt/1e3,a=e.visibleFor?n+e.visibleFor/1e3:n+1;o&&(n+=o,a+=o),(null===(t=e.interactions)||void 0===t?void 0:t.length)&&r.addCue({startTime:n-.001,endTime:a,text:e.id})})),r},Ma=n(423);function Da(e){return(Da="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 Ga(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ga=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.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 a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return k()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=w(i,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var s={};function f(){}function d(){}function p(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,a)&&(m=v);var y=p.prototype=f.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==Da(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,c(y,"constructor",p),c(p,"constructor",d),d.displayName=c(p,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(y),c(y,i,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},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),s},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),x(n),s}},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 a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}function qa(e){return function(e){if(Array.isArray(e))return Ba(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)return;if("string"==typeof e)return Ba(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ba(e,t)}(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 Ba(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 Va(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function za(){return(za="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Wa(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}}).apply(this,arguments)}function Wa(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ka(e)););return e}function Ha(e,t){return(Ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ya(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ka(e);if(t){var a=Ka(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Qa(this,n)}}function Qa(e,t){if(t&&("object"===Da(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)}function Ka(e){return(Ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xa=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},$a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ha(e,t)}(c,e);var t,n,r,a=Ya(c);function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this,e,t)).totalProgress=[],G.a.setToken("gateway",n.options.authToken),n.player.one("dispose",(function(){n.resultsService&&n.resultsService.stop()})),n.options.mode===u.InteractiveMode.Create&&n.player.addClass("cv-create-interactives"),n}return t=c,(n=[{key:"getPlayerOptions",value:function(){var e=za(Ka(c.prototype),"getPlayerOptions",this).call(this);return e.setMaxHeight=!1,this.options.embed||(e.aspectRatio="16:9"),e}},{key:"onFlushProgress",value:function(e){var t;za(Ka(c.prototype),"onFlushProgress",this).call(this,e),this.options.mode!==u.InteractiveMode.Create&&(t=this.totalProgress).push.apply(t,qa(e))}},{key:"additionalSetup",value:function(e){var t=this,n=Object.create(null,{additionalSetup:{get:function(){return za(Ka(c.prototype),"additionalSetup",t)}}});return Xa(this,void 0,void 0,Ga().mark((function t(){var r=this;return Ga().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.additionalSetup.call(this,e),this.setupUpClipPlugin(e),this.analyticsService?this.setupViewInteractivePlugin(e):this.one("config:loaded",(function(){return r.setupViewInteractivePlugin(e)}));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"setupUpClipPlugin",value:function(e){var t;if(null===(t=null==e?void 0:e.additionalData)||void 0===t?void 0:t.clipData){var n=e.additionalData.clipData;this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime})}}},{key:"setupViewInteractivePlugin",value:function(e){var t;this.track=Ua(this.player,e);var n=e.additionalData.interactive,r=null===(t=e.additionalData.clipData)||void 0===t?void 0:t.startTime;this.options.collectResults&&(this.options.currentUser||o.a.ErrorHelper.throw(new i.a("Must provide a currentUser in order to collect interactive results")),this.options.shareId||o.a.ErrorHelper.throw(new i.a("Must provide a shareId in order to collect interactive results")),this.resultsService=new Ra({interactiveId:n.id,mediaId:e.mediaId,userId:this.options.currentUser.id,customerId:this.options.currentUser.customerId,playerApi:this.options.playerApi,shareId:this.options.shareId})),this.player.viewInteractivePlugin({interactive:n,title:e.title,mode:this.options.mode,imageApi:this.options.imageApi,supportSiteUrl:this.options.supportSiteUrl,resultsService:this.resultsService,actionsPortalNode:this.options.actionsPortalNode,questionListPortalNode:this.options.questionListPortalNode,summaryPortalNode:this.options.summaryPortalNode,currentUser:this.options.currentUser,latestSession:e.additionalData.latestSession,progress:this.totalProgress,clipOffset:r,analyticsService:this.analyticsService,enableImmersiveReader:this.options.enableImmersiveReader,onShowSummary:this.options.onShowSummary,onClickEditDetails:this.options.onClickEditDetails,onClickPublish:this.options.onClickPublish})}},{key:"getAdditionalAnalyticsData",value:function(e){var t,n,r,a;return(null===(n=null===(t=e.additionalData)||void 0===t?void 0:t.clipData)||void 0===n?void 0:n.clipId)?{clip:{id:null===(a=null===(r=e.additionalData)||void 0===r?void 0:r.clipData)||void 0===a?void 0:a.clipId}}:{}}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}},{key:"getAnalyticsPlayerType",value:function(){return"interactive-player"}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"setActivityStatus",value:function(e,t){this.player.activityStatusPlugin().setActivityStatus(e,t)}}])&&Va(t.prototype,n),r&&Va(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(Ma.a);n.d(t,"a",(function(){return Za}));var Ja=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function Za(e){var t=e.onReady,n=e.className,r=Ja(e,["onReady","className"]),o=a.a.useRef();return a.a.useEffect((function(){var e=new $a(o.current,r);return t&&e.ready((function(){t(e)})),function(){e.dispose()}}),[]),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{ref:o,className:n}),a.a.createElement("div",{id:"popup-region"}))}},1312:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(0),a=n.n(r),o=n(286),i=n(1187),c=n(136),l=n(64),u=n(21),s=n(45),f=n(1156),d=n(1205),p=n(1313),m=n.n(p),h="shared.interactiveQuestions";function v(e){var t=e.interaction;switch((0,e.getCorrectness)(t)){case f.a.Correct:return a.a.createElement("span",{className:"text-success"},a.a.createElement(l.a,{size:l.b.Medium,svgName:u.b.Check}));case f.a.Incorrect:return a.a.createElement("span",{className:"text-danger"},a.a.createElement(l.a,{size:l.b.Medium,svgName:u.b.Close}));case f.a.AwaitingMarking:return a.a.createElement("span",{className:"text-muted italic"},a.a.createElement("i",null,a.a.createElement(s.b,{namespace:h,phrase:"pending"})));case f.a.UnAnswered:return a.a.createElement("button",{className:"btn btn-outline-dark"},a.a.createElement(s.b,{namespace:h,phrase:"answer"}));case f.a.Answered:return a.a.createElement("span",{className:"text-muted italic"},a.a.createElement("i",null,a.a.createElement(s.b,{namespace:h,phrase:"answered"})));case f.a.NotApplicable:return a.a.createElement(a.a.Fragment,null)}}function y(e){var t=e.interaction,n=e.visibleAt,r=e.selectedInteractionId,o=e.goToTimepoint,s=e.scrollTo,f=e.isFirstInteraction,p=t.id.toString()===(null==r?void 0:r.toString()),h=a.a.useRef();a.a.useEffect((function(){if(p&&h.current){var e=h.current,t=e.getBoundingClientRect(),n=t.top-e.offsetParent.getBoundingClientRect().top;s(n,t.height)}}),[p]);var y=o?"cursor-pointer":"cursor-default";return a.a.createElement("div",{ref:h},a.a.createElement(c.a,{className:"py-2 ".concat(y," ").concat(m.a.row," ").concat(p?m.a.selected:""),onClick:p?function(){}:function(){o&&o(t.id)}},a.a.createElement("span",{className:"".concat(m.a.time," mr-2 ").concat(p?"font-weight-bold":"")},f?i.a.ToDisplayDuration(n):""),a.a.createElement(d.a,{interaction:t,showTypeName:!0,typeNameClassName:m.a.type,questionClassName:m.a.question}),e.onClickDelete&&a.a.createElement(c.a,{onClick:function(n){n.stopPropagation(),e.onClickDelete(t.id)},className:"".concat(m.a.deleteContainer)},a.a.createElement("span",{className:"text-right ".concat(m.a.delete)},a.a.createElement(l.a,{size:l.b.Medium,svgName:u.b.Delete}))),e.getCorrectness&&a.a.createElement("span",{className:"text-right ".concat(m.a.correctness)},a.a.createElement(v,{interaction:t,getCorrectness:e.getCorrectness}))))}function g(e){var t=e.timepoint,n=e.scrollTo,r=e.onClickDelete,o=e.selectedInteractionId,i=e.getCorrectness;function c(n){e.goToTimepoint&&e.goToTimepoint(t.id,n)}return t.interactions?a.a.createElement("div",null,t.interactions.map((function(e,l){return a.a.createElement(y,{interaction:e,visibleAt:t.visibleAt,goToTimepoint:c,onClickDelete:r,scrollTo:n,selectedInteractionId:o,isFirstInteraction:0===l,getCorrectness:i,key:l})}))):a.a.createElement(a.a.Fragment,null)}function b(e){var t=e.interactive,n=e.goToTimepoint,r=e.selectedInteractionId,i=e.maxHeight,c=e.onClickDelete,l=e.getCorrectness,u=a.a.useRef();function s(e,t){if(u.current){var n=u.current.getClientHeight(),r=u.current.getScrollTop(),a=e+r;(a<r||a+t>r+n)&&u.current.scrollTop(a-n/2+t/2)}}var f=n?"border rounded":"";return a.a.createElement(o.Scrollbars,{autoHeight:!0,autoHeightMax:i,className:f,hideTracksWhenNotNeeded:!0,ref:u},a.a.createElement("div",{className:"px-3 py-1"},t.timepoints.map((function(e,t){return a.a.createElement(g,{key:t,timepoint:e,goToTimepoint:n,selectedInteractionId:r,scrollTo:s,onClickDelete:c,getCorrectness:l})}))))}},1313:function(e,t,n){e.exports={time:"_3B2vs",type:"_3lYII",question:"_3WHlt",deleteContainer:"Dqlwr",delete:"_4TtZ",correctness:"_3G9s-",selected:"_20LzY",row:"_3uCfp"}},1314:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),a=n.n(r),o=n(1410),i=n.n(o);function c(e){var t=e.isEdit;return a.a.createElement("div",{className:"px-3 w-100 ".concat(t?i.a.edit:"")},t?a.a.createElement("div",{className:"d-flex justify-content-between align-items-center mb-3"},a.a.createElement("div",{className:"partial-loading-background ".concat(i.a.heading)}),a.a.createElement("div",null,a.a.createElement("div",{className:"partial-loading-background d-inline-block ".concat(i.a.button)}),a.a.createElement("div",{className:"partial-loading-background d-inline-block ml-2 ".concat(i.a.button)}))):a.a.createElement("div",{className:"partial-loading-background ".concat(i.a.notice)}),a.a.createElement("div",{className:"partial-loading-background mb-3 ".concat(i.a.video)},a.a.createElement("div",{className:"partial-loading-background ".concat(i.a.questions)})),a.a.createElement("div",{className:"partial-loading-background mb-3 ".concat(i.a.heading)}),a.a.createElement("div",null,Array(5).fill(null).map((function(e,t){return a.a.createElement("div",{key:t,className:"partial-loading-background my-2 ".concat(i.a.interaction)})}))))}},1381:function(e,t,n){},1382:function(e,t,n){},1383:function(e,t,n){},1384:function(e,t,n){},1389:function(e,t,n){},1390:function(e,t,n){},1391:function(e,t,n){},1392:function(e,t,n){e.exports={incorrect:"_3pK3B",answer:"_2ItYx",avatarContainer:"_3DkKy"}},1393:function(e,t,n){},1394:function(e,t,n){e.exports={feedback:"_2hJr3",avatarContainer:"_2Ukg-",avatarContainerSmall:"_1E7DW",incorrect:"xbaUc"}},1395:function(e,t,n){e.exports={svg:"_17Ny-",iconButton:"x1ePL",iconWithText:"_2BmJR",iconOnly:"_2DnLq"}},1396:function(e,t,n){},1397:function(e,t,n){},1398:function(e,t,n){},1399:function(e,t,n){},1400:function(e,t,n){e.exports={type:"_3N9_3",dragIcon:"_1GfpD",name:"_3s8vL",dragging:"_1qnqN"}},1401:function(e,t,n){},1402:function(e,t,n){},1403:function(e,t,n){e.exports={interaction:"_3SUOU"}},1404:function(e,t,n){e.exports={progress:"_1myQT"}},1405:function(e,t,n){e.exports={avatarContainer:"_27TEu"}},1406:function(e,t,n){e.exports={feedback:"F7uFH"}},1407:function(e,t,n){e.exports={bar:"_2pc-n"}},1408:function(e,t,n){},1409:function(e,t,n){},1410:function(e,t,n){e.exports={video:"_3LBoh",notice:"_3Ebra",heading:"_3dAbk",interaction:"_2rGzr",button:"_21cTi",edit:"_28OGp",questions:"_1SVHi"}},1541:function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(0),a=n(247),o=n(8),i=n(282),c=n(51),l=n(1),u=n(57),s=n(1225),f=n(1164),d=n(45),p=n(1182),m=n(1116),h=n(137),v=n(288),y=n(47),g=n(1280),b=n(6),w=n(2),E=n(417),x=n(1157),I=n(210),S=n(395),k=n(1215),O=n(1314),C=n(1211),N=n(1212),j=n(1208),L=n(403),T=n(1137);function A(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(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 P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _="interactives.previewInteractive",F=o.a.encloseNamespace(_);function R(e){var t,n,o,P,R,U=e.shareId?l.LocationContext.PreviewSharedInteractive:l.LocationContext.PreviewInteractive,M=A(r.useState(!1),2),D=M[0],G=M[1],q=r.useRef(),B=r.useMemo((function(){return Object(a.c)()}),[]),V=r.useRef(),z=Object(x.b)(x.a.PlayPage),W=Object(N.a)(e.interactive,e.currentUser,e.queryParams.context,e.queryParams.contextId),H=v.a.isFavouritedByCurrentUser(e.interactive),Y=Object(S.a)(U),Q=Y.setFavourite,K=Y.canFavourite;Object(i.a)(e.interactive.name),Object(k.a)(e.interactive,e.queryParams),Object(I.c)(q.current,K(e.interactive),H,(function(){Q(e.interactive,!H,null)})),Object(j.a)(),Object(T.a)(null!==(t=W.videos)&&void 0!==t?t:[],{hasCurriculumLinks:!0});var X,$,J,Z,ee=(X=e.interactive).clip||X.video;y.a.isClip(ee)?($=null===(o=null===(n=ee.interactives)||void 0===n?void 0:n.data)||void 0===o?void 0:o.filter((function(t){return t.id.toString()!==e.interactive.id.toString()})),J=ee.name,Z={application:w.a.DEFAULT,action:b.a.Default.PLAY_CLIP,args:[ee.id,c.a.slugify(ee.name)]}):($=null===(R=null===(P=ee.interactives)||void 0===P?void 0:P.data)||void 0===R?void 0:R.filter((function(t){return t.id.toString()!==e.interactive.id.toString()})),J=ee.name,Z={application:w.a.DEFAULT,action:b.a.Default.PLAY_VIDEO,args:[ee.id,c.a.slugify(ee.name)]});var te=e.interactive.status===h.a.Draft;return r.createElement(d.a.Provider,{value:_},!D&&r.createElement(O.a,{isEdit:!0}),r.createElement("div",{className:"px-3 ".concat(D?"":"d-none")},r.createElement("div",{className:"alert alert-info",role:"alert"},r.createElement(d.b,{phrase:"alert"})),r.createElement("div",{className:"mb-3"},r.createElement(g.a,{viewKey:e.viewKey,imageApi:new URL(e.config.imageCdnUrl),playerApi:new URL(e.config.playerApiUrl),supportSiteUrl:new URL(e.config.supportSiteUrl),hotkeyElQuerySelector:"body",autoplay:!0,onReady:function(t){q.current=t,G(!0),V.current=new E.a({player:t,video:e.interactive,analyticsLocation:U,shareId:e.shareId})},currentUser:e.currentUser,questionListPortalNode:B,enableImmersiveReader:!0})),r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("div",null,r.createElement("h1",{className:"h3 d-inline-block m-0 mb-2"},te&&r.createElement("span",{className:"badge badge-secondary mr-2 align-bottom"},"Draft"),e.interactive.name),r.createElement("div",{className:"mb-1 mr-3 clamp-1"},r.createElement(d.b,{phrase:"backTo"}),": ",r.createElement(u.a,{appLink:Z,className:"text-info"},J))),r.createElement(m.a,{actions:z(e.interactive),actionsDropdownClassName:"btn btn-outline-dark"})),e.interactive.description&&r.createElement("p",null,e.interactive.description),r.createElement("div",{className:"mb-3"},r.createElement(a.b,{node:B})),!!(null==$?void 0:$.length)&&r.createElement("div",{className:"mx-n1"},r.createElement(f.a,{name:F("otherInteractives",{count:$.length}),contents:p.a.Interactives,collection:$,prefetched:!0,getChildAppLink:function(e){return{application:w.a.INTERACTIVES,action:b.a.Interactives.VIEW_INTERACTIVE,args:[e.id,c.a.slugify(e.name)]}},childComponent:s.a,extraChildComponentProps:{video:ee,questionsAppLink:{application:w.a.INTERACTIVES,action:b.a.Interactives.PREVIEW_QUESTIONS}},analyticsData:{widgetId:"interactives"}})),r.createElement(C.a,{currentVideo:e.interactive,setFavourite:Q,currentUser:e.currentUser,relatedVideos:W,getVideoAppLink:function(t){return L.a.getAppLink(t,{context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId})}})))}},1552:function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var r=n(0),a=n.n(r),o=n(247),i=n(282),c=n(288),l=n(144),u=n(1),s=n(1280),f=n(417),d=n(210),p=n(395),m=n(430),h=n(1215),v=n(1211),y=n(1212),g=n(1208),b=n(403),w=n(1137);function E(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)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(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 x(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 I(e){var t,n=e.shareId?u.LocationContext.PlaySharedInteractive:u.LocationContext.PlayInteractive,r=E(a.a.useState(),2),x=r[0],I=r[1],S=E(a.a.useState(!0),2),k=S[0],O=S[1],C=a.a.useRef(),N=Object(y.a)(e.interactive,e.currentUser,e.queryParams.context,e.queryParams.contextId),j=a.a.useMemo((function(){return Object(o.c)()}),[]),L=c.a.isFavouritedByCurrentUser(e.interactive),T=Object(p.a)(n),A=T.setFavourite,P=T.canFavourite,_=Object(m.a)(n);return Object(d.c)(x,P(e.interactive),L,(function(){A(e.interactive,!L,null)})),Object(d.b)(x,e.activityStatus,e.currentUser,(function(){var t=e.activityStatus===l.a.Complete?l.a.Incomplete:l.a.Complete;_(e.shareId,e.interactive,t)})),Object(i.a)(e.interactive.name),Object(h.a)(e.interactive,e.queryParams),Object(g.a)(),Object(w.a)(null!==(t=N.videos)&&void 0!==t?t:[],{hasCurriculumLinks:!0}),a.a.createElement("div",{className:"px-3"},a.a.createElement("div",{className:"mb-3"},a.a.createElement(s.a,{viewKey:e.viewKey,imageApi:new URL(e.config.imageCdnUrl),playerApi:new URL(e.config.playerApiUrl),supportSiteUrl:new URL(e.config.supportSiteUrl),hotkeyElQuerySelector:"body",autoplay:!0,onReady:function(t){I(t),C.current=new f.a({player:t,video:e.interactive,shareId:e.shareId,analyticsLocation:n})},currentUser:e.currentUser,collectResults:e.currentUser.isAuthenticated&&!!e.shareId,shareId:e.shareId,summaryPortalNode:j,onShowSummary:function(e){O(!e)},sharerInstanceRegion:e.sharerInstanceRegion,enableImmersiveReader:!0})),a.a.createElement("div",null,k&&a.a.createElement("h1",{className:"h3"},e.interactive.name)),a.a.createElement(o.b,{node:j}),a.a.createElement(v.a,{currentVideo:e.interactive,currentUser:e.currentUser,setFavourite:A,relatedVideos:N,getVideoAppLink:function(t){return b.a.getAppLink(t,{context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId})}}))}},2224:function(e,t,n){"use strict";n.r(t),n.d(t,"SharedInteractiveView",(function(){return S}));var r=n(0),a=n.n(r),o=n(10),i=n(98),c=n(52),l=n(1149),u=n(103),s=n(1134),f=n(1150),d=n(287),p=n(1180),m=n(28),h=n(222),v=n(87),y=n(1314),g=n(1541),b=n(1552),w=n(475),E=n(425),x=n(108),I={notFound:w.a,forbidden:{privacy:E.a}};function S(e){var t=o.a.useBasicFetch(u.a.config()),n=o.a.useBasicFetch(d.a.sharedInteractiveMetadata(e.objectId,e.shareId)),r=o.a.useBasicFetch(v.a.getShareObject(e.shareId),{optimize:!0}),w=r.data&&(r.data.objectTypeId===m.a.Interactive?l.a.createViewKey(e.shareId,f.a.Share):l.a.createViewKey(e.objectId,f.a.MasterObject,e.shareId)),S=o.a.useBasicFetch(w),k=Object(i.a)().hasPermissions,O=Object(h.a)().hasProduct;Object(s.a)(n,I),Object(p.a)(n,{private:E.a});var C=!S.data||!n.data||!t.data;return!k(c.a.StudentExperience)&&O(x.a.Primary)&&e.currentUser.isAuthenticated?C?a.a.createElement(y.a,{isEdit:!1}):a.a.createElement(g.a,{config:t.data,currentUser:e.currentUser,queryParams:e.queryParams,interactive:n.data,viewKey:S.data.viewKey,shareId:e.shareId}):C?a.a.createElement(a.a.Fragment,null):a.a.createElement(b.a,{config:t.data,currentUser:e.currentUser,queryParams:e.queryParams,interactive:n.data,activityStatus:e.activityStatus,viewKey:S.data.viewKey,shareId:e.shareId})}}}]);