@clickview/streamable-learning 0.30.0 → 0.31.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 7570-8059e178af-streamable-learning.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_streamable_learning=self.webpackChunk_clickview_streamable_learning||[]).push([[7570],{92869:(e,t,n)=>{n.d(t,{t:()=>a});var r=n(43823),o=n(95846),a={preventScrollTop:function(){r.Radio.channel(o.G.SHELL).trigger("prevent:scroll:top")}}},11098:(e,t,n)=>{n.d(t,{w:()=>a});var r=n(32735);function o(){return r.createElement("svg",{viewBox:"0 0 24 24"},r.createElement("path",{d:"M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"}))}var a=r.forwardRef(function(e,t){var n=e.onClickClear,a=e.showClearButton,i=e.clearClassName,c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["onClickClear","showClearButton","clearClassName"]);return r.createElement("div",{className:"position-relative"},r.createElement("input",Object.assign({},c,{ref:t,className:"".concat(e.className," ").concat("aYpO7")})),(!!e.value||a)&&r.createElement("span",{className:"".concat("ygMgF"," position-absolute cursor-pointer text-secondary ").concat(i||""),role:"button",onClick:n,onKeyDown:function(e){return"Enter"===e.key&&n()},tabIndex:0},r.createElement("div",{className:"d-inline-block svg-container md"},r.createElement(o,null))))})},68293:(e,t,n)=>{n.d(t,{B:()=>w});var r=n(32735),o=n(93824),a=n(19808);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 c(e,t,n){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=["Teacher","Librarian / Teacher Librarian","Curriculum Coordinator","Digital Technology Coordinator","SSO / SLSO","IT","Head of Department","Head of Subject","Assistant Principal","Deputy Principal","Principal"],u=["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"],s=["Teacher","Librarian / Teacher Librarian","Head of Department","Instructional Technology Specialist","Curriculum Coordinator","School Leadership","District Leadership","Academic Coach","Principal","IT / IT Specialist"],f=["Teacher","Librarian / Teacher Librarian","Curriculum Leader","e-Learning Coordinator","IT","Head of Department","Head of Faculty","Learning Support","Learning Assistant","Deputy Principal","Assistant Principal","Principal"],d=["Professor","Lecturer","Course Coordinator / Administrator","Digital Learning Manager","Tutor","Teaching Fellow","Librarian","Learning Technologist","Teaching Assistant","Researcher","IT"],m=["Professor","Lecturer","Course Coordinator / Administrator","Digital Learning Manager","Tutor","Teaching Fellow","Librarian","Learning Technologist","Teacher","Teaching Assistant","Researcher","IT"],y=c(c(c(c(c(c(c(c({},a.b.AU,l),a.b.NZ,f),a.b.UK,u),a.b.US,s),o.C.AU,l),o.C.NZ,f),o.C.UK,u),o.C.US,s),p=c(c(c(c({},a.b.AU,d),a.b.UK,m),o.C.AU,d),o.C.UK,m),v=n(66122);function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.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)?g(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 g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h="OTHER";function S(e,t){return t.includes(e)?e:e?h:""}function w(e){var t,n,o=e.error,a=e.onChange,i=(t={countryCode:e.countryCode,isTertiary:e.isTertiary},n="instanceRegion"in t?t.instanceRegion:t.countryCode,t.isTertiary?p[null==n?void 0:n.toLowerCase()]||d:y[null==n?void 0:n.toLowerCase()]||s),c=S(e.initialValue,i),l=b(r.useState(c),2),u=l[0],f=l[1],m=b(r.useState(c===h?e.initialValue:""),2),g=m[0],w=m[1];r.useEffect(function(){f(S(e.initialValue,i))},[e.initialValue]);var O=u===h;return r.createElement("div",{className:"form-group"},r.createElement("label",{htmlFor:e.id,className:e.labelClassName},"Job title",e.required&&r.createElement("span",{className:"text-danger"},"*")),r.createElement("div",{className:"mb-2"},r.createElement("select",{id:e.id,name:e.id,className:"form-select ".concat("lg"===e.size?"form-select-lg":""," ").concat(u.length?"text-dark":"text-secondary"," ").concat(!!o&&"is-invalid"),value:u,placeholder:"Role",onChange:function(e){f(e.target.value),w(""),a(e.target.value===h?"":e.target.value)}},r.createElement("option",{value:"",disabled:!0,className:"text-secondary"},e.placeholder?e.placeholder:r.createElement(r.Fragment,null,"What do you do?")),i.map(function(e,t){return r.createElement("option",{value:e,className:"text-dark",key:t},e)}),r.createElement("option",{value:h,className:"text-dark"},"Other")),!!o&&!O&&r.createElement(v.A,{name:e.id},o)),O&&r.createElement("div",{className:"mb-3"},r.createElement("input",{className:"form-control ".concat("lg"===e.size?"form-select-lg":""," ").concat(!!o&&"is-invalid"),type:"text",value:g,placeholder:"What do you do?",autoFocus:!0,onChange:function(e){w(e.target.value),a(e.target.value)}}),!!o&&r.createElement(v.A,{name:e.id},o)))}},47464:(e,t,n)=>{n.d(t,{l:()=>_});var r=n(32735),o=n(65858),a=n(11098),i=n(57900),c=n(45157),l=n(86664),u=n(52214);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.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)?f(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 f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e){return new u.aN({apiKey:e.apiKey,version:"weekly",libraries:e.libraries,retries:3})}function m(e){var t={apiKey:e.apiKey,libraries:e.libraries||["places"]},n=s(r.useState(!1),2),o=n[0],a=n[1],i=s(r.useState(d(t)),2),c=i[0],l=i[1];function u(e,n){c?c.loadCallback(function(t){if(t)return a(!1),void(n&&n(t));a(!0),e&&e()}):l(d(t))}return r.useEffect(function(){u()},[]),{loader:c,scriptLoaded:o,onGoogleApiReady:u}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e){var t,n,o=m({apiKey:e.googleApiKey}).scriptLoaded,a=(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,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.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)?y(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.")}()),i=a[0],c=a[1];return r.useEffect(function(){o&&c(new google.maps.places.AutocompleteService)},[o]),i}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var b="us",g="country:placeholder:text";function h(e){var t,n,o=e.apiKey,a=e.geoLocation,u=e.makeRequest,s=void 0===u||u,f=e.template,d=void 0===f?"E.g. [placeholder]":f,m=e.templateKey,y=void 0===m?"[placeholder]":m,h=p({googleApiKey:o}),S=r.useState(function(){return function(e){var t=l.I.getLocalizedLocalityPlaceholderText(null==e?void 0:e.countryCode);return t||(i.SG.cacheGet("".concat(g,":").concat(null==e?void 0:e.countryCode))||void 0)}(a)}),w=(n=2,function(e){if(Array.isArray(e))return e}(t=S)||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,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.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)?v(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.")}()),O=w[0],C=w[1];function E(e,t){i.SG.cacheSet("".concat(g,":").concat(t),e,86400),C(e)}return r.useEffect(function(){if(!O&&h&&s){var e=(null==a?void 0:a.countryCode)||b,t={input:String.fromCharCode(96+c.Y.getRandomInt(26)),types:["(cities)"],region:e,componentRestrictions:{country:e}};h.getPlacePredictions(t,function(t,n){return function(e,t,n){if(t===google.maps.places.PlacesServiceStatus.OK&&e){var r=e[c.Y.getRandomInt(e.length)].description;E(d.replace(y,r),n)}else E(l.I.getLocalizedLocalityPlaceholderText(b),n)}(t,n,e)})}},[O,h,a,s]),O}var S=n(73525);function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.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)?O(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var C={getPlaceDetails:function(e){var t,n,r,o,a,i=e.formatted_address,c=w(e.address_components);try{for(c.s();!(a=c.n()).done;){var l,u=a.value,s=w(u.types);try{for(s.s();!(l=s.n()).done;){var f=l.value;"locality"===f&&(t=u.short_name),"administrative_area_level_1"===f&&(n=u.short_name),"postal_code"===f&&(o=u.short_name),"country"===f&&(r=u.short_name)}}catch(e){s.e(e)}finally{s.f()}}}catch(e){c.e(e)}finally{c.f()}return{locality:i,country:r,postalCode:o,city:t,province:n}}};function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var j={1:"geocoderPermissionDenied",2:"geocoderUnavailable",3:"geocoderTimeout"},T=n(28329);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var k=n(11607);function P(){return r.createElement("svg",{viewBox:"0 0 24 24"},r.createElement("path",{d:"m12.00559,20.40189c4.60881,0 8.37242,-3.78424 8.37242,-8.40189c0,-4.61764 -3.76361,-8.40187 -8.37242,-8.40187c-4.62002,0 -8.38365,3.78422 -8.38365,8.40187c0,4.61765 3.76364,8.40189 8.38365,8.40189zm0,-1.65557c-3.75235,0 -6.67085,-2.96208 -6.67085,-6.74632c0,-3.7842 2.91851,-6.74625 6.67085,-6.74625c3.74105,0 6.67084,2.96206 6.67084,6.74625c0,3.78424 -2.92978,6.74632 -6.67084,6.74632zm-10.14151,-6.02552l6.01731,0c0.40566,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208l-6.01731,0c-0.40566,0 -0.72117,0.31536 -0.72117,0.7208c0,0.40544 0.31551,0.7208 0.72118,0.7208l-0.00001,0zm14.25442,0l6.0174,0c0.40565,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31553,-0.7208 -0.72118,-0.7208l-6.0174,0c-0.40565,0 -0.72118,0.31536 -0.72118,0.7208c0,0.40544 0.31553,0.7208 0.72118,0.7208zm-4.12417,-4.1221c0.40566,0 0.72118,-0.31534 0.72118,-0.70952l0,-6.02547c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208c-0.3944,0 -0.7099,0.31536 -0.7099,0.7208l0,6.02547c0,0.39418 0.31551,0.70952 0.7099,0.70952zm0,14.25838c0.40566,0 0.72118,-0.3154 0.72118,-0.72077l0,-6.02541c0,-0.39425 -0.31552,-0.70965 -0.72118,-0.70965c-0.3944,0 -0.7099,0.3154 -0.7099,0.70965l0,6.02541c0,0.40538 0.31551,0.72077 0.7099,0.72077z"}))}var N=n(13189);function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.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)?x(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 x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function I(e){var t=e.predictions,n=e.getPlaceInfo,o=e.selectedIndex;return r.createElement(r.Fragment,null,t.map(function(e,t){return r.createElement(k.L,{className:"".concat(N.Z.suggestionItem," ").concat(o-1===t?N.Z.selected:""),key:e.place_id,onKeyDown:function(t){return"Enter"===t.key&&n(e)},onMouseDown:function(){return n(e)},onClick:function(){return n(e)}},e.description)}))}function _(e){var t,n,i,c,l,u,s=r.useRef(null),f=L(r.useState((null===(t=e.data)||void 0===t?void 0:t.schoolLocality)||""),2),d=f[0],y=f[1],v=L(r.useState(!1),2),b=v[0],g=v[1],w=h({apiKey:e.googleMapsApiKey,geoLocation:e.geoLocation}),O=function(e){var t,n,o=e.search,a=e.makePredicition,i=e.geoLocation,c=p({googleApiKey:e.apiKey}),l=(0,T.N)(o,300),u=(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,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n={}.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)?A(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.")}()),s=u[0],f=u[1];function d(e,t){t===google.maps.places.PlacesServiceStatus.OK&&e?f(e):f(void 0)}return r.useEffect(function(){if(c)if(0!==(null==l?void 0:l.length)&&a){var e=(null==i?void 0:i.countryCode)||"us";c.getPlacePredictions({input:l,componentRestrictions:(null==i?void 0:i.isFallback)?void 0:{country:e},region:e,types:["locality","sublocality","postal_code"]},d)}else f(void 0)},[l,a,c]),{localityPredicitions:s,getPlaceInfo:function(e,t,n){new google.maps.places.PlacesService(t.current).getDetails({placeId:e.place_id,fields:["geometry","address_components","formatted_address"],region:i.countryCode},function(e,t){if(t===google.maps.places.PlacesServiceStatus.OK){var r=e.geometry.location.lng(),o=e.geometry.location.lat(),a=C.getPlaceDetails(e),i=a.locality,c=a.country,l=a.postalCode,u=a.city,s=a.province;n({longitude:r,latitude:o,locality:i,country:c,city:u,postalCode:l,province:s})}})}}}({search:d,makePredicition:b,geoLocation:e.geoLocation,apiKey:e.googleMapsApiKey}),x=O.localityPredicitions,_=O.getPlaceInfo,F=function(e){var t,n,o=(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,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(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.")}()),a=o[0],i=o[1],c=m(e).onGoogleApiReady;function l(e){var t=e.coords,n=t.latitude,r=t.longitude,o=new google.maps.LatLng(n,r);(new google.maps.Geocoder).geocode({location:o},function(e,t){if(t===google.maps.GeocoderStatus.OK){var o=e.find(function(e){return e.types.includes("locality")||e.types.includes("administrative_area_level_2")}),a=C.getPlaceDetails(o);i(Object.assign(Object.assign({},a),{longitude:r,latitude:n}))}})}function u(t){var n=j[t.code];n||(n="geocoderUnknown"),e.onPositionError("We are unable to access your location. Please try again later.")}return{placeDetails:a,onClickGetCurrentLocation:function(){c(function(){window.navigator.geolocation.getCurrentPosition(l,u)})}}}({apiKey:e.googleMapsApiKey,onPositionError:function(e){g(!0),$(e)}}),D=F.placeDetails,U=F.onClickGetCurrentLocation,K=window.navigator.geolocation?1:0,R=(0,S.M)({onSelected:function(e){if(x)if(e!==x.length){var t=x[e];t&&J(t)}else X()},itemCount:null!==(n=(null==x?void 0:x.length)+K)&&void 0!==n?n:0,hideOnBlur:e.hideOnBlur}),M=R.selectedIndex,G=R.onKeyDown,Z=R.containerRef,z=R.hide,B=R.onBlur,V=R.onFocus,q=L(r.useState(),2),H=q[0],$=q[1];function W(t){var n,r,o;H&&$(void 0),b||g(!0),((null===(n=e.data)||void 0===n?void 0:n.longitude)||(null===(r=e.data)||void 0===r?void 0:r.latitude)||(null===(o=e.data)||void 0===o?void 0:o.schoolLocality))&&e.clearData(),y(t)}function Y(t){e.setData({schoolLocality:t.locality,country:t.country,province:t.province,schoolPostCode:t.postalCode,longitude:t.longitude,latitude:t.latitude}),t.locality&&y(t.locality)}function J(e){b&&g(!1),_(e,s,Y)}function X(t){var n;null==t||t.preventDefault(),g(!1),U(),null===(n=e.logUserAction)||void 0===n||n.call(e,{},{actionType:o.Vw.Click,descriptor:o.Yu.UseMyLocation})}r.useEffect(function(){Y(D)},[D]);var Q,ee=(null==x?void 0:x.length)&&!(null===(c=null===(i=e.data)||void 0===i?void 0:i.schoolLocality)||void 0===c?void 0:c.length),te=window.navigator.geolocation&&!(null===(u=null===(l=e.data)||void 0===l?void 0:l.schoolLocality)||void 0===u?void 0:u.length),ne=e.labelClassName||"d-block text-center mb-3 fw-normal ".concat(N.Z.baseText),re="form-group position-relative";return"lg"===e.size&&(re+=" ".concat(N.Z.large)),r.createElement("div",{className:re},r.createElement("label",{className:ne,htmlFor:"locality-input"},"ZIP code or city",e.required&&r.createElement("span",{className:"text-danger"},"*")),r.createElement(a.w,{type:"text",value:d,onChange:function(e){return W(e.currentTarget.value)},id:"locality-input",className:(Q="form-control","lg"===e.size&&(Q+=" form-control-lg"),!ee||z?"".concat(Q," ").concat(N.Z.input):"".concat(Q," ").concat(N.Z.inputFocused)),ref:s,autoComplete:"off",placeholder:w||"Loading...",disabled:e.disabled||!w,autoFocus:null==e?void 0:e.autoFocus,onClickClear:function(){W(""),s.current.focus()},onKeyDown:G,onFocus:V,onBlur:B}),r.createElement("div",{className:"position-absolute z-1 w-100 ".concat(N.Z.dropdown," ").concat(z?"d-none":"")},!!ee&&r.createElement("div",{className:N.Z.suggestionContainer,ref:Z},r.createElement(I,{predictions:x,getPlaceInfo:J,selectedIndex:M}),window.navigator.geolocation&&e.useGeoLocationApi&&r.createElement(k.L,{className:"".concat(N.Z.suggestionItem," px-1 ").concat(M-1===x.length?N.Z.selected:""),onClick:X},r.createElement("div",{className:"btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1"},r.createElement(P,null),"Use my current location"))),te&&!ee&&e.useGeoLocationApi&&r.createElement("div",{className:"d-flex ".concat(N.Z.useMyLocation)},r.createElement("button",{onClick:X,className:"btn btn-link info-link bg-white btn-with-icon"},r.createElement(P,null),"Use my current location")),!!H&&r.createElement("div",{className:"text-danger p-2"},H)))}},76530:(e,t,n)=>{n.d(t,{X:()=>P});var r=n(32735),o=n(80247),a=n(11098),i=n(99940);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(u())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&s(o,n.prototype),o}(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},l(e)}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var d=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=f(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}(this,t,[r])).body=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l(Error));function m(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof c?r:c,u=Object.create(l.prototype);return y(u,"_invoke",function(n,r,o){var a,c,l,u=0,s=o||[],f=!1,d={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,c=0,l=e,d.n=n,i}};function m(n,r){for(c=n,l=r,t=0;!f&&u&&!o&&t<s.length;t++){var o,a=s[t],m=d.p,y=a[2];n>3?(o=y===r)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(c=0,d.v=r,d.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,d.n=y,c=0))}if(o||n>1)return i;throw f=!0,r}return function(o,s,y){if(u>1)throw TypeError("Generator is already running");for(f&&1===s&&m(s,y),c=s,l=y;(t=c<2?e:l)||!f;){a||(c?c<3?(c>1&&(d.n=-1),m(c,l)):d.n=l:d.v=l);try{if(u=2,a){if(c||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a.return)&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=e}else if((t=(f=d.n<0)?l:n.call(r,d))!==i)break}catch(t){a=e,c=1,l=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function c(){}function l(){}function u(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(y(t={},r,function(){return this}),t),f=u.prototype=c.prototype=Object.create(s);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,y(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=u,y(f,"constructor",u),y(u,"constructor",l),l.displayName="GeneratorFunction",y(u,o,"GeneratorFunction"),y(f),y(f,o,"Generator"),y(f,r,function(){return this}),y(f,"toString",function(){return"[object Generator]"}),(m=function(){return{w:a,m:d}})()}function y(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}y=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var a=function(t,n){y(e,t,function(e){return this._invoke(t,n,e)})};a("next",0),a("throw",1),a("return",2)}},y(e,t,n,r)}var p=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())})};function v(e){var t={method:i.k.GET,headers:{"Content-type":"application/json"}};e.method&&(t=Object.assign(Object.assign({},t),{method:e.method})),e.init&&(t=Object.assign(Object.assign({},t),e.init));var n,r,o,a=e.url;return t.method===i.k.GET&&e.data?(n=a,r=e.data,o=n,Object.keys(r).forEach(function(e,t){r[e]&&(o+=0===t?"?":"&",o+="".concat(e,"=").concat(encodeURIComponent(r[e])))}),a=o):e.data&&(t=Object.assign(Object.assign({},t),{body:JSON.stringify(e.data)})),{init:t,url:a}}var b={asyncFetch:function(e){return p(this,void 0,void 0,m().m(function t(){var n,r,o;return m().w(function(t){for(;;)switch(t.n){case 0:return n=v(e),t.n=1,fetch(n.url,n.init);case 1:if((r=t.v).ok){t.n=3;break}return t.n=2,r.json();case 2:throw o=t.v,new d(o);case 3:if(204!==r.status){t.n=4;break}return t.a(2);case 4:return t.n=5,r.json();case 5:return t.a(2,t.v)}},t)}))},asyncFetchPlain:function(e){return p(this,void 0,void 0,m().m(function t(){var n,r;return m().w(function(t){for(;;)switch(t.n){case 0:return n=v(e),t.n=1,fetch(n.url,n.init);case 1:if((r=t.v).ok){t.n=2;break}return t.a(2);case 2:return t.n=3,r.text();case 3:return t.a(2,t.v)}},t)}))},fetch:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){var t=v(e);return fetch(t.url,t.init).then(function(e){if(204!==e.status)return e.json()}).then(function(t){return e.success&&e.success(t),t}).catch(function(t){return e.error&&e.error(),t}).finally(function(){e.always&&e.always()})})};function g(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof c?r:c,u=Object.create(l.prototype);return h(u,"_invoke",function(n,r,o){var a,c,l,u=0,s=o||[],f=!1,d={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,c=0,l=e,d.n=n,i}};function m(n,r){for(c=n,l=r,t=0;!f&&u&&!o&&t<s.length;t++){var o,a=s[t],m=d.p,y=a[2];n>3?(o=y===r)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(c=0,d.v=r,d.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,d.n=y,c=0))}if(o||n>1)return i;throw f=!0,r}return function(o,s,y){if(u>1)throw TypeError("Generator is already running");for(f&&1===s&&m(s,y),c=s,l=y;(t=c<2?e:l)||!f;){a||(c?c<3?(c>1&&(d.n=-1),m(c,l)):d.n=l:d.v=l);try{if(u=2,a){if(c||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a.return)&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=e}else if((t=(f=d.n<0)?l:n.call(r,d))!==i)break}catch(t){a=e,c=1,l=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function c(){}function l(){}function u(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(h(t={},r,function(){return this}),t),f=u.prototype=c.prototype=Object.create(s);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,h(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=u,h(f,"constructor",u),h(u,"constructor",l),l.displayName="GeneratorFunction",h(u,o,"GeneratorFunction"),h(f),h(f,o,"Generator"),h(f,r,function(){return this}),h(f,"toString",function(){return"[object Generator]"}),(g=function(){return{w:a,m:d}})()}function h(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}h=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var a=function(t,n){h(e,t,function(e){return this._invoke(t,n,e)})};a("next",0),a("throw",1),a("return",2)}},h(e,t,n,r)}var S={search:function(e,t,n,r,o){var a={longitude:t.longitude,latitude:t.latitude};t.query&&(a.query=t.query),b.fetch({url:e,data:a,success:n,error:r,always:o})},create:function(e,t){return n=this,r=void 0,o=void 0,a=g().m(function n(){return g().w(function(n){for(;;)if(0===n.n)return n.a(2,b.asyncFetch({url:e.createProspect,method:i.k.POST,data:t}))},n)}),new(o||(o=Promise))(function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function c(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o(function(e){e(n)})).then(i,c)}l((a=a.apply(n,r||[])).next())});var n,r,o,a},getLookups:function(e,t){return b.asyncFetch({url:e.prospectLookups(t)})}},w=n(73525),O=n(11607),C=n(28329),E=n(13189);function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.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)?T(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 T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function A(e){var t=e.filteredSchoolsList,n=e.getSchoolName,o=e.onSchoolSuggestionClick,a=e.selectedIndex;return r.createElement(r.Fragment,null,t.map(function(e,t){return r.createElement(O.L,{className:"".concat(E.Z.suggestionItem," ").concat(a-1===t?E.Z.selected:""),key:e.id,onKeyDown:function(t){return"Enter"===t.key&&o(e)},onMouseDown:function(){return o(e)},onClick:function(){return o(e)}},n(e)," ",r.createElement("br",null),r.createElement("small",{className:"text-secondary"},function(e){var t=[];return e.city&&t.push(e.city.toLowerCase().split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" ")),e.province&&t.push(e.province),e.postCode&&t.push(e.postCode),t.join(" ")}(e)))}))}function k(e){return r.createElement("div",{className:"info-link ".concat(E.Z.suggestionItem," ").concat(E.Z.noSuggestion," ").concat(e.selected?E.Z.selected:""),onKeyDown:function(t){return"Enter"===t.key&&e.handleNoSuggestion()},onMouseDown:e.handleNoSuggestion,onClick:e.handleNoSuggestion},"Can't find your school?")}function P(e){var t,n,i=r.useRef(null),c=j(r.useState(!0),2),l=c[0],u=c[1],s=j(r.useState(e.data.schoolName&&e.data.schoolPostCode?e.data.schoolName+", "+e.data.schoolPostCode:e.data.schoolName?e.data.schoolName:""),2),f=s[0],d=s[1],m=j(r.useState(),2),y=m[0],p=m[1],v=(0,C.N)(f,250),b=(0,w.M)({onSelected:function(t){if(y||t)if(t!==y.length){var n=y[t];n&&U(n)}else e.onClickNoSuggestions(f)},itemCount:null!==(t=(null==y?void 0:y.length)+1)&&void 0!==t?t:0,hideOnBlur:e.hideOnBlur}),g=b.selectedIndex,h=b.onKeyDown,O=b.containerRef,T=b.hide,P=b.onBlur,N=b.onFocus,L=!!(null===(n=e.data)||void 0===n?void 0:n.prospectId),x=l&&!L,I=!l&&!L&&(null==y?void 0:y.length)<5,_=(null==y?void 0:y.length)&&!L;function F(t){(e.data.schoolName||e.data.prospectId)&&e.clearData(),t!==f&&d(t)}function D(t){if(e.data.latitude||e.data.longitude){u(!0);var n={latitude:e.data.latitude,longitude:e.data.longitude};t&&t.length&&(n.query=t),S.search(e.searchUrl,n,function(e){return p(e)},null,function(){return u(!1)})}else u(!1)}function U(t){d(K(t)),e.setData({prospectId:t.id,schoolName:t.name,schoolPostCode:t.postCode,schoolType:t.prospectType,province:t.province,city:t.city,country:t.countryCode})}function K(e){return e.name}r.useEffect(function(){L||(v.length?!L&&v.length>1&&v===f&&D(v):D())},[v,L]);var R=(_||x||I)&&!e.disabled&&!T,M="form-control ".concat(R?E.Z.inputFocused:E.Z.input),G="form-group position-relative";return"lg"===e.size&&(M+=" form-control-lg",G+=" ".concat(E.Z.large)),r.createElement("div",{className:G},r.createElement("label",{className:e.labelClassName,htmlFor:"school-input"},"School",e.required&&r.createElement("span",{className:"text-danger"},"*")),r.createElement(a.w,{id:"school-input",value:f,onChange:function(e){return F(e.currentTarget.value)},ref:i,className:M,type:"text",autoComplete:"off",placeholder:e.placeholder||"Select your school below",disabled:e.disabled,autoFocus:!0,onClickClear:function(){F(""),i.current.focus()},onKeyDown:h,onFocus:N,onBlur:P}),r.createElement("div",{className:"position-absolute z-1 w-100 ".concat(E.Z.dropdown," ").concat(T?"d-none":"")},r.createElement("div",{className:"".concat(E.Z.suggestionContainer," ").concat(R?"":"d-none"),ref:O},_?r.createElement(A,{filteredSchoolsList:y,onSchoolSuggestionClick:U,getSchoolName:K,selectedIndex:g}):x&&r.createElement("div",{className:"".concat(E.Z.suggestionLoading," py-4 d-flex justify-content-center")},r.createElement(o.Z,{animation:"border"})),!x&&I&&r.createElement(k,{selected:g===y.length+1,handleNoSuggestion:function(){e.onClickNoSuggestions(f)}}))))}},76153:(e,t,n)=>{n.d(t,{F:()=>s});var r=n(33003),o=n.n(r);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.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)?c(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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l={secondary:{label:"Secondary",isTertiary:!1},"primary & secondary":{label:"Primary & Secondary",isTertiary:!1},k12:{label:"Primary & Secondary",isTertiary:!1},primary:{label:"Primary",isTertiary:!1},special:{label:"Special",isTertiary:!1},university:{label:"University",isTertiary:!0},middle:{label:"Middle",isTertiary:!1},"fe college":{label:"FE College",isTertiary:!0},"high school":{label:"Secondary",isTertiary:!1},elementary:{label:"Primary",isTertiary:!1},"middle school":{label:"Middle",isTertiary:!1},tafe:{label:"TAFE",isTertiary:!0},college:{label:"FE College",isTertiary:!0},"sixth form college":{label:"Sixth Form College",isTertiary:!0}},u={england:"ENG",scotland:"SCT",wales:"WLS","northern ireland":"NIR"},s={hashedEmail:function(e){var t=e.trim().toLowerCase();return o().hash(t)},removeEmptyKeys:function(e){if(Array.isArray(e))return e;var t=Object.assign({},e);return Object.entries(t).filter(function(e){var t=i(e,2)[1];return null!=t&&!("string"==typeof t&&!t.length)}).reduce(function(e,t){var n,r,o,c=i(t,2),l=c[0],u=c[1];return Object.assign(Object.assign({},e),(n={},r=l,o=u===Object(u)?s.removeEmptyKeys(u):u,(r=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(r))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n))},{})},EVENT_TOPIC:"Free Trial Request",BDM_EVENT_TOPIC:"Requested free trial (Streamable Customer)",SOURCE:"cv_product_trial_requested",BDM_SOURCE:"cv_product_bdm_trial_requested",getSchoolType:function(e){var t;if(e){var n=e.toLowerCase();if(!["unknown","other"].includes(n))return(null===(t=l[n])||void 0===t?void 0:t.label)||e}},isTertiarySchool:function(e){var t;return(null===(t=l[null==e?void 0:e.toLowerCase()])||void 0===t?void 0:t.isTertiary)||!1},parseProvince:function(e){return e.length?u[e.toLowerCase()]||e:""}}},73525:(e,t,n)=>{n.d(t,{M:()=>i});var r=n(32735);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.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)?a(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t=o(r.useState(0),2),n=t[0],a=t[1],i=r.useRef(null),c=o(r.useState(!!e.hideInitially),2),l=c[0],u=c[1];function s(){var e;i.current&&(null===(e=i.current.children[n-1])||void 0===e||e.scrollIntoView({block:"center"}))}return{selectedIndex:n,onKeyDown:function(t){if(e.hideOnEnter&&u(!1),"ArrowDown"===t.code){t.stopPropagation(),t.preventDefault();var r=n+1;return r>e.itemCount&&(r=1),a(r),void s()}if("ArrowUp"===t.code){t.stopPropagation(),t.preventDefault();var o=n-1;return o<=0&&(o=e.itemCount),a(o),void s()}if("Enter"===t.code&&n>0)return t.stopPropagation(),t.preventDefault(),e.onSelected(n-1),void(e.hideOnEnter&&u(!0));a(0)},containerRef:i,hide:l,onFocus:function(){e.hideOnBlur&&u(!1)},onBlur:function(){e.hideOnBlur&&u(!0)}}}},66122:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(32735);function o(e){return r.createElement("span",{id:"".concat(e.name,"Error"),className:"".concat(e.className," invalid-feedback d-block"),role:"status"},e.children)}},11904:(e,t,n)=>{n.d(t,{n:()=>w,W:()=>O});var r=n(32735),o=n(80247),a=n(50132),i=n(92802),c=n(91967),l=n(1048),u=n(28825),s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function f(e){var t=e.label,n=e.checkboxLabelClassName,o=e.checkboxLabelFontWeight,i=e.className,c=s(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return r.createElement(a.Z.Group,{className:"form-group"},r.createElement("div",{className:"form-check ".concat(i||"")},r.createElement(w,Object.assign({className:"form-check-input"},c)),r.createElement(a.Z.Label,{className:"form-check-label cursor-pointer ".concat("normal"===o?"fw-normal":""," \n ").concat(n),htmlFor:c.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement(u.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var d=n(83914),m=n(83345),y={getCustomFormControlClassName:function(e,t,n,r,o,a){var c="";return c=function(e,t){var n="";return n="select"===e?"form-select":"form-control","sm"===t&&(n+=" ".concat(n,"-sm")),"lg"===t&&(n+=" ".concat(n,"-lg")),n}(a,r),(0,i.u9)(t,n)&&(0,i.u9)(e,n)&&(c+=" is-invalid"),o&&(c+=" ".concat(o)),c}},p=n(35223);function v(e){var t=(0,i.u6)().values,n=l.t.get(t,e.fieldName);return"string"!=typeof n?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-end text-secondary fw-normal"},n.length,"/",e.limit," characters")}const b={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG",spinner:"CycFx"};function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},S="shared.formField";function w(e){var t,n,a=e.children,u=e.showLoadingSpinner,s=h(e,["children","showLoadingSpinner"]),f=(t=r.useState(e.type),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,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.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)?g(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.")}()),m=f[0],y=f[1],v=c.q.isFunction(a)?function(e){return a(e)}:r.Children.count(a)?a:null;if("password"!==s.type)return u?r.createElement("div",{className:"position-relative"},r.createElement(i.gN,Object.assign({},l.t.omit(s,["formSize"])),v),r.createElement("div",{className:b.spinner},r.createElement(o.Z,{animation:"border",size:"sm"}))):r.createElement(i.gN,Object.assign({},l.t.omit(s,["formSize"])),v);var S="position-relative ".concat(b.passwordContainer);return s.className&&(S+=" ".concat(s.className)),s.disabled&&(S+=" ".concat(b.passwordContainerDisabled)),r.createElement("div",{className:S},r.createElement(i.gN,Object.assign({},l.t.omit(s,["formSize","type","className"]),{type:m,className:"".concat(b.passwordInput," border-0 w-100 h-100 outline-none rounded")}),v),"password"===s.type&&r.createElement(d.x,{svgName:"password"===m?p.vn.VisibleOn:p.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(b.revealPassword),onClick:function(){y("password"===m?"text":"password")}}))}function O(e){var t=e.label,n=e.className,o=e.showCharacterCounter,c=e.showRequiredStar,u=e.infoTooltip,s=e.infoTooltipPlacement,g=e.infoText,O=e.formSize,C=e.showOptionalLabel,E=e.formGroupClassname,j=h(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel","formGroupClassname"]),T=(0,i.u6)(),A=T.errors,k=T.touched,P=function(){};if("checkbox"===j.type){var N=l.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(N.onChange=P),r.createElement(f,Object.assign({},N))}var L=Object.assign(Object.assign({},j),{className:y.getCustomFormControlClassName(A,k,j.name,O,n,"string"==typeof e.as?e.as:null)});return e.disabled&&(L.onChange=P),r.createElement(a.Z.Group,{className:"form-group ".concat(E)},!!t&&r.createElement(a.Z.Label,{htmlFor:j.id,className:"d-flex align-items-center"},t,c&&r.createElement("span",{className:"text-danger"},"*"),u&&r.createElement(d.x,{className:"svg-container text-secondary ".concat(b.infoTooltip),svgName:p.vn.Info,title:u,tooltipPlacement:s,tooltipSpanHack:!0}),C&&r.createElement("span",{className:"text-secondary"}," ",r.createElement(m.x,{namespace:S,phrase:"optional"})),!!o&&!!j.maxLength&&r.createElement("div",{className:"ms-auto"},r.createElement(v,{fieldName:j.name,limit:j.maxLength}))),r.createElement(w,Object.assign({},L,{"aria-errormessage":"".concat(j.name,"Error")})),!!g&&r.createElement(a.Z.Text,{className:"text-secondary"},g),r.createElement(i.Bc,{name:j.name},function(e){return r.createElement(a.Z.Control.Feedback,{id:"".concat(j.name,"Error"),type:"invalid",role:"status"},e)}))}w.defaultProps={autoComplete:"off"},O.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},82644:(e,t,n)=>{n.d(t,{b:()=>f,n:()=>s});var r=n(32735),o=n(92802),a=n(91967),i=n(1048);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!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){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function s(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,l=e.initialValues,s=e.onSubmit,f=u(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),d=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(n){Object.keys(t).forEach(function(r){t.hasOwnProperty(r)&&(i.t.isObject(n[r])?e(n[r]):null===t[r]&&delete t[r])})}(t),t}(l)):l,m={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(o.J9,Object.assign({enableReinitialize:!0},f,{initialValues:d,onSubmit:function(t,r){var o=r.setSubmitting,a=r.resetForm,i=r.setFieldError,l=n&&e.validationSchema?e.validationSchema.cast(t):t;s(l,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.reset&&a(),e.errors)for(var t=0,n=Object.entries(e.errors);t<n.length;t++){var r=c(n[t],2),l=r[0],u=r[1];i(l,u)}o(!1)})},initialStatus:m}),a.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function f(){return(0,o.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},7822:(e,t,n)=>{n.d(t,{D:()=>o});var r=n(99940),o={checkEmail:function(e){return{url:"/api/braze/check-email",key:"braze:check:email:".concat(e),type:r.k.POST,data:{email:e}}},prospectLookups:function(e){return{url:"{gateway}/v1/prospects/".concat(e,"/lookups"),key:"prospect:lookup:".concat(e)}}}},98137:(e,t,n)=>{n.d(t,{x:()=>a});var r=n(70624),o=n(57157);function a(){return{createOrUpdateProfile:(0,r.f)(o.K.ProfileApiClient).createOrUpdate}}},7614:(e,t,n)=>{var r;n.d(t,{_:()=>r}),function(e){e.LivestreamBooking="sl_product_livestream",e.ContactUs="sl_marketing_form_contact_us"}(r||(r={}))},91975:(e,t,n)=>{var r;n.d(t,{J:()=>r}),function(e){e.ContactUs="Contact us",e.LivestreamBooking="Livestream booking"}(r||(r={}))},93015:(e,t,n)=>{n.d(t,{k:()=>a});var r=n(70624),o=n(60735);function a(){return{client:e=(0,r.G)(o.D.BrazeClient),logFormSubmission:function(t){var n=t.user,r=t.additionalData,o=t.source,a=t.eventType,i=t.topic,c=t.productType,l=t.callback,u=function(e,t){return Object.assign(Object.assign({},e),{custom:Object.assign(Object.assign({},null==e?void 0:e.custom),{topic:t.topic,source:t.source}),event:Object.assign(Object.assign({},null==e?void 0:e.event),{eventTopic:t.topic})})}(n,{source:o,topic:i});e.setUserInit(u),e.logFormEvent({eventType:a,additionalData:r,callback:l,internalOptions:{subscriptionGroups:c}})}};var e}},6117:(e,t,n)=>{n.d(t,{f:()=>c});var r=n(39202),o=n(14292),a=n(97395);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)}var c={isBot:function(){if(!window.URLSearchParams)return!1;var e=new URLSearchParams(window.location.search);return"true"===(null==e?void 0:e.get("isBot"))},getCanonicalLink:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.A.GetCurrentOrigin(),n=(null==e?void 0:e.customAppLink)||r.C$.getCurrentAppLink(),c=function(e,t){if(!(null==t?void 0:t.length)||"string"==typeof e||!e)return{};var n=t.reduce(function(e,t){return Object.assign(Object.assign({},e),(n={},o=!0,(r=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(r=t))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n));var n,r,o},{});return Object.keys(e).reduce(function(t,r){return r in n&&(t[r]=e[r]),t},{})}(n.params,e.allowedParams),l=r.C$.getHref(Object.assign(Object.assign({},n),{params:c}));return"function"==typeof e.hrefTransformer&&(l=e.hrefTransformer(l)),a._.safeUrlConcat(t,l)}}},13189:(e,t,n)=>{n.d(t,{Z:()=>r});const r={baseText:"KL3Q_",inputFocused:"I6wQy",dropdown:"oI3z7",suggestionContainer:"Y78ea",suggestionItem:"magL7",suggestionLoading:"W7rH_",noSuggestion:"XXSnS",large:"b0Mz9",input:"ChY5L",selected:"snnHR",useMyLocation:"dwmvC"}}}]);