@clickview/lite 0.37.5 → 0.37.7-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/scripts/{2703-b9c67faeaa-lite.chunk.js → 2703-d521598fbe-lite.chunk.js} +2 -2
- package/dist/scripts/5759-9ff744faa0-lite.chunk.js +2 -0
- package/dist/scripts/{6468-51d7555dc6-lite.chunk.js → 6468-7d33adfc1c-lite.chunk.js} +2 -2
- package/dist/scripts/7670-1684f253e1-lite.chunk.js +2 -0
- package/dist/scripts/{841-c047ad76ef-lite.chunk.js → 841-664bc280c3-lite.chunk.js} +2 -2
- package/dist/scripts/{9371-6d41f8c918-lite.chunk.js → 9371-bb4cc49518-lite.chunk.js} +2 -2
- package/dist/scripts/bundle-2e1000b775.min.js +2 -0
- package/package.json +1 -1
- package/dist/scripts/5759-ceb0cc6a27-lite.chunk.js +0 -2
- package/dist/scripts/7670-a7f4c75968-lite.chunk.js +0 -2
- package/dist/scripts/bundle-abeb0f4eba.min.js +0 -2
- /package/dist/scripts/{2703-b9c67faeaa-lite.chunk.js.LICENSE.txt → 2703-d521598fbe-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5759-ceb0cc6a27-lite.chunk.js.LICENSE.txt → 5759-9ff744faa0-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6468-51d7555dc6-lite.chunk.js.LICENSE.txt → 6468-7d33adfc1c-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7670-a7f4c75968-lite.chunk.js.LICENSE.txt → 7670-1684f253e1-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{841-c047ad76ef-lite.chunk.js.LICENSE.txt → 841-664bc280c3-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9371-6d41f8c918-lite.chunk.js.LICENSE.txt → 9371-bb4cc49518-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-abeb0f4eba.min.js.LICENSE.txt → bundle-2e1000b775.min.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5759-ceb0cc6a27-lite.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5759],{19808:(e,t,n)=>{var r;n.d(t,{b:()=>r}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(r||(r={}))},74887:(e,t,n)=>{n.d(t,{f:()=>i});var r=n(32735),o=n(11607);const a={icon:"ohit6",description:"DmrW6",option:"KOzYf"};function i(e){return r.createElement("ul",{className:"list-unstyled mb-3"},e.options.map((function(t){return r.createElement("li",{key:t.id,className:"".concat(a.option," mb-2 border border-2 rounded-3 ").concat(e.selection===t.id?"border-dark bg-light-blue":"border-transparent")},r.createElement(o.L,{onClick:function(){return e.setSelection(t.id)},className:"d-flex align-items-center p-2"},r.createElement("div",{className:"rounded border border-dark ".concat(t.colourClass," ").concat(a.icon)},r.createElement("img",{src:t.imageUrl,className:"img-fluid"})),r.createElement("div",null,r.createElement("h2",{className:"mb-1 h6"},t.title),r.createElement("p",{className:"mb-0 ".concat(a.description)},t.description))))})))}},12058:(e,t,n)=>{n.d(t,{X:()=>o});var r=n(32735);function o(e){return r.createElement("p",{className:e.className},e.children)}},75919:(e,t,n)=>{n.d(t,{N:()=>a});var r=n(32735);const o={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function a(e){return r.createElement("div",{className:(t="d-flex align-items-center text-center position-relative w-100 ".concat(o.imageContainer),"center"===e.contentPosition&&(t+=" px-5 justify-content-center"),"right"===e.contentPosition&&(t+=" me-n5 justify-content-end"),t)},!!e.annotationUrl&&r.createElement("div",{className:function(){var t=o.annotation;switch(e.annotationPosition){case"top-left":t+=" ".concat(o.above," ").concat(o.left);break;case"top-right":t+=" ".concat(o.above," ").concat(o.right);break;case"bottom-left":t+=" ".concat(o.below," ").concat(o.left);break;case"bottom-right":t+=" ".concat(o.below," ").concat(o.right)}return e.annotationClassName&&(t+=" ".concat(e.annotationClassName)),t}()},r.createElement("img",{className:"img-fluid",src:e.annotationUrl})),e.children,"right"===e.contentPosition&&r.createElement("div",{className:o.divider}));var t}a.defaultProps={contentPosition:"center"}},45038:(e,t,n)=>{n.d(t,{P:()=>i});var r=n(32735),o=n(57245);const a={playerContainer:"w7_Oy",fallback:"xcBuH"};function i(e){return r.createElement("div",{className:"".concat(a.playerContainer," w-100")},e.hasDataLoaded?r.createElement(o._,{config:e.config,video:e.video,currentUser:e.currentUser,shareLink:e.shareLink,viewKey:e.viewKey,onReady:e.onReady,allowPip:!1,allowCreateClip:!1}):r.createElement("div",{className:"".concat(a.fallback," w-100 h-100 bg-light rounded-3 overflow-hidden")}))}},98065:(e,t,n)=>{n.d(t,{x:()=>o});var r=n(19808),o={getWelcomeVideo:function(e){return e?e.primaryUrl.includes("staging")?{videoId:"43000110",shareId:"GgX4xD"}:{videoId:"78694940",shareId:"DNBPmD"}:null},getAdvisorVideo:function(e){if(!e)return null;if(e.primaryUrl.includes("staging"))return{videoId:"43002959",shareId:"b98KVj"};switch(e.instanceRegion){case r.b.US:return{videoId:"78658407",shareId:"GmoxQj"};case r.b.UK:return{videoId:"78647428",shareId:"bwaxkD"};case r.b.AU:default:return{videoId:"78647427",shareId:"Ggo8pG"}}}}},92560:(e,t,n)=>{n.r(t),n.d(t,{OnboardingAdvisorVideoView:()=>A});var r=n(32735),o=n(23481),a=n(20354),i=n(65858),c=n(50122),l=n(30439),s=n(83345),u=n(19808),d=n(60051),f=n(39151),h=n(47812),p=n(31949),m=n(1575),v=n(79967),y=n(99742),g=n(75359),b=n(74887),w=n(12058),E=n(40695),x=n(75919),N=n(45038),k=n(73190),L=n(90815),C=n(98065);const O={headingContainer:"NrAKd",partnerLogos:"jG9GO",infoContainer:"U79xU",options:"Ps0S0"};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function U(){U=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new _(r||[]);return o(i,"_invoke",{value:C(e,n,c)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function g(){}function b(){}var w={};s(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(j([])));x&&x!==n&&r.call(x,i)&&(w=x);var N=b.prototype=y.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function n(o,a,i,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==I(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function C(t,n,r){var o=f;return function(a,i){if(o===p)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=O(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===f)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var s=d(t,n,r);if("normal"===s.type){if(o=r.done?m:h,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=m,r.method="throw",r.arg=s.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function V(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function j(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(I(t)+" is not iterable")}return g.prototype=b,o(N,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(N),e},t.awrap=function(e){return{__await:e}},k(L.prototype),s(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new L(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(N),s(N,l,"Generator"),s(N,i,(function(){return this})),s(N,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=j,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(V),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){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 a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),V(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;V(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:j(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function c(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},_="onboarding.advisorVideo",j=o.T.encloseNamespace(_),P=[{id:"contact-us",imageUrl:y.W.OnboardingV2.AdvisorVideo.CONTACT_US_ICON,colourClass:"bg-yellow",title:j("contactUsTitle"),description:j("contactUsDescription")},{id:"check-out-clickview",imageUrl:y.W.OnboardingV2.AdvisorVideo.CHECK_OUT_CLICKVIEW_ICON,colourClass:"bg-purple",title:j("checkOutClickViewTitle"),description:j("checkOutClickViewDescription")}];function A(){var e,t,n,o=(0,k.Q)(),I=o.completeStepAsync,A=o.onSaveError,R=o.onClickBack,T=(0,L.H)().logEvent,G=a.a.useBasicFetch(f.L.config()),K=a.a.useBasicFetch(p.N.currentUser()),F=r.useRef(),B=C.x.getAdvisorVideo(G.data),D=a.a.useBasicFetch(B&&m.R.sharedVideo(B.videoId,B.shareId)),W=a.a.useBasicFetch(l.o.getShareObject(B.shareId)),z=a.a.useBasicFetch(h.k.createViewKey(B.shareId,d.f.Share)),H=(t=r.useState(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),Q=H[0],X=H[1],Y={optionId:Q,optionName:null===(e=P.find((function(e){return e.id===Q})))||void 0===e?void 0:e.title,videoId:B.videoId,shareId:B.shareId},Z=(0,v.k)(),M=D.data&&K.hasCompleted&&G.hasCompleted&&W.hasCompleted&&z.hasCompleted,$=function(e){switch(e){case u.b.AU:return{heading:j("auPartners"),imageUrl:y.W.OnboardingV2.AdvisorVideo.PARTNERS_AU};case u.b.UK:return{heading:j("ukPartners"),imageUrl:y.W.OnboardingV2.AdvisorVideo.PARTNERS_UK};case u.b.US:return{heading:j("usPartners"),imageUrl:y.W.OnboardingV2.AdvisorVideo.PARTNERS_US};default:return null}}(K.data.instanceRegion),q=Z.lg||Z.xl||Z.xxl;return r.createElement(E.z,{namespace:_},r.createElement(E.z.Left,{className:"bg-blue d-flex justify-content-center flex-column"},q&&r.createElement(x.N,null,r.createElement(N.P,{hasDataLoaded:M,config:G.data,video:D.data,currentUser:K.data,shareLink:W.data,viewKey:z.data,onReady:function(e){F.current=e;var t=function(){T(i.Vw.Click,i.Ix.PlayVideo,Y)},n=function(){T(i.Vw.Click,i.Ix.PauseVideo,Y)},r=function(){T(i.Vw.Complete,i.Ix.FinishVideo,Y)};e.on("play",t),e.on("pause",n),e.on("ended",r),e.one("dispose",(function(){e.off("play",t),e.off("pause",n),e.off("ended",r)}))}}))),r.createElement(E.z.Right,{hasCustomButtons:!1,onClickNext:function(){return V(this,void 0,void 0,U().mark((function e(){return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(i.Vw.Click,i.Ix.Next,Y),c.m.setAdvisorVideoSelection(Q),e.prev=2,e.next=5,I({isExiting:"check-out-clickview"===Q});case 5:e.next=11;break;case 7:return e.prev=7,e.t0=e.catch(2),A(),e.abrupt("return",Promise.reject());case 11:case"end":return e.stop()}}),e,null,[[2,7]])})))},onClickBack:function(){c.m.removeUsageIntention(),R()},disableNext:!Q,className:"position-relative"},r.createElement(g.W,{className:"".concat(O.headingContainer)},r.createElement(s.x,{phrase:"heading"})),!q&&r.createElement(N.P,{hasDataLoaded:M,config:G.data,video:D.data,currentUser:K.data,shareLink:W.data,viewKey:z.data}),r.createElement(w.X,{className:O.infoContainer},r.createElement(s.x,{phrase:"description"})),r.createElement("div",{className:O.options},r.createElement(b.f,{options:P,selection:Q,setSelection:function(e){var t;T(i.Vw.Select,i.Ix.SelectOption,Object.assign(Object.assign({},Y),{optionId:e,optionName:null===(t=P.find((function(t){return t.id===e})))||void 0===t?void 0:t.title})),X(e)}})),!!$&&r.createElement("div",{className:"".concat(O.partnerLogos)},r.createElement("h2",{className:"h6 text-center"},$.heading),r.createElement("div",{className:"w-100 d-flex justify-content-center"},r.createElement("img",{className:"img-fluid",src:$.imageUrl})))))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7670-a7f4c75968-lite.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7670],{68293:(e,t,r)=>{r.d(t,{B:()=>f});var n=r(32735),a=["Teacher","Librarian / Teacher Librarian","Curriculum Coordinator","Digital Technology Coordinator","SSO / SLSO","IT","Head of Department","Head of Subject","Assistant Principal","Deputy Principal","Principal"],o=["Teacher","Librarian / Teacher Librarian","Head of Department","Instructional Technology Specialist","Curriculum Coordinator","School Leadership","District Leadership","Academic Coach","Principal","IT / IT Specialist"],i={au:a,nz:a,uk:["Teacher","Librarian / Teacher Librarian","IT/LRC","e-Learning/ICT Coordinator","Head of Key Stage","Head of Department","Subject Lead","Assistant Head Teacher","Deputy Head Teacher","Head Teacher"],us:o};function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var u="OTHER";function s(e,t){return t.includes(e)?e:e?u:""}function f(e){var t,r=e.error,a=e.onChange,l=(t=e.countryCode,i[t]||o),f=s(e.initialValue,l),h=c(n.useState(f),2),d=h[0],p=h[1],m=c(n.useState(f===u?e.initialValue:""),2),y=m[0],v=m[1];n.useEffect((function(){p(s(e.initialValue,l))}),[e.initialValue]);var g=d===u;return n.createElement(n.Fragment,null,n.createElement("div",{className:"mb-2"},n.createElement("select",{id:e.id,name:e.id,className:"form-select form-select-lg ".concat(d.length?"text-dark":"text-secondary"," ").concat(!!r&&"is-invalid"),value:d,placeholder:"Role",onChange:function(e){p(e.target.value),v(""),a(e.target.value===u?"":e.target.value)}},n.createElement("option",{value:"",disabled:!0,className:"text-muted"},e.placeholder?e.placeholder:n.createElement(n.Fragment,null,"What do you do?")),l.map((function(e,t){return n.createElement("option",{value:e,className:"text-dark",key:t},e)})),n.createElement("option",{value:u,className:"text-dark"},"Other")),!!r&&!g&&n.createElement("div",{className:"invalid-feedback"},r)),g&&n.createElement("div",{className:"mb-3"},n.createElement("input",{className:"form-control form-control-lg ".concat(!!r&&"is-invalid"),type:"text",value:y,placeholder:"What do you do?",autoFocus:!0,onChange:function(e){v(e.target.value),a(e.target.value)}}),!!r&&n.createElement("div",{className:"invalid-feedback"},r)))}},58329:(e,t,r)=>{r.r(t),r.d(t,{OnboardingSelectRoleView:()=>C});var n=r(32735),a=r(23481),o=r(20354),i=r(65858),c=r(50122),l=r(68293),u=r(60376),s=r(83914),f=r(83345),h=r(54610),d=r(31949),p=r(22902),m=r(67453),y=r(35223),v=r(99742),g=r(75359),b=r(40695),w=r(73190),E=r(90815);const x={customerLogo:"O0Fk5"};function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:N(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(_([])));x&&x!==r&&n.call(x,i)&&(w=x);var T=b.prototype=v.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==L(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function N(t,r,n){var a=h;return function(o,i){if(a===p)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=O(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=p;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=m,n.method="throw",n.arg=u.arg)}}}function O(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function _(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(L(t)+" is not iterable")}return g.prototype=b,a(T,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},j(k.prototype),u(k.prototype,c,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new k(s(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(T),u(T,l,"Generator"),u(T,i,(function(){return this})),u(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;A(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:_(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var k=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function c(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},N=/\$+[\w\s]?/,O="onboarding.selectRole";function C(){var e,t,r,L=(0,w.Q)(),j=L.onClickBack,C=L.exitOnboarding,A=L.completeStepAsync,I=L.onSaveError,_=(0,E.H)().logEvent,P=o.a.useBasicFetch(d.N.currentUser()),F=o.a.useBasicFetch(P.data&&d.N.user(P.data.id)),G=o.a.useGetFetchAsync(),B=(0,p.T)().hasPermissions,H=T(n.useState(""),2),R=H[0],V=H[1],D=T(n.useState(""),2),z=D[0],U=D[1];return n.createElement(b.z,{namespace:O},n.createElement(b.z.Left,{className:"bg-dark-blue d-flex align-items-center"},n.createElement("div",{className:"px-5 pt-4"},n.createElement("img",{className:"img-fluid",src:v.W.OnboardingV2.SelectRole.BACKGROUND}))),n.createElement(b.z.Right,{hasCustomButtons:!1,onClickNext:function(){return k(this,void 0,void 0,S().mark((function e(){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=2;break}return e.abrupt("return");case 2:return _(i.Vw.Click,i.Ix.Next,{jobTitle:R},{jobTitleOverride:R}),e.prev=3,e.next=6,G(d.N.updateJobTitle(P.data.id,P.data.customerId,R));case 6:return e.next=8,A({jobTitleOverride:R});case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(3),I(),e.abrupt("return",Promise.reject());case 14:case"end":return e.stop()}}),e,null,[[3,10]])})))},onClickBack:j,onClickComeBackLater:(null===(r=null===(t=null===(e=F.data)||void 0===e?void 0:e.userProfile)||void 0===t?void 0:t.metadata)||void 0===r?void 0:r.jobTitle)||!c.m.hasNonBdmTrial(B)?C:null,disableNext:!!z||!R},n.createElement(g.W,null,n.createElement(f.x,{phrase:"heading"})),n.createElement("div",{className:"d-flex align-items-center pt-2 pb-3"},n.createElement("div",{className:"".concat(x.customerLogo," me-2")},n.createElement(u.f,{imageUrl:m.j.createUrl(P.data.customerLogo,{size:h.h2.Small}),svgName:y.vn.GraduationCap,variant:"green",svgSize:s.S.Large})),n.createElement("p",{className:"mb-0"},n.createElement(f.x,{phrase:"whatIsYourRole",options:{schoolName:P.data.customerName}}))),n.createElement(l.B,{id:"onboarding-job-title",onChange:function(e){V(e),_(i.Vw.Select,i.Ix.SelectJobTitle,{jobTitle:R}),N.test(e)?U("Please enter a valid job title."):e.length>255?U("Job title cannot exceed max length of 255 characters."):z&&U("")},countryCode:P.data.countryCode,placeholder:a.T.getPhrase(O,"rolePlaceholder"),initialValue:R,error:z})))}}}]);
|