1(()=>{"use strict";var e={156:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function s(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function o(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function n(e,t){try{return t in e}catch(e){return!1}}function a(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var c,d,u=Array.isArray(r);return u!==Array.isArray(e)?i(r,l):u?l.arrayMerge(e,r,l):(d={},(c=l).isMergeableObject(e)&&o(e).forEach(function(t){d[t]=i(e[t],c)}),o(r).forEach(function(t){(!n(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(n(e,t)&&c.isMergeableObject(r[t])?d[t]=(function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a})(t,c)(e[t],r[t],c):d[t]=i(r[t],c))}),d)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return a(e,r,t)},{})},e.exports=a}},t={};function r(i){var s=t[i];if(void 0!==s)return s.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=r(156),s=r.n(i);class o{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let r=o.toUpperCamelCase(e,t);return o.lcFirst(r)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>o.ucFirst(e.toLowerCase())).join(""):o.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class n{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,s=e.split("."),o=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=o;o=function(r){i.unsubscribe(e),t(r)}}return this.el.addEventListener(s[0],o),this.listeners.push({splitEventName:s,opts:r,cb:o}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class a{constructor(e,t={},r=!1){if(!(e instanceof Node))throw Error("There is no valid element given.");this.el=e,this.$emitter=new n(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){throw Error(`The "init" method for the plugin "${this._pluginName}" is not defined.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),s().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=o.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=o.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-options`);if(r)try{return JSON.parse(r)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}class l{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",e,r);return this._sendRequest(i,null,t)}post(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let s=this._createPreparedRequest("POST",e,i);return this._sendRequest(s,t,r)}delete(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let s=this._createPreparedRequest("DELETE",e,i);return this._sendRequest(s,t,r)}patch(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let s=this._createPreparedRequest("PATCH",e,i);return this._sendRequest(s,t,r)}
1abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,r){return this._registerOnLoaded(e,r),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,r){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}}class c{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!c.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===c.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=t.replace(/^data(|-)/,""),s=o.toLowerCamelCase(i,"-");if(!c.isNode(e)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let n=e.dataset[s];if(void 0===n){if(r)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return n}return o.parsePrimitive(n)}static querySelector(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!c.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelector(t)||!1;if(r&&!1===i)throw Error(`The required element "${t}" does not exist in parent node!`);return i}static querySelectorAll(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!c.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelectorAll(t);if(0===i.length&&(i=!1),r&&!1===i)throw Error(`At least one item of "${t}" must exist in parent node!`);return i}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=` 2 input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]), 3 select:not([tabindex^="-"]):not([disabled]), 4 textarea:not([tabindex^="-"]):not([disabled]), 5 button:not([tabindex^="-"]):not([disabled]), 6 a[href]:not([tabindex^="-"]):not([disabled]), 7 [tabindex]:not([tabindex^="-"]):not([disabled]) 8 `;return e.querySelectorAll(t)}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}let d=window.PluginManager;d.register("StudygoodModal",class extends a{init(){this._client=new l(window.accessKey,window.contextToken),this._registerModalEvents(),this.callback=null}_registerModalEvents(){let e=this,t=document.getElementById("studygoodModal");this.el.addEventListener("click",()=>{let e=this.el.dataset.studygoodModal;this._client.get(e,e=>{this._openModal(e,null)})}),t.addEventListener("hidden.bs.modal",()=>{t.innerHTML=""}),window.studygoodModal=function(t,r){e._client.get(t,t=>{e._openModal(t,r)})}}_openModal(e,t){let r=document.getElementById("studygoodModal");r.innerHTML=e;let i=bootstrap.Modal.getInstance(r)??new bootstrap.Modal(r);i.show(),window.PluginManager.initializePlugins(),"function"==typeof t&&t(r,i)}},"[data-studygood-modal]"),d.register("StudygoodForm",class extends a{init(){this._client=new l(window.accessKey,window.contextToken),this._form=this.el,this._optionsElement=this.el.querySelector("#shopSelectionOptions"),this._registerEvents()}_registerEvents(){this._form.addEventListener("submit",this._formSubmit.bind(this))}_formSubmit(e){void 0!==e&&e.preventDefault();let t=c.getAttribute(this._form,"action").toLowerCase(),r=new FormData(this._form);if(!r.get("action"))try{r.set("action",e.submitter.value)}catch(e){}this._client.post(t,r,this._onLoaded.bind(this))}_onLoaded(e){e=JSON.parse(e);let t=document.getElementById("studygoodModal");if((bootstrap.Modal.getInstance(t)??new bootstrap.Modal(t)).hide(),e.reload&&window.location.reload(),void 0!==e.html)for(let[t,r]of Object.entries(e.html))document.querySelector(t).innerHTML=r;window.PluginManager.initializePlugins()}},"[data-studygood-form]"),d.register("StudygoodCourse",class extends a{init(){this._client=new l(window.accessKey,window.contextToken),this._actionElements=this.el.querySelectorAll("[data-action]"),this._historyElements=this.el.querySelectorAll("[data-history]"),this._registerEvents(),this.calcHeight(),this.calcWidth()}_registerEvents(){window.addEventListener("resize",()=>{this.calcHeight(),this.calcWidth()}),document.querySelectorAll("[data-bs-dismiss='sidebar'], [class^='overlay']").forEach(e
8=>{e.addEventListener("click",()=>{document.querySelectorAll(".sidebar").forEach(e=>{e.classList.remove("active")}),document.querySelectorAll("[class^='overlay']").forEach(e=>{e.classList.remove("active")}),document.querySelectorAll("a[aria-expanded=false]").forEach(e=>{e.setAttribute("aria-expanded","true")})})}),document.querySelectorAll("[data-bs-toggle='sidebar']").forEach(e=>{e.addEventListener("click",()=>{let t=e.getAttribute("href")??e.dataset.bsTarget,r=e.dataset.overlay??"[class^='overlay']";document.querySelector(t).classList.add("active"),document.querySelector(r).classList.add("active"),document.querySelectorAll("a[aria-expanded=true]").forEach(e=>{e.setAttribute("aria-expanded","false")})})}),this._historyElements.forEach(e=>{e.addEventListener("click",()=>{history.replaceState({},"",e.dataset.history)})}),this._actionElements.forEach(e=>{e.addEventListener("click",()=>{let t=e.dataset.action;this._removeActiveState(),this._client.get(t,t=>{e.classList.add("active"),this._processResponse(t)})})})}_removeActiveState(){this._actionElements.forEach(e=>{e.classList.remove("active")})}_processResponse(e){e=JSON.parse(e);let t=document.querySelector("#lessonMcTestNav");if(void 0!==e.html)for(let[r,i]of Object.entries(e.html)){"#lessonMcTestCount"===r&&(i>0?t.classList.remove("d-none"):t.classList.add("d-none"));let e=document.querySelector(r);null!==e&&(e.innerHTML=i)}window.PluginManager.initializePlugins()}calcHeight(){this.el.querySelectorAll("[data-height]").forEach(e=>{let t=e.offsetHeight;e.querySelectorAll("[data-height-fix]").forEach(e=>{t-=e.offsetHeight}),e.querySelector("[data-height-auto]").style.height=t+"px"})}calcWidth(){this.el.querySelectorAll("[data-width]").forEach(e=>{let t=e.offsetWidth;e.querySelectorAll("[data-width-fix]").forEach(e=>{t-=e.offsetWidth}),e.querySelector("[data-width-auto]").style.width=t+"px"})}},"[data-studygood-course]"),d.register("StudygoodCourseDetail",class extends a{init(){this._quantitySelect=this.el.querySelector(".product-detail-quantity-select"),this._subscriptionTime=this.el.querySelector("[data-subscription-time]"),this.courseCardBodyViewportOffset=this._getViewportOffset(".appflix-dl-product-course-card"),this.footerViewportOffset=this._getViewportOffset(".footer-main"),this._scrollSpy(),this._cardWatcher(),this._calcSubscriptionTime()}_calcSubscriptionTime(){if(!this._subscriptionTime)return;let e=this;this._quantitySelect.addEventListener("change",function(){let t=this.value,r=e._subscriptionTime.dataset.subscriptionTime;e._subscriptionTime.innerText=t*r})}_scrollSpy(){window.addEventListener("scroll",()=>{this._cardWatcher()})}_getViewportOffset(e){return document.querySelector(e).getBoundingClientRect()}_getOffsetTop(e){return document.querySelector(e).offsetTop}_cardWatcher(){this.el.getBoundingClientRect(),this._getViewportOffset(".footer-main");let e=this._getOffsetTop(".footer-main"),t=this._getViewportOffset(".appflix-dl-product-course-card"),r=window.scrollY,i=r+1;i+t.height>=e-50&&(this.el.classList.remove("course-top"),this.el.classList.remove("course-scroll"),this.el.classList.add("course-bottom")),r+t.height<e-50&&(i>=this.courseCardBodyViewportOffset.top?(this.el.classList.remove("course-top"),this.el.classList.remove("course-bottom"),this.el.classList.add("course-scroll")):(this.el.classList.remove("course-scroll"),this.el.classList.remove("course-bottom"),this.el.classList.add("course-top")))}},"[data-studygood-course-card-fixed]")})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.