@clickview/lite 0.70.1-dev.2 → 0.70.1-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/3596-7f32e7d4c0-lite.chunk.js +3 -0
- package/dist/scripts/3596-7f32e7d4c0-lite.chunk.js.map +1 -0
- package/dist/scripts/4050-cd4d18058a-lite.chunk.js +3 -0
- package/dist/scripts/4050-cd4d18058a-lite.chunk.js.map +1 -0
- package/dist/scripts/5829-689f5be5d1-lite.chunk.js +3 -0
- package/dist/scripts/5829-689f5be5d1-lite.chunk.js.map +1 -0
- package/dist/scripts/7042-65a932d16b-lite.chunk.js +2 -0
- package/dist/scripts/{7042-aaaf6e286f-lite.chunk.js.map → 7042-65a932d16b-lite.chunk.js.map} +1 -1
- package/dist/scripts/7428-546d62999f-lite.chunk.js +2 -0
- package/dist/scripts/7428-546d62999f-lite.chunk.js.map +1 -0
- package/dist/scripts/{8280-287760fb57-lite.chunk.js → 8280-8bb89d0a89-lite.chunk.js} +2 -2
- package/dist/scripts/8280-8bb89d0a89-lite.chunk.js.map +1 -0
- package/dist/scripts/8832-73ffd39e2a-lite.chunk.js +2 -0
- package/dist/scripts/{8832-aa3df17f66-lite.chunk.js.map → 8832-73ffd39e2a-lite.chunk.js.map} +1 -1
- package/dist/scripts/9973-648be9b72a-lite.chunk.js +2 -0
- package/dist/scripts/9973-648be9b72a-lite.chunk.js.map +1 -0
- package/dist/scripts/bundle-7514add562.min.js +3 -0
- package/dist/scripts/{bundle-4b10174000.min.js.map → bundle-7514add562.min.js.map} +1 -1
- package/package.json +1 -1
- package/dist/scripts/3596-191624e307-lite.chunk.js +0 -3
- package/dist/scripts/3596-191624e307-lite.chunk.js.map +0 -1
- package/dist/scripts/4050-74aa5394f6-lite.chunk.js +0 -3
- package/dist/scripts/4050-74aa5394f6-lite.chunk.js.map +0 -1
- package/dist/scripts/5829-5b395badf2-lite.chunk.js +0 -3
- package/dist/scripts/5829-5b395badf2-lite.chunk.js.map +0 -1
- package/dist/scripts/7042-aaaf6e286f-lite.chunk.js +0 -2
- package/dist/scripts/741-98a532e970-lite.chunk.js +0 -2
- package/dist/scripts/741-98a532e970-lite.chunk.js.map +0 -1
- package/dist/scripts/7428-6dd787bc07-lite.chunk.js +0 -2
- package/dist/scripts/7428-6dd787bc07-lite.chunk.js.map +0 -1
- package/dist/scripts/8280-287760fb57-lite.chunk.js.map +0 -1
- package/dist/scripts/8832-aa3df17f66-lite.chunk.js +0 -2
- package/dist/scripts/bundle-4b10174000.min.js +0 -3
- /package/dist/scripts/{3596-191624e307-lite.chunk.js.LICENSE.txt → 3596-7f32e7d4c0-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4050-74aa5394f6-lite.chunk.js.LICENSE.txt → 4050-cd4d18058a-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5829-5b395badf2-lite.chunk.js.LICENSE.txt → 5829-689f5be5d1-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-4b10174000.min.js.LICENSE.txt → bundle-7514add562.min.js.LICENSE.txt} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4050-74aa5394f6-lite.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4050],{8484:(t,e,n)=>{n.d(e,{Z:()=>g});var r=n(32735),o=n(42648),i=n(11607),a=n(83914),c=n(83345),l=n(28972),u=n(40424),s=n(93264),f=n(35223),m=n(86572);const p={timeTag:"ShZvf",hide:"FHzDr",time:"JDp5N",type:"AzIWg",question:"UhEYq",deleteContainer:"wBqoo",delete:"OAQQu",correctness:"W5sR9",selected:"tfrDf",row:"sGk59"};var d="shared.interactiveQuestions";function h(t){var e=t.interaction;switch((0,t.getCorrectness)(e)){case l.w.Correct:return r.createElement("span",{className:"text-success"},r.createElement(a.x,{size:a.S.Medium,svgName:f.vn.Check}));case l.w.Incorrect:return r.createElement("span",{className:"text-danger"},r.createElement(a.x,{size:a.S.Medium,svgName:f.vn.Close}));case l.w.AwaitingMarking:return r.createElement("span",{className:"text-secondary italic"},r.createElement("i",null,r.createElement(c.x,{namespace:d,phrase:"pending"})));case l.w.UnAnswered:return r.createElement("button",{className:"btn btn-outline-dark"},r.createElement(c.x,{namespace:d,phrase:"answer"}));case l.w.Answered:return r.createElement("span",{className:"text-secondary italic"},r.createElement("i",null,r.createElement(c.x,{namespace:d,phrase:"answered"})));case l.w.NotApplicable:return r.createElement(r.Fragment,null)}}function v(t){var e=t.interaction,n=t.visibleAt,o=t.selectedInteractionId,c=t.goToTimepoint,l=t.scrollTo,u=t.isFirstInteraction,d=e.id.toString()===(null==o?void 0:o.toString()),v=r.useRef(null);r.useEffect((function(){if(d&&v.current){var t=v.current,e=t.getBoundingClientRect(),n=e.top-t.offsetParent.getBoundingClientRect().top;l(n,e.height)}}),[d]);var y=c?"cursor-pointer":"cursor-default";return r.createElement("div",{ref:v},r.createElement(i.L,{className:"py-2 ".concat(y," ").concat(p.row," ").concat(d?p.selected:""),onClick:d?function(){}:function(){c&&c(e.id)}},r.createElement("div",{className:"me-3 d-inline-flex rounded-pill justify-content-center align-items-center text-info fw-semibold bg-light-blue ".concat(p.timeTag," ").concat(u?"":p.hide)},u?s.T.ToDisplayDuration(n):""),r.createElement(m.y,{interaction:e,showTypeName:!0,typeNameClassName:p.type,questionClassName:p.question}),t.onClickDelete&&r.createElement(i.L,{onClick:function(n){n.stopPropagation(),t.onClickDelete(e.id)},className:"".concat(p.deleteContainer)},r.createElement("span",{className:"text-end ".concat(p.delete)},r.createElement(a.x,{size:a.S.Medium,svgName:f.vn.Delete}))),t.getCorrectness&&r.createElement("span",{className:"text-end ".concat(p.correctness)},r.createElement(h,{interaction:e,getCorrectness:t.getCorrectness}))))}function y(t){var e=t.timepoint,n=t.scrollTo,o=t.onClickDelete,i=t.selectedInteractionId,a=t.getCorrectness;function c(n){t.goToTimepoint(e.id,n,e.visibleAt)}return e.interactions?r.createElement(r.Fragment,null,e.interactions.map((function(l,s){return!t.experimentalInteractiveQuestions&&u.IL[l.typeId]?r.createElement(r.Fragment,{key:s}):r.createElement(v,{interaction:l,visibleAt:e.visibleAt,goToTimepoint:t.goToTimepoint&&c,onClickDelete:o,scrollTo:n,selectedInteractionId:i,isFirstInteraction:0===s,getCorrectness:a,key:s})}))):r.createElement(r.Fragment,null)}function g(t){var e=t.interactive,n=t.goToTimepoint,i=t.selectedInteractionId,a=t.maxHeight,c=t.onClickDelete,l=t.getCorrectness,u=r.useRef(null);function s(t,e){if(u.current){var n=u.current.getClientHeight(),r=u.current.getScrollTop(),o=t+r;(o<r||o+e>r+n)&&u.current.scrollTop(o-n/2+e/2)}}var f=n?"border rounded":"";return r.createElement(o.$B,{autoHeight:!0,autoHeightMax:a,className:f,hideTracksWhenNotNeeded:!0,ref:u},r.createElement("div",{className:"px-3 py-2"},e.timepoints.map((function(e,o){return r.createElement(y,{key:o,timepoint:e,goToTimepoint:n,selectedInteractionId:i,scrollTo:s,onClickDelete:c,getCorrectness:l,experimentalInteractiveQuestions:t.experimentalInteractiveQuestions})}))))}},99705:(t,e,n)=>{var r,o;n.d(e,{b:()=>o}),function(t){t.AddToPlaylist="115005679748",t.EditSsoAccounts="8202508040345",t.LibraryEditor="360001974533",t.VideoAccess="360000153947",t.AddFromOnline="360011718234",t.UploadToLibraryEditor="360012069334",t.PBTErrorCodes="360012421153",t.ManuelReview="360020004534",t.LibraryReview="360000163788"}(r||(r={})),function(t){t.Integrations="4407268725529",t.Classrooms="4405362551833",t.MakeInteractive="4405370510873",t.EditSsoAccounts="8202605666073",t.UploadToLibraryEditor="10672936659865",t.AddFromLite="10671345281561",t.ManageSsoYearGroups="14691130889241",t.ContentReview="18525199576601",t.ContentPermissions="14692125209497",t.AccessSettings="27927466562201",t.ContentGuidelines="24133696186009",t.FoxtelFaq="24133519542169",t.ViviIntegration="23826297956377",t.AppleTvIntegration="25832373739929",t.RssFeed="32567445635097",t.ManageGroupPermissions="35407217335705"}(o||(o={}))},34479:(t,e,n)=>{n.d(e,{j:()=>v});var r=n(32735),o=n(44645),i=n(51934),a=n.n(i),c=n(23481),l=n(9111),u=n(13876),s=n(10587);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return m(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}(t,e)||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 m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}n(67575);var p=c.T.encloseNamespace("shared.imageCropper"),d=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function h(t){var e=f(r.useState(!1),2),n=e[0],o=e[1],i=f(r.useState(!1),2),c=i[0],m=i[1],h=r.useRef(null),v=r.useRef(null);return r.useEffect((function(){var e=new Image;e.src=t.src;var n=h.current.offsetWidth/e.width,r=s.y[t.imageType],i={viewMode:2,autoCropArea:1,ready:function(){return o(!0)}};return r&&(i.minCropBoxWidth=r.width*n,i.minCropBoxHeight=r.height*n,i.aspectRatio=r.width/r.height),v.current=new(a())(h.current,i),function(){v.current.destroy()}}),[]),r.createElement(l.G,{title:p("title"),closePopup:t.closePopup,size:t.popupSize},r.createElement("div",null,r.createElement("img",{src:t.src,alt:t.alt,ref:h,className:"img img-fluid"})),r.createElement(u.u,null,r.createElement(u.u.Cancel,{onClick:t.closePopup}),r.createElement(u.u.Submit,{onClick:function(){if(n){var e=v.current.getCroppedCanvas().toDataURL(function(t){var e=t.match(d);if(e)return e[1]}(t.src));m(!0),t.onClickCrop(e,t.closePopup)}},text:p("crop"),variant:"dark",showSpinner:c})))}h.defaultProps={popupSize:"lg"};var v={renderCropper:function(t){var e=(0,o.s)(document.getElementById("dialog-region"));e.render(r.createElement(h,Object.assign({},t,{closePopup:function(){return e.unmount()}})))}}},59253:(t,e,n)=>{var r=n(76032),o=n(11576);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function c(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}var f=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=u(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,n||[],u(t).constructor):e.apply(t,n))}(this,e,[t,n])).update(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),n=e,r=[{key:"update",value:function(){this.options_.activityStatus===o.T.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.getToggledActivityStatus(),this.update(),this.options_.clickHandler){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.options_.clickHandler.call(this,e)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===o.T.None||this.options_.activityStatus===o.T.Incomplete?o.T.Complete:this.options_.activityStatus===o.T.Complete?o.T.Incomplete:void 0}}],r&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getComponent("Button"));function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function d(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}f.prototype.controlText_="Complete";var g=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=v(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,(r=[{key:"setActivityStatus",value:function(t,e){var n=this;t!==this.activityStatus&&(this.activityStatus=t,this.onToggleStatus=e,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new f(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Z.getPlugin("plugin"));r.Z.registerPlugin("activityStatusPlugin",g)},76343:(t,e,n)=>{var r;n.d(e,{A:()=>r}),function(t){t[t.View=0]="View",t[t.Create=1]="Create"}(r||(r={}))},38314:(t,e,n)=>{n.d(e,{A:()=>r.A});var r=n(76343)},14050:(t,e,n)=>{n.r(e),n.d(e,{ClickViewInteractivePlayer:()=>Vr});var r=n(32735),o=n(38314),i=n(81886),a=n(2208);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}var p=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=f(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}(this,e,["Could not connect to submit interactive results"])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),n=e,(r=[{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()}}])&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(n(47663).S),d=n(51415);function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function v(){v=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new T(r||[]);return o(a,"_invoke",{value:I(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function b(){}function w(){}function E(){}var S={};u(S,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==n&&r.call(k,a)&&(S=k);var O=E.prototype=b.prototype=Object.create(S);function N(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==h(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function I(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function C(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(h(e)+" is not iterable")}return w.prototype=E,o(O,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=u(E,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,u(t,l,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},N(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new j(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(O),u(O,l,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function g(t){var e=function(t){if("object"!=h(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==h(e)?e:e+""}var b=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function c(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}l((r=r.apply(t,e||[])).next())}))},w=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.save=this.save.bind(this)},(e=[{key:"start",value:function(t){t&&(this.resultId=t),this.startSession()}},{key:"startSession",value:function(){var t;return b(this,void 0,void 0,v().mark((function e(){var n,r,o,c,l,u,s,f,m;return v().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 n=this.options,r=n.interactiveId,o=n.metadataId,c=n.userId,l=n.customerId,u=n.shareId,s=n.playerApi,f={interactiveId:r,metadataId:o,userId:c,customerId:l,shareId:u},c||(f.anonymous=!0,f.sessionId=null===(t=a.Y.getClientSessionData())||void 0===t?void 0:t.id),e.prev=5,e.next=8,d.e.post(s+"interactive/start-session",JSON.stringify(f));case 8:m=e.sent,this.resultId=m.resultId,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),i.Q.Ry.throw(new p);case 15:case"end":return e.stop()}}),e,this,[[5,12]])})))}},{key:"save",value:function(t,e){return b(this,void 0,void 0,v().mark((function n(){var r;return v().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.resultId){n.next=3;break}return n.next=3,this.startSession();case 3:return r={resultId:this.resultId,interactionId:t,results:e},n.prev=4,n.next=7,d.e.post(this.options.playerApi+"interactive/save-actions",JSON.stringify(r),void 0,!1);case 7:n.next=13;break;case 9:n.prev=9,n.t0=n.catch(4),console.log(n.t0),i.Q.Ry.throw(new p);case 13:case"end":return n.stop()}}),n,this,[[4,9]])})))}}])&&y(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),E=n(41386),S=n(56050),x=n(40424),k=n(3596),O=(n(16852),n(59253),n(76032)),N=n(65858),j=n(4271),I=n(10463),C=(n(6994),n(35223)),L=n(11607),P=n(83914);function T(t){var e=t.className,n=t.svgName,o=t.children,i=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["className","svgName","children"]),a="".concat(e," ").concat("Mr0S0");a+=" ".concat(o?"vHTVo":"vIGn0");var c=r.createElement(P.x,{svgName:n,className:"cDUaE"});return r.createElement(L.L,Object.assign({className:a},i),c,o)}function A(t){var e=t.isCreate,n=t.open,o=t.showTypeSelector;return!e||n?r.createElement(r.Fragment,null):r.createElement(T,{className:"btn btn-outline-dark cv-add-question",onClick:o,svgName:C.vn.Plus},"Add question")}var _=n(80247),F=n(38750),R=n(91693),M=n(7432),G=n(54610),D=n(69186),Z=n(86572),q=n(28972),U=n(8246),B=n(80845),W=n(83140),Q=n(4234),V=n(89961),Y=n(84120),z=n(99785);const H={colourButton:"y6pnq",colourButtonSelected:"PAPVX",canvasDrawContainer:"__tFu",strokeButtonContainer:"D1zMW",strokeButton:"J7C_3",selectedButton:"aJKor"};function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return J(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(t,e):void 0}}(t,e)||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 J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var K,X;!function(t){t[t.Small=2]="Small",t[t.Medium=4]="Medium",t[t.Large=8]="Large"}(K||(K={})),function(t){t.Black="#000000",t.Red="#D9584F",t.Orange="#F8981D",t.Yellow="#FFCD52",t.Green="#5DC786",t.Blue="#38A2E8",t.Purple="#7A76E8",t.Grey="#979797",t.White="#FFFFFF"}(X||(X={}));var tt=r.forwardRef((function(t,e){var n=r.useRef(null);r.useImperativeHandle(e,(function(){return n.current}),[n.current]);var o=r.useRef(null),i=$(r.useState([0,0]),2),a=$(i[0],2),c=a[0],l=a[1],u=i[1],s=$(r.useState(X.Black),2),f=s[0],m=s[1],p=$(r.useState(K.Small),2),d=p[0],h=p[1],v=$(r.useState(!1),2),y=v[0],g=v[1],b=$(r.useState(X.Black),2),w=b[0],E=b[1];function S(){if(o.current){var t=o.current.getBoundingClientRect();u([t.width,.5625*t.width])}}function x(t){m(t),E(f),g(!1)}return r.useLayoutEffect((function(){if(o.current){var t=new ResizeObserver(S);return t.observe(o.current),function(){return t.disconnect()}}}),[o.current]),r.createElement("section",null,r.createElement("div",{className:"d-flex align-items-start"},r.createElement("div",{className:"d-flex flex-lg-column"},r.createElement("ul",{className:"me-3-lg me-2 list-unstyled"},Object.entries(X).slice(0,4).map((function(t,e){var n=$(t,2),o=n[0],i=n[1];return r.createElement("li",{key:e},r.createElement(L.L,{className:"".concat(H.colourButton," ").concat(f===i?H.colourButtonSelected:""," rounded-circle"),style:{backgroundColor:i},onClick:function(){return x(i)},"aria-label":"Select the colour: ".concat(o)}," "))}))),r.createElement("ul",{className:"me-3-lg me-2 list-unstyled"},Object.entries(X).slice(4).map((function(t,e){var n=$(t,2),o=n[0],i=n[1];return r.createElement("li",{key:e},r.createElement(L.L,{className:"".concat(H.colourButton," ").concat(f===i?H.colourButtonSelected:""," rounded-circle"),style:{backgroundColor:i},onClick:function(){return x(i)},"aria-label":"Select the colour: ".concat(o)}," "))})))),r.createElement("div",{className:"flex-grow-1 position-relative",ref:o},r.createElement("div",{className:H.canvasDrawContainer},c&&r.createElement(z.Z,{canvasHeight:l,canvasWidth:c,brushRadius:d,lazyRadius:10,hideGrid:!0,brushColor:f,className:"position-absolute top-0 left-0 border",ref:n}))),r.createElement("div",{className:"d-flex flex-column align-self-stretch ms-2"},r.createElement("div",{className:"d-flex flex-column gap-2 flex-grow-1"},r.createElement("ul",{className:"d-lg-flex flex-column gap-2 list-unstyled d-none"},r.createElement(T,{svgName:C.vn.Edit,className:"btn btn-outline-dark ".concat(y?"":H.selectedButton),onClick:function(){y&&(m(w),g(!1))},"aria-label":"Pen"}),r.createElement(T,{svgName:C.vn.Erase,className:"btn btn-outline-dark mb-2 ".concat(y?H.selectedButton:""),onClick:function(){if(y)return m(w),void g(!1);E(f),m(X.White),g(!0)},"aria-label":"Eraser"})),r.createElement("ul",{className:"d-flex flex-column mb-2 list-unstyled"},r.createElement("li",{className:H.strokeButtonContainer},r.createElement(T,{svgName:C.vn.SmallStroke,className:"btn btn-outline-dark ".concat(d===K.Small?H.selectedButton:""," ").concat(H.strokeButton),onClick:function(){return h(K.Small)},style:{color:f!==X.White?f:X.Black},"aria-label":"Small stroke"})),r.createElement("li",{className:H.strokeButtonContainer},r.createElement(T,{svgName:C.vn.MediumStroke,className:"btn btn-outline-dark ".concat(d===K.Medium?H.selectedButton:""," ").concat(H.strokeButton),onClick:function(){return h(K.Medium)},style:{color:f!==X.White?f:X.Black},"aria-label":"Medium stroke"})),r.createElement("li",{className:H.strokeButtonContainer},r.createElement(T,{svgName:C.vn.LargeStroke,className:"btn btn-outline-dark ".concat(d===K.Large?H.selectedButton:""," ").concat(H.strokeButton),onClick:function(){return h(K.Large)},style:{color:f!==X.White?f:X.Black},"aria-label":"Large stroke"})))),r.createElement("ul",{className:"d-flex flex-column gap-lg-2 list-unstyled"},r.createElement("li",null,r.createElement(T,{svgName:C.vn.Undo,className:"btn btn-outline-dark",onClick:function(){return n.current.undo()},"aria-label":"Undo"})),r.createElement("li",null,r.createElement(T,{svgName:C.vn.Delete,onClick:function(){V.M.render(r.createElement("p",null,"Are you sure you want to discard your drawing?"),{title:"Discard your drawing?",submitButtonProps:{onClick:function(){return n.current.clear()},variant:"danger",text:"Discard"},cancelButtonProps:{variant:"link",text:"Cancel"}})},className:"btn btn-outline-danger d-lg-block d-none ".concat(H.myRight),"aria-label":"Clear canvas"}))))))}));function et(t){var e=r.useRef(null),n=Y.w.getTypeInfo(t.interaction.typeId),o=n.bgClassName,i=n.Svg;return r.createElement(Q.Z,{className:"h-100"},r.createElement("section",{className:"d-flex flex-column h-100"},r.createElement("div",{className:"text-center text-body d-flex justify-content-between align-items-center p-2"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("span",{className:"".concat("sTvDl"," me-3 rounded my-1 text-white align-middle d-inline-block ").concat(o)},r.createElement(i,null)),r.createElement("span",{className:"text-start flex-grow-1"},r.createElement("h2",{className:"h6 mb-0"},r.createElement("strong",null,t.interaction.name)))),r.createElement("div",null,r.createElement(L.L,{className:"btn btn-link",onClick:function(){V.M.render(r.createElement("p",null,"Are you sure you want to discard your drawing?"),{title:"Discard your drawing?",submitButtonProps:{onClick:t.onCancel,variant:"danger",text:"Discard"},cancelButtonProps:{variant:"link",text:"Cancel"}})}},"Cancel"),r.createElement(L.L,{className:"btn btn-dark ms-2",onClick:function(){e.current&&t.onSave(e.current.getDataURL("image/png"))}},"Save"))),r.createElement("div",{className:"cv-timepoint bg-gray-100 flex-grow-1 rounded-bottom"},r.createElement("div",{className:"cv-timepoint-padding h-100"},r.createElement("div",{className:"cv-interactive-question"},r.createElement("div",{className:"mx-auto ".concat("kFxi6")},r.createElement(tt,{ref:e})))))))}function nt(t){var e=t.error;return t.error?r.createElement("p",{className:"mt-2 small text-danger"},e):r.createElement(r.Fragment,null)}function rt(t){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(t)}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function it(){it=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==rt(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(rt(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function at(t,e,n){return(e=function(t){var e=function(t){if("object"!=rt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ct="data:image/png;base64,";function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}var ut="cv-missing-word-",st=n(7730),ft=n(64818);function mt(t){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function pt(t,e,n){return(e=function(t){var e=function(t){if("object"!=mt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var dt=n(56108);function ht(t){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(t)}var vt=n(28097);function yt(t){return yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(t)}function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function bt(t,e,n){return(e=function(t){var e=function(t){if("object"!=gt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var wt=function(){return!0},Et=function(){return!1},St=bt(bt(bt(bt(bt(bt(bt({},x.Z9.Annotation,Et),x.Z9.Image,Et),x.Z9.MissingWord,wt),x.Z9.MultipleChoice,wt),x.Z9.ShortAnswer,(function(t){return!!t.data.suggestedResponse})),x.Z9.TrueOrFalse,wt),x.Z9.Illustration,Et);function xt(t){return St[t]}var kt=bt(bt(bt(bt(bt(bt(bt({},x.Z9.Annotation,(function(t){var e=t.interaction.data.annotation.replace(/<(a)(.*?)>/g,'<$1 target="_blank" $2>');return r.createElement("div",{className:"cv-interactive-question"},r.createElement("div",{className:"mb-2 h4",dangerouslySetInnerHTML:{__html:e}}))})),x.Z9.Image,(function(t){var e=t.interaction,n=t.recalculateScroll,o=r.useCallback((function(t){t&&(t.onload=function(){n()})}),[]);return r.createElement("div",{className:"cv-interactive-question cv-image-interactive"},r.createElement("div",{className:"cv-image-container text-center"},r.createElement("img",{className:"img-fluid rounded",src:e.data.url,ref:o}),e.data.caption&&r.createElement(r.Fragment,null,r.createElement("p",{className:"mt-3 h4"},e.data.caption))))})),x.Z9.MissingWord,(function(t){var e=t.state,n=t.setState,o=t.interaction,i=t.showFeedback,a=o.data.sentence.replace(/{([^{}]*)}/g,(function(t,e){return"{".concat(ut).concat(e,"}")})).split(/{([^{}]*)}/g);return r.createElement("div",{className:"cv-interactive-question"},r.createElement("div",{className:"mb-2 h4"},a.map((function(t,a){var c;if(!t.startsWith(ut))return t;var l=t.replace(ut,""),u=o.actionableItems.find((function(t){return t.order.toString()===l}));if(u){var s,f,m=e[u.id]||"",p=(s=u.name,(f=document.createElement("canvas").getContext("2d")).font="20pt arial",f.measureText(s).width);if(i){var d=u.name.toLowerCase().toString()===(null===(c=e[u.id])||void 0===c?void 0:c.toLowerCase().toString());return r.createElement(r.Fragment,{key:a},!d&&r.createElement(r.Fragment,null,r.createElement("del",{className:"text-danger"},m)," "),r.createElement("span",{className:"text-success"},u.name))}return r.createElement("span",{className:"cv-missing-word-input-container",key:a},r.createElement("input",{style:{width:p/16+"rem"},onChange:function(t){return function(t,r){if(r.stopPropagation(),r.target.value)n(function(t,e,n){return(e=function(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},t.id,r.target.value));else{var o=e,i=t.id,a=(o[i],function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(o,["symbol"===lt(i)?i:i+""]));n(a,!0)}}(u,t)},value:m,maxLength:45,disabled:!!e.submitted,className:"cv-missing-word-input",autoComplete:"off"}))}}))),r.createElement(nt,{error:e.error}))})),x.Z9.MultipleChoice,(function(t){var e=t.state,n=t.setState,o=t.interaction,i=t.showFeedback,a=t.imageApi,c=t.currentUser,l=1===o.actionableItems.filter((function(t){return t.isCorrect})).length;return r.createElement("div",{className:"cv-interactive-question"},r.createElement("p",{className:"h4"},o.name),!l&&r.createElement("div",{className:"rounded bg-light-blue p-2 mb-2 text-small"},r.createElement(P.x,{svgName:C.vn.Resources,className:"d-inline-block svg-container sm align-text-bottom me-1"}),r.createElement("small",null,r.createElement("strong",null,"Multi-select: "),"This question has multiple correct answers")),r.createElement(st.n,{interaction:o,showFeedback:i,onSelectAnswer:function(t,r){if(!e.submitted)if(l)n(r?pt({},t.id,t.id):{},!0);else if(r)n(pt({},t.id,t.id));else{var o=e,i=t.id,a=(o[i],function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(o,["symbol"===mt(i)?i:i+""]));n(a,!0)}},getSelectedAnswer:function(t){return e[t]},imageApi:a.toString(),userInitials:ft.l.getInitials(c.givenName,c.familyName),userAvatar:c.avatar,leftHandSidePortalNode:t.leftHandSidePortalNode,submitted:!!e.submitted}),r.createElement(nt,{error:e.error}))})),x.Z9.ShortAnswer,(function(t){var e=t.interaction,n=t.state,o=t.setState;return t.showFeedback?r.createElement("div",{className:"cv-interactive-question"},r.createElement("p",{className:"h4"},e.name),r.createElement("label",{className:"h4 fw-bold"},"My answer"),r.createElement("p",{className:"h4"},n[e.actionableItems[0].id]),e.data.suggestedResponse&&r.createElement(r.Fragment,null,r.createElement("label",{className:"h4 fw-bold"},"Teacher's suggested answer"),r.createElement("p",{className:"h4"},e.data.suggestedResponse))):r.createElement("div",{className:"cv-interactive-question"},r.createElement("p",{className:"h4"},e.name),r.createElement(dt.Z,{id:"short-answer-answer",className:"form-control mt-2",minRows:3,value:n[e.actionableItems[0].id]||"",onChange:function(t){var r,i,a;o(Object.assign(Object.assign({},n),(r={},i=e.actionableItems[0].id,a=t.target.value,(i=function(t){var e=function(t){if("object"!=ht(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ht(e)?e:e+""}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r)))},disabled:!!n.submitted}),r.createElement(nt,{error:n.error}))})),x.Z9.TrueOrFalse,(function(t){var e=t.state,n=t.setState,o=t.interaction,i=t.showFeedback,a=t.imageApi,c=t.currentUser,l=o.actionableItems.find((function(t){return t.isCorrect}));return r.createElement("div",{className:"cv-interactive-question"},r.createElement("p",{className:"h4"},o.name),r.createElement(vt.x,{className:"justify-content-center",interaction:o,showFeedback:i,onSelectAnswer:function(t){var r,o,i;e.submitted||n((r={},o=t.id,i=t.name,(o=function(t){var e=function(t){if("object"!=yt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yt(e)?e:e+""}(o))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r),!0)},getSelectedAnswer:function(t){return e[t]},imageApi:a.toString(),userInitials:ft.l.getInitials(c.givenName,c.familyName),userAvatar:c.avatar}),i&&r.createElement("div",{className:"text-center px-5 mt-3"},r.createElement("p",{className:"h4"},"The answer is ",r.createElement("strong",null,l.name)),o.data.feedback&&r.createElement("p",{className:"h4"},o.data.feedback)),r.createElement(nt,{error:e.error}))})),x.Z9.Illustration,(function(t){var e,n,o=t.interaction,i=t.state,a=t.fullWidthPortalNode,c=t.setState,l=(e=r.useState(!1),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return ot(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],s=l[1],f=i[o.actionableItems[0].id];return r.createElement("div",{className:"cv-interactive-question"},r.createElement("p",{className:"h4 mb-3"},o.name),f?r.createElement(r.Fragment,null,r.createElement("img",{className:"img-fluid border rounded mb-2 w-75",src:f,alt:"Illustration"}),!i.submitted&&r.createElement(L.L,{className:"btn btn-outline-dark",onClick:function(){return s(!0)}},"Re-draw my answer")):r.createElement(L.L,{className:"btn btn-outline-dark",onClick:function(){return s(!0)}},"Draw my answer"),r.createElement(nt,{error:i.error}),u&&r.createElement(F.Nq,{node:a},r.createElement(et,{interaction:o,onSave:function(e){c(Object.assign(Object.assign({},i),at({},o.actionableItems[0].id,e))),s(!1),t.recalculateScroll()},onCancel:function(){return s(!1)}})))}));function Ot(){return""}var Nt=bt(bt(bt(bt(bt(bt(bt({},x.Z9.Annotation,Ot),x.Z9.Image,Ot),x.Z9.MissingWord,(function(t,e){var n=Object.keys(t).filter((function(e){var n;return!!(null===(n=t[e])||void 0===n?void 0:n.trim())})).length;return n?n!==e.actionableItems.length?"Please fill in all of the blanks":null:"Please fill in the blanks"})),x.Z9.MultipleChoice,(function(t){return Object.keys(t).length?null:"Please choose an answer"})),x.Z9.ShortAnswer,(function(t,e){var n;return Object.keys(t).filter((function(e){var n;return!!(null===(n=t[e])||void 0===n?void 0:n.trim())})).length?(null===(n=t[e.actionableItems[0].id])||void 0===n?void 0:n.length)>4e3?"Max answer length is ".concat(4e3," characters"):null:"Please provide an answer to the question"})),x.Z9.TrueOrFalse,(function(t){return Object.keys(t).length?null:"Please choose an answer"})),x.Z9.Illustration,(function(t){return Object.keys(t).filter((function(e){var n;return!!(null===(n=t[e])||void 0===n?void 0:n.trim())})).length?null:"Please submit an illustration"})),jt=bt(bt(bt(bt(bt(bt(bt({},x.Z9.Annotation,null),x.Z9.Image,null),x.Z9.MissingWord,(function(t,e,n){return n(e.id,Object.keys(t).map((function(e){return{actionableItemId:e,value:t[e].toString()}})))})),x.Z9.MultipleChoice,(function(t,e,n){return n(e.id,Object.keys(t).map((function(t){var n=e.actionableItems.find((function(e){var n;return(null===(n=e.id)||void 0===n?void 0:n.toString())===(null==t?void 0:t.toString())}));return{actionableItemId:t,value:null==n?void 0:n.name}})))})),x.Z9.ShortAnswer,(function(t,e,n){return n(e.id,Object.keys(t).map((function(e){return{actionableItemId:e,value:t[e].toString()}})))})),x.Z9.TrueOrFalse,(function(t,e,n){return n(e.id,Object.keys(t).map((function(e){return{actionableItemId:e,value:t[e]}})))})),x.Z9.Illustration,(function(t,e,n,r){return o=this,i=void 0,a=void 0,c=it().mark((function o(){var i,a,c,l;return it().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!(i=t[e.actionableItems[0].id]||"").startsWith(ct)){o.next=7;break}return a=i.replace(ct,""),o.next=5,d.e.post("".concat(r.imageApi,"v2/thumbnails/base64"),'"'.concat(a,'"'),{tokenName:"gateway"});case 5:c=o.sent,i=c.location;case 7:return l=Object.keys(t).map((function(t){return{actionableItemId:t,value:i}})),o.next=10,n(e.id,l);case 10:return o.abrupt("return",at({},e.actionableItems[0].id,i));case 11:case"end":return o.stop()}}),o)})),new(a||(a=Promise))((function(t,e){function n(t){try{l(c.next(t))}catch(t){e(t)}}function r(t){try{l(c.throw(t))}catch(t){e(t)}}function l(e){var o;e.done?t(e.value):(o=e.value,o instanceof a?o:new a((function(t){t(o)}))).then(n,r)}l((c=c.apply(o,i||[])).next())}));var o,i,a,c}));function It(t){return jt[t]}var Ct=bt(bt(bt(bt(bt(bt(bt({},x.Z9.Annotation,W.A.notApplicable),x.Z9.Image,W.A.notApplicable),x.Z9.MissingWord,(function(t,e){return W.A.isMissingWordCorrect(e,(function(e){return t[e]}))})),x.Z9.MultipleChoice,(function(t,e){return W.A.isMultipleChoiceCorrect(e,(function(e){return t[e]}))})),x.Z9.ShortAnswer,W.A.awaitingMarking),x.Z9.TrueOrFalse,(function(t,e){return e.actionableItems.filter((function(t){return t.isCorrect})).every((function(e){return t[e.id]===e.name}))?q.w.Correct:q.w.Incorrect})),x.Z9.Illustration,W.A.awaitingMarking);function Lt(t){return Ct[t]}function Pt(t){var e=t.studentResults,n=t.interaction,o=t.timepoint,i=t.interactive,a=t.state,c=t.goToTimepoint,l=t.interactionNumber,u=t.imageCdnUrl,s=(0,B.j_)(e),f=(0,B.f6)(n.id,s),m=a.interactions[n.id],p=Lt(n.typeId)(m||{},n),d=n.typeId!==x.Z9.Annotation&&n.typeId!==x.Z9.Image,h=d;n.typeId===x.Z9.MissingWord&&f&&(h=!1);var v=n.data.suggestedResponse||n.data.feedback;return r.createElement("li",{className:"mb-3 position-relative"},r.createElement("div",{className:"d-flex flex-wrap mb-2 cursor-pointer",onClick:function(){return c(o.id,n.id)}},i.immediateFeedback&&r.createElement("div",{className:"O6oD6"},!!f&&(p===q.w.AwaitingMarking?r.createElement("span",{className:"text-secondary fst-italic"},"Waiting to be marked"):p===q.w.Correct?r.createElement("span",{className:"text-success"},"Correct ",r.createElement(P.x,{className:"svg-container align-middle",svgName:C.vn.Check})):p===q.w.Incorrect&&r.createElement("span",{className:"text-danger"},"Incorrect ",r.createElement(P.x,{className:"svg-container align-middle",svgName:C.vn.Close})))),r.createElement(Z.y,{interaction:n,iconClassName:"flex-shrink-0",showQuestion:h,showTypeName:!0,questionClassName:"d-block w-100 mt-2",questionNumber:l})),d&&!f&&r.createElement("button",{className:"btn btn-dark",onClick:function(){return c(o.id,n.id)}},"Answer question"),f&&d&&r.createElement(D.O,{interaction:n,studentResults:e,markedStatus:U.N.PendingReview,markInteraction:function(){},imageCdnUrl:u,showFeedback:i.immediateFeedback,showAvatar:!0}),i.immediateFeedback&&f&&v&&r.createElement("div",{className:"bg-light rounded p-2"},r.createElement("div",null,r.createElement("strong",null,n.typeId===x.Z9.TrueOrFalse?"Teacher's feedback":"Teacher's suggested response")),v))}function Tt(t){var e=t.interactive,n=t.duration;return n?r.createElement(r.Fragment,null,e.timepoints.map((function(e,o){if(!e.interactions.length)return r.createElement(r.Fragment,null);var i=Y.w.getTypeInfo(e.interactions[0].typeId).bgClassName,a=e.visibleAt/1e3/n*100;return r.createElement("span",{key:o,className:"".concat("pUo8u"," ").concat(i),style:{left:"".concat(a,"%")},onClick:function(n){return r=e.id,o=e.interactions[0].id,n.stopPropagation(),void t.goToTimepoint(r,o);var r,o}})}))):r.createElement(r.Fragment,null)}function At(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function _t(t){var e,n,o=t.duration,i=t.progress,a=t.player,c=(e=r.useState(i.length),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return At(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?At(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],l=[];if(i.length){var u=i[0];l.push(u),i.forEach((function(t,e){0!==e&&(u.end.time+1>t.start.time&&u.start.time<t.start.time?u.end=t.end:(u=t,l.push(u)))}))}return r.useEffect((function(){var t=function(){c(i.length)};return a.on("progressflush",t),function(){return a.off("progressflush",t)}}),[]),r.createElement(r.Fragment,null,l.map((function(t,e){var n=t.start.time/o*100,i=100*(1-t.end.time/o);return r.createElement("span",{key:e,className:"BnKli",style:{left:"".concat(n,"%"),right:"".concat(i,"%")}})})))}function Ft(t){return!!(null==t?void 0:t.toString().startsWith("new_"))}function Rt(t){return t.error,t.hasChanges,t.submitted,t.spinner,function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["error","hasChanges","submitted","spinner"])}function Mt(t){return function(t){if(Array.isArray(t))return Dt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Gt(t)||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 Gt(t,e){if(t){if("string"==typeof t)return Dt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dt(t,e):void 0}}function Dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Zt(t){var e,n,o=t.showSummary,i=t.setShowSummary,a=t.state,c=t.interactive,l=t.player,u=t.progress,s=t.portalNode,f=r.useRef(null),m=(e=r.useState(!1),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||Gt(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],d=m[1];function h(){i(!1),l.show(),l.play()}function v(e,n){h(),t.goToTimepoint(e,n)}if(!s||!o)return r.createElement(r.Fragment,null);var y=function(t){var e=t.state,n=0,r=0,o=0,i=!1,a=[];return t.interactive.timepoints.forEach((function(t){t.interactions.forEach((function(t){var c=e.interactions[t.id],l=Lt(t.typeId)(c||{},t);l===q.w.Correct&&n++,l!==q.w.NotApplicable&&r++,l!==q.w.NotApplicable&&(null==c?void 0:c.submitted)&&o++,l===q.w.AwaitingMarking&&(i=!0);var u=Rt(c||{}),s=Object.keys(u).map((function(t){var e;return{id:t,text:null===(e=u[t])||void 0===e?void 0:e.toString()}}));s.length&&a.push({id:t.id,answeredAt:1,answers:s})}))})),{correctCount:n,total:r,answered:o,studentAttempts:a,awaitingMarking:i}}({interactive:c,state:a}),g=y.correctCount,b=y.total,w=y.answered,E=y.studentAttempts,S=y.awaitingMarking,x={user:{name:t.currentUser.givenName,surname:t.currentUser.familyName,avatar:{url:t.currentUser.avatar}},results:[{id:c.id,attempts:E}]},k=0,O=l.ended(),N=l.duration();return r.createElement(F.Nq,{node:s},r.createElement("div",{className:"row pb-3"},r.createElement("div",{className:"col-4 col-xs-12"},r.createElement(M.Z,{data:l.poster(),imageType:G.__.Thumbnails,imageOptions:{size:G.h2.Medium}})),r.createElement("div",{className:"col-8 col-xs-12"},r.createElement("span",{className:"float-end"},r.createElement(R.h,{svgName:C.vn.Play,className:"btn btn-outline-dark",onClick:function(){h(),l.ended()&&l.currentTime(0)}},O?"Play again":"Continue watching"),l.gradePassbackPlugin().enabled&&(p?r.createElement(L.L,{className:"btn btn-dark ms-2",onClick:function(){}},r.createElement(_.Z,{as:"span",animation:"border",role:"status",size:"sm"})):r.createElement(R.h,{svgName:C.vn.Check,className:"btn btn-dark ms-2",onClick:function(){d(!0),l.gradePassbackPlugin().submit(g/b,!S)}},"Submit"))),r.createElement("h1",{className:"h3"},t.title),r.createElement("p",null))),r.createElement("div",{className:"border rounder px-2 mb-3"},r.createElement("div",{className:"cursor-pointer my-4 ".concat("gxTA_"),onClick:function(t){if(f.current){var e=f.current.getBoundingClientRect(),n=(t.pageX-e.left)/e.width*N;h(),l.currentTime(n)}},ref:f},r.createElement(_t,{duration:N,progress:u,interactive:c,player:l}),r.createElement(Tt,{duration:N,interactive:c,goToTimepoint:v}))),r.createElement("h2",{className:"h4"},"My Answers"),r.createElement("div",{className:"d-flex justify-content-between"},r.createElement("span",null,c.immediateFeedback&&r.createElement("div",null,"Score: ",g,"/",b),r.createElement("div",{className:"mb-3"},"You have answered ",r.createElement("strong",{className:w!==b?"text-danger":""},w)," of ",r.createElement("strong",null,b)," questions"))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-lg-7 col-12"},r.createElement("ul",{className:"list-unstyled"},c.timepoints.reduce((function(e,n){return[].concat(Mt(e),Mt(n.interactions.map((function(e){return k++,r.createElement(Pt,{key:e.id,studentResults:x,interaction:e,timepoint:n,interactive:c,state:a,goToTimepoint:v,interactionNumber:k,imageCdnUrl:t.imageCdnUrl})}))))}),[])))))}function qt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ut(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ut(t,e):void 0}}(t,e)||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 Ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Bt(t){var e=t.player,n=t.resultsService,o=t.interactive,i=t.setShowSummary,a=t.mobile,c=qt(r.useState(!1),2),l=c[0],u=c[1],s=qt(r.useState(!1),2),f=s[0],m=s[1],p=t.player.activePlugins_.activityStatusPlugin,d=t.player.activePlugins_.favouritePlugin;function h(){var t=e.currentTime(),n=o.timepoints[o.timepoints.length-1];f||t>n.visibleAt/1e3+1?u(!0):u(!1)}function v(){m(!0)}if(r.useEffect((function(){return e.on("ended",v),function(){return e.off("ended",v)}}),[]),r.useEffect((function(){if(n&&!a)return e.on("timeupdate",h),function(){return e.off("timeupdate",h)}}),[f]),!l)return null;var y="btn btn-outline-dark cv-show-summary";return d&&(y+=" cv-has-favourite-plugin"),p&&(y+=" cv-has-activity-status-plugin"),r.createElement(L.L,{className:y,onClick:function(){i(!0),e.pause(),e.hide()}},e.gradePassbackPlugin().enabled?"Submit answers":"View summary")}function Wt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Qt(t){var e,n,o=t.resultsService,i=t.player,a=t.onShowSummary,c=t.mobile,l=(e=r.useState(!1),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return Wt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wt(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],s=l[1];function f(t){s(t),a&&a(t)}function m(){f(!0),i.hide()}return r.useEffect((function(){if(o&&!c)return i.on("ended",m),function(){return i.off("ended",m)}}),[]),r.useEffect((function(){u&&i.isFullscreen()&&i.exitFullscreen()}),[u]),r.createElement(r.Fragment,null,r.createElement(Bt,Object.assign({setShowSummary:f},t)),r.createElement(Zt,Object.assign({showSummary:u,setShowSummary:f},t)))}var Vt=n(8484),Yt=n(99705),zt=n(12778);function Ht(){var t=zt.o.getLiteArticle(Yt.b.MakeInteractive);return r.createElement("div",{className:"my-5 text-center"},r.createElement("h2",{className:"h3"},"Select an interaction to get started"),r.createElement("p",{className:"mb-0"},"Choose a point in the video and add a question to interact and engage your students."),!!t&&r.createElement("a",{href:t,target:"_blank",className:"btn btn-link text-info"},"How do I make interactives?"))}function $t(t){var e=t.isCreate,n=t.interactive,o=t.interaction,i=t.portalNode,a=t.goToTimepoint,c=t.promptDelete;if(!i)return r.createElement(r.Fragment,null);var l=n.timepoints.reduce((function(t,e){return t+e.interactions.length}),0);return r.createElement(F.Nq,{node:i},l?r.createElement(r.Fragment,null,r.createElement("h2",{className:"h4 mt-3"},"Question List (",l,")"),r.createElement(Vt.Z,{interactive:n,maxHeight:300,goToTimepoint:a,selectedInteractionId:null==o?void 0:o.id,onClickDelete:e?c:void 0,experimentalInteractiveQuestions:t.experimentalInteractiveQuestions})):e?r.createElement(Ht,null):r.createElement(r.Fragment,null))}var Jt=n(86764),Kt=n(3747),Xt=n(42503);function te(t,e){if(t){if("string"==typeof t)return ee(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(t,e):void 0}}function ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var ne=[x.Z9.MissingWord,x.Z9.MultipleChoice,x.Z9.TrueOrFalse,x.Z9.ShortAnswer,x.Z9.Image,x.Z9.Annotation];function re(t){var e,n,o=t.addInteraction,i=t.cancelTypeSelector,a=t.player,c=t.timepoint,l=t.open,u=t.isCreate,s=t.interaction,f=t.experimentalInteractiveQuestions,m=(e=r.useState((0,Xt.m)(a.currentTime()||0)),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||te(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],d=m[1],h=[].concat(ne);return f&&h.push.apply(h,function(t){return function(t){if(Array.isArray(t))return ee(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||te(t)||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.")}()}(Object.keys(x.IL))),r.useEffect((function(){var t=function(){d((0,Xt.m)(a.currentTime()))};return a.on("timeupdate",t),function(){return a.off("timeupdate",t)}}),[]),!s&&u&&l?r.createElement("div",{className:"d-flex align-items-center justify-content-center h-100\n ".concat(f?"cv-experimental-types":"","\n ")},r.createElement("div",{className:"cv-interactive-type-selector justify-content-center align-items-center"},r.createElement("h2",{className:"text-center fw-bold w-100 text-body mb-3 cv-add-question-copy"},c?"Add another question at:":"Add a question at:"," ",p),r.createElement("ul",{className:"list-unstyled row g-2\n ".concat(f?"row-cols-2":"row-cols-3")},h.map((function(t,e){var n=Y.w.getTypeInfo(t),i=n.name,a=n.bgClassName,c=n.Svg;return r.createElement("li",{className:"col",key:e},r.createElement(L.L,{className:"cv-type-selector rounded\n ".concat(f?" p-2 w-100 d-flex border justify-content-start align-items-center":"py-2 w-100 ".concat(a),"\n "),onClick:function(){return o(t)}},r.createElement("span",{className:"cv-create-type-icon\n ".concat(f?"text-shadow rounded ".concat(a," me-2"):"mb-1","\n ")},r.createElement(c,null)),r.createElement("div",{className:"d-flex align-items-center justify-content-center cv-interaction-type-name\n ".concat(f?"text-dark":"px-1 text-shadow","\n ")},i)))}))),(c||l)&&r.createElement("div",{className:"text-center w-100 mt-2 ".concat(c?"":"cv-adding-first-cancel")},r.createElement(L.L,{className:"btn btn-link",onClick:i},"Cancel")))):r.createElement(r.Fragment,null)}var oe=n(76306);function ie(t){var e=t.timepoint,n=t.interaction,o=t.promptDelete,i=t.optionsPortalNode,a=t.setView;if(!n)return r.createElement(r.Fragment,null);var c=[];if(c.push({label:"Move time point",onClick:function(){return a("move")}}),e.interactions.length>1){var l=Ft(n.id);c.push({label:"Re-order questions",onClick:function(){return a("reorder")},className:l?"disabled":""})}return c.push({label:"Delete",onClick:function(){return o(n.id)},className:"text-danger"}),r.createElement(F.Nq,{node:i},!!n&&r.createElement(oe.m,{actions:c,className:"p-0 mt-n2",dropdownToggleClassName:"p-0"}))}function ae(t){var e=t.interaction,n=t.interactionState,o=t.onClickContinue,i=t.onClickSave,a=t.onClickCancel,c=t.onClickAddAnother,l=t.onClickDiscard,u=Ft(e.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(L.L,{className:"btn btn-link",onClick:a},"Cancel"):s?r.createElement(L.L,{className:"btn btn-link",onClick:l},"Discard"):r.createElement(L.L,{className:"btn btn-link",onClick:c},"Add another question"),f?r.createElement(L.L,{className:"btn btn-dark ms-2 cv-interactive-spinner",onClick:function(){}},r.createElement(_.Z,{as:"span",animation:"border",role:"status",size:"sm"})):u?s?r.createElement(L.L,{className:"btn btn-dark ms-2",onClick:i},"Save"):r.createElement(L.L,{className:"btn btn-dark ms-2 disabled",onClick:function(){}},"Save"):s?r.createElement(L.L,{className:"btn btn-dark ms-2",onClick:i},"Save"):r.createElement(T,{className:"btn btn-dark ms-2",onClick:o,svgName:C.vn.Play},"Continue"))}function ce(t){var e=t.typeId,n=t.interactionState,o=t.onClickSkip,i=t.numberOfInteractions,a=t.currentIndex,c=t.changeIndex,l=!!(null==n?void 0:n.submitted),u=!!(null==n?void 0:n.hasChanges),s=!!(null==n?void 0:n.spinner),f=!!It(e),m=a<i-1;var p=a>0;return r.createElement("div",{className:"cv-timpoint-button-container flex-wrap"},!l&&f&&r.createElement(L.L,{className:"btn btn-link",onClick:o},"Come back later"),i>1&&a>0&&r.createElement(T,{className:"btn btn-dark ms-2 ".concat(p?"":"disabled"),onClick:function(){p&&c(a-1)},svgName:C.vn.ChevronUp}),s?r.createElement(L.L,{className:"btn btn-dark ms-2 cv-interactive-spinner",onClick:function(){}},r.createElement(_.Z,{as:"span",animation:"border",role:"status",size:"sm"})):l||!f?1===i||a===i-1?r.createElement(T,{className:"btn btn-dark ms-2",onClick:o,svgName:C.vn.Play},"Continue"):r.createElement(L.L,{className:"btn btn-dark ms-2 ".concat(m?"":"disabled"),onClick:function(){m&&c(a+1)}},"Next"):r.createElement(L.L,{className:"btn btn-dark ms-2 ".concat(u?"":"disabled"),onClick:function(){u&&t.onClickSubmit()}},"Save"))}function le(t){var e=t.isCreate,n=t.interaction,o=t.interactionState,i=t.continueInteractive,a=t.saveInteraction,c=t.cancel,l=t.addAnotherQuestion,u=t.discardChanges,s=t.submitInteractionAnswer,f=t.onClickSkip,m=t.changeIndex,p=t.timepoint,d=t.currentIndex;return r.createElement(r.Fragment,null,e?r.createElement(ae,{interaction:n,interactionState:o,onClickContinue:i,onClickSave:a,onClickCancel:c,onClickAddAnother:l,onClickDiscard:function(){return u()}}):r.createElement(ce,{typeId:n.typeId,interactionState:o,onClickSubmit:s,onClickSkip:f,changeIndex:m,currentIndex:d,numberOfInteractions:p.interactions.length}))}function ue(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function se(t){var e,n,o=t.typeId,i=t.currentIndex,a=t.numberOfInteractions,c=t.changeIndex,l=t.player,u=(e=r.useState((0,Xt.m)(l.currentTime()||0)),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return ue(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],f=u[1];r.useEffect((function(){var t=function(){f((0,Xt.m)(l.currentTime()))};return l.on("timeupdate",t),function(){return l.off("timeupdate",t)}}),[]);var m=Y.w.getTypeInfo(o),p=m.name,d=m.bgClassName,h=i<a-1,v=i>0;return r.createElement("div",{className:"text-center d-flex justify-content-between align-items-center p-1 ".concat(d)},r.createElement(L.L,{onClick:function(){v&&c(i-1)},className:v?"":"invisible"},r.createElement(P.x,{size:P.S.Medium,svgName:C.vn.ChevronLeft})),r.createElement("div",null,r.createElement("h2",{className:"h6 mb-0"},p),a>1&&r.createElement("div",null,i+1," of ",a," at ",s)),r.createElement(L.L,{onClick:function(){h&&c(i+1)},className:h?"":"invisible"},r.createElement(P.x,{size:P.S.Medium,svgName:C.vn.ChevronRight})))}var fe=n(52718);var me=["A","B","C","D"];function pe(t){if(!t.enableImmersiveReader)return r.createElement(r.Fragment,null);var e=t.interaction,n=t.className,o=Y.w.getTypeInfo(e.typeId),i=o.name,a=o.typeName,c="";switch(e.typeId){case x.Z9.Annotation:c=e.data.annotation;break;case x.Z9.Image:c=e.data.caption;break;case x.Z9.MissingWord:c=e.data.sentence.replace(/{([^{}]*)}/g,(function(){return"<u> </u>"}));break;case x.Z9.MultipleChoice:c=e.name,e.actionableItems.map((function(t,e){return c+="<br />".concat(me[e],": ").concat(t.name)}));break;case x.Z9.ShortAnswer:c=e.name;break;case x.Z9.TrueOrFalse:c="True or false: ".concat(e.name)}var l=e.typeId===x.Z9.Annotation||e.typeId===x.Z9.MissingWord||e.typeId===x.Z9.MultipleChoice;return r.createElement(fe.m,{title:i,text:c,html:l,className:"".concat("Erirh"," ").concat(n||""),analyticsData:{id:e.interactiveId,type:a},analyticsOptions:{location:N.LZ.InteractivePlayer,entity:N.py.Interactive,actionType:N.Vw.Click,descriptor:N._S.LaunchImmersiveReader}})}function de(t){var e=Y.w.getTypeInfo(t.interaction.typeId),n=e.name,o=e.prompt,i=e.bgClassName,a=e.Svg;return r.createElement("div",{className:"text-center text-body d-flex justify-content-between align-items-center px-3 pt-3"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("span",{className:"cv-interaction-icon rounded my-1 text-white ".concat(i)},r.createElement(a,null)),r.createElement("span",{className:"text-start flex-grow-1"},r.createElement("div",{className:"h5 ".concat(o?"":"mb-0")},r.createElement("strong",null,n)),o&&r.createElement("div",{className:"h6 mb-0"},o))),r.createElement(pe,{interaction:t.interaction,className:"ms-2",enableImmersiveReader:t.enableImmersiveReader}))}function he(t){var e=t.isCreate,n=t.interaction,o=t.player,i=t.changeIndex,a=t.timepointState,c=t.timepoint;return e?r.createElement(se,{typeId:n.typeId,changeIndex:i,player:o,currentIndex:a.interactionIndex,numberOfInteractions:c.interactions.length}):r.createElement(de,{interaction:n,enableImmersiveReader:t.enableImmersiveReader})}var ve=n(47961),ye=n(84891),ge=n(6880);function be(t){var e=t.error;return t.error?r.createElement("p",{id:t.id,className:"mt-2 small text-danger",role:"status"},e):r.createElement(r.Fragment,null)}function we(t){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},we(t)}function Ee(){Ee=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==we(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(we(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function Se(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xe(r.key),r)}}function xe(t){var e=function(t){if("object"!=we(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=we(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==we(e)?e:e+""}var ke=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function c(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}l((r=r.apply(t,e||[])).next())}))},Oe=function(t){return"/api/domain/v1/interactions/".concat(t)},Ne=function(t){return"/api/domain/v1/timepoints/".concat(t)},je={},Ie=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"saveInteraction",value:function(t){return ke(this,void 0,void 0,Ee().mark((function e(){var n,r,o,i,a;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ft(t.id),r=n?"/api/domain/v1/interactions/bulk":(c=t.id,"/api/domain/v1/interactions/bulk/".concat(c)),o={name:t.name,data:t.data,timepointId:t.timepointId,interactiveId:t.interactiveId,typeId:t.typeId,actionableItems:t.actionableItems,order:t.order},n||(o.id=t.id),i=n?d.e.post(r,JSON.stringify(o),je):d.e.put(r,JSON.stringify(o),je),e.next=7,i;case 7:a=e.sent,n&&(t.id=a.id);case 9:case"end":return e.stop()}var c}),e)})))}},{key:"deleteInteraction",value:function(t){return ke(this,void 0,void 0,Ee().mark((function e(){return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.e.delete(Oe(t),je);case 2:case"end":return e.stop()}}),e)})))}},{key:"saveTimepoint",value:function(t){return ke(this,void 0,void 0,Ee().mark((function e(){var n,r;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={interactiveId:t.interactiveId,shouldPause:1,visibleAt:t.visibleAt},e.next=3,d.e.post("/api/domain/v1/timepoints",JSON.stringify(n),je);case 3:r=e.sent,t.id=r.id;case 5:case"end":return e.stop()}}),e)})))}},{key:"updateTimepoint",value:function(t){return ke(this,void 0,void 0,Ee().mark((function e(){return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.e.put((n=t.id,"/api/domain/v1/timepoints/".concat(n)),JSON.stringify(t),je);case 2:case"end":return e.stop()}var n}),e)})))}},{key:"deleteTimepoint",value:function(t){return ke(this,void 0,void 0,Ee().mark((function e(){return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.e.delete(Ne(t),je);case 2:case"end":return e.stop()}}),e)})))}}])&&Se(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()),Ce={styleToHTML:function(t){return"SUPERSCRIPT"===t?{start:"<sup>",end:"</sup>"}:"SUBSCRIPT"===t?{start:"<sub>",end:"</sub>"}:void 0},entityToHTML:function(t,e){return"LINK"===t.type?r.createElement("a",{href:t.data.url},e):e},htmlToStyle:function(t,e,n){return"sup"===t?n.add("SUPERSCRIPT"):"sub"===t?n.add("SUBSCRIPT"):n},htmlToEntity:function(t,e,n){if("a"===t)return n("LINK","MUTABLE",{url:e.href})}};function Le(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Pe(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(t,e):void 0}}(t,e)||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 Pe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Te(t){var e=Le(r.useState(""),2),n=e[0],o=e[1],i=Le(r.useState(""),2),a=i[0],c=i[1];return r.createElement("div",{"aria-haspopup":"true","aria-expanded":t.expanded,"aria-label":"rdw-color-picker"},r.createElement("div",{className:"rdw-option-wrapper cv-annotation-toolbar-option cv-annotation-link",onClick:t.onExpandEvent}," "),t.expanded&&r.createElement("div",{className:"rdw-link-modal",onClick:function(t){return t.stopPropagation()}},r.createElement("div",{className:"form-group"},r.createElement("label",{className:"cv-interaction-field-label",htmlFor:"cv-annotation-url"},"URL"),r.createElement("input",{id:"cv-annotation-url",className:"form-control",onChange:function(t){return o(t.target.value)},value:n,placeholder:"Enter URL",autoComplete:"off"})),r.createElement("div",{className:"form-group"},r.createElement("label",{className:"cv-interaction-field-label",htmlFor:"cv-annotation-text"},"Text"),r.createElement("input",{id:"cv-annotation-text",className:"form-control",onChange:function(t){return c(t.target.value)},value:a,placeholder:"Enter Text",autoComplete:"off"})),r.createElement(L.L,{onClick:function(){return t.onChange("link",a||n,n,"_blank")},className:"btn btn-dark"},"Add")))}function Ae(t){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ae(t)}function _e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Fe(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fe(t,e):void 0}}(t,e)||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 Fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Re(){Re=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ae(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ae(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Ge(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return De(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(t,e):void 0}}(t,e)||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 De(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ze(){Ze=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Me(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Me(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}var qe=n(45368),Ue=n(34479),Be=n(79483);function We(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Qe(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(t,e):void 0}}(t,e)||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 Qe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ve(t){var e=We(r.useState(!1),2),n=e[0],o=e[1],i=We(r.useState(0),2),a=i[0],c=i[1];return r.useEffect((function(){0===a&&n&&o(!1)}),[a,n,o]),r.createElement("div",{onDragOver:function(t){t.preventDefault(),t.stopPropagation()},onDragEnter:function(t){t.preventDefault(),t.stopPropagation(),c((function(t){return t+1})),t.dataTransfer.items&&t.dataTransfer.items.length>0&&!n&&o(!0)},onDragLeave:function(t){t.preventDefault(),t.stopPropagation(),c((function(t){return t-1}))},onDrop:function(e){e.preventDefault(),e.stopPropagation(),o(!1),a>0&&c(0),e.dataTransfer.files&&e.dataTransfer.files.length>0&&(t.onDropImage(e.dataTransfer.files),e.dataTransfer.clearData())},className:n?t.dragClassName:""},t.children)}function Ye(t){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ye(t)}function ze(){ze=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ye(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ye(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function $e(){$e=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==He(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(He(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}var Je=/[.\?!,;:\-''\(\)]/g;function Ke(t){for(var e=t.split("");e.length&&e[0].match(Je);)e.shift();for(;e.length&&e[e.length-1].match(Je);)e.pop();return e.join("")}function Xe(t,e){for(var n=t.split(""),r=[],o=[];n.length&&n[0].match(Je);)r.push(n.shift());for(;n.length&&n[n.length-1].match(Je);)o.unshift(n.pop());return r.join("")+e+o.join("")}function tn(t){return t.map((function(t){if(!t.selected)return t.text;var e=Ke(t.text).length,n=new Array(e).fill("_").join("");return Xe(t.text,n)})).join(" ")}function en(t){return t.map((function(t){var e;return t.selected?null===(e=Xe(t.text,"{".concat(t.order,"}")))||void 0===e?void 0:e.trim():t.text})).join(" ")}var nn=n(75896),rn=n(36532);function on(t){return r.createElement(rn.u,{title:t.tooltipText,spanHack:!0,spanHackClassName:"d-inline-block"},r.createElement(P.x,{svgName:C.vn.Info}))}function an(){return r.createElement("svg",{viewBox:"0 0 43 38",className:"cv-upload-image-icon"},r.createElement("g",{transform:"translate(-1193.000000, -185.000000)"},r.createElement("g",{transform:"translate(1183.000000, 173.000000)"},r.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 cn(t){var e,n,o=r.useRef(null),i=r.useRef(null);function a(){t.onChange(Object.assign(Object.assign({},t.answer),{isCorrect:!t.answer.isCorrect}))}function c(e){t.isTrueOrFalse||e&&e[0]&&Be.J.onFileSelect(G.__.None,e,(function(t){Ue.j.renderCropper({src:t.src,alt:"",onClickCrop:l})}))}function l(e,n){var r=e.split(",")[1];d.e.post("".concat(t.imageApi,"v2/thumbnails/base64"),'"'.concat(r,'"'),{tokenName:"gateway"}).then((function(e){t.onChange(Object.assign(Object.assign({},t.answer),{data:{imageUrl:e.location}})),n()})).catch((function(){return alert("Something went wrong while trying to upload image. Please try again.")}))}return r.createElement(Ve,{onDropImage:c,dragClassName:"cv-multiple-choice-upload-mask"},r.createElement("div",{className:"p-2 my-1 w-100 bg-white d-flex align-items-center rounded cv-multiple-choice-answer"},r.createElement("div",{className:"form-check",onKeyDown:function(t){return"Enter"===t.key&&a()}},r.createElement("input",{id:"multiple-choice--".concat(t.answer.order),type:t.isTrueOrFalse?"radio":"checkbox",className:"form-check-input me-2",name:"multiple-choice-answer",checked:t.answer.isCorrect,onChange:a,disabled:!t.answer.name&&!(null===(e=t.answer.data)||void 0===e?void 0:e.imageUrl),"aria-label":"Correct answer ".concat(t.answer.order)}),r.createElement("label",{ref:o,htmlFor:"multiple-choice--".concat(t.answer.order),className:"cursor-pointer form-check-label"})),t.isTrueOrFalse?r.createElement("label",{className:"mb-0",htmlFor:"multiple-choice--".concat(t.answer.order)},t.answer.name):r.createElement("input",{placeholder:"Answer",onChange:function(e){t.onChange(Object.assign(Object.assign({},t.answer),{name:e.target.value}))},value:t.answer.name,className:"border-0 outline-none w-100 me-2",autoComplete:"off"}),!t.isTrueOrFalse&&r.createElement(r.Fragment,null,r.createElement("input",{type:"file",className:"file-select d-none",multiple:!1,accept:"image/jpg,image/jpeg,image/png",ref:i,onChange:function(t){return c(t.target.files)}}),(null===(n=t.answer.data)||void 0===n?void 0:n.imageUrl)?r.createElement(rn.u,{key:"1",title:"Remove image",spanHack:!0,spanHackClassName:"mt-n2 mb-n2 me-n2"},r.createElement(L.L,{type:"button",className:"cv-multiple-choice-create-image rounded-end bg-gray-400",style:{backgroundImage:"url(".concat(t.answer.data.imageUrl,")")},onClick:function(){t.onChange(Object.assign(Object.assign({},t.answer),{data:void 0}))}},r.createElement("span",{className:"cv-multiple-choice-remove-image"},r.createElement(P.x,{svgName:C.vn.Delete})))):r.createElement(rn.u,{key:"2",title:"Upload an image",spanHack:!0},r.createElement(L.L,{type:"button",className:"svg-container",onClick:function(){i.current.value=null,i.current.click(null)}},r.createElement(an,null))))))}function ln(t){return ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ln(t)}function un(){un=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==ln(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(ln(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function sn(t){var e,n;if(!(null===(e=t.question)||void 0===e?void 0:e.trim()))return"Please provide a question";if((null===(n=t.question)||void 0===n?void 0:n.trim().length)>500)return"Max question length is ".concat(500," characters");if(!t.answers.find((function(t){return t.isCorrect})))return"Please select the correct answer";if(t.answers.find((function(t){var e;return(null===(e=t.name)||void 0===e?void 0:e.length)>255})))return"Max answer length is ".concat(255," characters");var r=t.answers.filter((function(t){var e,n;return!!(null===(e=t.name)||void 0===e?void 0:e.trim())||!!(null===(n=t.data)||void 0===n?void 0:n.imageUrl)}));if(r.length<2)return"Please provide at least two answers";var o=t.answers.filter((function(t){var e;return!!(null===(e=t.name)||void 0===e?void 0:e.trim())}));if(o.length&&o.length!==r.length)return"Please add text to every question or none of the questions.";var i=!1,a={};if(o.forEach((function(t){i||(a[t.name]?i=!0:a[t.name]=!0)})),i)return"There are duplicates in your answers";var c=r.filter((function(t){var e;return null===(e=t.data)||void 0===e?void 0:e.imageUrl})).length;return c&&c<r.length?"Please add an image to all answers":null}function fn(t,e){var n,r,o,i,a;return r=this,o=void 0,i=void 0,a=un().mark((function r(){return un().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.name=null===(n=t.question)||void 0===n?void 0:n.trim(),e.actionableItems=t.answers.filter((function(t){var e,n;return!!(null===(e=t.name)||void 0===e?void 0:e.trim())||!!(null===(n=t.data)||void 0===n?void 0:n.imageUrl)})),t.feedback&&(e.data.feedback=t.feedback),r.next=5,Ie.saveInteraction(e);case 5:case"end":return r.stop()}}),r)})),new(i||(i=Promise))((function(t,e){function n(t){try{l(a.next(t))}catch(t){e(t)}}function c(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(t){t(r)}))).then(n,c)}l((a=a.apply(r,o||[])).next())}))}function mn(t){var e=t.state,n=void 0===e?function(t){var e,n=t.typeId===x.Z9.TrueOrFalse,r=null===(e=t.actionableItems)||void 0===e?void 0:e.map((function(t){return{order:t.order,name:t.name,isCorrect:t.isCorrect,data:t.data?{imageUrl:t.data.imageUrl}:null}}));return(null==r?void 0:r.length)?!n&&(null==r?void 0:r.length)<4&&r.push({order:r.length,name:"",isCorrect:!1,data:null}):r=[{order:0,name:n?"True":"",isCorrect:!1,data:null},{order:1,name:n?"False":"",isCorrect:!1,data:null}],{question:t.name||"",answers:r,feedback:t.data.feedback||""}}(t.interaction):e,o=t.setState,i=t.interaction,a=t.optionsPortalNode,c=t.showFeedback,l=i.typeId===x.Z9.TrueOrFalse;function u(t){var e,r,i=n.answers.map((function(e){return e.order!==t.order?Object.assign(Object.assign({},e),{isCorrect:!l&&e.isCorrect}):t}));if(i.find((function(t){var e;return!t.name&&!(null===(e=t.data)||void 0===e?void 0:e.imageUrl)}))&&(r=(e=i).find((function(t){var e;return!t.name&&!(null===(e=t.data)||void 0===e?void 0:e.imageUrl)})),i=e.length>2?e.filter((function(t){return t.order!==r.order})).map((function(t,e){return Object.assign(Object.assign({},t),{order:e})})):e.map((function(t){return t.order!==r.order?t:Object.assign(Object.assign({},t),{isCorrect:!1})}))),!l&&i.length<4&&!i.find((function(t){var e;return!t.name&&!(null===(e=t.data)||void 0===e?void 0:e.imageUrl)}))){var a=nn.m.last(i);i.push({name:"",order:a.order+1,isCorrect:!1,data:void 0})}o(Object.assign(Object.assign({},n),{answers:i}))}return(0,qe.R)(),r.createElement("div",{className:"cv-interactive-question"},r.createElement("div",{className:"form-group"},r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("label",{className:"cv-interaction-field-label",htmlFor:"multiple-choice-question"},"Question"),r.createElement(F.t0,{node:a})),r.createElement("input",{id:"multiple-choice-question",className:"form-control",placeholder:"Enter your question here",value:n.question,onChange:function(t){o(Object.assign(Object.assign({},n),{question:t.target.value}))},autoComplete:"off"}),!n.question&&r.createElement(be,{error:n.error})),r.createElement("div",{className:"form-group"},r.createElement("label",{className:"cv-interaction-field-label",htmlFor:"multiple-choice-answer"},l?r.createElement(r.Fragment,null,"Answer"):r.createElement(r.Fragment,null,"Answers")),r.createElement("ul",{className:"list-unstyled"},n.answers.map((function(e){return r.createElement("li",{key:e.order},r.createElement(cn,{answer:e,onChange:u,isTrueOrFalse:l,imageApi:t.imageApi}))}))),n.question&&r.createElement(be,{error:n.error})),c&&l&&r.createElement("div",{className:"form-group mb-0"},r.createElement("label",{className:"cv-interaction-field-label d-flex justify-content-between align-items-end",htmlFor:"true-or-false-feedback"},r.createElement("span",null,"Feedback ",r.createElement("small",{className:"text-secondary"},"(optional)")),r.createElement(on,{tooltipText:"Provide answer feedback for your students"})),r.createElement(dt.Z,{id:"true-or-false-feedback",className:"form-control",minRows:2,value:n.feedback||"",onChange:function(t){o(Object.assign(Object.assign({},n),{feedback:t.target.value}))},placeholder:"Give feedback for this question"})))}function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function dn(){dn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==pn(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(pn(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}var hn,vn="Please provide a question",yn="Max question length is ".concat(255," characters"),gn="Max answer length is ".concat(4e3," characters");function bn(t){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(t)}function wn(t,e,n){return(e=function(t){var e=function(t){if("object"!=bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}!function(t){t[t.QUESTION=0]="QUESTION",t[t.ANSWER=1]="ANSWER"}(hn||(hn={}));var En=wn(wn(wn(wn(wn(wn(wn({},x.Z9.Annotation,(function(t){var e=t.state,n=void 0===e?function(t){var e;return{annotation:(null===(e=t.data)||void 0===e?void 0:e.annotation)||""}}(t.interaction):e,o=t.setState,i=t.interaction,a=t.optionsPortalNode,c=_e(r.useState(function(){var t=i.data.annotation;if(t){var e=(0,ye.h4)(Ce)(t);return ge.EditorState.createWithContent(e)}return ge.EditorState.createEmpty()}()),2),l=c[0],u=c[1],s=_e(r.useState(null),2),f=s[0],m=s[1];return r.createElement("div",{className:"cv-interactive-question"},r.createElement("div",{className:"form-group"},r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("label",{className:"cv-interaction-field-label",onClick:function(){return null==f?void 0:f.focusEditor()}},"Annotation"),r.createElement(F.t0,{node:a})),r.createElement("div",{className:"cv-annotation ".concat(function(){if(!l)return!1;var t=l.getCurrentContent();return t.hasText()||"unstyled"!==t.getBlockMap().first().getType()}()?"Editor--hide-placeholder":"")},l&&r.createElement(ve.Editor,{editorState:l,onEditorStateChange:function(t){u(t);var e=t.getCurrentContent();if(e.hasText()){var r=(0,ye.cn)(Ce)(e);o(Object.assign(Object.assign({},n),{annotation:r}))}else o(Object.assign(Object.assign({},n),{annotation:""}))},toolbarClassName:"cv-annotation-toolbar",editorClassName:"form-control cv-annotation-editor",ref:m,placeholder:"Enter your annotation here",spellCheck:!0,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:Te,options:["link"]}}}),r.createElement(be,{error:n.error}))))})),x.Z9.Image,(function(t){var e=t.state,n=void 0===e?function(t){var e;return{url:(null===(e=t.data)||void 0===e?void 0:e.url)||"",caption:t.data.caption}}(t.interaction):e,o=t.setState,i=t.interaction,a=t.optionsPortalNode;(0,qe.R)();var c=r.useRef(null);function l(t){t&&t[0]&&Be.J.onFileSelect(G.__.None,t,(function(t){Ue.j.renderCropper({src:t.src,alt:"",onClickCrop:u})}))}function u(e,r){var i=e.split(",")[1];d.e.post("".concat(t.imageApi,"v2/thumbnails/base64"),'"'.concat(i,'"'),{tokenName:"gateway"}).then((function(t){o(Object.assign(Object.assign({},n),{url:t.location})),r()})).catch((function(){return alert("Something went wrong while trying to upload image. Please try again.")}))}return r.createElement("div",{className:"cv-interactive-question"},r.createElement("div",{className:"form-group"},r.createElement("div",{className:"d-flex justify-content-between align-items-center mb-2"},r.createElement("label",{className:"cv-interaction-field-label"},"Image"),r.createElement(F.t0,{node:a})),n.url?r.createElement("div",{className:"text-center"},r.createElement("div",{className:"cv-uploaded-image-container"},r.createElement("img",{className:"img img-fluid rounded",src:n.url,alt:n.caption}),r.createElement(L.L,{className:"cv-remove-uploaded-image d-flex justify-content-center align-items-center",onClick:function(){o(Object.assign(Object.assign({},n),{url:""}))}},r.createElement("div",{className:"btn btn-link text-light"},"Remove")))):r.createElement(Ve,{onDropImage:l,dragClassName:"cv-image-upload-mask"},r.createElement("div",{className:"cv-image-interaction-upload-container bg-white rounded py-3 text-center"},r.createElement("div",{className:"cv-upload-scenery-image mx-auto"}),r.createElement("p",{className:"mb-0"},"Drag and drop an image file or"),r.createElement(L.L,{type:"button",className:"text-underline d-inline-block",onClick:function(){c.current.value=null,c.current.click(null)}},"upload from your device"),r.createElement("input",{type:"file",className:"file-select d-none",multiple:!1,accept:"image/jpg,image/jpeg,image/png",ref:c,onChange:function(t){return l(t.target.files)}}))),r.createElement(be,{error:n.error})),r.createElement("div",{className:"form-group"},r.createElement("label",{className:"cv-interaction-field-label",htmlFor:"image-caption"},"Caption ",r.createElement("small",{className:"text-secondary"},"(optional)")),r.createElement("textarea",{id:"image-caption",className:"form-control",placeholder:"Caption your image",value:n.caption||i.data.caption||"",onChange:function(t){o(Object.assign(Object.assign({},n),{caption:t.target.value}))},rows:2})))})),x.Z9.MissingWord,(function(t){var e,n,o,i,a,c,l=t.state,u=void 0===l?(i=(null===(n=(e=t.interaction).data)||void 0===n?void 0:n.sentence)||"",a=i.split(" ").filter(Boolean),c=a.map((function(t,e){return{text:t,order:e,selected:!1}})),null===(o=e.actionableItems)||void 0===o||o.forEach((function(t){var e=t.order,n=Xe(a[e],t.name);a[e]=n,c[e].text=n,c[e].selected=!0})),{fullSentence:a.join(" "),sentence:i,preview:e.name,words:c}):l,s=t.setState,f=t.optionsPortalNode,m=!!u.sentence;return r.createElement("div",{className:"cv-interactive-question"},r.createElement("div",{className:"form-group"},r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("label",{className:"cv-interaction-field-label",htmlFor:"missing-word-sentence"},"Sentence"),r.createElement(F.t0,{node:f})),r.createElement("input",{id:"missing-word-sentence",className:"form-control",placeholder:"Enter your sentence here",value:u.fullSentence||"",onChange:function(t){var e=t.target.value,n=e.split(" ").filter(Boolean).map((function(t,e){return{text:t,order:e,selected:!1}}));s(Object.assign(Object.assign({},u),{fullSentence:e,sentence:en(n),preview:tn(n),words:n}))},autoComplete:"off"})),m&&r.createElement(r.Fragment,null,r.createElement("div",{className:"form-group"},r.createElement("label",{className:"cv-interaction-field-label"},"Select the missing word(s)"),r.createElement("ul",{className:"list-unstyled d-flex flex-wrap mx-n1 mb-n1"},u.words.map((function(t,e){var n;return(null===(n=Ke(t.text))||void 0===n?void 0:n.trim())?r.createElement("li",{key:"".concat(e,"-").concat(t.text)},r.createElement(L.L,{className:"rounded border p-2 mx-1 mb-1 cursor-pointer ".concat(t.selected?"bg-dark text-white":"bg-white"),onClick:function(){return t=e,n=u.words.map((function(e){return e.order!==t?e:Object.assign(Object.assign({},e),{selected:!e.selected})})),void s(Object.assign(Object.assign({},u),{words:n,preview:tn(n),sentence:en(n)}));var t,n}},Ke(t.text))):r.createElement(r.Fragment,{key:"".concat(e,"-").concat(t.text)})})))),r.createElement("div",null,r.createElement("label",{className:"cv-interaction-field-label"},"Preview"),r.createElement("p",null,u.preview))),r.createElement(be,{error:u.error}))})),x.Z9.MultipleChoice,mn),x.Z9.ShortAnswer,(function(t){var e=t.state,n=void 0===e?function(t){return{question:t.name,suggestedResponse:t.data.suggestedResponse||""}}(t.interaction):e,o=t.setState,i=t.interaction,a=t.optionsPortalNode,c=t.showFeedback;function l(){switch(n.error){case vn:case yn:return hn.QUESTION;case gn:return hn.ANSWER}}return r.createElement("div",{className:"cv-interactive-question"},r.createElement("div",{className:"form-group"},r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("label",{className:"cv-interaction-field-label",htmlFor:"short-answer-question"},"Question"),r.createElement(F.t0,{node:a})),r.createElement("input",{id:"short-answer-question",className:"form-control",onChange:function(t){o(Object.assign(Object.assign({},n),{question:t.target.value}))},value:n.question||i.data.text||"",placeholder:"Enter your question here",autoComplete:"off","aria-errormessage":"question-error"}),l()===hn.QUESTION&&r.createElement(be,{id:"question-error",error:n.error})),c&&r.createElement("div",{className:"form-group"},r.createElement("label",{className:"cv-interaction-field-label d-flex justify-content-between align-items-end",htmlFor:"short-answer-suggested-response"},r.createElement("span",null,"Suggested Response ",r.createElement("small",{className:"text-secondary"},"(optional)")),r.createElement(on,{tooltipText:"Provide a suggested response for your students"})),r.createElement(dt.Z,{id:"short-answer-suggested-response",className:"form-control",minRows:2,value:n.suggestedResponse||"",onChange:function(t){o(Object.assign(Object.assign({},n),{suggestedResponse:t.target.value}))},placeholder:"Give a suggested response for this question","aria-errormessage":"answer-error"}),l()===hn.ANSWER&&r.createElement(be,{id:"answer-error",error:n.error})))})),x.Z9.TrueOrFalse,mn),x.Z9.Illustration,(function(t){var e=Ge(r.useState(),2),n=e[0],o=e[1],i=Ge(r.useState(!1),2),a=i[0],c=i[1],l=t.state,u=void 0===l?{question:t.interaction.name}:l,s=t.setState,f=t.optionsPortalNode;return r.createElement("div",{className:"cv-interactive-question"},r.createElement("fieldset",{className:"form-group"},r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("label",{className:"cv-interaction-field-label",htmlFor:"illustration-question"},"Prompt"),r.createElement(F.t0,{node:f})),r.createElement("input",{id:"illustration-question",className:"form-control",onChange:function(t){s(Object.assign(Object.assign({},u),{question:t.target.value}))},value:u.question||"",placeholder:"Enter your prompt here",autoComplete:"off","aria-invalid":!!u.error,"aria-errormessage":"illustrationQuestionError"}),r.createElement(be,{id:"illustrationQuestionError",error:u.error})),r.createElement("div",{className:"alert text-dark bg-light-blue px-2 rounded-3"},"Students attempting this question will be prompted to draw their answer. ",r.createElement(L.L,{onClick:function(){return c(!0)},className:"btn-link text-underline d-inline"},"Preview how students will answer.")),a&&r.createElement(F.Nq,{node:t.fullWidthPortalNode},r.createElement(et,{interaction:Object.assign(Object.assign({},t.interaction),{name:u.question}),onSave:function(t){o(t),c(!1)},onCancel:function(){return c(!1)}})),n&&r.createElement("img",{className:"img-fluid border rounded mt-2 w-50 d-block",src:n,alt:"Illustration you just created."}))})),Sn=wn(wn(wn(wn(wn(wn(wn({},x.Z9.Annotation,(function(t){var e,n;return(null===(e=t.annotation)||void 0===e?void 0:e.trim())?(null===(n=t.annotation)||void 0===n?void 0:n.trim()).replace(/<[^>]*>/g,"").length>3500?"Max length is ".concat(3500," characters"):null:"Please provide an annotation"})),x.Z9.Image,(function(t){return t.url?null:"Please upload an image"})),x.Z9.MissingWord,(function(t){var e,n;return(null===(e=t.sentence)||void 0===e?void 0:e.trim())?(null===(n=t.sentence)||void 0===n?void 0:n.trim().length)>255?"Max length is ".concat(255," characters"):t.words.find((function(t){return t.selected}))?null:"Please select a missing word":"Please provide a sentence"})),x.Z9.MultipleChoice,sn),x.Z9.ShortAnswer,(function(t){var e,n,r;return(null===(e=t.question)||void 0===e?void 0:e.trim())?(null===(n=t.question)||void 0===n?void 0:n.trim().length)>255?yn:(null===(r=t.suggestedResponse)||void 0===r?void 0:r.trim().length)>4e3?gn:null:vn})),x.Z9.TrueOrFalse,sn),x.Z9.Illustration,(function(t){var e;return(null===(e=t.question)||void 0===e?void 0:e.trim())?null:"Please provide a question"})),xn=wn(wn(wn(wn(wn(wn(wn({},x.Z9.Annotation,(function(t,e){var n,r,o,i,a;return r=this,o=void 0,i=void 0,a=Re().mark((function r(){return Re().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.name="Annotation",e.data.annotation=null===(n=t.annotation)||void 0===n?void 0:n.trim(),e.actionableItems=[{name:"Answer"}],r.next=5,Ie.saveInteraction(e);case 5:case"end":return r.stop()}}),r)})),new(i||(i=Promise))((function(t,e){function n(t){try{l(a.next(t))}catch(t){e(t)}}function c(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(t){t(r)}))).then(n,c)}l((a=a.apply(r,o||[])).next())}))})),x.Z9.Image,(function(t,e){var n,r,o,i,a,c;return o=this,i=void 0,a=void 0,c=ze().mark((function o(){return ze().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return e.data.url=t.url,e.name=(null===(n=t.caption)||void 0===n?void 0:n.trim())||"Image",e.data.caption=null===(r=t.caption)||void 0===r?void 0:r.trim(),e.actionableItems=[{name:"Answer"}],o.next=6,Ie.saveInteraction(e);case 6:case"end":return o.stop()}}),o)})),new(a||(a=Promise))((function(t,e){function n(t){try{l(c.next(t))}catch(t){e(t)}}function r(t){try{l(c.throw(t))}catch(t){e(t)}}function l(e){var o;e.done?t(e.value):(o=e.value,o instanceof a?o:new a((function(t){t(o)}))).then(n,r)}l((c=c.apply(o,i||[])).next())}))})),x.Z9.MissingWord,(function(t,e){return n=this,r=void 0,o=void 0,i=$e().mark((function n(){var r;return $e().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.data.sentence=en(t.words),e.name=t.preview,r=t.words.filter((function(t){return t.selected})),e.actionableItems=r.map((function(t){return{name:Ke(t.text),order:t.order,isCorrect:!0}})),n.next=6,Ie.saveInteraction(e);case 6:case"end":return n.stop()}}),n)})),new(o||(o=Promise))((function(t,e){function a(t){try{l(i.next(t))}catch(t){e(t)}}function c(t){try{l(i.throw(t))}catch(t){e(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,c)}l((i=i.apply(n,r||[])).next())}));var n,r,o,i})),x.Z9.MultipleChoice,fn),x.Z9.ShortAnswer,(function(t,e){var n,r,o,i,a,c;return o=this,i=void 0,a=void 0,c=dn().mark((function o(){return dn().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return e.name=null===(n=t.question)||void 0===n?void 0:n.trim(),e.data.suggestedResponse=null===(r=t.suggestedResponse)||void 0===r?void 0:r.trim(),e.actionableItems=[{name:"Answer"}],o.next=5,Ie.saveInteraction(e);case 5:case"end":return o.stop()}}),o)})),new(a||(a=Promise))((function(t,e){function n(t){try{l(c.next(t))}catch(t){e(t)}}function r(t){try{l(c.throw(t))}catch(t){e(t)}}function l(e){var o;e.done?t(e.value):(o=e.value,o instanceof a?o:new a((function(t){t(o)}))).then(n,r)}l((c=c.apply(o,i||[])).next())}))})),x.Z9.TrueOrFalse,fn),x.Z9.Illustration,(function(t,e){var n,r,o,i,a;return r=this,o=void 0,i=void 0,a=Ze().mark((function r(){return Ze().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.name=null===(n=t.question)||void 0===n?void 0:n.trim(),e.actionableItems=[{name:"Answer"}],r.next=4,Ie.saveInteraction(e);case 4:case"end":return r.stop()}}),r)})),new(i||(i=Promise))((function(t,e){function n(t){try{l(a.next(t))}catch(t){e(t)}}function c(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(t){t(r)}))).then(n,c)}l((a=a.apply(r,o||[])).next())}))}));function kn(t){return xn[t]}function On(t){return On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(t)}function Nn(){Nn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==On(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(On(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function jn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return In(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?In(t,e):void 0}}(t,e)||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 In(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Cn=null,Ln=0,Pn=1;function Tn(t){var e=t.timepoint,n=t.updateTimepointTime,o=t.saveTimepoint,i=t.back,a=t.clearTimepointTimeState,c=jn(r.useState((0,Xt.m)(e.visibleAt/1e3)),2),l=c[0],u=c[1],s=jn(r.useState(!1),2),f=s[0],m=s[1];function p(t){n(t*Pn),u((0,Xt.m)(e.visibleAt/1e3)),2==++Ln?Pn=5:4===Ln?Pn=20:6===Ln?Pn=60:8===Ln&&(Pn=120),Cn||(Cn=window.setInterval((function(){return p(t)}),200),window.addEventListener("mouseup",d))}function d(){window.removeEventListener("mouseup",d),window.clearInterval(Cn),Cn=null,Ln=0,Pn=1}return r.useEffect((function(){return d}),[]),r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-timepoint flex-grow-1"},r.createElement("div",{className:"cv-timepoint-padding"},r.createElement("div",{className:"cv-interactive-question"},r.createElement("label",{htmlFor:"move-time-point",className:"cv-interaction-field-label mb-0"},"Move time point"),r.createElement("div",{className:"text-center mt-3"},r.createElement(L.L,{className:"cv-left-arrow d-inline-block cursor-pointer",onClick:function(){},onMouseDown:function(){return p(-1)},onKeyDown:function(t){t.stopPropagation(),13===t.keyCode&&0===Ln&&p(-1)},onKeyUp:d}),r.createElement("input",{id:"move-time-point",className:"form-control text-center d-inline-block cv-move-timepoint-input",value:l,onChange:function(){},onKeyDown:function(t){t.stopPropagation(),37===t.keyCode&&0===Ln&&p(-1),39===t.keyCode&&0===Ln&&p(1)},onKeyUp:d}),r.createElement(L.L,{className:"cv-right-arrow d-inline-block cursor-pointer",onClick:function(){},onMouseDown:function(){return p(1)},onKeyDown:function(t){t.stopPropagation(),13===t.keyCode&&0===Ln&&p(1)},onKeyUp:d}))))),r.createElement("div",{className:"cv-timpoint-button-container"},r.createElement(L.L,{className:"btn btn-link",onClick:function(){a(!0),i()}},"Cancel"),f?r.createElement(L.L,{className:"btn btn-dark ms-2 cv-interactive-spinner",onClick:function(){}},r.createElement(_.Z,{as:"span",animation:"border",role:"status",size:"sm"})):r.createElement(L.L,{className:"btn btn-dark",onClick:function(){return t=this,e=void 0,n=void 0,r=Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return m(!0),t.next=3,o();case 3:i();case 4:case"end":return t.stop()}}),t)})),new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function c(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}l((r=r.apply(t,e||[])).next())}));var t,e,n,r}},"Save")))}var An=n(17808),_n=n(1287);function Fn(t){return Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(t)}function Rn(){Rn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Fn(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Fn(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function Mn(t){return function(t){if(Array.isArray(t))return Zn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Dn(t)||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 Gn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||Dn(t,e)||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 Dn(t,e){if(t){if("string"==typeof t)return Zn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(t,e):void 0}}function Zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var qn=function(t){var e=t.interaction,n=Y.w.getTypeInfo(e.typeId).bgClassName,o=r.forwardRef((function(t,o){return r.createElement("div",Object.assign({className:"py-2 text-start"},t.dragAttributes,t.dragListeners,{ref:o,style:t.style}),r.createElement("span",{className:"fB8W8"},r.createElement(P.x,{size:P.S.Small,svgName:C.vn.Handle})),r.createElement(Z.y,{interaction:e,iconClassName:"".concat("GSE1a"," ").concat(n),questionClassName:"".concat("qKMzc"," clamp-1")}))}));return r.createElement(_n.W,{id:e.id,childComponent:o,childProps:{}})},Un=function(t){var e=t.interactions,n=function(){var t=r.useRef(null);function e(){document.body.style.cursor="",document.removeEventListener("mouseup",e),t.current&&(t.current.style.cursor="grab")}return{ref:t,style:{cursor:"grab"},onMouseDown:function(){document.body.style.cursor="grabbing",document.addEventListener("mouseup",e),t.current&&(t.current.style.cursor="grabbing")},onMouseUp:e}}();return r.createElement(An.Q,{ids:e.map((function(t){return t.id})),getDragOverlay:function(t){return r.createElement(qn,{key:t,interaction:e.find((function(e){return e.id===t}))})},onSortEnd:t.onSortEnd},r.createElement("div",Object.assign({tabIndex:0},n),e.map((function(t){return r.createElement(qn,{key:t.id,interaction:t})}))))};function Bn(t){var e=Gn(r.useState(!1),2),n=e[0],o=e[1],i=Gn(r.useState(Mn(t.interactions)),2),a=i[0],c=i[1],l=Gn(r.useState(!1),2),u=l[0],s=l[1];return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-timepoint flex-grow-1"},r.createElement("div",{className:"cv-timepoint-padding"},r.createElement("div",{className:"cv-interactive-question"},r.createElement("label",{className:"cv-interaction-field-label mb-0"},"Re-order questions"),r.createElement("div",{className:"text-center mt-3"},r.createElement(Un,{onSortEnd:function(t){var e=t.active,n=t.over,r=a.findIndex((function(t){return t.id.toString()===e.id.toString()})),o=a.findIndex((function(t){return t.id.toString()===n.id.toString()}));r!==o&&(c(Mn(function(t,e,n){for(;e<0;)e+=t.length;for(;n<0;)n+=t.length;if(n>=t.length)for(var r=n-t.length+1;r--;)t.push(void 0);return t.splice(n,0,t.splice(e,1)[0]),t}(a,r,o))),s(!0))},interactions:a}))))),r.createElement("div",{className:"cv-timpoint-button-container"},r.createElement(L.L,{className:"btn btn-link",onClick:function(){c(Mn(t.interactions)),s(!1),t.back()}},"Cancel"),n?r.createElement(L.L,{className:"btn btn-dark ms-2 cv-interactive-spinner",onClick:function(){}},r.createElement(_.Z,{as:"span",animation:"border",role:"status",size:"sm"})):r.createElement(L.L,{className:"btn btn-dark ".concat(u?"":"disabled"),onClick:function(){return e=this,n=void 0,r=void 0,i=Rn().mark((function e(){return Rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u){e.next=2;break}return e.abrupt("return");case 2:return o(!0),e.next=5,t.reOrderQuestions(a);case 5:o(!1),t.back();case 7:case"end":return e.stop()}}),e)})),new(r||(r=Promise))((function(t,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function c(t){try{l(i.throw(t))}catch(t){o(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(a,c)}l((i=i.apply(e,n||[])).next())}));var e,n,r,i}},"Save")))}function Wn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Qn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qn(t,e):void 0}}(t,e)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Vn(t){var e=t.isCreate,n=t.interaction,i=t.mode,a=t.immediateFeedback,c=t.interactionState,l=t.shouldFocus,u=t.delayFocus,s=t.open,f=t.timepoint,m=t.userUpdateInteractionState,p=t.submitInteractionAnswer,d=t.saveInteraction,h=t.skip,v=r.useRef(null),y=r.useRef(null),g=r.useRef(0),b=(0,Kt.a)(Jt.r.XLDown),w=!e||b;function E(){return!!v.current&&!!l&&!!s}function S(){v.current&&(v.current.focus(),O(!0))}var x=Wn(r.useState(!1),2),k=x[0],O=x[1];r.useEffect((function(){E()&&(k||(u&&w?g.current=window.setTimeout((function(){g.current=0,E()&&S()}),400):S()))}),[v.current,k]);var N=Wn(r.useState("question"),2),j=N[0],I=N[1],C=r.useMemo((function(){return(0,F.oD)()}),[]),L=n?function(t,e){if(e===o.A.Create)return function(t){return En[t]}(t);if(e===o.A.View)return function(t){return kt[t]}(t);throw new Error("Cannot find components for the mode ".concat(e))}(n.typeId,i):null,P=a;return e||(P=P&&(null==c?void 0:c.submitted)),r.createElement(r.Fragment,null,r.createElement(ie,Object.assign({optionsPortalNode:C,setView:I},t)),r.createElement(Q.Z,{className:"h-100",ref:y},r.createElement(re,Object.assign({},t)),!!n&&r.createElement("div",{className:"d-flex flex-column h-100"},r.createElement(he,Object.assign({},t)),"question"===j&&r.createElement(r.Fragment,null,r.createElement("form",{className:"cv-timepoint flex-grow-1",tabIndex:-1,onSubmit:function(t){t.preventDefault(),e?d():p()}},r.createElement("div",{className:"cv-timepoint-padding h-100"},r.createElement("div",{ref:v,tabIndex:0}),r.createElement(L,Object.assign({state:c,setState:m,recalculateScroll:function(){y.current.recalculate()},showFeedback:P,optionsPortalNode:C},t)))),r.createElement(le,Object.assign({onClickSkip:function(){g.current&&window.clearTimeout(g.current),h()}},t))),"move"===j&&r.createElement(Tn,Object.assign({back:function(){return I("question")}},t)),"reorder"===j&&r.createElement(Bn,Object.assign({back:function(){return I("question")},interactions:f.interactions},t)))))}function Yn(t){var e=t.open,n=t.nextInteraction,o=t.nextInteractionState,i=t.timepointState,a=t.interaction,c=t.delayFocus,l=t.experimentalInteractiveQuestions,u=r.useMemo((function(){return(0,F.oD)({attributes:{class:"cv-interactive-lhs"}})}),[]),s=r.useMemo((function(){return(0,F.oD)({attributes:{class:"cv-interactive-full"}})}),[]),f=n&&i.nextInteractionIndex<i.interactionIndex,m=n&&i.nextInteractionIndex>i.interactionIndex,p=m&&i.slideIn,d=f&&i.slideIn,h=e&&!f&&!m;return r.createElement(r.Fragment,null,r.createElement("div",{className:"cv-interactive-full-container ".concat(h?"":"cv-closed-full")},r.createElement(F.t0,{node:s})),r.createElement("div",{className:"cv-interactive-lhs-container ".concat(h?"":"cv-closed-lhs")},r.createElement(F.t0,{node:u})),r.createElement("div",{className:"cv-interactive ".concat(e?"cv-open":"")},f&&r.createElement("div",{className:"cv-prev-interaction ".concat(i.slideIn?"cv-slide-in":"")},r.createElement(Vn,Object.assign({},t,{currentIndex:i.nextInteractionIndex,interaction:n,interactionState:o}))),r.createElement("div",{className:"\n cv-main-slide\n ".concat(p?"cv-slide-out-up":"","\n ").concat(d?"cv-slide-out-down":"","\n ").concat(n?"cv-transitioning":"","\n ")},r.createElement(Vn,Object.assign({key:null==a?void 0:a.id},t,{currentIndex:i.interactionIndex,shouldFocus:a&&!f&&!m,delayFocus:c,leftHandSidePortalNode:u,fullWidthPortalNode:s,experimentalInteractiveQuestions:l}))),m&&r.createElement("div",{className:"cv-next-interaction ".concat(i.slideIn?"cv-slide-in":"")},r.createElement(Vn,Object.assign({},t,{currentIndex:i.nextInteractionIndex,interaction:n,interactionState:o})))))}function zn(t){return zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zn(t)}function Hn(t,e,n){return(e=function(t){var e=function(t){if("object"!=zn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $n={interactions:{},timepoints:{}};function Jn(t,e){return"interaction"===e.type?{timepoints:t.timepoints,interactions:Object.assign(Object.assign({},t.interactions),Hn({},e.id,e.value))}:"timepoint"===e.type?{interactions:t.interactions,timepoints:Object.assign(Object.assign({},t.timepoints),Hn({},e.id,e.value))}:void 0}function Kn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Xn={interactionIndex:0},tr=function(t){var e,n,i=t.mode,a=t.timepoint,c=t.latestSession,l=i===o.A.Create,u=r.useReducer(Jn,null,(function(){return function(t){return t?{timepoints:{},interactions:t.actions.reduce((function(t,e){return t[e.interactionId]=Object.assign(Object.assign({},t[e.interactionId]),Hn(Hn({},e.actionableItemId,e.data),"submitted",!0)),t}),{})}:$n}(c)})),s=(n=2,function(t){if(Array.isArray(t))return t}(e=u)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return Kn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kn(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=s[0],m=s[1],p=g(null==a?void 0:a.id),d=null==a?void 0:a.interactions[p.interactionIndex],h="number"==typeof p.nextInteractionIndex?null==a?void 0:a.interactions[p.nextInteractionIndex]:null,v=b(null==d?void 0:d.id),y=b(null==h?void 0:h.id);function g(t){return t&&f.timepoints[t]||Xn}function b(t){if(!t)return{};var e=f.interactions[t];return e||l?e:{}}function w(t,e,n){var r=b(t);m({type:"interaction",id:t,value:Object.assign(Object.assign({},n?{}:r),e)})}return{state:f,interaction:d,interactionState:v,timepointState:p,nextInteraction:h,nextInteractionState:y,getTimepointState:g,getInteractionState:b,updateTimepointState:function(t,e){var n=g(t);m({type:"timepoint",id:t,value:Object.assign(Object.assign({},n),e)})},updateInteractionState:w,clearTimepointState:function(t){m({type:"timepoint",id:t,value:void 0})},clearInteractionState:function(t){m({type:"interaction",id:t,value:void 0})},userUpdateInteractionState:function(t,e){w(d.id,Object.assign(Object.assign({},t),{hasChanges:!0,error:null}),e)}}};function er(t){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(t)}function nr(){nr=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==er(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(er(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}var rr=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function c(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}l((r=r.apply(t,e||[])).next())}))},or=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},ir=!1;function ar(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return cr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cr(t,e):void 0}}(t,e)||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 cr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var lr=n(89476),ur=n(76343),sr=n(14735),fr=n(83657),mr=n(5960);function pr(t){var e,n=!t.parentVideo||(null===(e=t.parentVideo)||void 0===e?void 0:e.status)===mr.X.Published,o=function(t){var e,n=0;return null===(e=null==t?void 0:t.timepoints)||void 0===e||e.forEach((function(t){var e;return null===(e=t.interactions)||void 0===e?void 0:e.forEach((function(){return n++}))})),n>0}(t.interactive)&&n,i=[];return t.onClickEditDetails&&i.push({label:"Edit details",svgName:C.vn.Edit,button:!0,className:"btn btn-outline-dark",onClick:t.onClickEditDetails}),t.onClickPublish&&i.push({label:"Publish",button:!0,className:"btn btn-dark ms-2".concat(o?"":" disabled"),disabled:!o,tooltip:o?"":n?"Interactives cannot be published without questions":"Parent video must be published before interactives can be published",onClick:function(){o&&t.onClickPublish&&t.onClickPublish()}}),t.onClickCopy&&i.push({label:"Copy interactive",button:!1,onClick:t.onClickCopy}),t.onClickDelete&&i.push({label:"Delete interactive",button:!1,onClick:t.onClickDelete,className:"text-danger"}),i.length?r.createElement(F.Nq,{node:t.portalNode},r.createElement(fr.e,{actions:i,actionsDropdownClassName:"btn btn-outline-dark ms-2"})):r.createElement(r.Fragment,null)}var dr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function hr(t){var e=t.title,n=t.player,i=t.track,a=t.mode,c=t.interactive,l=t.imageApi,u=t.actionsPortalNode,s=t.questionListPortalNode,f=t.summaryPortalNode,m=t.resultsService,p=t.currentUser,d=t.progress,h=t.latestSession,v=t.clipOffset,y=t.analyticsService,g=t.enableImmersiveReader,b=t.mobile,w=t.parentVideo,E=t.experimentalInteractiveQuestions,S=function(t){var e=t.player,n=t.track,o=t.interactive,i=t.clipOffset,a=ar(r.useState(!1),2),c=a[0],l=a[1],u=ar(r.useState(!1),2),s=u[0],f=u[1],m=ar(r.useState(null),2),p=m[0],d=m[1];function h(t){return i?t+i:t}function v(t){f(!!t&&c),l(t)}function y(){var t=n.activeCues;if(!t.length)return v(!1),void d(null);var r=o.timepoints.find((function(e){return e.id.toString()===t[0].text.toString()}));if(!r)return v(!1),void d(null);r.shouldPause&&(e.seeking()?e.one("play",(function(){return e.pause()})):e.pause()),v(!0),d(r)}function g(t){for(var e=0;e<n.cues.length;e++){var r=n.cues[e];if(r.text.toString()===t.toString())return r}}return r.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),e.play()},updateCue:function(t,e){var n=g(t);n.text=e.toString(),n.originalCue_.text=e.toString()},addCue:function(t){var r=e.currentTime();n.addCue({startTime:h(r)-.001,endTime:h(r+1),text:t}),n.trigger("cv:cuechange"),e.paused()&&n.trigger("cuechange")},removeCue:function(t){t=h(t);for(var e=0;e<n.cues.length;){var r=n.cues[e];if(r.startTime<=t&&r.endTime>=t){n.removeCue(r),n.trigger("cv:cuechange"),n.trigger("cuechange");break}e++}},moveTimepoint:function(t){var r=g(p.id);if(r){var o=t/1e3;r.startTime=h(o),r.endTime=h(o+1),e.currentTime(o+.5,!0),p.visibleAt=t,n.trigger("cv:cuechange")}},getClipOffset:h}}({player:n,track:i,interactive:c,mode:a,clipOffset:v}),x=S.open,k=S.timepoint,O=S.wasOpen,j=dr(S,["open","timepoint","wasOpen"]),I=function(t){var e=t.interactive,n=t.timepoint,i=t.player,a=t.mode,c=t.resultsService,l=t.latestSession,u=t.analyticsService,s=t.imageApi,f=or(t,["interactive","timepoint","player","mode","resultsService","latestSession","analyticsService","imageApi"]),m=tr({mode:a,timepoint:n,latestSession:l}),p=m.state,d=m.interaction,h=m.interactionState,v=m.timepointState,y=m.nextInteraction,g=m.nextInteractionState,b=or(m,["state","interaction","interactionState","timepointState","nextInteraction","nextInteractionState"]),w=a===o.A.Create;function E(t){for(var n=0;n<e.timepoints.length;){for(var r=e.timepoints[n],o=0;o<r.interactions.length;){var i=r.interactions[o];if(i.id===t)return{localTimepoint:r,localInteraction:i};o++}n++}return{localInteraction:null,localTimepoint:null}}function S(t){var n=Y.w.getTypeInfo(t.typeId);return{id:Ft(t.id)?void 0:t.id,typeId:t.typeId,type:n.typeName,interactiveId:e.id,timepointId:Ft(t.timepointId)?void 0:t.timepointId,order:t.order}}function x(t){return rr(this,void 0,void 0,nr().mark((function n(){var r,o,i,a,c,l,s;return nr().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=E(t),o=r.localInteraction,i=r.localTimepoint,o&&i){n.next=3;break}throw new Error("Could not find the interaction and timepoint for the interactionId ".concat(t));case 3:if(a=S(o),Ft(o.id)){n.next=10;break}return n.next=7,Ie.deleteInteraction(o.id);case 7:null==u||u.logUserAction(a,{actionType:N.Vw.Delete,entity:N.py.Interaction,workflowPhase:N.eu.Complete}),n.next=11;break;case 10:null==u||u.logUserAction(a,{actionType:N.Vw.Create,entity:N.py.Interaction,workflowPhase:N.eu.Discard});case 11:if(c=i.interactions.findIndex((function(t){return t.id===o.id})),i.interactions.splice(c,1),b.clearInteractionState(o.id),l=b.getTimepointState(i.id),c<l.interactionIndex&&b.updateTimepointState(i.id,{interactionIndex:l.interactionIndex-1}),!(i.interactions.length>0)){n.next=18;break}return n.abrupt("return");case 18:if(Ft(i.id)){n.next=21;break}return n.next=21,Ie.deleteTimepoint(i.id);case 21:s=e.timepoints.findIndex((function(t){return t.id===i.id})),e.timepoints.splice(s,1),f.removeCue(i.visibleAt/1e3),b.clearTimepointState(i.id);case 25:case"end":return n.stop()}}),n)})))}function k(t){if(d){var e=Ft(d.id);e||(null==h?void 0:h.hasChanges)||(null==v?void 0:v.hasChanges)?V.M.render(r.createElement("p",null,"Do you want to discard your changes?"),{title:"Unsaved changes",submitButtonProps:{onClick:function(){(null==v?void 0:v.hasChanges)&&L(!0),e?x(d.id):b.clearInteractionState(d.id),t&&t()},variant:"danger",text:"Discard"},cancelButtonProps:{variant:"link",text:"Cancel"}}):t&&t()}else t&&t()}function O(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(w)k((function(){b.updateTimepointState(n.id,{interactionIndex:t})}));else{var r=function(){b.updateTimepointState(n.id,{nextInteractionIndex:t}),window.requestAnimationFrame((function(){b.updateTimepointState(n.id,{nextInteractionIndex:t,slideIn:!0}),window.setTimeout((function(){b.updateTimepointState(n.id,{interactionIndex:t,nextInteractionIndex:null,slideIn:null})}),400)}))};e?k(r):r()}}function j(){v.interactionIndex+1>=n.interactions.length?f.continueInteractive():O(v.interactionIndex+1,!1)}function I(){e.timepoints.sort((function(t,e){return t.visibleAt>e.visibleAt?1:e.visibleAt>t.visibleAt?-1:0}))}function C(){O(n.interactions.length)}function L(t){(null==v?void 0:v.hasChanges)&&(t&&f.moveTimepoint(v.originalVisibleAt),b.updateTimepointState(n.id,{hasChanges:void 0,originalVisibleAt:void 0}),ir=!1)}return{state:p,interaction:d,interactionState:h,timepointState:v,nextInteraction:y,nextInteractionState:g,skip:j,cancel:function(){return rr(this,void 0,void 0,nr().mark((function t(){return nr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(null==h?void 0:h.hasChanges)){t.next=3;break}return k(),t.abrupt("return");case 3:return t.next=5,x(d.id);case 5:f.setOpen(!0);case 6:case"end":return t.stop()}}),t)})))},addAnotherQuestion:C,goToTimepoint:function(t,n){var r=function(t){for(var n=0;n<e.timepoints.length;){var r=e.timepoints[n];if(r.id===t)return r;n++}return null}(t),o=r.interactions.find((function(t){return t.id.toString()===n.toString()}));i.currentTime(r.visibleAt/1e3),b.updateTimepointState(r.id,{interactionIndex:r.interactions.indexOf(o)})},discardChanges:k,changeIndex:O,promptDelete:function(t){var e=S(E(t).localInteraction);null==u||u.logUserAction(e,{actionType:N.Vw.Delete,entity:N.py.Interaction,workflowPhase:N.eu.Start}),V.M.render(r.createElement("p",null,"Are you sure you want to delete this question?"),{title:"Delete question",submitButtonProps:{onClick:function(){return x(t)},variant:"danger",text:"Delete question"},cancelButtonProps:{variant:"link",text:"Cancel"}})},showTypeSelector:function(){i.pause(),f.setOpen(!0),n&&C()},cancelTypeSelector:function(){n?O(v.interactionIndex-1):(f.setOpen(!1),i.play())},deleteInteraction:x,saveInteraction:function(){return rr(this,void 0,void 0,nr().mark((function t(){var e,r,o,i,a,c,l;return nr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w){t.next=2;break}throw new Error("Should not be calling onClickSave while viewing an interactive");case 2:if(s=d.typeId,e=Sn[s],!(r=e(b.getInteractionState(d.id),d))){t.next=7;break}return b.updateInteractionState(d.id,{error:r}),t.abrupt("return");case 7:if(b.updateInteractionState(d.id,{spinner:!0}),!Ft(n.id)){t.next=15;break}return o=n.id,t.next=12,Ie.saveTimepoint(n);case 12:f.updateCue(o,n.id),b.clearTimepointState(o),(null==v?void 0:v.hasChanges)&&(I(),L());case 15:return d.timepointId=n.id,i=d.id,a=kn(d.typeId),t.next=20,a(b.getInteractionState(d.id),d);case 20:b.clearInteractionState(i),c=Ft(i),l=S(d),null==u||u.logUserAction(l,{actionType:c?N.Vw.Create:N.Vw.Edit,entity:N.py.Interaction,workflowPhase:c?N.eu.Complete:N.eu.Save});case 24:case"end":return t.stop()}var s}),t)})))},addInteraction:function(t){var r;i.pause();var o=(null==n?void 0:n.id)||"new_".concat(Math.round(Math.random()*Number.MAX_SAFE_INTEGER)),a={id:"new_".concat(Math.round(Math.random()*Number.MAX_SAFE_INTEGER)),timepointId:o,typeId:t,order:(null===(r=null==n?void 0:n.interactions)||void 0===r?void 0:r.length)||0,interactiveId:e.id,data:{}},c=S(a);if(null==u||u.logUserAction(c,{actionType:N.Vw.Create,entity:N.py.Interaction,workflowPhase:N.eu.Start}),n)return n.interactions.push(a),void O(v.interactionIndex);var l=i.currentTime();e.timepoints||(e.timepoints=[]),e.timepoints.push({id:o,visibleAt:1e3*l,interactiveId:e.id,shouldPause:1,interactions:[a]}),I(),f.addCue(o)},submitInteractionAnswer:function(){return rr(this,void 0,void 0,nr().mark((function t(){var r,i,l,m,p,y;return nr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a===o.A.View){t.next=2;break}throw new Error("Should not be calling onClickSubmit while creating an interactive");case 2:if(!h.submitted){t.next=8;break}if(!(v.interactionIndex>=n.interactions.length)){t.next=6;break}return f.continueInteractive(),t.abrupt("return");case 6:return O(v.interactionIndex+1),t.abrupt("return");case 8:if(r=Rt(h),g=d.typeId,i=Nt[g],!(l=i(r,d))){t.next=14;break}return b.updateInteractionState(d.id,{error:l}),t.abrupt("return");case 14:if(m={},!c||!h.hasChanges){t.next=27;break}if(p=It(d.typeId),b.updateInteractionState(d.id,{spinner:!0}),!p){t.next=27;break}return t.next=21,p(r,d,c.save,{imageApi:s});case 21:if(t.t0=t.sent,t.t0){t.next=24;break}t.t0={};case 24:m=t.t0,y=S(d),null==u||u.logUserAction(y,{actionType:N.Vw.Submit,entity:N.py.Interaction});case 27:if(b.updateInteractionState(d.id,Object.assign(Object.assign({},m),{submitted:!0,error:null,hasChanges:!1,spinner:!1})),e.immediateFeedback){t.next=31;break}return j(),t.abrupt("return");case 31:xt(d.typeId)(d)||j();case 34:case"end":return t.stop()}var g}),t)})))},userUpdateInteractionState:b.userUpdateInteractionState,updateTimepointTime:function(t){var r=i.duration(),o=function(t){for(var r=n.visibleAt+1e3*t,o=t>0,i=0;i<e.timepoints.length;i++){var a=e.timepoints[i];r<a.visibleAt-1e3||r>a.visibleAt+1e3||(r=o?a.visibleAt+1001:a.visibleAt-1001,i=0)}return r}(t);if(!(o/1e3>r||o<0)){var a=n.visibleAt;ir||(ir=!0,b.updateTimepointState(n.id,{originalVisibleAt:a,hasChanges:!0})),f.moveTimepoint(o)}},saveTimepoint:function(){return rr(this,void 0,void 0,nr().mark((function t(){return nr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Ft(n.id)){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,Ie.updateTimepoint(n);case 4:I(),L();case 6:case"end":return t.stop()}}),t)})))},clearTimepointTimeState:L,reOrderQuestions:function(t){return rr(this,void 0,void 0,nr().mark((function e(){var r,o;return nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<t.length)){e.next=7;break}return e.next=4,Ie.saveInteraction(Object.assign(Object.assign({},t[r]),{order:r}));case 4:r++,e.next=1;break;case 7:o=n.interactions[v.interactionIndex],n.interactions=t,b.updateTimepointState(n.id,{interactionIndex:t.indexOf(o)});case 10:case"end":return e.stop()}}),e)})))}}}(Object.assign({mode:a,interactive:c,timepoint:k,player:n,resultsService:m,latestSession:h,analyticsService:y,imageApi:l},j)),C=I.interaction,L=I.interactionState,P=I.nextInteraction,T=I.nextInteractionState,_=I.timepointState,F=I.state,R=dr(I,["interaction","interactionState","nextInteraction","nextInteractionState","timepointState","state"]);!function(t){var e,n=t.mode,i=t.player,a=t.timepoint,c=t.interaction,l=t.discardChanges,u=t.interactionState,s=t.timepointState,f=(0,lr.f)(),m=n===o.A.Create;r.useEffect((function(){if(m){if(Ft(null==c?void 0:c.id)||(null==u?void 0:u.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 i.lock((function(t){l(t)}));i.unlock(),f.unlock("interactive")}}),[c,null==u?void 0:u.hasChanges,null===(e=null==a?void 0:a.interactions)||void 0===e?void 0:e.length,null==s?void 0:s.hasChanges])}({mode:a,player:n,timepoint:k,interaction:C,discardChanges:R.discardChanges,interactionState:L,timepointState:_});var M={mode:a,open:x,isCreate:a===ur.A.Create,interaction:C,nextInteraction:P,timepoint:k,interactive:c,interactionState:L,nextInteractionState:T,timepointState:_,player:n};return r.createElement(r.Fragment,null,!!u&&r.createElement(pr,{interactive:c,onClickEditDetails:t.onClickEditDetails,onClickPublish:t.onClickPublish,onClickDelete:t.onClickDelete,onClickCopy:t.onClickCopy,portalNode:u,parentVideo:w}),r.createElement(A,Object.assign({},M,R)),r.createElement(Yn,Object.assign({imageApi:l,currentUser:p,immediateFeedback:c.immediateFeedback,delayFocus:!O,enableImmersiveReader:g,experimentalInteractiveQuestions:E},M,R,j)),r.createElement(Qt,Object.assign({title:e,currentUser:p,state:F,portalNode:f,progress:d,resultsService:m,imageCdnUrl:l.toString(),onShowSummary:t.onShowSummary,mobile:b},M,R)),r.createElement($t,Object.assign({portalNode:s,experimentalInteractiveQuestions:E},M,R)))}O.Z.registerComponent("Interactive",(0,sr.Z)((function(t,e){return r.createElement(hr,Object.assign({player:t},e))})));var vr=n(9111),yr=n(13876);function gr(t){var e=t.player;function n(){var t=e.getChild("ContinueSession");e.removeChild(t),t.dispose()}function o(){t.continue(!0),n()}return r.createElement(vr.G,{title:"Continue interactive?",closePopup:o,dialogClassName:"VVqKz"},r.createElement("p",null,"It looks like you've already started this interactive. Would you like to continue your attempt or start a new one?"),r.createElement(yr.u,{className:"kw8gW"},r.createElement(yr.u.Cancel,{text:"Start again",onClick:function(){t.continue(!1),n()}}),r.createElement(yr.u.Submit,{variant:"dark",text:"Continue",onClick:o})))}function br(t){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},br(t)}function wr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Er(r.key),r)}}function Er(t){var e=function(t){if("object"!=br(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==br(e)?e:e+""}function Sr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Sr=function(){return!!t})()}function xr(t){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xr(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}O.Z.registerComponent("ContinueSession",(0,sr.Z)((function(t,e){return r.createElement(gr,Object.assign({player:t},e))})));var Or=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=xr(e),function(t,e){if(e&&("object"==br(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Sr()?Reflect.construct(e,n||[],xr(t).constructor):e.apply(t,n))}(this,e,[t])).enabled=!1,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(e,t),n=e,(r=[{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(t){var e={};try{e=JSON.parse(t.data)}catch(t){return}"enable-grade-passback"===e.type&&(this.enabled=!0,window.removeEventListener("message",this.onReceiveMessage))}},{key:"submit",value:function(t,e){var n={type:"cv-lms-submit-score",data:{score:t,fullyGraded:e}};window.parent.postMessage(JSON.stringify(n),"*")}}])&&wr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(O.Z.getPlugin("plugin"));function Nr(t){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nr(t)}function jr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ir(r.key),r)}}function Ir(t){var e=function(t){if("object"!=Nr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nr(e)?e:e+""}function Cr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Cr=function(){return!!t})()}function Lr(t){return Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lr(t)}function Pr(t,e){return Pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pr(t,e)}O.Z.registerPlugin("gradePassbackPlugin",Or);var Tr=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Lr(e),function(t,e){if(e&&("object"==Nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Cr()?Reflect.construct(e,n||[],Lr(t).constructor):e.apply(t,n))}(this,e,[t])).continueSession=!1,r.options=n,t.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pr(t,e)}(e,t),n=e,(r=[{key:"initialize",value:function(){var t=this;this.player.gradePassbackPlugin(),I.O.useMetadataTrack(this.player,"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(){t.player.off("play",t.startSession)})))}},{key:"startSession",value:function(){var t,e=null===(t=this.options.latestSession)||void 0===t?void 0:t.resultId;this.continueSession||(e=null),this.options.resultsService.start(e)}},{key:"onTrackLoaded",value:function(t){var e=this;this.options.resultsService&&this.options.latestSession?this.player.addChild("ContinueSession",{continue:function(n){var r;null===(r=e.options.analyticsService)||void 0===r||r.logUserAction({},{actionType:N.Vw.Click,entity:N.py.Interactive,descriptor:n?N.r.ContinueSession:N.r.NewSession}),e.continueSession=n,e.startSession(),e.addChildren(t),e.continueSession||e.player.currentTime(0),e.player.play()}}):this.addChildren(t)}},{key:"getClipOffset",value:function(){return this.options.clipOffset?parseFloat(this.options.clipOffset.toPrecision(4)):null}},{key:"addChildren",value:function(t){this.player.addChild("Interactive",Object.assign(Object.assign({},this.options),{track:t,clipOffset:this.getClipOffset(),mode:this.options.mode||o.A.View,latestSession:this.continueSession&&this.options.latestSession})),this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new j.N(this.player,{interactive:this.options.interactive,track:t}))}}])&&jr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(O.Z.getPlugin("plugin"));function Ar(t){return Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ar(t)}function _r(){_r=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:N(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var m="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ar(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function N(e,n,r){var o=m;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=h,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ar(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function Fr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Rr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mr(r.key),r)}}function Mr(t){var e=function(t){if("object"!=Ar(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ar(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ar(e)?e:e+""}function Gr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gr=function(){return!!t})()}function Dr(t,e,n,r){var o=Zr(qr(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Zr(){return Zr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=qr(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Zr.apply(null,arguments)}function qr(t){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qr(t)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ur(t,e)}O.Z.registerPlugin("viewInteractivePlugin",Tr),n(98863);var Br=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=qr(e),function(t,e){if(e&&("object"==Ar(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gr()?Reflect.construct(e,n||[],qr(t).constructor):e.apply(t,n))}(this,e,[t,n])).totalProgress=[],d.e.setToken("gateway",r.options.authToken),r.options.mode===o.A.Create&&r.player.addClass("cv-create-interactives"),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(e,t),n=e,r=[{key:"togglePreviewPreventScrubbing",value:function(){var t=this.player.preventScrubbingPlugin();t&&t.togglePreview(!t.isPreviewing)}},{key:"getPlayerOptions",value:function(){var t=Dr(e,"getPlayerOptions",this,3)([]);return t.setMaxHeight=!1,this.options.embed||(t.aspectRatio="16:9"),t.preferFullWindow=!0,t}},{key:"onFlushProgress",value:function(t){var n;Dr(e,"onFlushProgress",this,3)([t]),this.options.mode!==o.A.Create&&(n=this.totalProgress).push.apply(n,function(t){return function(t){if(Array.isArray(t))return Fr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Fr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fr(t,e):void 0}}(t)||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.")}()}(t))}},{key:"additionalSetup",value:function(t){var n,r,o,i,a=this,c=Object.create(null,{additionalSetup:{get:function(){return Dr(e,"additionalSetup",a,1)}}});return n=this,r=void 0,o=void 0,i=_r().mark((function e(){return _r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.additionalSetup.call(this,t),this.setupClipPlugin(t),this.setupPreventScrubbingPlugin(t);case 3:case"end":return e.stop()}}),e,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{l(i.next(t))}catch(t){e(t)}}function c(t){try{l(i.throw(t))}catch(t){e(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,c)}l((i=i.apply(n,r||[])).next())}))}},{key:"setupAnalyticsDependentPlugins",value:function(t){Dr(e,"setupAnalyticsDependentPlugins",this,3)([t]),this.setupViewInteractivePlugin(t)}},{key:"handleAutoplay",value:function(t){var n;this.options.collectResults&&this.options.currentUser&&this.options.shareId&&(null===(n=t.additionalData)||void 0===n?void 0:n.latestSession)?this.options.autoplay&&this.showSplash():Dr(e,"handleAutoplay",this,3)([t])}},{key:"setupPreventScrubbingPlugin",value:function(t){var e,n;if(null===(e=t.additionalData)||void 0===e?void 0:e.interactive){var r=t.additionalData.interactive,i=this.options.mode===o.A.Create||!this.options.collectResults;this.player.preventScrubbingPlugin({isEnabled:!i&&r.preventScrubbing,furthestVisitedTime:null!==(n=this.options.furthestVisitedTime)&&void 0!==n?n:0})}}},{key:"setupClipPlugin",value:function(t){var e;if(null===(e=null==t?void 0:t.additionalData)||void 0===e?void 0:e.clipData){var n=t.additionalData.clipData;this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime})}}},{key:"filterNewQuestionTypes",value:function(t){var e;return Object.assign(Object.assign({},t),{timepoints:null===(e=t.timepoints)||void 0===e?void 0:e.map((function(t){var e;return Object.assign(Object.assign({},t),{interactions:null===(e=t.interactions)||void 0===e?void 0:e.filter((function(t){return!x.IL[t.typeId]}))})})).filter((function(t){var e;return!!(null===(e=t.interactions)||void 0===e?void 0:e.length)}))})}},{key:"validateCollectResultsOptions",value:function(){this.options.shareId||i.Q.Ry.throw(new S.H("Must provide a shareId in order to collect interactive results"))}},{key:"setupViewInteractivePlugin",value:function(t){var e,n,r;this.track=E.h.getInteractiveTrack(this.player,t);var o=t.additionalData.interactive;this.options.experimentalInteractiveQuestions||(o=this.filterNewQuestionTypes(o));var i=null===(e=t.additionalData.clipData)||void 0===e?void 0:e.startTime;this.options.collectResults&&(this.validateCollectResultsOptions(),this.resultsService=new w({interactiveId:o.id,metadataId:t.mediaId,userId:null===(n=this.options.currentUser)||void 0===n?void 0:n.id,customerId:null===(r=this.options.currentUser)||void 0===r?void 0:r.customerId,playerApi:this.options.playerApi,shareId:this.options.shareId})),this.player.viewInteractivePlugin({interactive:o,title:t.title,mode:this.options.mode,imageApi:this.options.imageApi,resultsService:this.resultsService,actionsPortalNode:this.options.actionsPortalNode,questionListPortalNode:this.options.questionListPortalNode,summaryPortalNode:this.options.summaryPortalNode,currentUser:this.options.currentUser,latestSession:t.additionalData.latestSession,progress:this.totalProgress,parentVideo:this.options.parentVideo,clipOffset:i,analyticsService:this.analyticsService,enableImmersiveReader:this.options.enableImmersiveReader,onShowSummary:this.options.onShowSummary,onClickCopy:this.options.onClickCopy,onClickEditDetails:this.options.onClickEditDetails,onClickPublish:this.options.onClickPublish,onClickDelete:this.options.onClickDelete,mobile:this.options.mobile,experimentalInteractiveQuestions:this.options.experimentalInteractiveQuestions})}},{key:"getAdditionalAnalyticsData",value:function(t){var e,n,r,o;return(null===(n=null===(e=t.additionalData)||void 0===e?void 0:e.clipData)||void 0===n?void 0:n.clipId)?{clip:{id:null===(o=null===(r=t.additionalData)||void 0===r?void 0:r.clipData)||void 0===o?void 0:o.clipId}}:{}}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}},{key:"getAnalyticsPlayerType",value:function(){return"interactive-player"}},{key:"setActivityStatus",value:function(t,e){this.player.activityStatusPlugin().setActivityStatus(t,e)}}],r&&Rr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(k.r),Wr=n(63816),Qr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};function Vr(t){var e=t.onReady,n=t.className,o=Qr(t,["onReady","className"]),i=r.useRef(null);return r.useEffect((function(){var t=new Br(i.current,o);return e&&t.ready((function(){e((0,Wr.G)(t))})),function(){window.requestAnimationFrame((function(){return t.dispose()}))}}),[]),r.createElement(r.Fragment,null,r.createElement("div",{ref:i,className:n}),r.createElement("div",{id:"popup-region"}))}},63816:(t,e,n)=>{function r(t){return new Proxy(t,{get:function(t,e,n){if("off"===e||!t.isDisposed())return Reflect.get(t,e,n)}})}n.d(e,{G:()=>r})},67575:()=>{}}]);
|
|
3
|
-
//# sourceMappingURL=4050-74aa5394f6-lite.chunk.js.map
|