vendor: 5,218 bytes, lines 1-2
1/*! For license information please see Search-UniversalSearchPage-vue.ecae29be.js.LICENSE.txt */ 2"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[933,2567,7163,5967,2152,2116,2124,9125,6825,9050,2452,5147,4692,3696,4453,7941,7930,2898,7498],{9482:(e,t,r)=>{r.d(t,{x:()=>p});var n=r(41916),o=r(15229),a=r(87879),i=r(5121),l=r(47393),c=r(91440),s=r(72326);function u(e){return u="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},u(e)}function d(){d=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof h?t:h,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:S(e,r,l)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var p={};function h(){}function m(){}function g(){}var v={};c(v,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(I([])));b&&b!==t&&r.call(b,a)&&(v=b);var w=g.prototype=h.prototype=Object.create(v);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,a,i,l){var c=f(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==u(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=E(i,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return m.prototype=g,n(w,"constructor",{value:g,configurable:!0}),n(g,"constructor",{value:m,configurable:!0}),m.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(x.prototype),c(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(w),c(w,l,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,p):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),p},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),B(r),p}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function f(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function p(e){var t,r,u,p,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=h.hitsPerPage,g=void 0===m?9:m,v=h.initialSearch,y=void 0===v||v,b=h.autoSearch,w=void 0===b||b,k=h.initialQuery,x=void 0===k?"":k,S=h.initialFilters,E=void 0===S?"":S,C=h.initialSort,B=void 0===C?"":C,N=h.facets,I=void 0===N?[]:N,L=h.aiSearchEnabled,V=void 0!==L&&L,T=h.aiSearchEndpoint,_=void 0===T?null:T,A=h.initialHits,j=void 0===A?[]:A,D=h.initialTotalHits,O=void 0===D?0:D,F=(0,a.qt)(),P=(null===(t=F.props.integrations)||void 0===t||null===(r=t.meilisearch)||void 0===r?void 0:r.host)||("undefined"!=typeof window?window.MEILISEARCH_HOST:void 0)||"http://localhost:7700",R=(null===(u=F.props.integrations)||void 0===u||null===(p=u.meilisearch)||void 0===p?void 0:p.key)||("undefined"!=typeof window?window.MEILISEARCH_KEY:void 0)||"";R&&(0,l.qd)(R,P);var U=(0,l.wA)(),M=new o.MeiliSearch({host:P,apiKey:R,requestConfig:{headers:{"X-MS-USER-ID":U}}}),G=(0,n.ref)(j),H=(0,n.ref)(O),q=(0,n.ref)(Math.ceil((O||0)/g)),Q=(0,n.ref)(1),Z=(0,n.ref)(!1),z=(0,n.ref)(null),$=(0,n.ref)(x),K=(0,n.ref)(E),W=(0,n.ref)(B),Y=(0,n.ref)({}),J=(0,n.ref)(0),X=(0,n.ref)(null),ee=(0,n.ref)({enabled:V,used:!1,summary:null,match_quality:null,matched_themes:[],result_reasons:[],unmet_constraints:[]}),te=function(){var t,r=(t=d().mark((function t(){var r,n,o,a,l,u,f,p,h,m,v,y,b,w,k=arguments;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k.length>0&&void 0!==k[0]&&k[0]||(Z.value=!0),z.value=null,t.prev=3,n=(0,s.Bl)($.value),!(V&&_&&$.value.trim())){t.next=24;break}return t.prev=6,t.next=9,i.Z.post(_,{query:$.value,filters:K.value||"",facets:I,sort:W.value,page:Q.value,per_page:g});case 9:return m=t.sent,v=m.data,G.value=v.hits||[],H.value=v.estimatedTotalHits||0,q.value=v.totalPages||Math.ceil(H.value/g),J.value=v.processingTimeMs||0,Y.value=v.facetDistribution||{},X.value=v.queryUid||null,ee.value={enabled:!(null===(o=v.ai)||void 0===o||!o.enabled),used:!(null===(a=v.ai)||void 0===a||!a.used),summary:(null===(l=v.ai)||void 0===l?void 0:l.summary)||null,match_quality:(null===(u=v.ai)||void 0===u?void 0:u.match_quality)||null,matched_themes:(null===(f=v.ai)||void 0===f?void 0:f.matched_themes)||[],result_reasons:(null===(p=v.ai)||void 0===p?void 0:p.result_reasons)||[],unmet_constraints:(null===(h=v.ai)||void 0===h?void 0:h.unmet_constraints)||[]},t.abrupt("return");case 21:t.prev=21,t.t0=t.catch(6),console.warn("[useMeilisearch] AI search unavailable, falling back to Meilisearch.",t.t0);case 24:return y=M.index(e),b={limit:g,offset:(Q.value-1)*g},n&&(b.q=n),K.value&&(b.filter=K.value),I.length>0&&(b.facets=I),W.value&&!$.value&&(b.sort=Array.isArray(W.value)?W.value:[W.value]),t.next=32,y.search(n||"",b);case 32:w=t.sent,G.value=w.hits,H.value=w.estimatedTotalHits||0,q.value=Math.ceil(H.value/g),J.value=w.processingTimeMs,Y.value=w.facetDistribution||{},X.value=(null===(r=w.metadata)||void 0===r?void 0:r.queryUid)||null,ee.value={enabled:V,used:!1,summary:null,match_quality:null,matched_themes:[],result_reasons:[],unmet_constraints:[]},(0,c.j)({tenantId:F.props.tenantId,index:e,source:"single"}),t.next=47;break;case 43:t.prev=43,t.t1=t.catch(3),console.error("[useMeilisearch] Search error:",t.t1),z.value=t.t1;case 47:return t.prev=47,Z.value=!1,t.finish(47);case 50:case"end":return t.stop()}}),t,null,[[3,43,47,50],[6,21]])})),function(){var e=this,r=arguments;
2return new Promise((function(n,o){var a=t.apply(e,r);function i(e){f(a,n,o,i,l,"next",e)}function l(e){f(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(){return r.apply(this,arguments)}}();return y&&te(),{hits:G,totalHits:H,totalPages:q,currentPage:Q,isLoading:Z,error:z,query:$,filters:K,sort:W,facetDistribution:Y,processingTimeMs:J,queryUid:X,aiMeta:ee,search:te,setQuery:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];$.value=e,r&&(Q.value=1),w&&t&&te()},setFilters:function(e){K.value=e,Q.value=1,w&&te()},setSort:function(e){W.value=e,Q.value=1,w&&te()},goToPage:function(e){Q.value=e,w&&te()},setResults:function(e){e&&(G.value=e.hits||[],H.value=e.estimatedTotalHits||e.totalHits||0,q.value=Math.ceil(H.value/g),Y.value=e.facetDistribution||{},J.value=e.processingTimeMs||0,Q.value=1,ee.value={enabled:V,used:!1,summary:null,match_quality:null,matched_themes:[],result_reasons:[],unmet_constraints:[]})}}}},47393:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.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 d(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),l=new N(n||[]);return a(i,"_invoke",{value:S(e,r,l)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var p={};function h(){}function m(){}function g(){}var v={};u(v,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(I([])));b&&b!==t&&r.call(b,l)&&(v=b);var w=g.prototype=h.prototype=Object.create(v);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(a,i,l,c){var s=f(e[a],e,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==n(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,l,c)}),(function(e){o("throw",e,l,c)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return o("throw",e,l,c)}))}c(s.arg)}var i;a(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=E(i,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[l];if(t)return t.call(e);
2if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return m.prototype=g,a(w,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:m,configurable:!0}),m.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(x.prototype),u(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(d(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(w),u(w,s,"Generator"),u(w,l,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,p):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),p},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),B(r),p}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}r.d(t,{De:()=>h,VK:()=>m,aU:()=>g,ob:()=>p,qd:()=>c,wA:()=>u});var i=null,l=null;function c(e,t){i=e,t&&(l=t)}function s(){if("undefined"==typeof localStorage)return"ssr_anonymous";var e=localStorage.getItem("meilisearch_user_id");e||(e="user_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),localStorage.setItem("meilisearch_user_id",e));try{var t,r,n,o=(null===(t=window.Inertia)||void 0===t?void 0:t.page)||{},a=null==o||null===(r=o.props)||void 0===r||null===(n=r.auth)||void 0===n?void 0:n.user;a&&a.id&&(e="user_"+a.id)}catch(e){}return e}function u(){return s()}function d(e){return f.apply(this,arguments)}function f(){var e;return e=o().mark((function e(t){var r,n,a,c,u,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=s(),n=i,a=l,r&&n&&a){e.next=6;break}return("localhost"===window.location.hostname||window.location.search.includes("debug"))&&console.log("[Meilisearch Analytics] Skipping event (not yet initialized)",{eventType:t.eventType,hasUserId:!!r,hasApiKey:!!n,hasHost:!!a}),e.abrupt("return");case 6:return c={eventType:t.eventType,eventName:t.eventName||("click"===t.eventType?"Search Result Clicked":"Conversion"),indexUid:t.indexUid,userId:r,objectId:t.objectId},t.objectName&&(c.objectName=t.objectName),void 0!==t.position&&null!==t.position&&(c.position=t.position),t.queryUid&&(c.queryUid=t.queryUid),e.prev=10,u="".concat(a.replace(/\/$/,""),"/events"),e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n),"X-MS-USER-ID":r},body:JSON.stringify(c)});case 14:(d=e.sent).ok?console.log("[Meilisearch Analytics] Event sent successfully:",t.eventType,t.eventName):console.warn("[Meilisearch Analytics] Event failed:",d.status,d.statusText),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(10),console.warn("[Meilisearch Analytics] Failed to send event:",e.t0);case 21:case"end":return e.stop()}}),e,null,[[10,18]])})),f=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function l(e){a(i,n,o,l,c,"next",e)}function c(e){a(i,n,o,l,c,"throw",e)}l(void 0)}))},f.apply(this,arguments)}function p(e){d({eventType:"click",eventName:"Search Result Clicked",indexUid:e.indexUid,objectId:e.objectId,objectName:e.objectName,position:e.position,queryUid:e.queryUid})}function h(e){var t=e.indexUid,r=e.objectId,n=e.objectName,o=e.eventName,a=e.queryUid;a||(a=new URLSearchParams(window.location.search).get("queryUid"));d({eventType:"conversion",eventName:o||"Conversion",indexUid:t,objectId:r,objectName:n,queryUid:a})}function m(){return new URLSearchParams(window.location.search).get("queryUid")}function g(){try{var e,t,r,n=(null===(e=window.Inertia)||void 0===e?void 0:e.page)||{},o=(null==n||null===(t=n.props)||void 0===t||null===(r=t.integrations)||void 0===r?void 0:r.meilisearch)||{},a=window.location.pathname;return a.includes("/lesson-plans/")||a.includes("/external-resources/")?o.teachingMaterialsIndex||"teaching_materials":a.includes("/teacher-guides/")?o.teacherGuidesIndex||"teacher_guides":a.includes("/climate-change-explainers/")?o.climateExplainersIndex||"climate_explainers":a.includes("/professional-development/")?o.pdIndex||"opportunities":a.includes("/news/")?o.newsIndex||"news":null}catch(e){return null}}},91440:(e,t,r)=>{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,l=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){c=!0,i=e},f:function(){try{l||null==r.return||r.return()}finally{if(c)throw i}}}}function o(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}function a(e){var t=e.tenantId,r=e.index,n=e.source,o=void 0===n?"single":n;t&&r&&fetch("/api/track-ms-request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tenant_id:t,index:r,source:o})}).catch((function(){}))}function i(e){var t=e.tenantId,r=e.indexes;if(t&&null!=r&&r.length){var o,i=n(r);try{for(i.s();!(o=i.n()).done;){a({tenantId:t,index:o.value,source:"multi"})}}catch(e){i.e(e)}finally{i.f()}}}r.d(t,{j:()=>a,p:()=>i})},23044:(e,t,r)=>{function n(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}
2finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(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}r.d(t,{K:()=>c,U:()=>l});var a=null,i=1e3;function l(e){var t=e.tenantId,r=e.query,n=void 0===r?null:r,o=e.filters,l=void 0===o?{}:o;a&&clearTimeout(a),a=setTimeout((function(){s({tenantId:t,query:n,filters:l})}),i)}function c(e){var t=e.tenantId,r=e.query,n=void 0===r?null:r,o=e.filters;s({tenantId:t,query:n,filters:void 0===o?{}:o})}function s(e){for(var t,r=e.tenantId,o=e.query,a=e.filters,i={},l=0,c=Object.entries(a);l<c.length;l++){var s=n(c[l],2),u=s[0],d=s[1];d&&(!Array.isArray(d)||d.length>0)&&(i[u]=d)}(o||0!==Object.keys(i).length)&&fetch("/api/track-search",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":(null===(t=document.querySelector('meta[name="csrf-token"]'))||void 0===t?void 0:t.getAttribute("content"))||""},body:JSON.stringify({tenant_id:r,query:o||null,filters:i})}).catch((function(){}))}},90222:(e,t,r)=>{r.d(t,{O:()=>o,T:()=>n});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">";return e.split(t).slice(-1)[0]},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">";return e.split(t).length}},57694:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".slide-fade-enter-active[data-v-de324c16],.slide-fade-leave-active[data-v-de324c16]{transition:all .3s ease-in-out}.slide-fade-enter-from[data-v-de324c16],.slide-fade-leave-to[data-v-de324c16]{opacity:0;transform:translateX(100%)}",""]);const a=o},98209:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".slide-fade-enter-active[data-v-5ba3edf7],.slide-fade-leave-active[data-v-5ba3edf7]{transition:all .3s ease-in-out}.slide-fade-enter-from[data-v-5ba3edf7],.slide-fade-leave-to[data-v-5ba3edf7]{opacity:0;transform:translateX(100%)}",""]);const a=o},71644:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".slide-down-enter-active[data-v-265fda74],.slide-down-leave-active[data-v-265fda74]{transition:all .3s ease-in-out}.slide-down-enter-from[data-v-265fda74],.slide-down-leave-to[data-v-265fda74]{opacity:0;transform:translateY(-100%)}",""]);const a=o},2364:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,"body.modal-open{position:fixed;width:100%}@keyframes blink{0%{opacity:1}50%{opacity:0}to{opacity:1}}input::placeholder{opacity:.7}",""]);const a=o},1712:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".dropdown[data-v-b5a1442e]{background:#00000005;opacity:.98}.resource-card[data-v-b5a1442e]{column-count:3}.pagination-arrow[data-v-b5a1442e]{background:#fff;color:#fff}button[data-v-b5a1442e]{border-bottom-width:1px;margin-bottom:-1px;position:relative;transition:all .2s ease}button.active[data-v-b5a1442e]:after,button.active[data-v-b5a1442e]:before{background:inherit;bottom:-1px;content:\"\";height:6px;position:absolute;width:6px}button.active[data-v-b5a1442e]:before{border-bottom-right-radius:6px;left:-6px}button.active[data-v-b5a1442e]:after{border-bottom-left-radius:6px;right:-6px}.flex[data-v-b5a1442e]{transition:background-color .3s ease}input[data-v-b5a1442e],select[data-v-b5a1442e]{appearance:none;background-color:#fff;height:42px}select[data-v-b5a1442e]{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m19 9-7 7-7-7'/%3E%3C/svg%3E\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}",""]);const a=o},48365:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));
2o.push([e.id,".line-clamp-2[data-v-75873320]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}",""]);const a=o},57264:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".filter-expand-enter-active[data-v-19d7f00a],.filter-expand-leave-active[data-v-19d7f00a]{max-height:1000px;transition:all .3s ease-in-out}.filter-expand-enter-from[data-v-19d7f00a],.filter-expand-leave-to[data-v-19d7f00a]{max-height:0;opacity:0;transform:translateY(-10px)}.filter-expand-enter-to[data-v-19d7f00a],.filter-expand-leave-from[data-v-19d7f00a]{max-height:1000px;opacity:1;transform:translateY(0)}",""]);const a=o},54210:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,'.cookie-consent-banner[data-v-65f8774e]{align-items:flex-end;bottom:0;contain:layout style paint;display:flex;left:0;opacity:0;pointer-events:none;position:fixed;right:0;top:0;transition:opacity .3s ease,visibility .3s ease;visibility:hidden;will-change:transform,opacity;z-index:9999}.cookie-consent-banner--visible[data-v-65f8774e]{opacity:1;pointer-events:none;visibility:visible}.cookie-consent-banner__content[data-v-65f8774e]{background:#fff;border-radius:10px;border-top:1px solid #e5e7eb;box-shadow:0 -4px 6px -1px #0000001a,0 10px 25px -5px #0003,0 4px 10px -3px #00000026;contain:layout style paint;padding:13px 16px 13px 15px;pointer-events:auto;position:relative;transform:translate3d(0,100%,0);transition:transform .3s ease;width:342px;will-change:transform;z-index:9999}.cookie-consent-banner--visible .cookie-consent-banner__content[data-v-65f8774e]{transform:translateZ(0)}.cookie-consent-banner__header[data-v-65f8774e]{align-items:center;display:flex;justify-content:space-between;margin-bottom:1rem}.cookie-consent-banner__title[data-v-65f8774e]{color:#000;font-family:Outfit;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.cookie-consent-banner__close[data-v-65f8774e]{align-items:center;background:none;border:none;color:#6b7280;cursor:pointer;display:flex;font-size:1.5rem;height:2rem;justify-content:center;line-height:1;padding:0;transition:color .2s;width:2rem}.cookie-consent-banner__close[data-v-65f8774e]:hover{color:#111827}.cookie-consent-banner__body[data-v-65f8774e]{margin-bottom:1.5rem}.cookie-consent-banner__description[data-v-65f8774e]{color:#000;margin-bottom:7px}.cookie-consent-banner__description[data-v-65f8774e],.cookie-consent-banner__link[data-v-65f8774e]{font-family:Outfit;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.cookie-consent-banner__link[data-v-65f8774e]{color:#556fa4;cursor:pointer}.cookie-consent-banner__link[data-v-65f8774e]:hover{color:#2563eb}.cookie-consent-banner__options[data-v-65f8774e]{display:flex;flex-direction:column;gap:1rem}.cookie-consent-banner__option[data-v-65f8774e]{background:#f9fafb;border:1px solid #e5e7eb;border-radius:.5rem;padding:1rem}.cookie-consent-banner__toggle[data-v-65f8774e]{align-items:flex-start;cursor:pointer;display:flex;gap:1rem}.cookie-consent-banner__toggle input[type=checkbox][data-v-65f8774e]{display:none}.cookie-consent-banner__toggle-slider[data-v-65f8774e]{background:#d1d5db;border-radius:9999px;flex-shrink:0;height:1.5rem;margin-top:.125rem;position:relative;transition:background .2s;width:3rem}.cookie-consent-banner__toggle-slider[data-v-65f8774e]:before{background:#fff;border-radius:50%;box-shadow:0 1px 3px #0000001a;content:"";height:1.25rem;left:.125rem;position:absolute;top:.125rem;transition:transform .2s;width:1.25rem}.cookie-consent-banner__toggle input[type=checkbox]:checked+.cookie-consent-banner__toggle-slider[data-v-65f8774e]{background:#3b82f6}.cookie-consent-banner__toggle input[type=checkbox]:checked+.cookie-consent-banner__toggle-slider[data-v-65f8774e]:before{transform:translateX(1.5rem)}.cookie-consent-banner__toggle-label[data-v-65f8774e]{display:flex;flex:1;flex-direction:column;gap:.25rem}.cookie-consent-banner__toggle-label strong[data-v-65f8774e]{color:#111827;font-size:12px;font-weight:600}.cookie-consent-banner__toggle-label small[data-v-65f8774e]{color:#6b7280;font-size:10px}.cookie-consent-banner__actions[data-v-65f8774e]{display:flex;gap:1rem;justify-content:flex-start}.cookie-consent-banner__button[data-v-65f8774e]{font-feature-settings:"liga" off,"clig" off;border:none;cursor:pointer;font-family:Outfit;font-size:12px;font-style:normal;font-weight:400;line-height:normal;padding:.5rem 1rem;transition:all .2s}.cookie-consent-banner__button--pill[data-v-65f8774e]{background:#eef1f6;border-radius:15px;color:#000}.cookie-consent-banner__button--pill[data-v-65f8774e]:hover{background:#d5d9e2;box-shadow:0 2px 4px #0000001a}@media (min-width:768px){.cookie-consent-banner__content[data-v-65f8774e]{border-radius:.5rem;margin:0 0 1.5rem 1.5rem;max-width:28rem}}',""]);const a=o},69026:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));
2o.push([e.id,".filter-expand-enter-active[data-v-16607474],.filter-expand-leave-active[data-v-16607474]{max-height:500px;transition:all .3s ease-in-out}.filter-expand-enter-from[data-v-16607474],.filter-expand-leave-to[data-v-16607474]{max-height:0;opacity:0;transform:translateY(-10px)}.filter-expand-enter-to[data-v-16607474],.filter-expand-leave-from[data-v-16607474]{max-height:500px;opacity:1;transform:translateY(0)}",""]);const a=o},84468:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".filter-expand-enter-active[data-v-1fbe49ec],.filter-expand-leave-active[data-v-1fbe49ec]{max-height:800px;transition:all .3s ease-in-out}.filter-expand-enter-from[data-v-1fbe49ec],.filter-expand-leave-to[data-v-1fbe49ec]{max-height:0;opacity:0;transform:translateY(-10px)}.filter-expand-enter-to[data-v-1fbe49ec],.filter-expand-leave-from[data-v-1fbe49ec]{max-height:800px;opacity:1;transform:translateY(0)}",""]);const a=o},81735:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".filter-expand-enter-active[data-v-68aab014],.filter-expand-leave-active[data-v-68aab014]{max-height:800px;transition:all .3s ease-in-out}.filter-expand-enter-from[data-v-68aab014],.filter-expand-leave-to[data-v-68aab014]{max-height:0;opacity:0;transform:translateY(-10px)}.filter-expand-enter-to[data-v-68aab014],.filter-expand-leave-from[data-v-68aab014]{max-height:800px;opacity:1;transform:translateY(0)}",""]);const a=o},26588:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".slide-fade-enter-active[data-v-69ecbbfa]{transition:all .2s ease-out}.slide-fade-leave-active[data-v-69ecbbfa]{transition:all .15s ease-in}.slide-fade-enter-from[data-v-69ecbbfa]{opacity:0;transform:translateY(10px)}.slide-fade-leave-to[data-v-69ecbbfa]{opacity:0;transform:translateY(-10px)}",""]);const a=o},91274:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".line-clamp-2[data-v-1d6d3356]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.animate-pulse[data-v-1d6d3356]{animation:pulse-1d6d3356 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-1d6d3356{0%,to{opacity:1}50%{opacity:.5}}",""]);const a=o},38923:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".animate-pulse[data-v-03bc7326]{animation:pulse-03bc7326 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-03bc7326{0%,to{opacity:1}50%{opacity:.5}}",""]);const a=o},49613:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(41916),o={class:"max-w-[1088px] mx-auto h-full"};const a={},i=(0,r(83744).Z)(a,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("div",o,[(0,n.renderSlot)(e.$slots,"default")])])}]])},68300:(e,t,r)=>{r.d(t,{Z:()=>Vo});var n=r(41916),o={class:"font-outfit"};var a=r(87879);function i(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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 c={class:"grid grid-cols-6 items-center justify-between py-5 px-4 lg:px-0 shadow-sm lg:shadow-none bg-white"},s={class:"flex"},u={class:"flex items-center justify-center col-span-3"},d={class:"flex space-x-1 items-center justify-end col-span-2"},f={key:1,href:"https://subjecttoclimate.org/",class:"w-[115px] hidden lg:block px-2"};var p={class:"hidden lg:flex items-center"};function h(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(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 g={class:"relative mx-4"},v={class:"inline-block whitespace-nowrap"},y={key:0},b={key:0,class:"md:w-96 bg-white absolute md:top-10 w-full md:left-1/2 transform -translate-x-1/2 z-50 rounded-xl shadow p-3"};var w=["href","target"],k={class:"px-3 py-3 rounded-xl hover:bg-menu-2
200 duration-75 text-lg hover:text-contrast-200 flex flex-col group"},x={class:"text-base font-semibold"},S={class:"text-base text-[#3f3f3f] group-hover:text-contrast-200"};const E={props:{menu:Object}};var C=r(83744);const B={components:{DropDownMenuItem:(0,C.Z)(E,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("a",{href:r.menu.url,target:r.menu.is_new_tab?"_blank":null},[(0,n.createElementVNode)("span",k,[(0,n.createElementVNode)("span",x,(0,n.toDisplayString)(r.menu.title),1),(0,n.createElementVNode)("span",S,(0,n.toDisplayString)(r.menu.subtitle),1)])],8,w)}]])},data:function(){return{}},props:{menu:Object,expanded:Boolean},computed:{hasChildren:function(){return this.menu.children&&this.menu.children.length},expanded:{get:function(){return this.expanded},set:function(e){this.$emit(e?"expanded":"collapsed",!0)}}}},N={components:{DropDownMenu:(0,C.Z)(B,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("DropDownMenuItem");return(0,n.openBlock)(),(0,n.createElementBlock)("div",g,[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(i.hasChildren?"button":"a"),{href:r.menu.url,onClick:t[0]||(t[0]=function(e){return i.expanded=!i.expanded}),class:"",target:r.menu.is_new_tab?"_blank":null},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["flex items-center space-x-1 ",i.expanded?"font-semibold":""])},[(0,n.createElementVNode)("span",v,(0,n.toDisplayString)(r.menu.title),1),i.hasChildren?((0,n.openBlock)(),(0,n.createElementBlock)("div",y,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",{class:(0,n.normalizeClass)(["w-6 h-6 duration-150",i.expanded?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 96 960 960",fill:"currentColor"},h(t[1]||(t[1]=[(0,n.createElementVNode)("path",{d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},null,-1)])),2))])):(0,n.createCommentVNode)("",!0)],2),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["w-full h-1 rounded-full mt-1",i.expanded?"bg-menu-500":"bg-neutral-100"])},null,2)]})),_:1},8,["href","target"])),i.expanded&&r.menu.children.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",b,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.menu.children,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(l,{key:e.id,menu:e},null,8,["menu"])})),128))])):(0,n.createCommentVNode)("",!0)])}]])},props:{expandedMenuId:String|Number},computed:{menus:function(){return(0,a.qt)().props.header.menus},_expandedMenuId:{get:function(){return this.expandedMenuId},set:function(e){this.$emit("update:expandedMenuId",e)}}},data:function(){return{}}},I=(0,C.Z)(N,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("DropDownMenu");return(0,n.openBlock)(),(0,n.createElementBlock)("div",p,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.menus,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(l,{key:e.id,menu:e,onExpanded:function(t){return i._expandedMenuId=e.id},onCollapsed:t[0]||(t[0]=function(e){return i._expandedMenuId=null}),expanded:i._expandedMenuId===e.id},null,8,["menu","onExpanded","expanded"])})),128))])}]]);function L(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return V(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(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 T={class:"flex items-center space-x-4"},_={key:0,class:"lg:hidden"},A={key:0,class:"fixed top-0 left-0 w-screen h-screen bg-white z-50 lg:hidden"},j={class:""},D={class:"w-full flex justify-between p-4"},O={class:"flex items-center space-x-2"},F={class:"relative"},P={class:"mt-6"},R={class:"mt-6 space-y-4"};function U(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return M(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(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 G={class:(0,n.normalizeClass)(["flex items-center justify-between w-full space-x-1"])},H={class:"font-semibold"},q={key:0},Q={class:(0,n.normalizeClass)(["w-6 h-6 duration-150"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 96 960 960",fill:"currentColor"},Z={key:0,class:(0,n.normalizeClass)(["absolute top-0 left-0 w-full h-screen z-20 bg-white p-4"])},z={class:"mt-8"};var $=["href","target"],K={class:"px-4 py-2 rounded hover:bg-gray-100 duration-75 text-lg flex flex-col"},W={class:"text-base font-semibold"},Y={class:"text-base text-[#3f3f3f]"};const J={props:{menu:Object}},X={components:{DropDownMenuItem:(0,C.Z)(J,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("a",{href:r.menu.url,target:r.menu.is_new_tab?"_blank":null,class:"block"},[(0,n.createElementVNode)("span",K,[(0,n.createElementVNode)("span",W,(0,n.toDisplayString)(r.menu.title),
21),(0,n.createElementVNode)("span",Y,(0,n.toDisplayString)(r.menu.subtitle),1)])],8,$)}]])},data:function(){return{}},props:{menu:Object,expanded:Boolean},computed:{hasChildren:function(){return this.menu.children&&this.menu.children.length},expanded:{get:function(){return this.expanded},set:function(e){this.$emit(e?"expanded":"collapsed",!0)}}}};var ee=r(93379),te=r.n(ee),re=r(98209),ne={insert:"head",singleton:!1};te()(re.Z,ne);re.Z.locals;const oe=(0,C.Z)(X,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("DropDownMenuItem");return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:(0,n.normalizeClass)(["px-6",(i.expanded,"")])},[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(i.hasChildren?"button":"a"),{href:r.menu.url,onClick:t[0]||(t[0]=function(e){return i.expanded=!0}),class:"block w-full p-3 border-b"},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",G,[(0,n.createElementVNode)("span",H,(0,n.toDisplayString)(r.menu.title),1),i.hasChildren?((0,n.openBlock)(),(0,n.createElementBlock)("div",q,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",Q,U(t[2]||(t[2]=[(0,n.createElementVNode)("path",{d:"m376 816-56-56 184-184-184-184 56-56 240 240-240 240Z"},null,-1)]))))])):(0,n.createCommentVNode)("",!0)])]})),_:1},8,["href"])),(0,n.createVNode)(n.Transition,{name:"slide-fade"},{default:(0,n.withCtx)((function(){return[i.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("div",Z,[(0,n.createElementVNode)("button",{onClick:t[1]||(t[1]=function(e){return i.expanded=!1}),class:"flex items-center space-x-2"},U(t[3]||(t[3]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",viewBox:"0 96 960 960",fill:"currentColor"},[(0,n.createElementVNode)("path",{d:"M560 816 320 576l240-240 56 56-184 184 184 184-56 56Z"})],-1),(0,n.createElementVNode)("span",null,"Back",-1)]))),(0,n.createElementVNode)("div",z,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.menu.children,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(l,{key:e.id,menu:e},null,8,["menu"])})),128))])])):(0,n.createCommentVNode)("",!0)]})),_:1})],2)}],["__scopeId","data-v-5ba3edf7"]]);var ae={href:"/",class:"h-10 block"},ie=["src"];const le={computed:{url:function(){return(0,a.qt)().props.theme.logo.dark}}},ce=(0,C.Z)(le,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("a",ae,[(0,n.createElementVNode)("img",{class:"h-full w-auto",height:"40",src:i.url,alt:""},null,8,ie)])])}]]);function se(e){return function(e){if(Array.isArray(e))return ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ue(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ue(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(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 de={class:"px-8"},fe={key:0,class:"w-full"},pe={key:0,class:(0,n.normalizeClass)(["absolute top-0 left-0 w-full h-screen z-20 bg-white p-4"])},he={class:"mt-8"},me=["href"],ge=["href"],ve=["href"],ye={key:1,class:"space-y-2"},be=["href"],we=["href"];const ke={props:{expanded:Boolean},data:function(){return{}},computed:{user:function(){return(0,a.qt)().props.auth.user},settings:function(){return(0,a.qt)().props.settings}},methods:{toggleExpanded:function(){this.$emit(this.expanded?"collapsed":"expanded",!0)}}};var xe=r(57694),Se={insert:"head",singleton:!1};te()(xe.Z,Se);xe.Z.locals;const Ee=(0,C.Z)(ke,[["render",function(e,t,r,o,a,i){var l,c,s,u,d,f,p,h,m,g,v,y,b,w,k,x,S,E,C,B,N,I,L,V;return(0,n.openBlock)(),(0,n.createElementBlock)("div",de,[i.user?((0,n.openBlock)(),(0,n.createElementBlock)("div",fe,[(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=function(){return i.toggleExpanded&&i.toggleExpanded.apply(i,arguments)}),class:"flex items-center space-x-2 p-2 rounded shadow w-full justify-center",style:(0,n.normalizeStyle)({backgroundColor:(null===(l=i.settings)||void 0===l||null===(c=l.theme)||void 0===c||null===(s=c.colors)||void 0===s||null===(u=s["account-dropdown-background"])||void 0===u?void 0:u[500])||"#333333",color:(null===(d=i.settings)||void 0===d||null===(f=d.theme)||void 0===f||null===(p=f.colors)||void 0===p||null===(h=p["account-dropdown-foreground"])||void 0===h?void 0:h[500])||"#FFFFFF"})},se(t[2]||(t[2]=[(0,n.createElementVNode)("span",{class:"font-semibold"},"My Account",-1)])),4),(0,n.createVNode)(n.Transition,{name:"slide-fade"},{default:(0,n.withCtx)((function(){return[r.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("div",pe,[(0,n.createElementVNode)("button",{onClick:t[1]||(t[1]=function(){return i.toggleExpanded&&i.toggleExpanded.apply(i,arguments)}),class:"flex items-center space-x-2"},se(t[3]||(t[3]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",viewBox:"0 96 960 960",fill:"currentColor"},[(0,n.createElementVNode)("path",{d:"M560 816 320 576l240-240 56 56-184 184 184 184-56 56Z"})],-1),(0,n.createElementVNode)("span",null,"Back",-1)]))),(0,n.createElementVNode)("div",he,[(0,n.createElementVNode)("a",{href:e.route("account"),class:"block"},se(t[4]||(t[4]=[(0,n.createElementVNode)("span",{class:"px-4 py-2 rounded hover:bg-gray-100 font-semibold duration-75 text-lg"}," My profile",-1)])),8,me),(0,n.createElementVNode)("a",{href:e.route("library"),class:"block"}
2,se(t[5]||(t[5]=[(0,n.createElementVNode)("span",{class:"px-4 py-2 rounded hover:bg-gray-100 font-semibold duration-75 text-lg"}," My Library",-1)])),8,ge),(0,n.createElementVNode)("a",{href:e.route("logout"),class:"block"},se(t[6]||(t[6]=[(0,n.createElementVNode)("span",{class:"px-4 py-2 rounded hover:bg-gray-100 font-semibold duration-75 text-lg"}," Logout",-1)])),8,ve)])])):(0,n.createCommentVNode)("",!0)]})),_:1})])):((0,n.openBlock)(),(0,n.createElementBlock)("div",ye,[(0,n.createElementVNode)("a",{href:e.route("login"),class:"font-semibold flex justify-center items-center border px-4 py-2 rounded",style:(0,n.normalizeStyle)({borderColor:(null===(m=i.settings)||void 0===m||null===(g=m.theme)||void 0===g||null===(v=g.colors)||void 0===v||null===(y=v["account-dropdown-background"])||void 0===y?void 0:y[500])||"#333333",color:(null===(b=i.settings)||void 0===b||null===(w=b.theme)||void 0===w||null===(k=w.colors)||void 0===k||null===(x=k["account-dropdown-background"])||void 0===x?void 0:x[500])||"#333333"})},"Login",12,be),(0,n.createElementVNode)("a",{href:e.route("register"),class:"flex justify-center items-center px-4 py-2 rounded font-semibold shadow",style:(0,n.normalizeStyle)({backgroundColor:(null===(S=i.settings)||void 0===S||null===(E=S.theme)||void 0===E||null===(C=E.colors)||void 0===C||null===(B=C["account-dropdown-background"])||void 0===B?void 0:B[500])||"#333333",color:(null===(N=i.settings)||void 0===N||null===(I=N.theme)||void 0===I||null===(L=I.colors)||void 0===L||null===(V=L["account-dropdown-foreground"])||void 0===V?void 0:V[500])||"#FFFFFF"})},"Join",12,we)]))])}],["__scopeId","data-v-de324c16"]]);var Ce=["href"];const Be={methods:{}},Ne=(0,C.Z)(Be,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("a",{href:e.route("donate"),class:"flex items-center justify-center py-2 px-2 text-center font-semibold text-[#262626] cursor-pointer bg-[#ffdc71] rounded-lg"}," Support Our Work ",8,Ce)}]]),Ie={components:{DropDownMenu:oe,Auth:Ee,Logo:ce,DonateButton:Ne},props:{expandedMenuId:String},computed:{menus:function(){return(0,a.qt)().props.header.menus},showDonateButton:function(){return(0,a.qt)().props.header.showDonateButton},_expandedMenuId:{get:function(){return this.expandedMenuId},set:function(e){this.$emit("update:expandedMenuId",e)}}},data:function(){return{menuIsVisible:!1}}};var Le=r(71644),Ve={insert:"head",singleton:!1};te()(Le.Z,Ve);Le.Z.locals;const Te=(0,C.Z)(Ie,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("Logo"),c=(0,n.resolveComponent)("DropDownMenu"),s=(0,n.resolveComponent)("DonateButton"),u=(0,n.resolveComponent)("Auth");return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("div",T,[a.menuIsVisible?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",_,[(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=function(e){return a.menuIsVisible=!0}),class:"w-6 h-6"},L(t[5]||(t[5]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 96 960 960"},[(0,n.createElementVNode)("path",{d:"M120 816v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z"})],-1)])))]))]),(0,n.createVNode)(n.Transition,{name:"slide-down"},{default:(0,n.withCtx)((function(){return[a.menuIsVisible?((0,n.openBlock)(),(0,n.createElementBlock)("div",A,[(0,n.createElementVNode)("div",j,[(0,n.createElementVNode)("div",D,[(0,n.createElementVNode)("div",null,[(0,n.createVNode)(l)]),(0,n.createElementVNode)("div",O,[(0,n.createElementVNode)("button",{onClick:t[1]||(t[1]=function(e){return a.menuIsVisible=!1}),class:"w-8 h-8"},L(t[6]||(t[6]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 96 960 960",fill:"currentColor"},[(0,n.createElementVNode)("path",{d:"m336 776 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144 56 56Zm144 200q-83 0-156-31.5T197 859q-54-54-85.5-127T80 576q0-83 31.5-156T197 293q54-54 127-85.5T480 176q83 0 156 31.5T763 293q54 54 85.5 127T880 576q0 83-31.5 156T763 859q-54 54-127 85.5T480 976Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})],-1)])))])]),(0,n.createElementVNode)("div",F,[(0,n.createElementVNode)("div",P,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.menus,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(c,{key:e.id,menu:e,onExpanded:function(t){return i._expandedMenuId=e.id},onCollapsed:t[2]||(t[2]=function(e){return i._expandedMenuId=null}),expanded:i._expandedMenuId==e.id},null,8,["menu","onExpanded","expanded"])})),128))]),(0,n.createElementVNode)("div",R,[i.showDonateButton?((0,n.openBlock)(),(0,n.createBlock)(s,{key:0,class:"mx-8"})):(0,n.createCommentVNode)("",!0),(0,n.createVNode)(u,{onExpanded:t[3]||(t[3]=function(e){return i._expandedMenuId="auth"}),onCollapsed:t[4]||(t[4]=function(e){return i._expandedMenuId=null}),expanded:"auth"==i._expandedMenuId},null,8,["expanded"])])])])])):(0,n.createCommentVNode)("",!0)]})),_:1})])}
2],["__scopeId","data-v-265fda74"]]);function _e(e){return function(e){if(Array.isArray(e))return Ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ae(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ae(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 je={class:""},De={key:0,class:"relative"},Oe={key:0,class:"absolute bg-white w-96 right-0 top-12 rounded-lg p-4 z-10"},Fe=["href"],Pe=["href"],Re=["href"],Ue={key:1,class:"flex items-center"},Me=["href"];const Ge={props:{expanded:Boolean},data:function(){return{}},computed:{user:function(){var e=(0,a.qt)().props.auth.user;return Array.isArray(e)?null:e},settings:function(){return(0,a.qt)().props.settings},expanded:{get:function(){return this.expanded},set:function(e){this.$emit(e?"expanded":"collapsed",!0)}}},methods:{}},He=(0,C.Z)(Ge,[["render",function(e,t,r,o,a,i){var l,c,s,u,d,f,p,h,m,g,v,y,b,w,k,x;return(0,n.openBlock)(),(0,n.createElementBlock)("div",je,[i.user?((0,n.openBlock)(),(0,n.createElementBlock)("div",De,[(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=function(e){return i.expanded=!i.expanded}),class:"flex items-center justify-center space-x-2 p-2 rounded-lg",style:(0,n.normalizeStyle)({backgroundColor:(null===(l=i.settings)||void 0===l||null===(c=l.theme)||void 0===c||null===(s=c.colors)||void 0===s||null===(u=s["account-dropdown-background"])||void 0===u?void 0:u[500])||"#333333",color:(null===(d=i.settings)||void 0===d||null===(f=d.theme)||void 0===f||null===(p=f.colors)||void 0===p||null===(h=p["account-dropdown-foreground"])||void 0===h?void 0:h[500])||"#FFFFFF"})},[t[2]||(t[2]=(0,n.createElementVNode)("span",{class:"font-semibold block"},"My Account",-1)),((0,n.openBlock)(),(0,n.createElementBlock)("svg",{class:(0,n.normalizeClass)(["w-6 h-6 duration-150",i.expanded?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 96 960 960",fill:"currentColor"},_e(t[1]||(t[1]=[(0,n.createElementVNode)("path",{d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},null,-1)])),2))],4),i.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("div",Oe,[(0,n.createElementVNode)("a",{href:e.route("account")},_e(t[3]||(t[3]=[(0,n.createElementVNode)("span",{class:"px-4 py-3 rounded-lg hover:bg-menu-200 font-semibold duration-75 text-lg block"},"My Profile",-1)])),8,Fe),(0,n.createElementVNode)("a",{href:e.route("library")},_e(t[4]||(t[4]=[(0,n.createElementVNode)("span",{class:"px-4 py-3 rounded-lg hover:bg-menu-200 font-semibold duration-75 text-lg block"},"My Library",-1)])),8,Pe),(0,n.createElementVNode)("a",{href:e.route("logout")},_e(t[5]||(t[5]=[(0,n.createElementVNode)("span",{class:"px-4 py-3 rounded-lg hover:bg-menu-200 font-semibold duration-75 text-lg block"},"Logout",-1)])),8,Re)])):(0,n.createCommentVNode)("",!0)])):((0,n.openBlock)(),(0,n.createElementBlock)("div",Ue,[(0,n.createElementVNode)("a",{href:e.route("login"),class:"block px-4 py-2 rounded-lg font-semibold",style:(0,n.normalizeStyle)({backgroundColor:(null===(m=i.settings)||void 0===m||null===(g=m.theme)||void 0===g||null===(v=g.colors)||void 0===v||null===(y=v["account-dropdown-background"])||void 0===y?void 0:y[500])||"#333333",color:(null===(b=i.settings)||void 0===b||null===(w=b.theme)||void 0===w||null===(k=w.colors)||void 0===k||null===(x=k["account-dropdown-foreground"])||void 0===x?void 0:x[500])||"#FFFFFF"})},"Login",12,Me)]))])}]]);function qe(e){return function(e){if(Array.isArray(e))return Qe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Qe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qe(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qe(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 Ze={class:"flex items-center justify-between"},ze=["href"],$e={key:0,class:"text-xs text-gray-500 flex items-center gap-2"},Ke={class:"hidden"},We={class:"mt-2"},Ye=["href"],Je={class:"overflow-hidden"},Xe={class:"w-full text-start"},et={class:"flex space-x-2.5 mt-2"};function tt(e){return function(e){if(Array.isArray(e))return rt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return rt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(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 nt={class:"max-h-[90vh] max-w-[580px] w-full mx-4 rounded-lg shadow-xl overflow-hidden"},ot={class:"border-b bg-white rounded-lg"}
vendor: 4,970 bytes, line 2
2,at=["placeholder"],it={ref:"modalScrollContainer",class:"overflow-y-auto max-h-[calc(90vh-80px)] bg-white mt-4 rounded-lg"};function lt(e){return lt="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},lt(e)}function ct(){ct=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new C(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(B([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==lt(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return N()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function B(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=B,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},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),E(r),d}},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 o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function st(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.words,r=void 0===t?[]:t,o=e.typingSpeed,a=void 0===o?100:o,i=e.deletingSpeed,l=void 0===i?50:i,c=e.pauseBeforeDelete,s=void 0===c?2e3:c,u=e.pauseBeforeType,d=void 0===u?500:u,f=(0,n.ref)(""),p=0,h=0,m=!1,g=function(e){return new Promise((function(t){return setTimeout(t,e)}))};function v(){return y.apply(this,arguments)}function y(){var e;return e=ct().mark((function e(){var t;return ct().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r[p],!m){e.next=12;break}if(f.value=t.substring(0,h-1),0!=--h){e.next=9;break}return m=!1,p=(p+1)%r.length,e.next=9,g(d);case 9:setTimeout((function(){return v()}),l),e.next=19;break;case 12:if(f.value=t.substring(0,h+1),++h!==t.length){e.next=18;break}return m=!0,e.next=18,g(s);case 18:setTimeout((function(){return v()}),a);case 19:case"end":return e.stop()}}),e)})),y=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){st(a,n,o,i,l,"next",e)}function l(e){st(a,n,o,i,l,"throw",e)}i(void 0)}))},y.apply(this,arguments)}return(0,n.onMounted)((function(){v()})),{currentText:f}}var dt={class:""},ft={class:"sticky top-0 z-50 shadow-sm border-b border-gray-200 p-5 bg-white sticky-chip-bar"},pt={class:"flex flex-wrap gap-2"},ht=["onClick"],mt={class:"relative"},gt={key:"all",class:"section-container","data-section":"all"},vt={key:0,class:"space-y-4 p-5"},yt={key:0,class:"text-center py-4 text-gray-500"},bt={key:1,class:"space-y-2"},wt=["aria-label","onClick","onKeydown"],kt={class:"py-3"},xt={class:"space-y-2"},St={class:"text-gray-500 group-hover:text-gray-900"},Et={class:"flex flex-wrap items-center gap-1.5"},Ct={key:1,class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},Bt={key:2,class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},Nt={key:0,class:"text-sm text-gray-600 line-clamp-2"},It={key:1,class:"p-5 text-center text-gray-500"},Lt={key:"teaching",class:"section-container","data-section":"teaching"},Vt={key:0,class:"space-y-4 p-5"},Tt={key:0,class:"text-center py-4 text-gray-500"},_t={key:1,class:"space-y-2"},At=["aria-label","onClick","onKeydown"],jt={class:"py-3"},Dt={class:"space-y-2"},Ot={class:"text-gray-500 group-hover:text-gray-900"},Ft={class:"flex flex-wrap items-center gap-1.5"},Pt={key:1,class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},Rt={key:2,class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},Ut={key:0,class:"text-sm text-gray-600 line-clamp-2"},Mt={key:1,class:"p-5 text-center text-gray-500"},Gt={key:"guides",class:"section-container","data-section":"guides"},Ht={key:0,class:"space-y-4 p-5"},qt={key:0,class:"text-center py-4 text-gray-500"},Qt={key:1,class:"space-y-2"},Zt=["aria-label","onClick","onKeydown"],zt={class:"py-3"},$t={class:"space-y-2"},Kt={class:"text-gray-500 group-hover:text-gray-900"},Wt={class:"flex flex-wrap items-center gap-1.5"},Yt={key:1,class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},Jt={key:0,class:"text-sm text-gray-600 line-clamp-2"},Xt={key:1,class:"p-5 text-center text-gray-500"},er={key:"climate",class:"section-container","data-section":"climate"},tr={key:0,class:"space-y-4 p-5"},rr={key:0,class:"text-center py-4 text-gray-500"},nr={key:1,class:"space-y-2"},or=["aria-label","onClick","onKeydown"],ar={class:"py-3"},ir={class:"space-y-2"},lr={class:"text-gray-500 group-hover:text-gray-900"},cr={class:"flex flex-wrap items-center gap-1.5"},sr={key:1,class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},ur={key:0,class:"text-sm text-gray-600 line-clamp-2"},dr={key:1,class:"p-5 text-center text-gray-500"},fr={key:"professional",class:"section-container","data-section":"professional"},pr={key:0,class:"space-y-4 p-5"},hr={key:0,class:"text-center py-4 text-gray-500"},mr={key:1,class:"space-y-2"},gr=["aria-label","onClick","onKeydown"],vr={class:"py-3"},yr={class:"space-y-2"},br={class:"text-gray-500 group-hover:text-gray-900"},wr={class:"flex flex-wrap items-center gap-1.5"},kr={key:1,class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},xr={key:0,class:"text-sm text-gray-600 line-clamp-2"},Sr={key:1,class:"p-5 text-center text-gray-500"},Er={key:"news",class:"section-container","data-section":"news"},Cr={key:0,class:"space-y-4 p-5"},Br={key:0,class:"text-center py-4 text-gray-500"},Nr={key:1,class:"space-y-2"},Ir=["aria-label","onClick","onKeydown"],Lr={class:"py-3"},Vr={class:"space-y-2"},Tr={class:"text-gray-500 group-hover:text-gray-900"},_r={class:"flex flex-wrap items-center gap-1.5"},Ar={key:1,class:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full"},jr={key:0,class:"text-sm text-gray-600 line-clamp-2"},Dr={key:1,class:"p-5 text-center text-gray-500"};var Or=r(15229),Fr=r(3754),Pr=r(47393),Rr=r(91440),Ur=r(72326);function Mr(e){return Mr="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},Mr(e)}function Gr(){Gr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new C(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(B([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,147 bytes, line 2
2))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==Mr(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return N()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function B(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=B,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),d}},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 o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function Hr(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}const qr={components:{Link:a.rU,Grades:Fr.Z},props:{term:{type:String,default:""}},setup:function(e){var t,r,o,i,l,c,s=(0,a.qt)().props.tenantId,u=(0,n.ref)("all"),d=(0,n.ref)(""),f=(0,n.ref)(!1),p=(null===(t=(0,a.qt)().props.integrations)||void 0===t?void 0:t.meilisearch)||(null===(r=(0,a.qt)().props.integrations)||void 0===r?void 0:r.algolia),h={lessonPlans:p.teachingMaterialsIndex||"teaching_materials",teaching:p.teachingMaterialsIndex||"teaching_materials",guides:p.teacherGuidesIndex||"teacher_guides",climate:p.climateExplainersIndex||"climate_explainers",professional:p.pdIndex||"opportunities",news:p.newsIndex||"news"},m={lessonPlans:"is_live=true AND (is_internal_resource=true OR is_featured_in_tenants IN [".concat(s,"] OR is_internal_unit_plan=true) AND is_in_unit_plans=false AND tenantIds IN [").concat(s,"]"),teaching:"is_external_resource=true AND is_live=true AND tenantIds IN [".concat(s,"]"),guides:"",climate:"",professional:"enabled=1 AND tenant_ids IN [".concat(s,"]"),news:""},g=(null===(o=(0,a.qt)().props.integrations)||void 0===o||null===(i=o.meilisearch)||void 0===i?void 0:i.host)||window.MEILISEARCH_HOST||"http://localhost:7700",v=(null===(l=(0,a.qt)().props.integrations)||void 0===l||null===(c=l.meilisearch)||void 0===c?void 0:c.key)||window.MEILISEARCH_KEY||"",y=(0,Pr.wA)();v&&(0,Pr.qd)(v,g);var b=(0,n.reactive)({lessonPlans:null,teaching:null,guides:null,climate:null,professional:null,news:null}),w=new Or.MeiliSearch({host:g,apiKey:v,requestConfig:{headers:{"X-MS-USER-ID":y}}}),k=(0,n.reactive)({hits:[],totalHits:0,isLoading:!1}),x=(0,n.reactive)({hits:[],totalHits:0,isLoading:!1}),S=(0,n.reactive)({hits:[],totalHits:0,isLoading:!1}),E=(0,n.reactive)({hits:[],totalHits:0,isLoading:!1}),C=(0,n.reactive)({hits:[],totalHits:0,isLoading:!1}),B=(0,n.reactive)({hits:[],totalHits:0,isLoading:!1}),N=function(){var e,t=(e=Gr().mark((function e(t){var r,n,o,a,i,l,c,u,d;return Gr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=14;break}return k.hits=[],k.totalHits=0,x.hits=[],x.totalHits=0,S.hits=[],S.totalHits=0,E.hits=[],E.totalHits=0,C.hits=[],C.totalHits=0,B.hits=[],B.totalHits=0,e.abrupt("return");case 14:return f.value=!0,e.prev=15,c=(0,Ur.Bl)(t),console.log("[POPUP-SEARCH] Performing federated multi-search for:",t,"formatted:",c),u=[{indexUid:h.lessonPlans,q:c,limit:5,filter:m.lessonPlans||void 0},{indexUid:h.teaching,q:c,limit:5,filter:m.teaching||void 0},{indexUid:h.guides,q:c,limit:5,filter:m.guides||void 0},{indexUid:h.climate,q:c,limit:5,filter:m.climate||void 0},{indexUid:h.professional,q:c,limit:5,filter:m.professional||void 0},{indexUid:h.news,q:c,limit:5,filter:m.news||void 0}],e.next=21,w.multiSearch({queries:u});case 21:d=e.sent,console.log("[POPUP-SEARCH] Multi-search results:",d),(0,Rr.p)({tenantId:s,indexes:u.map((function(e){return e.indexUid}))}),k.hits=d.results[0].hits||[],k.totalHits=d.results[0].estimatedTotalHits||0,b.lessonPlans=(null===(r=d.results[0].metadata)||void 0===r?void 0:r.queryUid)||null,x.hits=d.results[1].hits||[],x.totalHits=d.results[1].estimatedTotalHits||0,b.teaching=(null===(n=d.results[1].metadata)||void 0===n?void 0:n.queryUid)||null,S.hits=d.results[2].hits||[],S.totalHits=d.results[2].estimatedTotalHits||0,b.guides=(null===(o=d.results[2].metadata)||void 0===o?void 0:o.queryUid)||null,E.hits=d.results[3].hits||[],E.totalHits=d.results[3].estimatedTotalHits||0,b.climate=(null===(a=d.results[3].metadata)||void 0===a?void 0:a.queryUid)||null,C.hits=d.results[4].hits||[],C.totalHits=d.results[4].estimatedTotalHits||0,b.professional=(null===(i=d.results[4].metadata)||void 0===i?void 0:i.queryUid)||null,B.hits=d.results[5].hits||[],B.totalHits=d.results[5].estimatedTotalHits||0,b.news=(null===(l=d.results[5].metadata)||void 0===l?void 0:l.queryUid)||null,e.next=47;break;
2case 44:e.prev=44,e.t0=e.catch(15),console.error("[POPUP-SEARCH] Multi-search error:",e.t0);case 47:return e.prev=47,f.value=!1,e.finish(47);case 50:case"end":return e.stop()}}),e,null,[[15,44,47,50]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){Hr(a,n,o,i,l,"next",e)}function l(e){Hr(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();(0,n.watch)((function(){return e.term}),(function(e){d.value=e,N(e)}),{immediate:!0});return{activeFilter:u,confirmedTerm:d,categoryFilters:[{id:"all",name:"Lesson Plans, Units & Activities"},{id:"teaching",name:"Teaching Resources"},{id:"guides",name:"Teacher Guides"},{id:"climate",name:"Climate Change Explainers"},{id:"professional",name:"Professional Development"},{id:"news",name:"News for Students"}],categoryColors:{all:"bg-[#E8FAE8] text-[#194C26]",teaching:"bg-[#E4F4FC] text-[#1A226B]",guides:"bg-[#FFF6DB] text-[#5E3A11]",climate:"bg-[#FFE8DB] text-[#7F3822]",professional:"bg-[#EEF1F6] text-[#2B2B2B]",news:"bg-[#D5DBE7] text-[#29313F]"},isLoading:f,lessonPlansResults:k,teachingResults:x,guidesResults:S,climateResults:E,professionalResults:C,newsResults:B,switchTab:function(e){u.value=e},selectItem:function(e,t,r){(0,Pr.ob)({indexUid:h[t],queryUid:b[t],objectId:e.id.toString(),position:r});var n={lessonPlans:function(){return a.Nd.visit(route(e.is_internal_unit_plan?"stc.unit":"stc.show",e.slug))},teaching:function(){return a.Nd.visit(route("resource.show",e.slug))},guides:function(){return a.Nd.visit(route("teacherGuides.show",e.slug))},climate:function(){return a.Nd.visit(route("climateChangeExplainers.show",e.slug))},professional:function(){return a.Nd.visit(route("professional-learning.show",e.slug))},news:function(){return a.Nd.visit(route("news.show",e.slug))}};n[t]&&n[t]()}}}};var Qr=r(26588),Zr={insert:"head",singleton:!1};te()(Qr.Z,Zr);Qr.Z.locals;const zr={components:{SearchResultsDirect:(0,C.Z)(qr,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("Grades"),c=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",dt,[(0,n.createElementVNode)("div",ft,[(0,n.createElementVNode)("div",pt,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.categoryFilters,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:e.id,class:(0,n.normalizeClass)(["px-3 py-1 rounded-full text-sm transition-all duration-300",o.categoryColors[e.id],{"ring-2 ring-offset-2 ring-green-300":o.activeFilter===e.id}]),onClick:function(t){return o.switchTab(e.id)}},(0,n.toDisplayString)(e.name),11,ht)})),128))])]),(0,n.createElementVNode)("div",mt,[(0,n.createVNode)(n.Transition,{name:"slide-fade",mode:"out-in"},{default:(0,n.withCtx)((function(){return["all"===o.activeFilter?((0,n.openBlock)(),(0,n.createElementBlock)("div",gt,[o.confirmedTerm?((0,n.openBlock)(),(0,n.createElementBlock)("div",vt,[t[0]||(t[0]=(0,n.createElementVNode)("h3",{class:"font-medium text-gray-900"},"Lesson Plans, Units & Activities",-1)),o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",yt,"Searching...")):o.lessonPlansResults.hits.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",bt,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.lessonPlansResults.hits,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.id,role:"button",tabindex:"0","aria-label":"View ".concat(e.title||e.name),class:"hover:bg-gray-50 focus:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 cursor-pointer -mx-5 px-5 group rounded",onClick:function(r){return o.selectItem(e,"lessonPlans",t)},onKeydown:[(0,n.withKeys)((function(r){return o.selectItem(e,"lessonPlans",t)}),["enter"]),(0,n.withKeys)((0,n.withModifiers)((function(r){return o.selectItem(e,"lessonPlans",t)}),["prevent"]),["space"])]},[(0,n.createElementVNode)("div",kt,[(0,n.createElementVNode)("div",xt,[(0,n.createElementVNode)("h4",St,(0,n.toDisplayString)(e.title||e.name),1),(0,n.createElementVNode)("div",Et,[e.grades?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,grades:e.grades},null,8,["grades"])):(0,n.createCommentVNode)("",!0),e.languages&&e.languages[0]?((0,n.openBlock)(),(0,n.createElementBlock)("span",Ct,(0,n.toDisplayString)(e.languages[0]),1)):(0,n.createCommentVNode)("",!0),e.time_to_read?((0,n.openBlock)(),(0,n.createElementBlock)("span",Bt,(0,n.toDisplayString)(e.time_to_read)+" min read ",1)):(0,n.createCommentVNode)("",!0)]),e.excerpt?((0,n.openBlock)(),(0,n.createElementBlock)("p",Nt,(0,n.toDisplayString)(e.excerpt),1)):(0,n.createCommentVNode)("",!0)])])],40,wt)})),128))])):(0,n.createCommentVNode)("",!0),o.lessonPlansResults.totalHits>5?((0,n.openBlock)(),(0,n.createBlock)(c,{key:2,href:e.route("search",{section:"all",term:o.confirmedTerm}),class:"text-gray-500 hover:text-gray-700 text-sm"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)(" View "+(0,n.toDisplayString)(o.lessonPlansResults.totalHits-5)+" other Lesson Plans, Units & Activities ",1)]})),_:1},8,["href"])):(0,n.createCommentVNode)("",!0)])):((0,n.openBlock)(),(0,n.createElementBlock)("div",It,"Enter a search term and click search to see results"))])):"teaching"===o.activeFilter?((0,n.openBlock)(),(0,n.createElementBlock)("div",Lt,[o.confirmedTerm?((0,n.openBlock)(),(0,n.createElementBlock)("div",Vt,[t[1]||(t[1]=(0,n.createElementVNode)("h3",{class:"font-medium text-gray-900"},"Teaching Resources",-1)),o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",Tt,"Searching...")):o.teachingResults.hits.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",_t,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.teachingResults.hits,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.id,role:"button",tabindex:"0","aria-label":"View ".concat(e.title||e.name),class:"hover:bg-gray-50 focus:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 cursor-pointer -mx-5 px-5 group rounded",onClick:function(r){return o.selectItem(e,"teaching",t)},onKeydown:[(0,n.withKeys)((function(r){return o.selectItem(e,"teaching",t)}),["enter"]),(0,n.withKeys)((0,n.withModifiers)((function(r){return o.selectItem(e,"teaching",t)}),["prevent"]),["space"])]},[(0,n.createElementVNode)("div",jt,[(0,n.createElementVNode)("div",Dt,[(0,n.createElementVNode)("h4",Ot,(0,n.toDisplayString)(e.title||e.name),1),(0,n.createElementVNode)("div",Ft,[e.grades?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,grades:e.grades},null,8,["grades"])):(0,n.createCommentVNode)("",!0),e.languages&&e.languages[0]?((0,n.openBlock)(),(0,n.createElementBlock)("span",Pt,(0,n.toDisplayString)(e.languages[0]),1)):(0,n.createCommentVNode)("",!0),e.time_to_read?((0,n.openBlock)(),(0,n.createElementBlock)("span",Rt,(0,n.toDisplayString)(e.time_to_read)+" min read ",1)):(0,n.createCommentVNode)("",!0)]),e.excerpt?((0,n.openBlock)(),(0,n.createElementBlock)("p",Ut,(0,n.toDisplayString)(e.excerpt),1)):(0,n.createCommentVNode)("",!0)])])],40,At)})),128))])):(0,n.createCommentVNode)("",!0),o.teachingResults.totalHits>5?((0,n.openBlock)(),(0,n.createBlock)(c,{key:2,href:e.route("search",{section:"teaching",term:o.confirmedTerm}),class:"text-gray-500 hover:text-gray-700 text-sm"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)(" View "+(0,n.toDisplayString)(o.teachingResults.totalHits-5)+" other Teaching Resources ",1)]})),_:1},8,["href"])):(0,n.createCommentVNode)("",!0)])):((0,n.openBlock)(),(0,n.createElementBlock)("div",Mt,"Enter a search term and click search to see results"))])):"guides"===o.activeFilter?((0,n.openBlock)(),(0,n.createElementBlock)("div",Gt,[o.confirmedTerm?((0,n.openBlock)(),(0,n.createElementBlock)("div",Ht,[t[2]||(t[2]=(0,n.createElementVNode)("h3",{class:"font-medium text-gray-900"},"Teacher Guides",-1)),o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",qt,"Searching...")):o.guidesResults.hits.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",Qt,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.guidesResults.hits,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.id,role:"button",tabindex:"0","aria-label":"View ".concat(e.title),class:"hover:bg-gray-50 focus:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 cursor-pointer -mx-5 px-5 group rounded",onClick:function(r){return o.selectItem(e,"guides",t)},onKeydown:[(0,n.withKeys)((function(r){return o.selectItem(e,"guides",t)}),["enter"]),(0,n.withKeys)((0,n.withModifiers)((function(r){return o.selectItem(e,"guides",t)}),["prevent"]),["space"])]},[(0,n.createElementVNode)("div",zt,[(0,n.createElementVNode)("div",$t,[(0,n.createElementVNode)("h4",Kt,(0,n.toDisplayString)(e.title),
21),(0,n.createElementVNode)("div",Wt,[e.grades?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,grades:e.grades},null,8,["grades"])):(0,n.createCommentVNode)("",!0),e.time_to_read?((0,n.openBlock)(),(0,n.createElementBlock)("span",Yt,(0,n.toDisplayString)(e.time_to_read)+" min read ",1)):(0,n.createCommentVNode)("",!0)]),e.excerpt?((0,n.openBlock)(),(0,n.createElementBlock)("p",Jt,(0,n.toDisplayString)(e.excerpt),1)):(0,n.createCommentVNode)("",!0)])])],40,Zt)})),128))])):(0,n.createCommentVNode)("",!0),o.guidesResults.totalHits>5?((0,n.openBlock)(),(0,n.createBlock)(c,{key:2,href:e.route("search",{section:"guides",term:o.confirmedTerm}),class:"text-gray-500 hover:text-gray-700 text-sm"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)(" View "+(0,n.toDisplayString)(o.guidesResults.totalHits-5)+" other Teacher Guides ",1)]})),_:1},8,["href"])):(0,n.createCommentVNode)("",!0)])):((0,n.openBlock)(),(0,n.createElementBlock)("div",Xt,"Enter a search term and click search to see results"))])):"climate"===o.activeFilter?((0,n.openBlock)(),(0,n.createElementBlock)("div",er,[o.confirmedTerm?((0,n.openBlock)(),(0,n.createElementBlock)("div",tr,[t[3]||(t[3]=(0,n.createElementVNode)("h3",{class:"font-medium text-gray-900"},"Climate Change Explainers",-1)),o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",rr,"Searching...")):o.climateResults.hits.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",nr,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.climateResults.hits,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.id,role:"button",tabindex:"0","aria-label":"View ".concat(e.title),class:"hover:bg-gray-50 focus:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 cursor-pointer -mx-5 px-5 group rounded",onClick:function(r){return o.selectItem(e,"climate",t)},onKeydown:[(0,n.withKeys)((function(r){return o.selectItem(e,"climate",t)}),["enter"]),(0,n.withKeys)((0,n.withModifiers)((function(r){return o.selectItem(e,"climate",t)}),["prevent"]),["space"])]},[(0,n.createElementVNode)("div",ar,[(0,n.createElementVNode)("div",ir,[(0,n.createElementVNode)("h4",lr,(0,n.toDisplayString)(e.title),1),(0,n.createElementVNode)("div",cr,[e.grades?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,grades:e.grades},null,8,["grades"])):(0,n.createCommentVNode)("",!0),e.time_to_read?((0,n.openBlock)(),(0,n.createElementBlock)("span",sr,(0,n.toDisplayString)(e.time_to_read)+" min read ",1)):(0,n.createCommentVNode)("",!0)]),e.excerpt?((0,n.openBlock)(),(0,n.createElementBlock)("p",ur,(0,n.toDisplayString)(e.excerpt),1)):(0,n.createCommentVNode)("",!0)])])],40,or)})),128))])):(0,n.createCommentVNode)("",!0),o.climateResults.totalHits>5?((0,n.openBlock)(),(0,n.createBlock)(c,{key:2,href:e.route("search",{section:"climate",term:o.confirmedTerm}),class:"text-gray-500 hover:text-gray-700 text-sm"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)(" View "+(0,n.toDisplayString)(o.climateResults.totalHits-5)+" other Climate Change Explainers ",1)]})),_:1},8,["href"])):(0,n.createCommentVNode)("",!0)])):((0,n.openBlock)(),(0,n.createElementBlock)("div",dr,"Enter a search term and click search to see results"))])):"professional"===o.activeFilter?((0,n.openBlock)(),(0,n.createElementBlock)("div",fr,[o.confirmedTerm?((0,n.openBlock)(),(0,n.createElementBlock)("div",pr,[t[4]||(t[4]=(0,n.createElementVNode)("h3",{class:"font-medium text-gray-900"},"Professional Development",-1)),o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",hr,"Searching...")):o.professionalResults.hits.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",mr,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.professionalResults.hits,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.id,role:"button",tabindex:"0","aria-label":"View ".concat(e.name),class:"hover:bg-gray-50 focus:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 cursor-pointer -mx-5 px-5 group rounded",onClick:function(r){return o.selectItem(e,"professional",t)},onKeydown:[(0,n.withKeys)((function(r){return o.selectItem(e,"professional",t)}),["enter"]),(0,n.withKeys)((0,n.withModifiers)((function(r){return o.selectItem(e,"professional",t)}),["prevent"]),["space"])]},[(0,n.createElementVNode)("div",vr,[(0,n.createElementVNode)("div",yr,[(0,n.createElementVNode)("h4",br,(0,n.toDisplayString)(e.name),1),(0,n.createElementVNode)("div",wr,[e.grades?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,grades:e.grades},null,8,["grades"])):(0,n.createCommentVNode)("",!0),e.type?((0,n.openBlock)(),(0,n.createElementBlock)("span",kr,(0,n.toDisplayString)(e.type),1)):(0,n.createCommentVNode)("",!0)]),e.description?((0,n.openBlock)(),(0,n.createElementBlock)("p",xr,(0,n.toDisplayString)(e.description),1)):(0,n.createCommentVNode)("",!0)])])],40,gr)})),128))])):(0,n.createCommentVNode)("",!0),o.professionalResults.totalHits>5?((0,n.openBlock)(),(0,n.createBlock)(c,{key:2,href:e.route("search",{section:"professional",term:o.confirmedTerm}),class:"text-gray-500 hover:text-gray-700 text-sm"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)(" View "+(0,n.toDisplayString)(o.professionalResults.totalHits-5)+" other Professional Development opportunities ",1)]})),_:1},8,["href"])):(0,n.createCommentVNode)("",!0)])):((0,n.openBlock)(),(0,n.createElementBlock)("div",Sr,"Enter a search term and click search to see results"))])):"news"===o.activeFilter?((0,n.openBlock)(),(0,n.createElementBlock)("div",Er,[o.confirmedTerm?((0,n.openBlock)(),(0,n.createElementBlock)("div",Cr,[t[5]||(t[5]=(0,n.createElementVNode)("h3",{class:"font-medium text-gray-900"},"News for Students",-1)),o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",Br,"Searching...")):o.newsResults.hits.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",Nr,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.newsResults.hits,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.id,role:"button",tabindex:"0","aria-label":"View ".concat(e.title),class:"hover:bg-gray-50 focus:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 cursor-pointer -mx-5 px-5 group rounded",onClick:function(r){return o.selectItem(e,"news",t)},onKeydown:[(0,n.withKeys)((function(r){return o.selectItem(e,"news",t)}),["enter"]),(0,n.withKeys)((0,n.withModifiers)((function(r){return o.selectItem(e,"news",t)}),["prevent"]),["space"])]},[(0,n.createElementVNode)("div",Lr,[(0,n.createElementVNode)("div",Vr,[(0,n.createElementVNode)("h4",Tr,(0,n.toDisplayString)(e.title),
21),(0,n.createElementVNode)("div",_r,[e.grades?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,grades:e.grades},null,8,["grades"])):(0,n.createCommentVNode)("",!0),e.publish_at?((0,n.openBlock)(),(0,n.createElementBlock)("span",Ar,(0,n.toDisplayString)(new Date(e.publish_at).toLocaleDateString()),1)):(0,n.createCommentVNode)("",!0)]),e.description?((0,n.openBlock)(),(0,n.createElementBlock)("p",jr,(0,n.toDisplayString)(e.description),1)):(0,n.createCommentVNode)("",!0)])])],40,Ir)})),128))])):(0,n.createCommentVNode)("",!0),o.newsResults.totalHits>5?((0,n.openBlock)(),(0,n.createBlock)(c,{key:2,href:e.route("search",{section:"news",term:o.confirmedTerm}),class:"text-gray-500 hover:text-gray-700 text-sm"},{default:(0,n.withCtx)((function(){return[(0,n.createTextVNode)(" View "+(0,n.toDisplayString)(o.newsResults.totalHits-5)+" other News articles ",1)]})),_:1},8,["href"])):(0,n.createCommentVNode)("",!0)])):((0,n.openBlock)(),(0,n.createElementBlock)("div",Dr,"Enter a search term and click search to see results"))])):(0,n.createCommentVNode)("",!0)]})),_:1})])])}],["__scopeId","data-v-69ecbbfa"]])},props:{term:{type:String,default:""}},emits:["update:term"],setup:function(){return{typewriterText:ut({words:["topic...","title...","keyword..."],typingSpeed:100,deletingSpeed:50,pauseBeforeDelete:2e3,pauseBeforeType:500}).currentText}},data:function(){return console.log("[SEARCH-DEBUG] PopSearchSkeleton data() initializing",{propTerm:this.term,timestamp:(new Date).toISOString()}),{showSearchModal:!1,localTerm:this.term,confirmedTerm:"",searchResults:[],isSearching:!1,resultsShown:!1}},created:function(){console.log("[SEARCH-DEBUG] PopSearchSkeleton created()",{state:{showSearchModal:this.showSearchModal,localTerm:this.localTerm,confirmedTerm:this.confirmedTerm,isSearching:this.isSearching,resultsShown:this.resultsShown},timestamp:(new Date).toISOString()})},mounted:function(){console.log("[SEARCH-DEBUG] PopSearchSkeleton mounted()",{state:{showSearchModal:this.showSearchModal,localTerm:this.localTerm,confirmedTerm:this.confirmedTerm,isSearching:this.isSearching,resultsShown:this.resultsShown},timestamp:(new Date).toISOString()}),document.addEventListener("visibilitychange",(function(){console.log("[SEARCH-DEBUG] Page visibility changed",{hidden:document.hidden,visibilityState:document.visibilityState,timestamp:(new Date).toISOString()})})),window.addEventListener("beforeunload",(function(){console.log("[SEARCH-DEBUG] Window beforeunload triggered",{location:window.location.href,timestamp:(new Date).toISOString()})})),window.addEventListener("open-search-modal",this.openSearchModal),window.addEventListener("keydown",this.handleKeydown)},methods:{handleKeydown:function(e){console.log("[SEARCH-DEBUG] handleKeydown()",{key:e.key,showSearchModal:this.showSearchModal,timestamp:(new Date).toISOString()}),"Escape"===e.key&&this.showSearchModal&&this.toggleModal()},toggleModal:function(){var e=this,t=this.showSearchModal;this.showSearchModal=!this.showSearchModal,console.log("[SEARCH-DEBUG] toggleModal()",{before:t,after:this.showSearchModal,state:{localTerm:this.localTerm,confirmedTerm:this.confirmedTerm,resultsShown:this.resultsShown},timestamp:(new Date).toISOString()}),this.showSearchModal?(document.body.style.overflow="hidden",this.$nextTick((function(){var t;null===(t=e.$refs.searchInput)||void 0===t||t.focus()}))):document.body.style.overflow=""},openSearchModal:function(){console.log("[SEARCH-DEBUG] openSearchModal()",{currentState:this.showSearchModal,timestamp:(new Date).toISOString()}),this.showSearchModal||this.toggleModal()},confirmSearch:function(){var e=this.localTerm.trim();if(console.log("[SEARCH-DEBUG] confirmSearch() CALLED",{trimmedTerm:e,localTerm:this.localTerm,confirmedTerm:this.confirmedTerm,resultsShown:this.resultsShown,willRedirect:this.resultsShown&&this.confirmedTerm===e,state:{showSearchModal:this.showSearchModal,isSearching:this.isSearching},timestamp:(new Date).toISOString(),stack:(new Error).stack}),this.resultsShown&&this.confirmedTerm===e){var t="/search?term=".concat(encodeURIComponent(e));
2return console.log("[SEARCH-DEBUG] confirmSearch() REDIRECTING TO FULL SEARCH PAGE",{url:t,reason:"resultsShown is true and terms match",timestamp:(new Date).toISOString()}),void(window.location.href=t)}console.log("[SEARCH-DEBUG] confirmSearch() SHOWING POPUP RESULTS",{beforeConfirmedTerm:this.confirmedTerm,afterConfirmedTerm:e,beforeResultsShown:this.resultsShown,afterResultsShown:!0,timestamp:(new Date).toISOString()}),this.confirmedTerm=e,this.resultsShown=!0,this.$emit("update:term",this.confirmedTerm),console.log("[SEARCH-DEBUG] confirmSearch() EMITTED update:term",{term:this.confirmedTerm,timestamp:(new Date).toISOString()})},handleSearch:function(){console.log("[SEARCH-DEBUG] handleSearch() CALLED",{localTerm:this.localTerm,trimmed:this.localTerm.trim(),isSearching:this.isSearching,willProceed:this.localTerm.trim()&&!this.isSearching,timestamp:(new Date).toISOString()}),this.localTerm.trim()&&!this.isSearching&&(this.isSearching=!0,console.log("[SEARCH-DEBUG] handleSearch() REDIRECTING",{url:"/search?term=".concat(encodeURIComponent(this.localTerm.trim())),timestamp:(new Date).toISOString()}),this.toggleModal(),window.location.href="/search?term=".concat(encodeURIComponent(this.localTerm.trim())))},clearSearch:function(){var e;console.log("[SEARCH-DEBUG] clearSearch() CALLED",{beforeState:{localTerm:this.localTerm,confirmedTerm:this.confirmedTerm,resultsShown:this.resultsShown},timestamp:(new Date).toISOString()}),this.localTerm="",this.confirmedTerm="",this.resultsShown=!1,this.$emit("update:term",""),null===(e=this.$refs.searchInput)||void 0===e||e.focus(),console.log("[SEARCH-DEBUG] clearSearch() COMPLETED",{timestamp:(new Date).toISOString()})},handleResultSelect:function(e){console.log("[SEARCH-DEBUG] handleResultSelect() CALLED",{item:e,url:e.url,timestamp:(new Date).toISOString()}),this.toggleModal(),a.Nd.visit(e.url)}},watch:{term:function(e,t){console.log("[SEARCH-DEBUG] WATCHER term changed",{from:t,to:e,localTermBefore:this.localTerm,timestamp:(new Date).toISOString()}),this.localTerm=e,console.log("[SEARCH-DEBUG] WATCHER term updated localTerm",{localTerm:this.localTerm,timestamp:(new Date).toISOString()})},localTerm:function(e,t){console.log("[SEARCH-DEBUG] WATCHER localTerm changed",{from:t,to:e,confirmedTerm:this.confirmedTerm,resultsShownBefore:this.resultsShown,willResetResultsShown:e!==this.confirmedTerm,timestamp:(new Date).toISOString()}),e!==this.confirmedTerm&&(this.resultsShown=!1,console.log("[SEARCH-DEBUG] WATCHER localTerm reset resultsShown to false",{timestamp:(new Date).toISOString()}))},confirmedTerm:function(e,t){console.log("[SEARCH-DEBUG] WATCHER confirmedTerm changed",{from:t,to:e,resultsShown:this.resultsShown,localTerm:this.localTerm,timestamp:(new Date).toISOString()})},resultsShown:function(e,t){console.log("[SEARCH-DEBUG] WATCHER resultsShown changed",{from:t,to:e,confirmedTerm:this.confirmedTerm,timestamp:(new Date).toISOString()})},showSearchModal:function(e,t){console.log("[SEARCH-DEBUG] WATCHER showSearchModal changed",{from:t,to:e,timestamp:(new Date).toISOString()})}},beforeUnmount:function(){console.log("[SEARCH-DEBUG] PopSearchSkeleton beforeUnmount()",{finalState:{showSearchModal:this.showSearchModal,localTerm:this.localTerm,confirmedTerm:this.confirmedTerm,resultsShown:this.resultsShown},timestamp:(new Date).toISOString()}),document.body.style.overflow="",window.removeEventListener("open-search-modal",this.openSearchModal),window.removeEventListener("keydown",this.handleKeydown)}};var $r=r(2364),Kr={insert:"head",singleton:!1};te()($r.Z,Kr);$r.Z.locals;const Wr=(0,C.Z)(zr,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("SearchResultsDirect");return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=function(){return i.toggleModal&&i.toggleModal.apply(i,arguments)}),"aria-label":"Search Menu",class:"p-2 rounded-lg bg-popup-search-background-500"},tt(t[6]||(t[6]=[(0,n.createStaticVNode)('<svg class="text-popup-search-foreground-500" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_1975_4089" style="mask-type:alpha;" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24"><rect width="24" height="24" fill="#D9D9D9"></rect></mask><g mask="url(#mask0_1975_4089)"><path d="M19.6 21L13.3 14.7C12.8 15.1 12.225 15.4167 11.575 15.65C10.925 15.8833 10.2333 16 9.5 16C7.68333 16 6.14583 15.3708 4.8875 14.1125C3.62917 12.8542 3 11.3167 3 9.5C3 7.68333 3.62917 6.14583 4.8875 4.8875C6.14583 3.62917 7.68333 3 9.5 3C11.3167 3 12.8542 3.62917 14.1125 4.8875C15.3708 6.14583 16 7.68333 16 9.5C16 10.2333 15.8833 10.925 15.65 11.575C15.4167 12.225 15.1 12.8 14.7 13.3L21 19.6L19.6 21ZM9.5 14C10.75 14 11.8125 13.5625 12.6875 12.6875C13.5625 11.8125 14 10.75 14 9.5C14 8.25 13.5625 7.1875 12.6875 6.3125C11.8125 5.4375 10.75 5 9.5 5C8.25 5 7.1875 5.4375 6.3125 6.3125C5.4375 7.1875 5 8.25 5 9.5C5 10.75 5.4375 11.8125 6.3125 12.6875C7.1875 13.5625 8.25 14 9.5 14Z" class="fill-popup-search-foreground-500"></path></g></svg>',1)]))),a.showSearchModal?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,onClick:t[5]||(t[5]=(0,n.withModifiers)((function(){return i.toggleModal&&i.toggleModal.apply(i,arguments)}),["self"])),style:{"backdrop-filter":"blur(6px)"},class:"fixed top-0 left-0 w-screen h-screen bg-black/70 flex items-start justify-center z-50 p-4 pt-8"},[(0,n.createElementVNode)("div",nt,[(0,n.createElementVNode)("div",ot,[(0,n.createElementVNode)("form",{onSubmit:t[4]||(t[4]=(0,n.withModifiers)((function(){return i.confirmSearch&&i.confirmSearch.apply(i,arguments)}),["prevent"])),class:"flex items-center px-5 py-2"},[t[9]||(t[9]=(0,n.createStaticVNode)('<svg class="w-6 h-6 text-gray-500 flex-shrink-0" viewB
2ox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_1975_4089" style="mask-type:alpha;" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24"><rect width="24" height="24" fill="#D9D9D9"></rect></mask><g mask="url(#mask0_1975_4089)"><path d="M19.6 21L13.3 14.7C12.8 15.1 12.225 15.4167 11.575 15.65C10.925 15.8833 10.2333 16 9.5 16C7.68333 16 6.14583 15.3708 4.8875 14.1125C3.62917 12.8542 3 11.3167 3 9.5C3 7.68333 3.62917 6.14583 4.8875 4.8875C6.14583 3.62917 7.68333 3 9.5 3C11.3167 3 12.8542 3.62917 14.1125 4.8875C15.3708 6.14583 16 7.68333 16 9.5C16 10.2333 15.8833 10.925 15.65 11.575C15.4167 12.225 15.1 12.8 14.7 13.3L21 19.6L19.6 21ZM9.5 14C10.75 14 11.8125 13.5625 12.6875 12.6875C13.5625 11.8125 14 10.75 14 9.5C14 8.25 13.5625 7.1875 12.6875 6.3125C11.8125 5.4375 10.75 5 9.5 5C8.25 5 7.1875 5.4375 6.3125 6.3125C5.4375 7.1875 5 8.25 5 9.5C5 10.75 5.4375 11.8125 6.3125 12.6875C7.1875 13.5625 8.25 14 9.5 14Z" fill="currentColor"></path></g></svg>',1)),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.localTerm=e}),placeholder:"Search by ".concat(o.typewriterText),class:"flex-grow px-4 py-2 focus:outline-none text-gray-900",ref:"searchInput"},null,8,at),[[n.vModelText,a.localTerm]]),t[10]||(t[10]=(0,n.createElementVNode)("button",{type:"submit",class:"px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-md transition-colors",title:"Search"}," Search ",-1)),a.localTerm?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,type:"button",onClick:t[2]||(t[2]=function(){return i.clearSearch&&i.clearSearch.apply(i,arguments)}),class:"p-1 hover:bg-gray-100 rounded-full ml-1",title:"Clear search"},tt(t[7]||(t[7]=[(0,n.createElementVNode)("svg",{class:"w-5 h-5 text-gray-500",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",fill:"currentColor"})],-1)])))):((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:1,type:"button",onClick:t[3]||(t[3]=function(){return i.toggleModal&&i.toggleModal.apply(i,arguments)}),class:"p-1 hover:bg-gray-100 rounded-full ml-1",title:"Close search"},tt(t[8]||(t[8]=[(0,n.createElementVNode)("svg",{class:"w-5 h-5 text-gray-500",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",fill:"currentColor"})],-1)]))))],32)]),(0,n.createElementVNode)("div",it,[(0,n.createVNode)(l,{term:a.confirmedTerm,results:a.searchResults,"scroll-container":e.$refs.modalScrollContainer,onSelect:i.handleResultSelect},null,8,["term","results","scroll-container","onSelect"])],512)])])):(0,n.createCommentVNode)("",!0)])}]]);var Yr=r(32608),Jr=r(76306);const Xr={components:{PopSearchSkeleton:Wr,AisSearchBox:Jr.AV,AisInstantSearch:Jr.M,AisHits:Jr.xC,AisConfigure:Jr.St,AisHighlight:Jr.YE},data:function(){return{searchTerm:"",perPage:5,isSearching:!1}},setup:function(){var e,t,r,o,i=(null===(e=(0,a.qt)().props.integrations)||void 0===e||null===(t=e.meilisearch)||void 0===t?void 0:t.host)||("undefined"!=typeof window?window.MEILISEARCH_HOST:null)||"http://localhost:7700",l=(null===(r=(0,a.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.key)||("undefined"!=typeof window?window.MEILISEARCH_KEY:null)||"",c=(0,Pr.wA)();return{client:(0,Yr.instantMeiliSearch)(i,l,{placeholderSearch:!1,primaryKey:"id",requestConfig:{headers:{"X-MS-USER-ID":c}}}).searchClient,debouncedSearchTerm:(0,n.ref)("")}},created:function(){var e,t=this;this.$watch("searchTerm",(function(r){r&&(t.isSearching=!0),clearTimeout(e),e=setTimeout((function(){t.debouncedSearchTerm=(0,Ur.Bl)(r),setTimeout((function(){t.isSearching=!1}),1e3)}),1e3)}))},methods:{urlFromTm:function(e){var t,r,n;return e.is_external_resource?route("resources.show",null!==(t=e.slug)&&void 0!==t?t:e.id):e.is_internal_resource?route("stc.show",null!==(r=e.slug)&&void 0!==r?r:e.id):e.is_internal_unit_plan?route("stc.unit",null!==(n=e.slug)&&void 0!==n?n:e.id):""}},computed:{indexName:function(){return(0,a.qt)().props.integrations.algolia.teachingMaterialsIndex},filters:function(){return"is_live=1 AND tenantIds=".concat(this.tenantId)},tenantId:function(){return(0,a.qt)().props.tenantId}}},en={components:{DesktopMenu:I,MobileMenu:Te,Logo:ce,DesktopAuth:He,PopSearch:(0,C.Z)(Xr,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("AisConfigure"),c=(0,n.resolveComponent)("AisSearchBox"),s=(0,n.resolveComponent)("AisHighlight"),u=(0,n.resolveComponent)("AisHits"),d=(0,n.resolveComponent)("AisInstantSearch"),f=(0,n.resolveComponent)("PopSearchSkeleton");return(0,n.openBlock)(),(0,n.createBlock)(f,{term:a.searchTerm,"onUpdate:term":t[1]||(t[1]=function(e){return a.searchTerm=e})},{default:(0,n.withCtx)((function(r){r.term;return[(0,n.createVNode)(d,{searchClient:o.client,indexName:i.indexName},{default:(0,n.withCtx)((function(){return[(0,n.createVNode)(l,{hitsPerPage:a.perPage,page:e.currentPage,filters:i.filters},null,8,["hitsPerPage","page","filters"]),(0,n.createElementVNode)("div",Ze,[(0,n.createElementVNode)("a",{href:"/search?term=".concat(a.searchTerm),class:"underline text-xs"},"View all results",8,ze),a.isSearching?((0,n.openBlock)(),(0,n.createElementBlock)("div",$e,qe(t[2]||(t[2]=[(0,n.createElementVNode)("svg",{class:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[(0,n.createElementVNode)("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),(0,n.createElementVNode)("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),(0,n.createTextVNode)(" Searching... ",-1)])))):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",Ke,[(0,n.createVNode)(c,{modelValue:o.debouncedSearchTerm,"onUpdate:modelValue":t[0]||(t[0]=function(e){return o.debouncedSearchTerm=e})},null,8,["modelValue"])]),(0,n.createElementVNode)("div",We,[(0,n.createVNode)(u,{onRender:e.handleHitsRender},{default:(0,n.withCtx)((function(e){var r=e.items;return[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("a",{href:i.urlFromTm(e),key:e.id,class:"p-3 flex justify-between bg-neutral-100 rounded-lg items-center w-full mt-3 hover:bg-[#
2E8FAE8] duration-150"},[(0,n.createElementVNode)("div",Je,[(0,n.createElementVNode)("div",Xe,[(0,n.createVNode)(s,{attribute:"title",hit:e,class:"text-start"},null,8,["hit"])]),(0,n.createElementVNode)("div",et,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.gradeBands,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,class:"bg-[#BBF0B9] rounded px-2.5 flex-nowrap whitespace-nowrap uppercase"},(0,n.toDisplayString)(e),1)})),128)),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.subjects_list_short,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,class:"bg-[#BBF0B9] rounded px-2.5 flex-nowrap whitespace-nowrap uppercase"},(0,n.toDisplayString)(e),1)})),128))])]),t[3]||(t[3]=(0,n.createElementVNode)("div",null,[(0,n.createElementVNode)("button",{class:"p-2"},[(0,n.createElementVNode)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("mask",{id:"mask0_1975_4094",style:{"mask-type":"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"15",height:"15"},[(0,n.createElementVNode)("rect",{width:"15",height:"15",fill:"#D9D9D9"})]),(0,n.createElementVNode)("g",{mask:"url(#mask0_1975_4094)"},[(0,n.createElementVNode)("path",{d:"M9.26901 7.5L4.56105 2.79203C4.43688 2.66786 4.37641 2.52005 4.37964 2.34859C4.38287 2.17714 4.44657 2.02927 4.57073 1.905C4.6949 1.78083 4.84271 1.71875 5.01417 1.71875C5.18563 1.71875 5.33349 1.78083 5.45776 1.905L10.2426 6.69953C10.3555 6.81255 10.4392 6.93917 10.4937 7.07937C10.5483 7.21958 10.5756 7.35979 10.5756 7.5C10.5756 7.64021 10.5483 7.78042 10.4937 7.92063C10.4392 8.06083 10.3555 8.18745 10.2426 8.30047L5.44808 13.095C5.32391 13.2192 5.17771 13.2796 5.00948 13.2764C4.84115 13.2732 4.6949 13.2095 4.57073 13.0853C4.44657 12.9611 4.38448 12.8133 4.38448 12.6419C4.38448 12.4704 4.44657 12.3226 4.57073 12.1983L9.26901 7.5Z",fill:"#1C1B1F"})])])])],-1))],8,Ye)})),128))]})),_:1},8,["onRender"])])]})),_:1},8,["searchClient","indexName"])]})),_:1},8,["term"])}]]),DonateButton:Ne},data:function(){return{expandedMenuId:null}},computed:{showDonateButton:function(){return(0,a.qt)().props.header.showDonateButton},tenantId:function(){return(0,a.qt)().props.tenantId}}},tn=(0,C.Z)(en,[["render",function(e,t,r,o,a,l){var p=(0,n.resolveComponent)("Logo"),h=(0,n.resolveComponent)("DesktopMenu"),m=(0,n.resolveComponent)("PopSearch"),g=(0,n.resolveComponent)("DonateButton"),v=(0,n.resolveComponent)("MobileMenu"),y=(0,n.resolveComponent)("DesktopAuth");return(0,n.openBlock)(),(0,n.createElementBlock)("div",c,[(0,n.createElementVNode)("div",s,[(0,n.createVNode)(p)]),(0,n.createElementVNode)("div",u,[(0,n.createVNode)(h,{expandedMenuId:a.expandedMenuId,"onUpdate:expandedMenuId":t[0]||(t[0]=function(e){return a.expandedMenuId=e})},null,8,["expandedMenuId"])]),(0,n.createElementVNode)("div",d,[(0,n.createVNode)(m),l.showDonateButton?((0,n.openBlock)(),(0,n.createBlock)(g,{key:0,class:"hidden md:flex"})):(0,n.createCommentVNode)("",!0),(0,n.createVNode)(v,{expandedMenuId:a.expandedMenuId,"onUpdate:expandedMenuId":t[1]||(t[1]=function(e){return a.expandedMenuId=e}),class:"lg:hidden"},null,8,["expandedMenuId"]),(0,n.createVNode)(y,{onExpanded:t[2]||(t[2]=function(e){return a.expandedMenuId="auth"}),onCollapsed:t[3]||(t[3]=function(e){return a.expandedMenuId=null}),expanded:"auth"===a.expandedMenuId,class:"hidden lg:block"},null,8,["expanded"]),1!=l.tenantId?((0,n.openBlock)(),(0,n.createElementBlock)("a",f,i(t[4]||(t[4]=[(0,n.createElementVNode)("img",{src:"/img/logo-with-trademark-2.svg",alt:"SubjectToClimate",width:"387",height:"100",class:"w-full h-auto"},null,-1)])))):(0,n.createCommentVNode)("",!0)])])}]]);function rn(e){return function(e){if(Array.isArray(e))return nn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return nn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(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 on={class:"mt-10"},an={class:"flex flex-col lg:flex-row items-center lg:justify-between lg:items-center mb-[50px] space-y-[30px] lg:sp
2ace-y-0"},ln={class:"w-[239px]"},cn=["href"],sn={class:"flex space-x-[16px]"},un={class:"flex items-center justify-start space-x-8 mt-10"},dn={target:"_blank",href:"https://www.charitynavigator.org/ein/861536473"},fn=["src"],pn={target:"_blank",href:"https://directories.onepercentfortheplanet.org/profile/subjecttoclimate"},hn=["src"],mn={key:0,class:"mt-10"};var gn=r(49613),vn={href:"/",class:"h-10 block"},yn=["src"];const bn={computed:{url:function(){return(0,a.qt)().props.theme.logo.dark}}},wn=(0,C.Z)(bn,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("a",vn,[(0,n.createElementVNode)("img",{alt:"Avatar",class:"h-full",src:i.url},null,8,yn)])])}]]);var kn=["href"],xn={class:"space-y-[10px] mt-[14px]"};var Sn=["href"];const En={props:{menu:Object}},Cn={components:{MenuItem:(0,C.Z)(En,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("a",{href:r.menu.url,class:(0,n.normalizeClass)(["block",r.menu.url?"hover:underline":""])},(0,n.toDisplayString)(r.menu.title),11,Sn)}]])},props:{menu:Object}},Bn=(0,C.Z)(Cn,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("MenuItem");return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("a",{href:r.menu.url,class:(0,n.normalizeClass)(["font-bold text-xl block",r.menu.url?"hover:underline":""])},(0,n.toDisplayString)(r.menu.title),11,kn),(0,n.createElementVNode)("div",xn,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.menu.children,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(l,{key:e.id,menu:e},null,8,["menu"])})),128))])])}]]);function Nn(e){return function(e){if(Array.isArray(e))return In(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return In(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return In(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function In(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 Ln={key:0,class:"flex space-x-[16px]"},Vn=["href"],Tn=["href"],_n=["href"],An=["href"];const jn={computed:{socialMedias:function(){return(0,a.qt)().props.footer.socialMedias}}},Dn=(0,C.Z)(jn,[["render",function(e,t,r,o,a,i){return i.socialMedias?((0,n.openBlock)(),(0,n.createElementBlock)("div",Ln,[i.socialMedias.linkedin?((0,n.openBlock)(),(0,n.createElementBlock)("a",{key:i.socialMedias.linkedin,href:i.socialMedias.linkedin,class:"block",target:"_blank"},Nn(t[0]||(t[0]=[(0,n.createElementVNode)("img",{alt:"LinkedIn",src:"/img/social-media/linked-in.png",class:"w-[30px] h-[30px]"},null,-1)])),8,Vn)):(0,n.createCommentVNode)("",!0),i.socialMedias.facebook?((0,n.openBlock)(),(0,n.createElementBlock)("a",{key:i.socialMedias.facebook,href:i.socialMedias.facebook,class:"block",target:"_blank"},Nn(t[1]||(t[1]=[(0,n.createElementVNode)("img",{alt:"Facebook",src:"/img/social-media/facebook.png",class:"w-[30px] h-[30px]"},null,-1)])),8,Tn)):(0,n.createCommentVNode)("",!0),i.socialMedias.pinterest?((0,n.openBlock)(),(0,n.createElementBlock)("a",{key:i.socialMedias.pinterest,href:i.socialMedias.pinterest,class:"block",target:"_blank"},Nn(t[2]||(t[2]=[(0,n.createElementVNode)("img",{alt:"Pinterest",src:"/img/social-media/pinterest.png",class:"w-[30px] h-[30px]"},null,-1)])),8,_n)):(0,n.createCommentVNode)("",!0),i.socialMedias.instagram?((0,n.openBlock)(),(0,n.createElementBlock)("a",{key:i.socialMedias.instagram,href:i.socialMedias.instagram,class:"block",target:"_blank"},Nn(t[3]||(t[3]=[(0,n.createElementVNode)("img",{alt:"Instagram",src:"/img/social-media/instagram.png",class:"w-[30px] h-[30px]"},null,-1)])),8,An)):(0,n.createCommentVNode)("",!0)])):(0,n.createCommentVNode)("",!0)}]]);const On={components:{Container:gn.Z,Logo:wn,Menu:Bn,SocialMediaIcons:Dn},computed:{menus:function(){return(0,a.qt)().props.footer.menus},logoHref:function(){return 1!=(0,a.qt)().props.tenantId?"https://subjecttoclimate.org/":"/"},isCoreSite:function(){return 1==(0,a.qt)().props.tenantId},badge3StarUrl:function(){var e,t=null===(e=(0,a.qt)().props.assetVersions)||void 0===e?void 0:e.badge3Star;return t?"/img/charity_navigator_three_star_rating_badge_2026.png?v=".concat(t):"/img/charity_navigator_three_star_rating_badge_2026.png"},onePercentPlanetUrl:function(){var e,t=null===(e=(0,a.qt)().props.assetVersions)||void 0===e?void 0:e.onePercentPlanet;return t?"/img/environmentalPartner_Vertical_FullColor.webp?v=".concat(t):"/img/environmentalPartner_Vertical_FullColor.webp"}},methods:{initPreferredSourceButton:function(){this.isCoreSite&&(window.PREFERRED_SOURCE=window.PREFERRED_SOURCE||[],window.PREFERRED_SOURCE.push((function(e){return e.init()})))}},mounted:function(){this.initPreferredSourceButton()}},Fn=(0,C.Z)(On,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("SocialMediaIcons"),c=(0,n.resolveComponent)("Menu"),s=(0,n.resolveComponent)("Container");return(0,n.openBlock)(),(0,n.createElementBlock)("div",on,[(0,n.createVNode)(s,{class:"p-10"},{default:(0,n.withCtx)((function(){return[t[4]||(t[4]=(0,n.createElementVNode)("hr",{class:"mb-[60px]"},null,-1)),(0,n.createElementVNode)("div",an,[(0,n.createElementVNode)("div",ln,[(0,n.createElementVNode)("a",{href:i.logoHref,class:"w-[215px] block"},rn(t[0]||(t[0]=[(0,n.createElementVNode)("img",{src:"/img/logo-with-trademark-2.svg",alt:"SubjectToClimate",width:"387",height:"100",class:"w-full h-auto"},null,-1)])),8,cn)]),t[1]||(t[1]=(0,n.createElementVNode)("div",{class:"w-full lg:w-[444px] text-center lg:text-start"}," All resources can be used for your educational purposes with proper attribution to the content provider. ",-1)),(0,n.createElementVNode)("div",sn,[(0,n.createVNode)(l)])]),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["grid gap-10 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-".concat(i.menus.length+1)])},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.menus,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(c,{key:e.id,menu:e},null,8,["menu"])})),128))],2),(0,n.createElementVNode)("div",un,[t[2]||(t[2]=(0,n.createElementVNode)("a",{target:"_blank",href:"https://app.candid.org/profile/10986729/climate-change-for-all-educators-inc-86-1536473"},[(0,n.createElementVNode)("img",{src:"https://widgets.guidestar.org/prod/v1/pdp/transparency-seal/10986729/svg",alt:"Candid Platinum Transparency 2025",class:"h-[100px] w-auto"})],-1)),(0,n.createElementVNode)("a",dn,[(0,n.createElementVNode)("img",{src:i.badge3StarUrl,alt:"3 Star Rating Badge",width:"200",height:"200",class:"h-[100px] w-auto"},null,8,fn)]),(0,n.createElementVNode)("a",pn,[(0,n.createElementVNode)("img",{src:i.onePercentPlanetUrl,alt:"Add 1% For the Planet logo to our site",width:"152",height:"200",class:"h-[100px] w-auto"},null,8,hn)])]),i.isCoreSite?((0,n.openBlock)(),(0,n.createElementBlock)("div",mn,rn(t[3]||(t[3]=[(0,n.createElementVNode)("div",{"google-add-preferred-source-btn":"","data-theme":"light",class:"min-h-[40px]"},null,-1)])))):(0,n.createCommentVNode)("",!0)]})),_:1})])}]]);function Pn(e){return function(e){if(Array.isArray(e))return Rn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(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 Un={class:"hidden"},Mn={key:0,class:"w-full"},Gn={class:"hidden"},Hn=["onClick"],qn={class:"flex items-center justify-center space-x-4 pr-8"},Qn=["innerHTML"],Zn=["href"];function zn(e){return function(e){if(Array.isArray(e))return $n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $n(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}function Kn(e){return Kn="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},Kn(e)}const Wn={setup:function(){var e=(0,n.ref)(new Set);(0,n.onMounted)((function(){var t=localStorage.getItem("closedBanners");t&&(e.value=new Set(JSON.parse(t)))}));
2var t=(0,n.computed)((function(){var e=(0,a.qt)().props,t=e.banners;return console.log("Page props:",e),console.log("Raw banners:",t),t?"object"!==Kn(t)||Array.isArray(t)?t:Object.values(t):[]})),r=(0,n.computed)((function(){var r;if(null===(r=t.value)||void 0===r||!r.length)return console.log("No active banners found"),[];var n=t.value.filter((function(t){return console.log("Processing banner:",t),!e.value.has(t.id)}));return console.log("Filtered banners:",n),n}));return{closedBanners:e,closeBanner:function(t){e.value.add(t),localStorage.setItem("closedBanners",JSON.stringify(zn(e.value)))},activeBanners:t,visibleBanners:r,getBannerStyles:function(e){return{backgroundColor:(null==e?void 0:e.bg_color)||"#FFFFFF"}}}}},Yn=(0,C.Z)(Wn,[["render",function(e,t,r,o,a,i){var l;return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createElementVNode)("div",Un," Active banners: "+(0,n.toDisplayString)(o.activeBanners.length)+" Visible banners: "+(0,n.toDisplayString)(o.visibleBanners.length),1),(null===(l=o.activeBanners)||void 0===l?void 0:l.length)>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",Mn,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.visibleBanners,(function(e){var r,a,i,l,c,s,u,d,f,p,h,m,g,v,y;return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.id,style:(0,n.normalizeStyle)(o.getBannerStyles(null===(r=e.content)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.attributes)),class:"w-full py-3 px-4 text-center relative"},[(0,n.createElementVNode)("div",Gn," Banner ID: "+(0,n.toDisplayString)(e.id)+" Has content: "+(0,n.toDisplayString)(!(null===(i=e.content)||void 0===i||!i[0])),1),(0,n.createElementVNode)("button",{onClick:function(t){return o.closeBanner(e.id)},"aria-label":"close",class:"absolute right-2 top-1/2 -translate-y-1/2 p-2 hover:bg-black/5 rounded-full transition-colors duration-150",style:(0,n.normalizeStyle)({color:(null===(l=e.content)||void 0===l||null===(c=l[0])||void 0===c||null===(s=c.attributes)||void 0===s?void 0:s.text_color)||"#000000"})},Pn(t[0]||(t[0]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])),12,Hn),(0,n.createElementVNode)("div",qn,[null!==(u=e.content)&&void 0!==u&&null!==(d=u[0])&&void 0!==d&&null!==(f=d.attributes)&&void 0!==f&&f.text?((0,n.openBlock)(),(0,n.createElementBlock)("span",{key:0,style:(0,n.normalizeStyle)({color:e.content[0].attributes.text_color||"#000000"})},[(0,n.createElementVNode)("div",{innerHTML:e.content[0].attributes.text},null,8,Qn)],4)):(0,n.createCommentVNode)("",!0),null!==(p=e.content)&&void 0!==p&&null!==(h=p[0])&&void 0!==h&&null!==(m=h.attributes)&&void 0!==m&&m.button_text&&null!==(g=e.content)&&void 0!==g&&null!==(v=g[0])&&void 0!==v&&null!==(y=v.attributes)&&void 0!==y&&y.button_url?((0,n.openBlock)(),(0,n.createElementBlock)("a",{key:1,href:e.content[0].attributes.button_url,class:(0,n.normalizeClass)(["px-4 py-2 rounded-lg transition-colors duration-150","bg-".concat(e.content[0].attributes.button_style||"primary","-500"),"hover:bg-".concat(e.content[0].attributes.button_style||"primary","-600"),"text-white"])},(0,n.toDisplayString)(e.content[0].attributes.button_text),11,Zn)):(0,n.createCommentVNode)("",!0)])],4)})),128))])):(0,n.createCommentVNode)("",!0)],64)}]]);var Jn={class:"cookie-consent-banner__content"},Xn={class:"cookie-consent-banner__primary"},eo={class:"cookie-consent-banner__description"},to={class:"cookie-consent-banner__actions"},ro={class:"cookie-consent-banner__preferences"},no={class:"cookie-consent-banner__body"},oo={class:"cookie-consent-banner__options"},ao={class:"cookie-consent-banner__option"},io={class:"cookie-consent-banner__toggle"},lo={class:"cookie-consent-banner__option"},co={class:"cookie-consent-banner__toggle"},so={class:"cookie-consent-banner__actions"};var uo="cookie_consent_preferences",fo=365;function po(){if("undefined"==typeof document)return null;var e=document.cookie.split("; ").find((function(e){return e.startsWith(uo+"=")}));if(!e)return null;try{var t=e.split("=")[1];return JSON.parse(decodeURIComponent(t))}catch(e){return console.error("Error parsing consent cookie:",e),null}}function ho(e){if("undefined"!=typeof window){window.dataLayer=window.dataLayer||[];var t={analytics_storage:"granted"};e.marketing?(t.ad_storage="granted",t.ad_user_data="granted",t.ad_personalization="granted"):(t.ad_storage="denied",t.ad_user_data="denied",t.ad_personalization="denied"),window.dataLayer.push(["consent","update",t]),window.gtag&&"function"==typeof window.gtag&&window.gtag("consent","update",t),function(e){if("undefined"!=typeof document){var t=new Date;t.setTime(t.getTime()+24*fo*60*60*1e3);var r=encodeURIComponent(JSON.stringify(e));document.cookie="".concat(uo,"=").concat(r,"; expires=").concat(t.toUTCString(),"; path=/; SameSite=Lax")}}(e),window.dispatchEvent(new CustomEvent("consentUpdated",{detail:e}))}}function mo(){var e=po();return e?(ho(e),e):null}const go={name:"CookieConsentBanner",setup:function(){var e=(0,n.ref)(!1),t=(0,n.ref)(!1),r=(0,n.ref)("primary"),o=(0,n.ref)({anal
2ytics:!1,marketing:!1}),a=function(){"undefined"!=typeof navigator&&/bot|crawler|spider|crawling/i.test(navigator.userAgent)||null!==mo()||(e.value=!0,setTimeout((function(){t.value=!0}),10))},i=function(){t.value=!1,setTimeout((function(){e.value=!1}),300)};return(0,n.onMounted)((function(){var e=mo();e?o.value=e:"undefined"!=typeof window&&("requestIdleCallback"in window?requestIdleCallback(a,{timeout:2e3}):setTimeout(a,1e3))})),{shouldRender:e,isVisible:t,screen:r,preferences:o,acceptAll:function(){o.value={analytics:!0,marketing:!0},ho(o.value),i()},decline:function(){o.value={analytics:!1,marketing:!1},ho(o.value),i()},openPreferencesModal:function(){r.value="preferences"},closePreferencesModal:function(){r.value="primary"},savePreferencesFromModal:function(){ho(o.value),i()},closeBanner:i}}};var vo=r(54210),yo={insert:"head",singleton:!1};te()(vo.Z,yo);vo.Z.locals;const bo=(0,C.Z)(go,[["render",function(e,t,r,o,a,i){return(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("div",{id:"cookie-consent-banner",class:(0,n.normalizeClass)(["cookie-consent-banner",{"cookie-consent-banner--visible":o.isVisible}])},[(0,n.createElementVNode)("div",Jn,[(0,n.withDirectives)((0,n.createElementVNode)("div",Xn,[(0,n.createElementVNode)("p",eo,[t[6]||(t[6]=(0,n.createTextVNode)(" We use cookies to improve our site. We don't sell or share your data. You can ",-1)),(0,n.createElementVNode)("a",{href:"#",class:"cookie-consent-banner__link",onClick:t[0]||(t[0]=(0,n.withModifiers)((function(){return o.openPreferencesModal&&o.openPreferencesModal.apply(o,arguments)}),["prevent"]))},"manage your preferences here"),t[7]||(t[7]=(0,n.createTextVNode)(". ",-1))]),(0,n.createElementVNode)("div",to,[(0,n.createElementVNode)("button",{class:"cookie-consent-banner__button cookie-consent-banner__button--pill",onClick:t[1]||(t[1]=function(){return o.acceptAll&&o.acceptAll.apply(o,arguments)})}," Accept "),(0,n.createElementVNode)("button",{class:"cookie-consent-banner__button cookie-consent-banner__button--pill",onClick:t[2]||(t[2]=function(){return o.decline&&o.decline.apply(o,arguments)})}," Decline ")])],512),[[n.vShow,"primary"===o.screen]]),(0,n.withDirectives)((0,n.createElementVNode)("div",ro,[t[12]||(t[12]=(0,n.createElementVNode)("div",{class:"cookie-consent-banner__header"},[(0,n.createElementVNode)("h3",{class:"cookie-consent-banner__title"},"Cookie Preferences")],-1)),(0,n.createElementVNode)("div",no,[(0,n.createElementVNode)("div",oo,[(0,n.createElementVNode)("div",ao,[(0,n.createElementVNode)("label",io,[(0,n.withDirectives)((0,n.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=function(e){return o.preferences.analytics=e})},null,512),[[n.vModelCheckbox,o.preferences.analytics]]),t[8]||(t[8]=(0,n.createElementVNode)("span",{class:"cookie-consent-banner__toggle-slider"},null,-1)),t[9]||(t[9]=(0,n.createElementVNode)("span",{class:"cookie-consent-banner__toggle-label"},[(0,n.createElementVNode)("strong",null,"Analytics Cookies"),(0,n.createElementVNode)("small",null,"Help us understand how visitors interact with our website")],-1))])]),(0,n.createElementVNode)("div",lo,[(0,n.createElementVNode)("label",co,[(0,n.withDirectives)((0,n.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(e){return o.preferences.marketing=e})},null,512),[[n.vModelCheckbox,o.preferences.marketing]]),t[10]||(t[10]=(0,n.createElementVNode)("span",{class:"cookie-consent-banner__toggle-slider"},null,-1)),t[11]||(t[11]=(0,n.createElementVNode)("span",{class:"cookie-consent-banner__toggle-label"},[(0,n.createElementVNode)("strong",null,"Marketing Cookies"),(0,n.createElementVNode)("small",null,"Used to deliver personalized advertisements")],-1))])])])]),(0,n.createElementVNode)("div",so,[(0,n.createElementVNode)("button",{class:"cookie-consent-banner__button cookie-consent-banner__button--pill",onClick:t[5]||(t[5]=function(){return o.savePreferencesFromModal&&o.savePreferencesFromModal.apply(o,arguments)})}," Save Preferences ")])],512),[[n.vShow,"preferences"===o.screen]])])],2)),[[n.vShow,o.shouldRender]])}],["__scopeId","data-v-65f8774e"]]);function wo(e){return function(e){if(Array.isArray(e))return ko(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ko(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ko(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ko(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 xo={key:0,"aria-label":"Breadcrumb",class:"w-full"},So={class:"flex flex-wrap items-center gap-y-1 py-3 text-sm text-gray-500"},Eo=["href"],Co={key:1,"aria-current":"page",class:"truncate max-w-[70vw] font-medium text-gray-700"},Bo={key:2,class:"mx-2 h-4 w-4 shrink-0 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"};const No={props:{items:{type:Array,default:function(){return[]}}}},Io=(0,C.Z)(No,[["render",function(e,t,r,o,a,i){return r.items&&r.items.length?((0,n.openBlock)(),(0,n.createElementBlock)("nav",xo,[(0,n.createElementVNode)("ol",So,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.items,(function(e,o){return(0,n.openBlock)(),(0,n.createElementBlock)("li",{key:o,class:"flex items-center min-w-0"},[o<r.items.length-1?((0,n.openBlock)(),(0,n.createElementBlock)("a",{key:0,href:e.url,class:"whitespace-nowrap hover:text-primary-600 hover:underline"},(0,n.toDisplayString)(e.name),9,Eo)):((0,n.openBlock)(),(0,n.createElementBlock)("span",Co,(0,n.toDisplayString)(e.name),1)),o<r.items.length-1?((0,n.openBlock)(),(0,n.createElementBlock)("svg",Bo,wo(t[0]||(t[0]=[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M7.21 14.77a.75.75 0 0 1 .02-1.06L11.168 10 7.23 6.29a.75.75 0 1 1 1.04-1.08l4.5 4.25a.75.75 0 0 1 0 1.08l-4.5 4.25a.75.75 0 0 1-1.06-.02Z","clip-rule":"evenodd"},null,-1)])))):(0,n.createCommentVNode)("",!0)])})),128))])])):(0,n.createCommentVNode)("",!0)}]]),Lo={components:{Header:tn,Footer:Fn,Container:gn.Z,Banner:Yn,CookieConsentBanner:bo,Breadcrumbs:Io},computed:{breadcrumbs:function(){var e;return null!==(e=(0,a.qt)().props.breadcrumbs)&&void 0!==e?e:[]}}},Vo=(0,C.Z)(Lo,[["render",function(e,t,r,a,i,l){var c=(0,n.resolveComponent)("CookieConsentBanner"),s=(0,n.resolveComponent)("Banner"),u=(0,n.resolveComponent)("Header"),d=(0,n.resolveComponent)("Container"),f=(0,n.resolveComponent)("Breadcrumbs"),p=(0,n.resolveComponent)("Footer");return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createVNode)(c),(0,n.createVNode)(s),(0,n.createVNode)(d,{class:""},{default:(0,n.withCtx)((function(){return[(0,n.createVNode)(u)]})),_:1}),l.breadcrumbs.length?((0,n.openBlock)(),(0,n.createBlock)(d,{key:0,class:""},{default:(0,n.withCtx)((function(){return[(0,n.createVNode)(f,{items:l.breadcrumbs},null,8,["items"])]})),_:1})):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("main",null,[(0,n.renderSlot)(e.$slots,"default")]),(0,n.createVNode)(p)])}]])},78662:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var n=r(41916),o={class:"tracking-[.25px] text-base leading-[20px] font-normal text-[#49454F]"};var a=r(28415),i=r(93220),l=r(5121),c=r(87879);function s(){s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function d(e,t,r,o){var a=t&&t.prototype instanceof h?t:h,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:S(e,r,l)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var p={};function h(){}function m(){}function g(){}var v={};c(v,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(I([])));b&&b!==t&&r.call(b,a)&&(v=b);var w=g.prototype=h.prototype=Object.create(v);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,146 bytes, line 2
2))}function x(e,t){function o(n,a,i,l){var c=f(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==u(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=E(i,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return m.prototype=g,n(w,"constructor",{value:g,configurable:!0}),n(g,"constructor",{value:m,configurable:!0}),m.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(x.prototype),c(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(d(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(w),c(w,l,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,p):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),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),B(r),p}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e){return u="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},u(e)}function d(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}const f={components:{BaseCard:a.Z,ExplainerTag:i.default},props:{explainer:Object,isBookmarked:{type:Boolean,default:!1},bookmarkRoute:{type:String}},setup:function(){var e=(0,n.ref)("undefined"!=typeof window&&window.innerWidth<640),t=function(){e.value=window.innerWidth<640};return(0,n.onMounted)((function(){window.addEventListener("resize",t)})),(0,n.onUnmounted)((function(){window.removeEventListener("resize",t)})),{isMobile:e}},computed:{url:function(){return this.explainer.slug?route("climateChangeExplainers.show",this.explainer.slug):null},imageUrl:function(){return this.explainer.primaryImageUrl},timeToRead:function(){return"".concat(this.explainer.mins_to_read," minute read")},user:function(){return(0,c.qt)().props.auth.user}},methods:{notifyAlgoliaAboutClick:function(){var e=this.explainer.id;this.aa("clickedObjectIDs",{objectIDs:[e.toString()],eventName:"Explainer Clicked",index:this.climateChangeExplainersIndex})},toggleBookmark:function(){var e,t=this;return(e=s().mark((function e(){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.user&&("object"!==u(t.user)||t.user.id)){e.next=3;break}return window.location.href=route("login"),e.abrupt("return");case 3:return r=!t.isBookmarked,t.$emit("bookmarkUpdated",{id:t.explainer.id,is_bookmarked:r}),e.prev=5,e.next=8,l.Z.put(route(t.bookmarkRoute,t.explainer.id),{is_bookmarked:r});case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.error(e.t0);case 13:case"end":return e.stop()}}),e,null,[[5,10]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){d(a,n,o,i,l,"next",e)}function l(e){d(a,n,o,i,l,"throw",e)}i(void 0)}))})()}}};const p=(0,r(83744).Z)(f,[["render",function(e,t,r,a,i,l){var c=(0,n.resolveComponent)("BaseCard");return(0,n.openBlock)(),(0,n.createBlock)(c,{item:{title:r.explainer.title,image:l.imageUrl||"https://subjecttoclimate.nyc3.digitaloceanspaces.com/4365/conversions/adryan-ra-ysT-xbhhK2c-unsplash-thumb.jpg",subtitle:l.timeToRead},to:l.url,"is-bookmarked":r.isBookmarked,"show-stats":!1,"fallback-image":"/img/climate-explainers/placeholder.webp",view:a.isMobile?"mobile-grid":"desktop",onBookmark:l.toggleBookmark},{subtitle:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("p",o,(0,n.toDisplayString)(l.timeToRead),1)]})),_:1},8,["item","to","is-bookmarked","view","onBookmark"])}]])},93220:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var n=r(41916),o={class:"text-xl font-poppins bg-[#A4EBA2] rounded-b-xl px-[19.76px] py-[5px]"};const a={},i=(0,r(83744).Z)(a,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.renderSlot)(e.$slots,"default")])}]])},87202:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"overflow-hidden flex-shrink-0 bottom-0 left-0 pr-2 pl-1 -ml-1 -mb-1 absolute bg-white flex items-center justify-center rounded-tr-xl rounded-bl-xl text-sm z-10"},l={class:"w-full h-full resource-card duration-150 object-cover overflow-hidden rounded-bl-[13px] rounded-tr-xl rounded-tl-xl rounded-br-xl"},c=["src"],s=["href"],u={key:1,class:"line-clamp-3 mt-[12px] font-semibold"};var d=r(15973),f=r(76306),p=r(87879),h=r(72326),m=r(3754),g=r(47393);const v={components:{ItemCard:d.Z,AisHighlight:f.YE,Grades:m.Z},props:{resource:Object,isLoadedFromAlgolia:{default:!0,type:Boolean},position:{type:Number,default:null},queryUid:{type:String,default:null}},computed:{url:function(){if(this.resource.slug){var e;if(this.resource.is_external_resource?e=route("resources.show",this.resource.slug):this.resource.is_internal_resource?e=route("stc.show",this.resource.slug):this.resource.is_internal_unit_plan&&(e=route("stc.unit",this.resource.slug)),e&&this.queryUid){var t=e.includes("?")?"&":"?";return e+t+"queryUid="+encodeURIComponent(this.queryUid)}return e}return null},providerImageUrl:function(){var e;return null!==(e=this.resource.firstProviderCircleImageUrl)&&void 0!==e?e:this.resource.firstProviderImageUrl},imageUrl:function(){return this.resource.image_conversions&&this.resource.image_conversions[240]?this.resource.image_conversions[240]:this.resource.image_conversions&&this.resource.image_conversions[360]?this.resource.image_conversions[360]:this.resource.image}},methods:{notifyAlgoliaAboutClick:function(){var e=this.teachingMaterialsIndex||"teaching_materials";if((0,g.ob)({indexUid:e,objectId:String(this.resource.id),objectName:this.resource.title,position:this.position,queryUid:this.queryUid}),this.aa){var t=this.resource.id;this.aa("clickedObjectIDs",{objectIDs:[t.toString()],eventName:"External Resource Clicked",index:this.teachingMaterialsIndex})}},sortGradeBands:h.dP},setup:function(){var e,t,r,o,a=(0,n.inject)("initAndGetAlgoliaEventDispatcher")(),i=(0,p.qt)();return{aa:a,teachingMaterialsIndex:(null===(e=i.props.integrations)||void 0===e||null===(t=e.meilisearch)||void 0===t?void 0:t.teachingMaterialsIndex)||(null===(r=i.props.integrations)||void 0===r||null===(o=r.algolia)||void 0===o?void 0:o.teachingMaterialsIndex)||"teaching_materials"}}};const y=(0,r(83744).Z)(v,[["render",function(e,t,r,a,d,f){var p=(0,n.resolveComponent)("Grades"),h=(0,n.resolveComponent)("AisHighlight"),m=(0,n.resolveComponent)("PrimaryButton"),g=(0,n.resolveComponent)("ItemCard");return(0,n.openBlock)(),(0,n.createBlock)(g,{item:r.resource,imageUrl:f.imageUrl,bookmarkRoute:"tm.bookmark",actionUrl:f.url,onClick:t[1]||(t[1]=function(e){return f.notifyAlgoliaAboutClick()})},(0,n.createSlots)({badge:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,(0,n.toDisplayString)(r.resource.type),1)]})),image:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("img",{alt:"stc",class:"w-full h-full object-cover group-hover:scale-105 duration-150",src:f.imageUrl},null,8,c)])]})),bands:(0,n.withCtx)((function(){return[(0,n.createVNode)(p,{grades:r.resource.grades},null,8,["grades"])]})),title:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{href:f.url},[r.isLoadedFromAlgolia?((0,n.openBlock)(),(0,n.createBlock)(h,{key:0,attribute:"title",hit:r.resource,"class-names":{"ais-Highlight":"font-semibold line-clamp-3"}},null,8,["hit"])):((0,n.openBlock)(),(0,n.createElementBlock)("div",u,(0,n.toDisplayString)(r.resource.title),
21))],8,s)]})),tags:(0,n.withCtx)((function(){return[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.resource.subjects_list_short,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,class:"text-xs rounded-2xl bg-[#EEF1F6] px-2.5 py-0.5"},(0,n.toDisplayString)(e),1)})),128))]})),_:2},[f.url?{name:"action",fn:(0,n.withCtx)((function(){return[(0,n.createVNode)(m,{onClick:t[0]||(t[0]=function(e){return f.notifyAlgoliaAboutClick()}),href:f.url},{default:(0,n.withCtx)((function(){return o(t[2]||(t[2]=[(0,n.createElementVNode)("span",{class:"capitalize"},"View Resource",-1)]))})),_:1},8,["href"])]})),key:"0"}:void 0]),1032,["item","imageUrl","actionUrl"])}]])},90099:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var n=r(41916),o={class:""},a={key:0,class:"mb-4"},i={class:"-ml-2 flex flex-wrap"},l=["onClick"],c={class:"text-start flex-shrink-[100]"},s={key:1,class:"mb-4"},u={class:"-ml-2 flex flex-wrap"},d={class:"text-start flex-shrink-[100]"},f={key:2,class:"mb-4"},p={class:"-ml-2 flex flex-wrap"},h={class:"text-start flex-shrink-[100]"},m={key:3,class:"mb-4"},g={class:"-ml-2 flex flex-wrap"},v={class:"text-start flex-shrink-[100]"},y={key:4,class:"mb-4"},b={class:"-ml-2 flex flex-wrap"},w=["onClick"],k={class:"text-start flex-shrink-[100]"},x={key:5,class:"mb-4"},S={class:"-ml-2 flex flex-wrap"},E=["onClick"],C={class:"text-start flex-shrink-[100]"},B={key:6,class:"mb-4"},N={class:"-ml-2 flex flex-wrap"},I=["onClick"],L={class:"text-start flex-shrink-[100]"};const V={props:{selectedFacets:{type:Object,required:!0},subjectsFilterString:{type:String,default:""},standardsFilterString:{type:String,default:""},regionsFilterString:{type:String,default:""},whiteBackground:{type:Boolean,default:!1}},emits:["filter-change"],computed:{selectedGrades:function(){return this.selectedFacets.grades||[]},selectedTypes:function(){return this.selectedFacets.type||[]},selectedProviders:function(){return this.selectedFacets["teachable.provider.name"]||[]},selectedLanguages:function(){return this.selectedFacets.languages||[]},displayedSubject:function(){if(!this.subjectsFilterString)return null;var e=this.subjectsFilterString.match(/subjects\.level3='([^']+)'/);if(e)return this.formatKeyword(e[1]);var t=this.subjectsFilterString.match(/subjects\.level2='([^']+)'/);if(t)return this.formatKeyword(t[1]);var r=this.subjectsFilterString.match(/subjects\.level1='([^']+)'/);return r?this.formatKeyword(r[1]):null},displayedStandard:function(){if(!this.standardsFilterString)return null;var e=this.standardsFilterString.match(/performances='([^']+)'/);if(e)return this.formatKeyword(e[1]);var t=this.standardsFilterString.match(/standards='([^']+)'/);return t?this.formatKeyword(t[1]):null},displayedRegion:function(){if(!this.regionsFilterString)return null;for(var e=5;e>=1;e--){var t=new RegExp("regions\\.level".concat(e,"='([^']+)'")),r=this.regionsFilterString.match(t);if(r)return this.formatKeyword(r[1])}return null}},methods:{formatKeyword:function(e){var t=e.split(">");return t[t.length-1].trim()},removeGrade:function(e){var t=this.selectedGrades.filter((function(t){return t!==e}));this.$emit("filter-change",{attribute:"grades",values:t})},removeType:function(e){var t=this.selectedTypes.filter((function(t){return t!==e}));this.$emit("filter-change",{attribute:"type",values:t})},removeProvider:function(e){var t=this.selectedProviders.filter((function(t){return t!==e}));this.$emit("filter-change",{attribute:"teachable.provider.name",values:t})},removeLanguage:function(e){var t=this.selectedLanguages.filter((function(t){return t!==e}));this.$emit("filter-change",{attribute:"languages",values:t})},clearSubjects:function(){this.$emit("filter-change",{attribute:"subjects",filterString:""})},clearStandards:function(){this.$emit("filter-change",{attribute:"standards",filterString:""})},clearRegions:function(){this.$emit("filter-change",{attribute:"regions",filterString:""})}}};const T=(0,r(83744).Z)(V,[["render",function(e,t,r,V,T,_){return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[_.selectedGrades.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",a,[t[4]||(t[4]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Grades",-1)),(0,n.createElementVNode)("div",i,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.selectedGrades,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:e,onClick:function(t){return _.removeGrade(e)}
2,class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",c,(0,n.toDisplayString)(e),1),t[3]||(t[3]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,l)})),128))])])):(0,n.createCommentVNode)("",!0),_.displayedSubject?((0,n.openBlock)(),(0,n.createElementBlock)("div",s,[t[6]||(t[6]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Subjects",-1)),(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=function(){return _.clearSubjects&&_.clearSubjects.apply(_,arguments)}),class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",d,(0,n.toDisplayString)(_.displayedSubject),1),t[5]||(t[5]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],2)])])):(0,n.createCommentVNode)("",!0),_.displayedStandard?((0,n.openBlock)(),(0,n.createElementBlock)("div",f,[t[8]||(t[8]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Standards",-1)),(0,n.createElementVNode)("div",p,[(0,n.createElementVNode)("button",{onClick:t[1]||(t[1]=function(){return _.clearStandards&&_.clearStandards.apply(_,arguments)}),class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",h,(0,n.toDisplayString)(_.displayedStandard),1),t[7]||(t[7]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],2)])])):(0,n.createCommentVNode)("",!0),_.displayedRegion?((0,n.openBlock)(),(0,n.createElementBlock)("div",m,[t[10]||(t[10]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Locations",-1)),(0,n.createElementVNode)("div",g,[(0,n.createElementVNode)("button",{onClick:t[2]||(t[2]=function(){return _.clearRegions&&_.clearRegions.apply(_,arguments)}),class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",v,(0,n.toDisplayString)(_.displayedRegion),1),t[9]||(t[9]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],2)])])):(0,n.createCommentVNode)("",!0),_.selectedTypes.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",y,[t[12]||(t[12]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Resource Type",-1)),(0,n.createElementVNode)("div",b,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.selectedTypes,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:e,onClick:function(t){return _.removeType(e)},class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",k,(0,n.toDisplayString)(e),1),t[11]||(t[11]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,w)})),128))])])):(0,n.createCommentVNode)("",!0),_.selectedProviders.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",x,[t[14]||(t[14]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Providers",-1)),(0,n.createElementVNode)("div",S,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.selectedProviders,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:e,onClick:function(t){return _.removeProvider(e)}
2,class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",C,(0,n.toDisplayString)(e),1),t[13]||(t[13]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,E)})),128))])])):(0,n.createCommentVNode)("",!0),_.selectedLanguages.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",B,[t[16]||(t[16]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Languages",-1)),(0,n.createElementVNode)("div",N,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.selectedLanguages,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:e,onClick:function(t){return _.removeLanguage(e)},class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",L,(0,n.toDisplayString)(e),1),t[15]||(t[15]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,I)})),128))])])):(0,n.createCommentVNode)("",!0)])}]])},73819:(e,t,r)=>{r.r(t),r.d(t,{default:()=>z});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"px-4 pt-8"},l={class:"text-xl sm:text-2xl font-bold mb-6"},c={class:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2 mb-6"},s={class:"order-2 lg:order-1 relative w-full sm:min-w-[180px] sm:w-auto"},u=["value"],d={class:"order-3 lg:order-2 w-full sm:min-w-[140px] sm:w-auto"},f=["value"],p={class:"order-1 lg:order-3 flex-1 flex items-center pr-4 overflow-hidden border border-gray-200 focus-within:border-gray-400 duration-150 rounded-lg"},h={class:"hidden sm:flex items-stretch gap-x-1 border-b border-gray-200"},m=["onClick"],g={class:"flex flex-col items-center justify-center w-full text-sm"},v={class:"text-center break-words leading-tight"};var y=r(68300),b=r(49613),w=r(92881),k=r(6351),x=r(18758),S=r(23270),E=r(17129),C=r(46365),B=r(87879),N=r(15229),I=r(47393),L=r(23044),V=r(91440),T=r(72326);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function A(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}
vendor: 5,294 bytes, line 2
2finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||D(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 D(e,t){if(e){if("string"==typeof e)return O(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)?O(e,t):void 0}}function O(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}function F(){F=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new C(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(B([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==_(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return N()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function B(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=B,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},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),E(r),d}},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 o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function P(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==_(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const G={components:{MainLayout:y.Z,Container:b.Z,TeachingMaterialsContentDirect:w.default,LessonPlansContentDirect:k.default,ClimateChangeContentDirect:x.default,ProfessionalDevelopmentContentDirect:S.default,TeacherGuidesContentDirect:E.default,NewsContentDirect:C.default},name:"UniversalSearchPage",data:function(){var e="instance_"+Date.now()+"_"+Math.random().toString(36).substr(2,9);console.log("[SEARCH-DEBUG] ==================== UniversalSearchPage data() INITIALIZING ====================",{timestamp:(new Date).toISOString(),location:"undefined"!=typeof window?window.location.href:"ssr",searchParams:"undefined"!=typeof window?window.location.search:"",componentInstanceId:e,note:"This means the component is being created/recreated from scratch. If you see this multiple times during one search action, the component is being destroyed and recreated (full page reload behavior)."});var t={"lesson-plans":"Lesson Plans, Units & Activities","teaching-resources":"Teaching Resources","climate-change":"Climate Change Explainers","professional-development":"Professional Development","teacher-guides":"Teacher Guides",news:"News for Students"},r=new URLSearchParams("undefined"!=typeof window?window.location.search:""),n=r.get("tab"),o=n&&t[n]?t[n]:"Lesson Plans, Units & Activities",a=r.get("field")||"all";
2return console.log("[SEARCH-DEBUG] Tab initialization:",{urlTabParam:n,initialTab:o,initialField:a}),{componentInstanceId:e,searchQuery:"",localSearchQuery:"",activeTab:o,tabSlugMap:t,tabNameToSlug:{"Lesson Plans, Units & Activities":"lesson-plans","Teaching Resources":"teaching-resources","Climate Change Explainers":"climate-change","Professional Development":"professional-development","Teacher Guides":"teacher-guides","News for Students":"news"},resourceTabs:[{name:"Lesson Plans, Units & Activities",count:"∞",theme:"rgb(242, 250, 242)"},{name:"Teaching Resources",count:"∞",theme:"rgb(242, 247, 250)"},{name:"Climate Change Explainers",count:"∞",theme:"rgb(255, 245, 240)"},{name:"Professional Development",count:"∞",theme:"rgb(244, 242, 249)"},{name:"Teacher Guides",count:"∞",theme:"rgb(255, 252, 241)"},{name:"News for Students",count:"∞",theme:"rgb(240, 246, 254)"}],filters:["Filter","Filter","Filter","Filter","Filter","Filter"],selectedField:a,availableFields:[],multiSearchResults:{"Lesson Plans, Units & Activities":null,"Teaching Resources":null,"Climate Change Explainers":null,"Professional Development":null,"Teacher Guides":null,"News for Students":null},isFederatedSearchLoading:!1}},computed:{activeTabTheme:function(){var e=this,t=this.resourceTabs.find((function(t){return t.name===e.activeTab})),r=t?t.theme:"white";return console.log("[SEARCH-DEBUG] COMPUTED activeTabTheme",{activeTab:this.activeTab,theme:r,timestamp:(new Date).toISOString()}),r},currentTabComponent:function(){var e={"Teaching Resources":"TeachingMaterialsContentDirect","Lesson Plans, Units & Activities":"LessonPlansContentDirect","Climate Change Explainers":"ClimateChangeContentDirect","Professional Development":"ProfessionalDevelopmentContentDirect","Teacher Guides":"TeacherGuidesContentDirect","News for Students":"NewsContentDirect"}[this.activeTab]||"TeachingMaterialsContentDirect";return console.log("[SEARCH-DEBUG] COMPUTED currentTabComponent",{activeTab:this.activeTab,component:e,timestamp:(new Date).toISOString()}),e},fieldsByResourceType:function(){return{"Lesson Plans, Units & Activities":[{value:"title",label:"Title"},{value:"synopsis",label:"Description"},{value:"keywords",label:"Keywords"},{value:"all_subjects",label:"Subjects"},{value:"type",label:"Types"},{value:"standards.".concat(this.tenantSlug,".codes"),label:"Standards"}],"Teaching Resources":[{value:"title",label:"Title"},{value:"synopsis",label:"Description"},{value:"keywords",label:"Keywords"},{value:"all_subjects",label:"Subjects"},{value:"type",label:"Types"},{value:"standards.".concat(this.tenantSlug,".codes"),label:"Standards"}],"Climate Change Explainers":[{value:"title",label:"Title"}],"Professional Development":[{value:"name",label:"Title"},{value:"description",label:"Description"},{value:"regions",label:"Regions"},{value:"providers",label:"Providers"},{value:"subjects",label:"Subjects"},{value:"type",label:"Types"}],"Teacher Guides":[{value:"title",label:"Title"},{value:"keywords",label:"Keywords"},{value:"excerpt",label:"Description"}],"News for Students":[{value:"title",label:"Title"},{value:"description",label:"Description"}]}},selectedFieldLabel:function(){var e=this;if("all"===this.selectedField)return"All Fields";var t=(this.fieldsByResourceType[this.activeTab]||[]).find((function(t){return t.value===e.selectedField}));return t?t.label:"All Fields"},tenantId:function(){return(0,B.qt)().props.tenantId},tenantSlug:function(){return(0,B.qt)().props.tenantSlug}},methods:{logRender:function(){return console.log("[SEARCH-DEBUG] ==================== TEMPLATE RENDERING ====================",{componentInstanceId:this.componentInstanceId,state:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab,selectedField:this.selectedField},timestamp:(new Date).toISOString(),note:"Component template is being re-rendered"}),!0},performSearch:function(){var e=this;console.log("[SEARCH-DEBUG] ==================== performSearch() CALLED ====================",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),currentState:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab,selectedField:this.selectedField},url:window.location.href,existingTimeout:!!this.timeout,stack:(new Error).stack,note:"User initiated a search. Will set searchQuery = localSearchQuery after 1.5s delay"}
2),clearTimeout(this.timeout),console.log("[SEARCH-DEBUG] performSearch() timeout cleared",{timestamp:(new Date).toISOString()}),this.timeout=setTimeout((function(){console.log("[SEARCH-DEBUG] ==================== performSearch() TIMEOUT EXECUTING (after 1.5s) ====================",{componentInstanceId:e.componentInstanceId,timestamp:(new Date).toISOString(),willSetSearchQueryTo:e.localSearchQuery,currentSearchQuery:e.searchQuery,activeTab:e.activeTab,note:"About to trigger searchQuery watcher by setting searchQuery = localSearchQuery"}),e.searchQuery=e.localSearchQuery,console.log("[SEARCH-DEBUG] performSearch() searchQuery SET - this will trigger the searchQuery watcher",{componentInstanceId:e.componentInstanceId,timestamp:(new Date).toISOString(),newSearchQuery:e.searchQuery,activeTab:e.activeTab})}),1500),console.log("[SEARCH-DEBUG] performSearch() timeout scheduled",{timestamp:(new Date).toISOString()})},clearSearch:function(){console.log("[SEARCH-DEBUG] ==================== clearSearch() CALLED ====================",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),before:{localSearchQuery:this.localSearchQuery,searchQuery:this.searchQuery,activeTab:this.activeTab},stack:(new Error).stack}),this.localSearchQuery="",this.searchQuery="",console.log("[SEARCH-DEBUG] clearSearch() COMPLETED",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),after:{localSearchQuery:this.localSearchQuery,searchQuery:this.searchQuery,activeTab:this.activeTab}})},handleResourceTypeChange:function(){console.log("[SEARCH-DEBUG] ==================== handleResourceTypeChange() CALLED ====================",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),activeTab:this.activeTab,currentSelectedField:this.selectedField,currentAvailableFields:this.availableFields,stack:(new Error).stack}),this.availableFields=this.fieldsByResourceType[this.activeTab]||[],console.log("[SEARCH-DEBUG] handleResourceTypeChange() availableFields UPDATED",{timestamp:(new Date).toISOString(),newAvailableFields:this.availableFields});var e=this.selectedField,t=this.fieldsByResourceType[this.activeTab]||[];console.log("[SEARCH-DEBUG] handleResourceTypeChange() checking field compatibility",{timestamp:(new Date).toISOString(),currentField:e,newTabFields:t,fieldExistsInNewTab:t.some((function(t){return t.value===e}))}),"all"===e||t.some((function(t){return t.value===e}))?console.log("[SEARCH-DEBUG] handleResourceTypeChange() KEEPING current field",{timestamp:(new Date).toISOString(),selectedField:this.selectedField}):(console.log('[SEARCH-DEBUG] handleResourceTypeChange() RESETTING field to "all"',{timestamp:(new Date).toISOString(),reason:"Current field not compatible with new tab"}),this.selectedField="all"),console.log("[SEARCH-DEBUG] handleResourceTypeChange() COMPLETED",{timestamp:(new Date).toISOString(),finalState:{activeTab:this.activeTab,selectedField:this.selectedField,availableFields:this.availableFields}})},handleTabClick:function(e){console.log("[SEARCH-DEBUG] ==================== handleTabClick() CALLED ====================",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),clickedTab:e,currentActiveTab:this.activeTab,currentSearchQuery:this.searchQuery,currentSelectedField:this.selectedField,stack:(new Error).stack,note:"User clicked on a tab button"}),this.activeTab=e,console.log("[SEARCH-DEBUG] handleTabClick() activeTab SET - watcher will update URL",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),newActiveTab:this.activeTab}),this.handleResourceTypeChange(),console.log("[SEARCH-DEBUG] handleTabClick() COMPLETED",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),finalActiveTab:this.activeTab})},updateTabCount:function(e){var t=this;console.log("[SEARCH-DEBUG] updateTabCount() CALLED",{timestamp:(new Date).toISOString(),count:e,activeTab:this.activeTab});var r=this.resourceTabs.findIndex((function(e){return e.name===t.activeTab}));-1!==r?(this.resourceTabs[r]=U(U({},this.resourceTabs[r]),{},{count:e}
2),console.log("[SEARCH-DEBUG] updateTabCount() tab count UPDATED",{timestamp:(new Date).toISOString(),tabIndex:r,tabName:this.activeTab,newCount:e})):console.log("[SEARCH-DEBUG] updateTabCount() tab NOT FOUND",{timestamp:(new Date).toISOString(),activeTab:this.activeTab,availableTabs:this.resourceTabs.map((function(e){return e.name}))})},performMultiSearch:function(){var e,t=arguments,r=this;return(e=F().mark((function e(){var n,o,a,i,l,c,s,u,d,f,p,h,m,g,v,y,b,w,k,x,S,E,C,_,A,j,D,O;return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=t.length>0&&void 0!==t[0]?t[0]:"",console.log("[UNIVERSAL-SEARCH] performMultiSearch() CALLED",{searchTerm:v,timestamp:(new Date).toISOString()}),v&&(0,L.U)({tenantId:r.tenantId,query:v,filters:{}}),y=(null===(n=(0,B.qt)().props.integrations)||void 0===n||null===(o=n.meilisearch)||void 0===o?void 0:o.host)||window.MEILISEARCH_HOST||"http://localhost:7700",b=(null===(a=(0,B.qt)().props.integrations)||void 0===a||null===(i=a.meilisearch)||void 0===i?void 0:i.key)||window.MEILISEARCH_KEY||"",w=(0,I.wA)(),k=new N.MeiliSearch({host:y,apiKey:b,requestConfig:{headers:{"X-MS-USER-ID":w}}}),x=(null===(l=(0,B.qt)().props.integrations)||void 0===l||null===(c=l.meilisearch)||void 0===c?void 0:c.teachingMaterialsIndex)||"teaching_materials",S=(null===(s=(0,B.qt)().props.integrations)||void 0===s||null===(u=s.meilisearch)||void 0===u?void 0:u.climateExplainersIndex)||"climate_explainers",E=(null===(d=(0,B.qt)().props.integrations)||void 0===d||null===(f=d.meilisearch)||void 0===f?void 0:f.pdIndex)||"opportunities",C=(null===(p=(0,B.qt)().props.integrations)||void 0===p||null===(h=p.meilisearch)||void 0===h?void 0:h.teacherGuidesIndex)||"teacher_guides",_=(null===(m=(0,B.qt)().props.integrations)||void 0===m||null===(g=m.meilisearch)||void 0===g?void 0:g.newsIndex)||"news",A=r.tenantId,j=(0,T.Bl)(v),D=[{indexUid:x,q:j,limit:12,filter:"is_live=true AND (is_internal_resource=true OR is_internal_unit_plan=true) AND tenantIds=".concat(A),facets:["grades","subjects.level1","subjects.level2","subjects.level3","standards.".concat(r.tenantSlug,".standards"),"standards.".concat(r.tenantSlug,".performances"),"type","is_internal_unit_plan","teachable.provider.name"]},{indexUid:x,q:j,limit:12,filter:"is_live=true AND is_external_resource=true AND tenantIds=".concat(A),facets:["grades","subjects.level1","subjects.level2","subjects.level3","standards.".concat(r.tenantSlug,".standards"),"standards.".concat(r.tenantSlug,".performances"),"type","regions.level1","teachable.provider.name"]},{indexUid:S,q:j,limit:12,filter:"categoryId IN [".concat(r.explainerCategories.map((function(e){return e.id})).join(","),"]"),facets:[]},{indexUid:E,q:j,limit:12,filter:"enabled=1 AND (publish_until_is_null=1 OR publish_until_timestamp > ".concat(Math.floor(Date.now()/1e3),") AND tenant_ids IN [").concat(A,"]"),facets:["type","formats","cost","months","credit","grades","subjects","regions.level1","regions.level2","regions.level3","regions.level4","regions.level5"]},{indexUid:C,q:j,limit:12,facets:[]},{indexUid:_,q:j,limit:12,filter:"categoryIds IN [".concat(r.newsCategories.map((function(e){return e.id})).join(","),"]"),facets:[]}],r.isFederatedSearchLoading=!0,e.prev=16,console.log("[UNIVERSAL-SEARCH] Sending multi-search request...",D),e.next=20,k.multiSearch({queries:D});case 20:O=e.sent,console.log("[UNIVERSAL-SEARCH] Multi-search results received:",O),(0,V.p)({tenantId:A,indexes:D.map((function(e){return e.indexUid}))}),r.multiSearchResults={"Lesson Plans, Units & Activities":O.results[0],"Teaching Resources":O.results[1],"Climate Change Explainers":O.results[2],"Professional Development":O.results[3],"Teacher Guides":O.results[4],"News for Students":O.results[5]},r.resourceTabs.forEach((function(e,t){var r=O.results[t];r&&(e.count=r.estimatedTotalHits||r.totalHits||0)})),console.log("[UNIVERSAL-SEARCH] Multi-search complete, results stored",r.multiSearchResults),e.next=31;break;case 28:e.prev=28,e.t0=e.catch(16),console.error("[UNIVERSAL-SEARCH] Multi-search error:",e.t0);case 31:return e.prev=31,r.isFederatedSearchLoading=!1,e.finish(31);case 34:case"end":return e.stop()}}),e,null,[[16,28,31,34]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){P(a,n,o,i,l,"next",e)}function l(e){P(a,n,o,i,l,"throw",e)}i(void 0)}))})()}}
2,created:function(){console.log("[SEARCH-DEBUG] ==================== UniversalSearchPage created() ====================",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),state:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab,selectedField:this.selectedField},location:"undefined"!=typeof window?window.location.href:"ssr",note:"Component instance is created but not yet mounted to DOM"}),this.handleResourceTypeChange(),console.log("[SEARCH-DEBUG] UniversalSearchPage created() after handleResourceTypeChange",{componentInstanceId:this.componentInstanceId,availableFields:this.availableFields,timestamp:(new Date).toISOString()})},mounted:function(){var e,t,r=this;console.log("[SEARCH-DEBUG] 🚀🚀🚀 DEBUGGING GUIDE 🚀🚀🚀"),console.log("[SEARCH-DEBUG] Look for these patterns to diagnose the issue:"),console.log('[SEARCH-DEBUG] 1. FULL PAGE RELOAD: If you see "data() INITIALIZING" or "beforeUnmount()" during a search, the component is being destroyed/recreated'),console.log('[SEARCH-DEBUG] 2. TAB RESET: Track the "activeTab" value through watchers - if it changes unexpectedly, check what triggered it'),console.log('[SEARCH-DEBUG] 3. ROUTER CALLS: Look for "router.get" calls and their callbacks to see if they are preserving state correctly'),console.log("[SEARCH-DEBUG] 4. COMPONENT INSTANCE: Each component gets a unique componentInstanceId - if this ID changes during a search, the component was recreated"),console.log("[SEARCH-DEBUG] 5. WATCH THE FLOW: Search button -> performSearch() -> searchQuery watcher -> router.get -> Inertia events"),console.log("[SEARCH-DEBUG] =================================================================================="),console.log("[SEARCH-DEBUG] ==================== UniversalSearchPage mounted() START ====================",{componentInstanceId:this.componentInstanceId,timestamp:(new Date).toISOString(),location:"undefined"!=typeof window?window.location.href:"ssr",searchParams:"undefined"!=typeof window?window.location.search:"",state:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab},props:{searchTerm:this.searchTerm,newsCategories:null===(e=this.newsCategories)||void 0===e?void 0:e.length,explainerCategories:null===(t=this.explainerCategories)||void 0===t?void 0:t.length},note:"Component is now mounted in the DOM"}),window.addEventListener("popstate",(function(e){console.log("[SEARCH-DEBUG] BROWSER popstate EVENT (back/forward navigation)",{event:e,state:e.state,url:window.location.href,timestamp:(new Date).toISOString()})})),window.addEventListener("beforeunload",(function(e){console.log("[SEARCH-DEBUG] BROWSER beforeunload EVENT (page is about to unload)",{event:e,url:window.location.href,timestamp:(new Date).toISOString()})})),B.Nd.on("start",(function(e){var t,r,n,o,a,i,l,c,s,u;console.log("[SEARCH-DEBUG] ==================== Inertia navigation START ====================",{event:e,url:(null==e||null===(t=e.detail)||void 0===t||null===(r=t.visit)||void 0===r?void 0:r.url)||"N/A",method:(null==e||null===(n=e.detail)||void 0===n||null===(o=n.visit)||void 0===o?void 0:o.method)||"N/A",data:(null==e||null===(a=e.detail)||void 0===a||null===(i=a.visit)||void 0===i?void 0:i.data)||{},preserveState:null==e||null===(l=e.detail)||void 0===l||null===(c=l.visit)||void 0===c?void 0:c.preserveState,replace:null==e||null===(s=e.detail)||void 0===s||null===(u=s.visit)||void 0===u?void 0:u.replace,timestamp:(new Date).toISOString()})})),B.Nd.on("progress",(function(e){var t;console.log("[SEARCH-DEBUG] Inertia navigation PROGRESS",{event:e,progress:(null==e||null===(t=e.detail)||void 0===t?void 0:t.progress)||"N/A",timestamp:(new Date).toISOString()})})),B.Nd.on("finish",(function(e){var t,n;console.log("[SEARCH-DEBUG] ==================== Inertia navigation FINISH ====================",{event:e,url:(null==e||null===(t=e.detail)||void 0===t||null===(n=t.visit)||void 0===n?void 0:n.url)||"N/A",currentActiveTab:r.activeTab,currentSearchQuery:r.searchQuery,timestamp:(new Date).toISOString()})})),B.Nd.on("success",(function(e){var t,n,o;
2console.log("[SEARCH-DEBUG] ==================== Inertia navigation SUCCESS ====================",{event:e,url:(null==e||null===(t=e.detail)||void 0===t||null===(n=t.visit)||void 0===n?void 0:n.url)||"N/A",page:null==e||null===(o=e.detail)||void 0===o?void 0:o.page,currentActiveTab:r.activeTab,currentSearchQuery:r.searchQuery,timestamp:(new Date).toISOString()})})),B.Nd.on("error",(function(e){var t;console.log("[SEARCH-DEBUG] ==================== Inertia navigation ERROR ====================",{event:e,errors:(null==e||null===(t=e.detail)||void 0===t?void 0:t.errors)||"N/A",timestamp:(new Date).toISOString()})})),B.Nd.on("navigate",(function(e){var t;console.log("[SEARCH-DEBUG] ==================== Inertia NAVIGATE event ====================",{event:e,page:null==e||null===(t=e.detail)||void 0===t?void 0:t.page,timestamp:(new Date).toISOString()})})),B.Nd.on("before",(function(e){var t;console.log("[SEARCH-DEBUG] ==================== Inertia BEFORE event ====================",{event:e,visit:null==e||null===(t=e.detail)||void 0===t?void 0:t.visit,timestamp:(new Date).toISOString()})}));var n=new URLSearchParams(window.location.search),o=(0,T.O9)(n),a=n.get("tab"),i=n.get("section");console.log("[SEARCH-DEBUG] ==================== UniversalSearchPage mounted() URL params PARSING ====================",{componentInstanceId:this.componentInstanceId,rawUrl:window.location.href,searchString:window.location.search,parsedParams:{termFromUrl:o,tabFromUrl:a,sectionFromUrl:i},propsSearchTerm:this.searchTerm,currentState:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab},timestamp:(new Date).toISOString()}),o?(console.log("[SEARCH-DEBUG] UniversalSearchPage mounted() setting search from URL",{term:o,timestamp:(new Date).toISOString()}),this.searchQuery=o,this.localSearchQuery=o):this.searchTerm&&(console.log("[SEARCH-DEBUG] UniversalSearchPage mounted() setting search from props",{term:this.searchTerm,timestamp:(new Date).toISOString()}),this.searchQuery=this.searchTerm,this.localSearchQuery=this.searchTerm);var l={teaching:"teaching-resources",guides:"teacher-guides",climate:"climate-change",professional:"professional-development",news:"news",all:"lesson-plans"};if(i&&l[i]){var c=l[i],s=this.tabSlugMap[c];if(console.log("[SEARCH-DEBUG] UniversalSearchPage mounted() converting section to tab",{sectionFromUrl:i,tabSlug:c,targetTab:s,timestamp:(new Date).toISOString()}),s&&this.activeTab!==s){this.activeTab=s,this.handleResourceTypeChange();var u=new URL(window.location);u.searchParams.delete("section"),u.searchParams.set("tab",c),window.history.replaceState({},"",u)}}console.log("[SEARCH-DEBUG] ==================== UniversalSearchPage mounted() END ====================",{componentInstanceId:this.componentInstanceId,finalState:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab,selectedField:this.selectedField},url:window.location.href,timestamp:(new Date).toISOString(),note:"Component is fully initialized and ready. Federated search will be triggered by searchQuery watcher if searchQuery was set, or will be called now if searchQuery is still empty."}),this.searchQuery||o||(console.log("[SEARCH-DEBUG] No search term in URL, performing initial empty federated search"),this.performMultiSearch(""))},props:{newsCategories:{type:Array,default:function(){return[]}},explainerCategories:{type:Array,default:function(){return[]}},bookmarkedNewsIds:{type:Array,default:function(){return[]}},bookmarkedTeacherGuidesIds:{type:Array,default:function(){return[]}},bookmarkedProfessionalOpportunitiesIds:{type:Array,default:function(){return[]}},bookmarkedExplainerIds:{type:Array,default:function(){return[]}},bookmarkedTeachingMaterialIds:{type:Array,default:function(){return[]}},searchTerm:{type:String,default:""}},watch:{searchQuery:function(e,t){var r=this;console.log("[SEARCH-DEBUG] ==================== WATCHER searchQuery TRIGGERED ====================",{componentInstanceId:this.componentInstanceId,from:t,to:e,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab,timestamp:(new Date).toISOString(),stack:(new Error).stack}
2),console.log("[SEARCH-DEBUG] WATCHER searchQuery setting localSearchQuery",{willSetTo:e||"",timestamp:(new Date).toISOString()}),this.localSearchQuery=e||"",console.log("[SEARCH-DEBUG] WATCHER searchQuery localSearchQuery SET",{newLocalSearchQuery:this.localSearchQuery,timestamp:(new Date).toISOString()}),this.performMultiSearch(e||"");var n=new URLSearchParams(window.location.search).get("term"),o=this.searchQuery||null;if(console.log("[SEARCH-DEBUG] WATCHER searchQuery URL check",{currentTermInUrl:n,newTerm:o,areEqual:n===o,shouldSkipNavigation:n===o,currentUrl:window.location.href,timestamp:(new Date).toISOString()}),n!==o){var a=this.searchQuery?{term:this.searchQuery}:{},i=this.tabNameToSlug[this.activeTab];i&&"lesson-plans"!==i&&(a.tab=i),this.selectedField&&"all"!==this.selectedField&&(a.field=this.selectedField);var l,c=["term","q","tab","field"],s=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=D(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},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,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw a}}}}(new URLSearchParams(window.location.search).entries());try{for(s.s();!(l=s.n()).done;){var u=j(l.value,2),d=u[0],f=u[1];c.includes(d)||a[d]||(a[d]=f)}}catch(e){s.e(e)}finally{s.f()}console.log("[SEARCH-DEBUG] WATCHER searchQuery ABOUT TO CALL router.get",{pathname:window.location.pathname,query:a,activeTab:this.activeTab,options:{preserveState:!0,replace:!0},currentUrl:window.location.href,willNavigateTo:window.location.pathname+"?"+new URLSearchParams(a).toString(),timestamp:(new Date).toISOString(),note:"Query now includes both term AND tab (if not default tab)"}),B.Nd.get(window.location.pathname,a,{preserveState:!0,replace:!0,onStart:function(){console.log("[SEARCH-DEBUG] WATCHER searchQuery router.get onStart callback",{timestamp:(new Date).toISOString()})},onSuccess:function(){console.log("[SEARCH-DEBUG] WATCHER searchQuery router.get onSuccess callback",{timestamp:(new Date).toISOString(),newUrl:window.location.href})},onError:function(e){console.log("[SEARCH-DEBUG] WATCHER searchQuery router.get onError callback",{errors:e,timestamp:(new Date).toISOString()})},onFinish:function(){console.log("[SEARCH-DEBUG] WATCHER searchQuery router.get onFinish callback",{timestamp:(new Date).toISOString(),finalUrl:window.location.href,finalActiveTab:r.activeTab})}}),console.log("[SEARCH-DEBUG] WATCHER searchQuery router.get INVOKED (async, callbacks will fire later)",{timestamp:(new Date).toISOString()})}else console.log("[SEARCH-DEBUG] WATCHER searchQuery SKIPPING router.get (URL already matches)",{timestamp:(new Date).toISOString(),reason:"URL term already matches new search query"})},activeTab:function(e,t){console.log("[SEARCH-DEBUG] ==================== WATCHER activeTab TRIGGERED ====================",{componentInstanceId:this.componentInstanceId,from:t,to:e,searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,selectedField:this.selectedField,timestamp:(new Date).toISOString(),stack:(new Error).stack});var r=this.tabNameToSlug[e],n=new URL(window.location),o=n.searchParams.get("tab");if(console.log("[SEARCH-DEBUG] WATCHER activeTab URL check",{currentTabSlug:o,newTabSlug:r,areEqual:o===r,currentUrl:window.location.href,timestamp:(new Date).toISOString()}),o!==r){r?n.searchParams.set("tab",r):n.searchParams.delete("tab");for(var a=["term","tab","field"],i=0,l=A(n.searchParams.keys());i<l.length;i++){var c=l[i];a.includes(c)||n.searchParams.delete(c)}window.history.replaceState({},"",n),console.log("[SEARCH-DEBUG] WATCHER activeTab URL updated WITHOUT RELOAD",{oldUrl:window.location.href,newUrl:n.toString(),tabSlug:r,timestamp:(new Date).toISOString()})}
2else console.log("[SEARCH-DEBUG] WATCHER activeTab SKIPPING URL update (URL already matches)",{timestamp:(new Date).toISOString(),reason:"URL tab slug already matches new activeTab"})},localSearchQuery:function(e,t){console.log("[SEARCH-DEBUG] ==================== WATCHER localSearchQuery TRIGGERED ====================",{from:t,to:e,searchQuery:this.searchQuery,activeTab:this.activeTab,timestamp:(new Date).toISOString(),stack:(new Error).stack})},searchTerm:function(e,t){console.log("[SEARCH-DEBUG] ==================== WATCHER searchTerm PROP CHANGED ====================",{from:t,to:e,currentSearchQuery:this.searchQuery,currentLocalSearchQuery:this.localSearchQuery,activeTab:this.activeTab,timestamp:(new Date).toISOString(),stack:(new Error).stack})},selectedField:function(e,t){console.log("[SEARCH-DEBUG] ==================== WATCHER selectedField TRIGGERED ====================",{componentInstanceId:this.componentInstanceId,from:t,to:e,activeTab:this.activeTab,timestamp:(new Date).toISOString()});var r=new URL(window.location);e&&"all"!==e?r.searchParams.set("field",e):r.searchParams.delete("field"),window.history.replaceState({},"",r)},currentTabComponent:function(e,t){console.log("[SEARCH-DEBUG] ==================== WATCHER currentTabComponent CHANGED ====================",{componentInstanceId:this.componentInstanceId,from:t,to:e,activeTab:this.activeTab,timestamp:(new Date).toISOString(),note:"The results component being displayed has changed"})}},beforeUpdate:function(){console.log("[SEARCH-DEBUG] ==================== UniversalSearchPage beforeUpdate() ====================",{componentInstanceId:this.componentInstanceId,state:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab,selectedField:this.selectedField},url:window.location.href,timestamp:(new Date).toISOString(),note:"Component is about to re-render due to state change"})},updated:function(){console.log("[SEARCH-DEBUG] ==================== UniversalSearchPage updated() ====================",{componentInstanceId:this.componentInstanceId,state:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab,selectedField:this.selectedField},url:window.location.href,timestamp:(new Date).toISOString(),note:"Component has finished re-rendering"})},beforeUnmount:function(){console.log("[SEARCH-DEBUG] ==================== UniversalSearchPage beforeUnmount() ====================",{componentInstanceId:this.componentInstanceId,finalState:{searchQuery:this.searchQuery,localSearchQuery:this.localSearchQuery,activeTab:this.activeTab},timestamp:(new Date).toISOString(),note:"Component is being destroyed. If you see this during a search, it means the page is doing a full reload instead of a partial update!"})}};var H=r(93379),q=r.n(H),Q=r(1712),Z={insert:"head",singleton:!1};q()(Q.Z,Z);Q.Z.locals;const z=(0,r(83744).Z)(G,[["render",function(e,t,r,a,y,b){var w=(0,n.resolveComponent)("Container"),k=(0,n.resolveComponent)("MainLayout");return(0,n.openBlock)(),(0,n.createBlock)(k,null,{default:(0,n.withCtx)((function(){return[(0,n.createVNode)(w,null,{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,[(0,n.createElementVNode)("p",l,'Search results for "'+(0,n.toDisplayString)(y.searchQuery)+'"',1),(0,n.createElementVNode)("div",c,[(0,n.createElementVNode)("div",s,[(0,n.withDirectives)((0,n.createElementVNode)("select",{"onUpdate:modelValue":t[0]||(t[0]=function(e){return y.activeTab=e}),class:"w-full px-4 py-2 border border-gray-200 focus-within:border-gray-400 duration-150 rounded-lg",onChange:t[1]||(t[1]=function(e){console.log("[SEARCH-DEBUG] SELECT @change EVENT triggered",{timestamp:(new Date).toISOString(),newValue:e.target.value,oldActiveTab:y.activeTab,event:e}),b.handleResourceTypeChange()})},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(y.resourceTabs,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("option",{key:e.name,value:e.name},(0,n.toDisplayString)(e.name),9,u)})),128))],544),[[n.vModelSelect,y.activeTab]])]),(0,n.createElementVNode)("div",d,[(0,n.withDirectives)((0,n.createElementVNode)("select",{"onUpdate:modelValue":t[2]||(t[2]=function(e){return y.selectedField=e}),class:"w-full px-4 py-2 border border-gray-200 focus-within:border-gray-400 duration-150 rounded-lg",onChange:t[3]||(t[3]=function(e){console.log("[
2SEARCH-DEBUG] FIELD SELECT @change EVENT",{timestamp:(new Date).toISOString(),newValue:e.target.value,oldSelectedField:y.selectedField,activeTab:y.activeTab,event:e})})},[t[11]||(t[11]=(0,n.createElementVNode)("option",{value:"all"},"All Fields",-1)),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(y.availableFields,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("option",{key:e.value,value:e.value},(0,n.toDisplayString)(e.label),9,f)})),128))],544),[[n.vModelSelect,y.selectedField]])]),(0,n.createElementVNode)("div",p,[(0,n.withDirectives)((0,n.createElementVNode)("input",{type:"text","onUpdate:modelValue":t[4]||(t[4]=function(e){return y.localSearchQuery=e}),placeholder:"Search...",class:"w-full py-2 border-transparent focus:border-transparent focus:ring-0",onKeyup:t[5]||(t[5]=(0,n.withKeys)((function(e){console.log("[SEARCH-DEBUG] INPUT @keyup.enter EVENT",{timestamp:(new Date).toISOString(),localSearchQuery:y.localSearchQuery,activeTab:y.activeTab,event:e}),b.performSearch()}),["enter"])),onInput:t[6]||(t[6]=function(e){console.log("[SEARCH-DEBUG] INPUT @input EVENT",{timestamp:(new Date).toISOString(),value:e.target.value,localSearchQuery:y.localSearchQuery})}),onFocus:t[7]||(t[7]=function(e){console.log("[SEARCH-DEBUG] INPUT @focus EVENT",{timestamp:(new Date).toISOString(),localSearchQuery:y.localSearchQuery,activeTab:y.activeTab})})},null,544),[[n.vModelText,y.localSearchQuery]]),(0,n.createElementVNode)("button",{onClick:t[8]||(t[8]=function(e){console.log("[SEARCH-DEBUG] SEARCH BUTTON @click EVENT",{timestamp:(new Date).toISOString(),localSearchQuery:y.localSearchQuery,activeTab:y.activeTab,event:e}),b.performSearch()}),class:"text-gray-500 hover:text-gray-700 transition-colors mr-2 border-none"},o(t[12]||(t[12]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-5 h-5"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})],-1)]))),y.localSearchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:t[9]||(t[9]=function(e){console.log("[SEARCH-DEBUG] CLEAR BUTTON @click EVENT",{timestamp:(new Date).toISOString(),currentLocalSearchQuery:y.localSearchQuery,activeTab:y.activeTab,event:e}),b.clearSearch()}),class:"text-gray-500 hover:text-gray-700 text-xl border-none"}," ✕ ")):(0,n.createCommentVNode)("",!0)])]),(0,n.createElementVNode)("div",h,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(y.resourceTabs,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:e.name,onClick:function(t){console.log("[SEARCH-DEBUG] TAB BUTTON @click EVENT",{timestamp:(new Date).toISOString(),clickedTabName:e.name,currentActiveTab:y.activeTab,searchQuery:y.searchQuery,localSearchQuery:y.localSearchQuery,event:t}),b.handleTabClick(e.name)},class:(0,n.normalizeClass)(["relative min-w-[120px] max-w-[200px] h-[64px] px-4 py-2 text-sm transition-colors duration-200 flex-shrink border-t border-l border-r rounded-t-lg flex items-center justify-center",[y.activeTab===e.name?"text-gray-900 border-gray-200 font-medium z-10":"text-gray-600 hover:text-gray-800 border-gray-100 bg-gray-50/50"]]),style:(0,n.normalizeStyle)(y.activeTab===e.name?{backgroundColor:e.theme,borderBottomColor:e.theme}:{})},[(0,n.createElementVNode)("div",g,[(0,n.createElementVNode)("span",v,(0,n.toDisplayString)(e.name),1)])],14,m)})),128))])])]})),_:1}),(0,n.createElementVNode)("div",{style:(0,n.normalizeStyle)({backgroundColor:b.activeTabTheme})},[(0,n.createVNode)(w,{class:""},{default:(0,n.withCtx)((function(){return[((0,n.openBlock)(),(0,n.createBlock)(n.KeepAlive,null,[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(b.currentTabComponent),{key:y.activeTab,searchQuery:y.searchQuery,"onUpdate:searchQuery":t[10]||(t[10]=function(e){return y.searchQuery=e}),"selected-field":y.selectedField,"selected-field-label":b.selectedFieldLabel,"initial-results":y.multiSearchResults[y.activeTab],"is-federated-loading":y.isFederatedSearchLoading,"onUpdate:hitCount":b.updateTabCount,"news-categories":r.newsCategories,"explainer-categories":r.explainerCategories,"bookmarked-news-ids":r.bookmarkedNewsIds,"bookmarked-teacher-guides-ids":r.bookmarkedTeacherGuidesIds,"bookmarked-professional-opportunities-ids":r.bookmarkedProfessionalOpportunitiesIds,"bookmarked-explainer-ids":r.bookmarkedExplainerIds,"bookmarked-teaching-material-ids":r.bookmarkedTeachingMaterialIds},null,40,["searchQuery","selected-field","selected-field-label","initial-results","is-federated-loading","onUpdate:hitCount","news-categories","explainer-categories","bookmarked-news-ids","bookmarked-teacher-guides-ids","bookmarked-professional-opportunities-ids","bookmarked-explainer-ids","bookmarked-teaching-material-ids"]))],1024))]})),_:1})],4)]}
2)),_:1})}],["__scopeId","data-v-b5a1442e"]])},8953:(e,t,r)=>{r.r(t),r.d(t,{default:()=>U});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"lg:hidden space-y-4 px-4 bg-white"},l={class:"relative"},c={class:"space-y-2 rounded-lg shadow-lg"},s={key:0,class:"absolute bottom-0 left-0 right-0"},u={class:"absolute bottom-2 left-0 right-0 text-center"},d={key:0,class:"text-center mt-4"},f={class:"space-y-4"},p={key:0,class:"text-gray-600"},h={key:1,class:"text-gray-600"},m={key:0,class:"text-center py-8"},g={class:"flex justify-center"},v={class:"sm:hidden flex justify-between items-center w-full space-x-4"},y=["disabled"],b={class:"text-sm"},w=["disabled"],k={class:"hidden lg:flex gap-8 px-4 py-4 sm:py-8"},x={class:"w-64 flex-shrink-0 mt-12 space-y-6"},S={key:0,class:"bg-white p-4 rounded-lg border"},E={class:"space-y-2"},C={class:"flex-1"},B={class:"flex justify-between items-center mb-4"},N={class:"w-full"},I={key:0,class:"text-gray-600"},L={key:1,class:"text-gray-600"},V={key:0,class:"flex items-center gap-2"},T=["value","disabled"],_=["value"],A={key:0,class:"text-center py-8"},j={class:"flex justify-center mt-4"},D={class:"flex items-center space-x-1"},O=["disabled"],F=["onClick","disabled"],P=["disabled"];const R={name:"BaseTabContentDirect",props:{showing:{type:Number,default:0},total:{type:Number,default:0},currentPage:{type:Number,default:1},totalPages:{type:Number,default:1},isLoading:{type:Boolean,default:!1},supportsSorting:{type:Boolean,default:!0},sortOptions:{type:Array,default:function(){return[]}},currentSort:{type:String,default:""}},emits:["page-change","sort-change"],data:function(){return{showAllFilters:!1}},computed:{visiblePages:function(){return this.getVisiblePages(this.currentPage,this.totalPages,10)}},methods:{getVisiblePages:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=[];if(t<=r)for(var o=1;o<=t;o++)n.push(o);else{var a=Math.max(1,e-Math.floor(r/2)),i=a+r;i>t&&(i=t+1,a=Math.max(1,i-r));for(var l=a;l<i&&l<=t;l++)n.push(l)}return n}}};const U=(0,r(83744).Z)(R,[["render",function(e,t,r,a,R,U){return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createElementVNode)("div",i,[(0,n.renderSlot)(e.$slots,"selected-keywords"),(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["transition-all duration-300 overflow-hidden relative",R.showAllFilters?"max-h-[1000px]":"max-h-[60px]"])},[(0,n.createElementVNode)("div",c,[t[7]||(t[7]=(0,n.createElementVNode)("h3",{class:"font-medium mb-4"},"Refine Search Results",-1)),(0,n.renderSlot)(e.$slots,"filters")]),R.showAllFilters?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",s,[t[8]||(t[8]=(0,n.createElementVNode)("div",{class:"h-20 bg-gradient-to-t from-white via-white/80 to-transparent pointer-events-none"},null,-1)),(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("a",{href:"#",onClick:t[0]||(t[0]=(0,n.withModifiers)((function(e){return R.showAllFilters=!R.showAllFilters}),["prevent"])),class:"text-blue-600 text-sm underline hover:text-blue-800"}," Show more filters ")])]))],2),R.showAllFilters?((0,n.openBlock)(),(0,n.createElementBlock)("div",d,[(0,n.createElementVNode)("a",{href:"#",onClick:t[1]||(t[1]=(0,n.withModifiers)((function(e){return R.showAllFilters=!R.showAllFilters}),["prevent"])),class:"text-blue-600 text-sm underline hover:text-blue-800"}," Hide Filters ")])):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",f,[(0,n.renderSlot)(e.$slots,"results-header",{},(function(){return[r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("p",p,"Loading...")):((0,n.openBlock)(),(0,n.createElementBlock)("p",h,"Showing "+(0,n.toDisplayString)(r.showing)+" out of "+(0,n.toDisplayString)(r.total)+" results",1))]})),r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",m,o(t[9]||(t[9]=[(0,n.createElementVNode)("p",{class:"text-gray-500"},"Searching...",-1)])))):(0,n.renderSlot)(e.$slots,"results-grid",{key:1}),(0,n.renderSlot)(e.$slots,"pagination",{},(function(){return[(0,n.createElementVNode)("div",g,[(0,n.createElementVNode)("div",v,[(0,n.createElementVNode)("button",{disabled:1===r.currentPage||r.isLoading,onClick:t[2]||(t[2]=function(t){return e.$emit("page-change",r.currentPage-1)}),class:"p-2 border rounded-md disabled:opacity-50 disabled:cursor-not-allowed"},o(t[10]||(t[10]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])),8,y),(0,n.createElementVNode)("span",b," Page "+(0,n.toDisplayString)(r.currentPage)+" of "+(0,n.toDisplayString)(r.totalPages),1),(0,n.createElementVNode)("button",{disabled:r.currentPage===r.totalPages||r.isLoading,onClick:t[3]||(t[3]=function(t){return e.$emit("page-change",r.currentPage+1)}),class:"p-2 border rounded-md disabled:opacity-50 disabled:cursor-not-allowed"},o(t[11]||(t[11]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])),8,w)])])]}))])]),(0,n.createElementVNode)("div",k,[(0,n.createElementVNode)("div",x,[(0,n.renderSlot)(e.$slots,"selected-keywords"),e.$slots.filters?((0,n.openBlock)(),(0,n.createElementBlock)("div",S,[t[12]||(t[12]=(0,n.createElementVNode)("h3",{class:"font-medium mb-4"},"Refine Search Results",-1)),(0,n.createElementVNode)("div",E,[(0,n.renderSlot)(e.$slots,"filters")])])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",null,[(0,n.renderSlot)(e.$slots,"all-button")]
2)]),(0,n.createElementVNode)("div",C,[(0,n.createElementVNode)("div",B,[(0,n.renderSlot)(e.$slots,"results-header",{},(function(){return[(0,n.createElementVNode)("div",N,[r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("p",I,"Loading...")):((0,n.openBlock)(),(0,n.createElementBlock)("p",L,"Showing "+(0,n.toDisplayString)(r.showing)+" out of "+(0,n.toDisplayString)(r.total)+" results",1))])]})),(0,n.renderSlot)(e.$slots,"sort-by",{class:"flex items-center gap-2"},(function(){return[r.supportsSorting&&r.sortOptions.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",V,[t[13]||(t[13]=(0,n.createElementVNode)("span",{class:"text-gray-600"},"Sort By:",-1)),(0,n.createElementVNode)("select",{value:r.currentSort,onChange:t[4]||(t[4]=function(t){return e.$emit("sort-change",t.target.value)}),disabled:r.isLoading,class:"border border-gray-200 rounded pl-2 pr-8 py-1 disabled:opacity-50"},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.sortOptions,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("option",{key:e.value,value:e.value},(0,n.toDisplayString)(e.label),9,_)})),128))],40,T)])):(0,n.createCommentVNode)("",!0)]}))]),r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",A,o(t[14]||(t[14]=[(0,n.createElementVNode)("p",{class:"text-gray-500"},"Searching...",-1)])))):(0,n.renderSlot)(e.$slots,"results-grid",{key:1}),(0,n.renderSlot)(e.$slots,"pagination",{},(function(){return[(0,n.createElementVNode)("div",j,[(0,n.createElementVNode)("div",D,[(0,n.createElementVNode)("button",{disabled:1===r.currentPage||r.isLoading,onClick:t[5]||(t[5]=function(t){return e.$emit("page-change",r.currentPage-1)}),class:"px-3 py-2 border rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50"},o(t[15]||(t[15]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])),8,O),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(U.visiblePages,(function(t){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:t,onClick:function(r){return e.$emit("page-change",t)},disabled:r.isLoading,class:(0,n.normalizeClass)(["px-4 py-2 border rounded-md",t===r.currentPage?"bg-blue-500 text-white border-blue-500":"hover:bg-gray-50 disabled:opacity-50"])},(0,n.toDisplayString)(t),11,F)})),128)),(0,n.createElementVNode)("button",{disabled:r.currentPage===r.totalPages||r.isLoading,onClick:t[6]||(t[6]=function(t){return e.$emit("page-change",r.currentPage+1)}),class:"px-3 py-2 border rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50"},o(t[16]||(t[16]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])),8,P)])])]}))])])],64)}]])},18758:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"space-y-4"},l={class:"space-y-2"},c={class:"rounded-lg"},s=["value"],u=["href"],d={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 text-gray-600"},f={key:0}
vendor: 5,128 bytes, line 2
2,p={key:1},h={class:"flex items-center gap-2"},m={key:0,class:"text-gray-400 hidden sm:inline"},g={key:1,class:"text-sm sm:text-base"},v={class:"font-medium"},y={class:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6"};var b=r(87879),w=r(9482),k=r(8953),x=r(78662),S=r(5121);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function C(){C=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(I([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==E(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},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),B(r),d}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function B(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function N(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(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}const L={name:"ClimateChangeContentDirect",components:{BaseTabContentDirect:k.default,ExplainerItem:x.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},explainerCategories:{type:Array,default:function(){return[]}},bookmarkedExplainerIds:{type:Array,default:function(){return[]}},initialResults:{type:Object,default:null},isFederatedLoading:{type:Boolean,default:!1}},emits:["update:searchQuery","update:hitCount"],setup:function(e,t){var r,o,a,i,l=t.emit,c=(null===(r=(0,b.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.climateExplainersIndex)||(null===(a=(0,b.qt)().props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.climateExplainersIndex)||"climate_explainers",s=(0,n.ref)(e.bookmarkedExplainerIds||[]),u=new URLSearchParams("undefined"!=typeof window?window.location.search:""),d=(0,n.ref)(u.get("
2category")||""),f=(0,n.ref)(u.get("sort")||"published_at:desc"),p=function(){var e=new URL(window.location);d.value?e.searchParams.set("category",d.value):e.searchParams.delete("category"),f.value&&"published_at:desc"!==f.value?e.searchParams.set("sort",f.value):e.searchParams.delete("sort"),window.history.replaceState({},"",e)},h=(0,n.computed)((function(){var e="";return d.value&&(e="categoryId=".concat(d.value)),e})),m=(0,n.computed)((function(){var e=N(f.value.split(":"),2);return{attribute:e[0],direction:e[1]}})),g=(0,w.x)(c,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialFilters:h.value,initialSort:[m.value.attribute+":"+m.value.direction],facets:[],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),v=g.hits,y=g.totalHits,k=g.totalPages,x=g.currentPage,E=g.isLoading,I=g.error,L=g.facetDistribution,V=g.setQuery,T=g.setFilters,_=g.setSort,A=g.goToPage,j=g.search,D=g.setResults,O=function(){return!!d.value};e.initialResults&&!O()&&D(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&(O()?j():D(e))})),(0,n.watch)(h,(function(e){T(e)})),(0,n.watch)((function(){return e.searchQuery}),(function(e){V(e||"",!1,!1)}),{immediate:!0}),(0,n.watch)((function(){return e.selectedField}),(function(t){var r="all"===t?["*"]:[t];j(e.searchQuery,{attributesToSearchOn:r})})),(0,n.watch)(y,(function(e){l("update:hitCount",e)}),{immediate:!0});var F=(0,n.computed)((function(){return 0===y.value?0:12*(x.value-1)+1})),P=function(){var e,t=(e=C().mark((function e(t){var r,n;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=s.value.includes(t.id),e.next=4,S.Z.put(route("climateChangeExplainers.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=s.value.indexOf(t.id))>-1&&s.value.splice(n,1):s.value.push(t.id),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error toggling bookmark:",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){B(a,n,o,i,l,"next",e)}function l(e){B(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return{bookmarkedIds:s,selectedCategoryID:d,explainerCategories:e.explainerCategories,perPage:12,currentSort:f,sortOptions:[{value:"published_at:desc",label:"Newest"},{value:"published_at:asc",label:"Oldest"}],showing:F,hits:v,totalHits:y,totalPages:k,currentPage:x,isLoading:E,error:I,facetDistribution:L,goToPage:A,handleCategoryChange:function(){p()},handleSortChange:function(e){f.value=e;var t=N(e.split(":"),2),r=t[0],n=t[1];_([r+":"+n]),p()},handleBookmark:P}}};const V=(0,r(83744).Z)(L,[["render",function(e,t,r,a,b,w){var k=(0,n.resolveComponent)("ExplainerItem"),x=(0,n.resolveComponent)("BaseTabContentDirect");return(0,n.openBlock)(),(0,n.createBlock)(x,{showing:a.showing,total:a.totalHits,"current-page":a.currentPage,"total-pages":a.totalPages,"is-loading":a.isLoading,"supports-sorting":!0,"sort-options":a.sortOptions,"current-sort":a.currentSort,onPageChange:a.goToPage,onSortChange:a.handleSortChange},{filters:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("div",c,[(0,n.withDirectives)((0,n.createElementVNode)("select",{"onUpdate:modelValue":t[0]||(t[0]=function(e){return a.selectedCategoryID=e}),class:"flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg border px-4 py-2.5 bg-white w-full border-gray-200 font-medium",onChange:t[1]||(t[1]=function(){return a.handleCategoryChange&&a.handleCategoryChange.apply(a,arguments)})},[t[2]||(t[2]=(0,n.createElementVNode)("option",{value:""},"All Categories",-1)),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.explainerCategories,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("option",{key:e.id,value:e.id},(0,n.toDisplayString)(e.title),9,s)})),128))],544),[[n.vModelSelect,a.selectedCategoryID]])])])])]})),"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("climateChangeExplainers.index"),class:"block"},o(t[3]||(t[3]=[(0,n.createElementVNode)("div",{class:"flex items-center justify-between p-4 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors duration-200"},[(0,n.createElementVNode)("span",{class:"font-medium text-gray-900 text-sm"},"Go to all Climate Change Explainers"),(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})])],-1)])),8,u)]})),"results-header":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",d,[0===a.totalHits?((0,n.openBlock)(),(0,n.createElementBlock)("span",f,"0 results")):((0,n.openBlock)(),(0,n.createElementBlock)("span",p,"Showing "+(0,n.toDisplayString)(a.showing)+"-"+(0,n.toDisplayString)(Math.min(a.currentPage*a.perPage,a.totalHits))+" out of "+(0,n.toDisplayString)(a.totalHits)+" results",1)),(0,n.createElementVNode)("div",h,[r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("span",m,"|")):(0,n.createCommentVNode)("",!0),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("p",g,[t[4]||(t[4]=(0,n.createTextVNode)(" Searching in ",-1)),(0,n.createElementVNode)("span",v,(0,n.toDisplayString)(r.selectedFieldLabel),1),(0,n.createTextVNode)(' for "'+(0,n.toDisplayString)(r.searchQuery)+'" ',1)])):(0,n.createCommentVNode)("",!0)])])]})),"results-grid":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",y,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.hits,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(k,{key:e.id,explainer:e,"is-bookmarked":a.bookmarkedIds.includes(e.id),onBookmark:function(t){return a.handleBookmark(e)}},null,8,["explainer","is-bookmarked","onBookmark"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","sort-options","current-sort","onPageChange","onSortChange"])}]])},6351:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"space-y-2"},l={key:2,class:(0,n.normalizeClass)(["rounded-lg bg-primary-100"])},c={class:""}
vendor: 4,195 bytes, line 2
2,s={xmlns:"http://www.w3.org/2000/svg",height:"24",fill:"currentColor",viewBox:"0 96 960 960",width:"24"},u={key:0,class:"",d:"m296 711-56-56 240-240 240 240-56 56-184-184-184 184Z"},d={key:1,class:"",d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},f={class:"p-2"},p={key:0,class:"flex space-x-2 mb-2"},h=["checked"],m={class:"text-base leading-5"},g={class:"text-xs"},v=["id","checked","onChange"],y={class:"text-base leading-5"},b={class:"text-xs"},w=["href"],k={class:"flex items-center gap-2 text-gray-600 flex-wrap"},x={key:0},S={key:1},E={key:2,class:"text-gray-400 hidden sm:inline"},C={key:3,class:"text-sm sm:text-base"},B={class:"font-medium"},N={class:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6"};var I=r(87879),L=r(9482),V=r(23044),T=r(8953),_=r(98032),A=r(62662),j=r(51725),D=r(73593),O=r(5441),F=r(5121);function P(e){return P="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},P(e)}function R(){R=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new C(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(B([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==P(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return N()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function B(e){if(e){var t=e[a];if(t)return t.call(e);
vendor: 5,329 bytes, line 2
2if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=B,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},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),E(r),d}},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 o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function U(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){H(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==P(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===P(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}
2finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||Z(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 Z(e,t){if(e){if("string"==typeof e)return z(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)?z(e,t):void 0}}function z(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}const $={name:"LessonPlansContentDirect",components:{BaseTabContentDirect:T.default,LessonPlanItem:_.default,GenericFacetFilter:A.Z,SubjectsFilterHierarchical:j.Z,StandardsFilterHierarchical:D.Z,SelectedKeywordsDirect:O.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},bookmarkedTeachingMaterialIds:{type:Array,default:function(){return[]}},initialResults:{type:Object,default:null},isFederatedLoading:{type:Boolean,default:!1}},emits:["update:searchQuery","update:hitCount"],setup:function(e,t){var r,o,a,i,l=t.emit,c=(0,I.qt)().props.tenantId,s=(0,I.qt)().props.tenantSlug,u=(null===(r=(0,I.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.teachingMaterialsIndex)||(null===(a=(0,I.qt)().props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.teachingMaterialsIndex)||"teaching_materials",d=(0,n.ref)(e.bookmarkedTeachingMaterialIds||[]),f=(0,n.ref)(!1),p=new URLSearchParams("undefined"!=typeof window?window.location.search:""),h={},m=p.get("grades");m&&(h.grades=m.split(","));var g=p.get("type");g&&(h.type=g.split(","));var v=p.get("is_internal_unit_plan");v&&(h.is_internal_unit_plan=v.split(","));var y=(0,n.ref)(h),b=(0,n.ref)(p.get("subjects")||""),w=(0,n.ref)(p.get("standards")||""),k=(0,n.ref)(p.get("sort")||"published_at:desc"),x=function(){var e=new URL(window.location),t={grades:"grades",type:"type",is_internal_unit_plan:"is_internal_unit_plan"};Object.values(t).forEach((function(t){return e.searchParams.delete(t)})),Object.entries(y.value).forEach((function(r){var n=Q(r,2),o=n[0],a=n[1];if(a&&a.length>0){var i=t[o]||o;e.searchParams.set(i,a.join(","))}})),b.value?e.searchParams.set("subjects",b.value):e.searchParams.delete("subjects"),w.value?e.searchParams.set("standards",w.value):e.searchParams.delete("standards"),k.value&&"published_at:desc"!==k.value?e.searchParams.set("sort",k.value):e.searchParams.delete("sort"),window.history.replaceState({},"",e)},S=(0,n.computed)((function(){var e="is_live=true AND (is_internal_resource=true OR is_internal_unit_plan=true) AND tenantIds=".concat(c);return Object.entries(y.value).forEach((function(t){var r=Q(t,2),n=r[0],o=r[1];if(o&&o.length>0){var a=o.map((function(e){return"".concat(n,"='").concat(e.replace(/'/g,"\\'"),"'")})).join(" OR ");e+=" AND (".concat(a,")")}})),b.value&&(e+=" AND ".concat(b.value)),w.value&&(e+=" AND ".concat(w.value)),e})),E=(0,n.computed)((function(){var e=Q(k.value.split(":"),2);return{attribute:e[0],direction:e[1]}})),C=(0,L.x)(u,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialFilters:S.value,initialSort:[E.value.attribute+":"+E.value.direction],facets:["grades","subjects.level1","subjects.level2","subjects.level3","standards.".concat(s,".standards"),"standards.".concat(s,".performances"),"type","is_internal_unit_plan"],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),B=C.hits,N=C.totalHits,T=C.totalPages,_=C.currentPage,A=C.isLoading,j=C.error,D=C.facetDistribution,O=C.setQuery,P=C.setFilters,M=C.setSort,Z=C.goToPage,z=C.search,$=C.setResults,K=function(){return Object.keys(y.value).some((function(e){var t;return(null===(t=y.value[e])||void 0===t?void 0:t.length)>0}))||b.value||w.value};e.initialResults&&!K()&&$(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&(K()?z():$(e))})),(0,n.watch)(S,(function(e){P(e)})),(0,n.watch)((function(){return e.searchQuery}),(function(e){O(e||"",!1,!1)}),{immediate:!0}),(0,n.watch)((function(){return e.selectedField}),(function(t){var r="all"===t?["*"]:[t];z(e.searchQuery,{attributesToSearchOn:r})})),(0,n.watch)(N,(function(e){l("update:hitCount",e)}),{immediate:!0});
2var W=(0,n.computed)((function(){return 0===N.value?0:12*(_.value-1)+1})),Y=function(e,t){var r=Q(e,1)[0],n=Q(t,1)[0],o=["Lesson Plan","Games","Worksheets","Read-Aloud Guides","Bundle","Centers/Stations","Book","Curriculum Planning Guide"],a=o.indexOf(r),i=o.indexOf(n);return-1!==a&&-1!==i?a-i:-1!==a?-1:-1!==i?1:r.localeCompare(n)},J=(0,n.computed)((function(){return Object.entries(D.value.type||{}).sort(Y).reduce((function(e,t){var r=Q(t,2),n=r[0],o=r[1];return e[n]=o,e}),{})})),X=function(e){var t=e.attribute,r=e.values,n=e.filterString;void 0!==n?("subjects"===t?b.value=n:"standards"===t&&(w.value=n),n&&(0,V.K)({tenantId:c,filters:H({},t,[n])})):void 0!==r&&(y.value=G(G({},y.value),{},H({},t,r)),r&&r.length>0&&(0,V.K)({tenantId:c,filters:H({},t,r)})),x()},ee=function(){var e,t=(e=R().mark((function e(t){var r,n;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=d.value.includes(t.id),e.next=4,F.Z.put(route("tm.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=d.value.indexOf(t.id))>-1&&d.value.splice(n,1):d.value.push(t.id),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error toggling bookmark:",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){U(a,n,o,i,l,"next",e)}function l(e){U(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return{bookmarkedIds:d,selectedFacets:y,subjectsFilterString:b,standardsFilterString:w,resourceTypeExpanded:f,tenantSlug:s,perPage:12,currentSort:k,sortOptions:[{value:"published_at:desc",label:"Newest"},{value:"published_at:asc",label:"Oldest"},{value:"nb_views:desc",label:"Most Viewed"}],showing:W,sortedResourceTypes:J,hits:B,totalHits:N,totalPages:T,currentPage:_,isLoading:A,error:j,facetDistribution:D,goToPage:Z,sortGrades:function(e,t){var r=Q(e,1)[0],n=Q(t,1)[0];if("PK"===r)return-1;if("PK"===n)return 1;if("K"===r)return-1;if("K"===n)return 1;var o=parseInt(r),a=parseInt(n);return isNaN(o)||isNaN(a)?r.localeCompare(n):o-a},sortResourceTypes:Y,handleFacetFilterChange:X,handleSortChange:function(e){k.value=e;var t=Q(e.split(":"),2),r=t[0],n=t[1];M([r+":"+n]),x()},handleUnitPlanToggle:function(){var e=y.value.is_internal_unit_plan||[],t=e.includes("true")?e.filter((function(e){return"true"!==e})):[].concat(q(e),["true"]);X({attribute:"is_internal_unit_plan",values:t})},handleResourceTypeToggle:function(e){var t=y.value.type||[],r=t.includes(e)?t.filter((function(t){return t!==e})):[].concat(q(t),[e]);X({attribute:"type",values:r})},handleBookmark:ee}}};const K=(0,r(83744).Z)($,[["render",function(e,t,r,a,I,L){var V=(0,n.resolveComponent)("SelectedKeywordsDirect"),T=(0,n.resolveComponent)("GenericFacetFilter"),_=(0,n.resolveComponent)("SubjectsFilterHierarchical"),A=(0,n.resolveComponent)("StandardsFilterHierarchical"),j=(0,n.resolveComponent)("LessonPlanItem"),D=(0,n.resolveComponent)("BaseTabContentDirect");return(0,n.openBlock)(),(0,n.createBlock)(D,{showing:a.showing,total:a.totalHits,"current-page":a.currentPage,"total-pages":a.totalPages,"is-loading":a.isLoading,"supports-sorting":!0,"sort-options":a.sortOptions,"current-sort":a.currentSort,onPageChange:a.goToPage,onSortChange:a.handleSortChange},{"selected-keywords":(0,n.withCtx)((function(){return[(0,n.createVNode)(V,{"selected-facets":a.selectedFacets,"subjects-filter-string":a.subjectsFilterString,"standards-filter-string":a.standardsFilterString,"white-background":!0,onFilterChange:a.handleFacetFilterChange},null,8,["selected-facets","subjects-filter-string","standards-filter-string","onFilterChange"])]})),filters:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,[a.facetDistribution.grades?((0,n.openBlock)(),(0,n.createBlock)(T,{key:0,title:"Grades",attribute:"grades",facets:a.facetDistribution.grades,"current-filters":a.selectedFacets.grades||[],"sort-function":a.sortGrades,onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","sort-function","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution["subjects.level1"]?((0,n.openBlock)(),(0,n.createBlock)(_,{key:1,"facets-level1":a.facetDistribution["subjects.level1"],"facets-level2":a.facetDistribution["subjects.level2"]||{},"facets-level3":a.facetDistribution["subjects.level3"]||{}
2,"current-filters":a.subjectsFilterString,"single-select":!0,onFilterChange:a.handleFacetFilterChange},null,8,["facets-level1","facets-level2","facets-level3","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.type||a.facetDistribution.is_internal_unit_plan?((0,n.openBlock)(),(0,n.createElementBlock)("div",l,[(0,n.createElementVNode)("div",{onClick:t[0]||(t[0]=function(e){return a.resourceTypeExpanded=!a.resourceTypeExpanded}),class:(0,n.normalizeClass)(["flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg shadow py-2 px-4 bg-white"])},[t[2]||(t[2]=(0,n.createElementVNode)("h3",{class:"text-base font-medium whitespace-nowrap"},"Resource Type",-1)),(0,n.createElementVNode)("button",c,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",s,[a.resourceTypeExpanded?((0,n.openBlock)(),(0,n.createElementBlock)("path",u)):((0,n.openBlock)(),(0,n.createElementBlock)("path",d))]))])]),(0,n.withDirectives)((0,n.createElementVNode)("div",f,[a.facetDistribution.is_internal_unit_plan&&a.facetDistribution.is_internal_unit_plan.true?((0,n.openBlock)(),(0,n.createElementBlock)("div",p,[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",id:"unit-plan-search",checked:(a.selectedFacets.is_internal_unit_plan||[]).includes("true"),onChange:t[1]||(t[1]=function(){return a.handleUnitPlanToggle&&a.handleUnitPlanToggle.apply(a,arguments)})},null,40,h),(0,n.createElementVNode)("h3",m,[t[3]||(t[3]=(0,n.createTextVNode)(" Unit Plan ",-1)),(0,n.createElementVNode)("span",g,"("+(0,n.toDisplayString)(a.facetDistribution.is_internal_unit_plan.true)+")",1)])])):(0,n.createCommentVNode)("",!0),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.sortedResourceTypes,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:t,class:"flex space-x-2 mb-1"},[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",id:"type-".concat(t,"-search"),checked:(a.selectedFacets.type||[]).includes(t),onChange:function(e){return a.handleResourceTypeToggle(t)}},null,40,v),(0,n.createElementVNode)("h3",y,[(0,n.createTextVNode)((0,n.toDisplayString)(t)+" ",1),(0,n.createElementVNode)("span",b,"("+(0,n.toDisplayString)(e)+")",1)])])})),128))],512),[[n.vShow,a.resourceTypeExpanded]])])):(0,n.createCommentVNode)("",!0),a.facetDistribution["standards.".concat(a.tenantSlug,".standards")]?((0,n.openBlock)(),(0,n.createBlock)(A,{key:3,"facets-level1":a.facetDistribution["standards.".concat(a.tenantSlug,".standards")],"facets-level2":a.facetDistribution["standards.".concat(a.tenantSlug,".performances")]||{},"current-filters":a.standardsFilterString,"tenant-slug":a.tenantSlug,"single-select":!0,onFilterChange:a.handleFacetFilterChange},null,8,["facets-level1","facets-level2","current-filters","tenant-slug","onFilterChange"])):(0,n.createCommentVNode)("",!0)])]})),"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("stc.index"),class:"block"},o(t[4]||(t[4]=[(0,n.createElementVNode)("div",{class:"flex items-center justify-between p-4 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors duration-200"},[(0,n.createElementVNode)("span",{class:"font-medium text-gray-900 text-sm"},"Go to all Lesson Plans, Units & Activities"),(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})])],-1)])),8,w)]})),"results-header":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",k,[0===a.totalHits?((0,n.openBlock)(),(0,n.createElementBlock)("span",x,"0 results")):((0,n.openBlock)(),(0,n.createElementBlock)("span",S,"Showing "+(0,n.toDisplayString)(a.showing)+"-"+(0,n.toDisplayString)(Math.min(a.currentPage*a.perPage,a.totalHits))+" out of "+(0,n.toDisplayString)(a.totalHits)+" results",1)),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("span",E,"|")):(0,n.createCommentVNode)("",!0),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("p",C,[t[5]||(t[5]=(0,n.createTextVNode)(" Searching in ",-1)),(0,n.createElementVNode)("span",B,(0,n.toDisplayString)(r.selectedFieldLabel),1),(0,n.createTextVNode)(' for "'+(0,n.toDisplayString)(r.searchQuery)+'" ',1)])):(0,n.createCommentVNode)("",!0)])]})),"results-grid":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",N,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.hits,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(j,{key:e.id,material:e,isLoadedFromAlgolia:!1,isBookmarked:a.bookmarkedIds.includes(e.id),onBookmark:function(t){return a.handleBookmark(e)}},null,8,["material","isBookmarked","onBookmark"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","sort-options","current-sort","onPageChange","onSortChange"])}]])},46365:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"space-y-4"},l={class:"space-y-2"},c={class:"rounded-lg"},s=["value"],u=["href"],d={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 text-gray-600"},f={key:0}
vendor: 5,113 bytes, line 2
2,p={key:1},h={class:"flex items-center gap-2"},m={key:0,class:"text-gray-400 hidden sm:inline"},g={key:1,class:"text-sm sm:text-base"},v={class:"font-medium"},y={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6"};var b=r(87879),w=r(9482),k=r(8953),x=r(30379),S=r(5121);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function C(){C=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(I([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==E(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},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),B(r),d}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function B(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function N(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(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}const L={name:"NewsContentDirect",components:{BaseTabContentDirect:k.default,NewsCard:x.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},newsCategories:{type:Array,default:function(){return[]}},bookmarkedNewsIds:{type:Array,default:function(){return[]}},initialResults:{type:Object,default:null},isFederatedLoading:{type:Boolean,default:!1}},emits:["update:searchQuery","update:hitCount"],setup:function(e,t){var r,o,a,i,l=t.emit,c=(null===(r=(0,b.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.newsIndex)||(null===(a=(0,b.qt)().props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.newsIndex)||"news",s=(0,n.ref)("undefined"!=typeof window&&window.innerWidth<640),u=(0,n.ref)(e.bookmarkedNewsIds||[]),d=new URLSearchParams("undefined"!=typeof window?window.location.search:""),f=(0,n.ref)(d.get("category")||""),p=(0,n.ref)(d.get("sort")||"publish_at:desc"),h=function(){var e=new URL(window.location);f.value?e.searchParams.set("category",f.value):e.searchParams.delete("category"),p.value&&"publish_at:desc"!==p.value?e.searchParams.set("sort",p.value):e.searchParams.delete("sort"),window.history.replaceState({},"",e)},m=(0,n.computed)((function(){var e="";return f.value&&(e="categoryIds=".concat(f.value)),e}
2)),g=(0,n.computed)((function(){var e=N(p.value.split(":"),2);return{attribute:e[0],direction:e[1]}})),v=(0,w.x)(c,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialFilters:m.value,initialSort:[g.value.attribute+":"+g.value.direction],facets:[],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),y=v.hits,k=v.totalHits,x=v.totalPages,E=v.currentPage,I=v.isLoading,L=v.error,V=v.facetDistribution,T=v.setQuery,_=v.setFilters,A=v.setSort,j=v.goToPage,D=v.search,O=v.setResults,F=function(){return!!f.value};e.initialResults&&!F()&&O(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&(F()?D():O(e))}));(0,n.watch)(m,(function(e){_(e)})),(0,n.watch)((function(){return e.searchQuery}),(function(e){T(e||"",!1,!1)}),{immediate:!0}),(0,n.watch)((function(){return e.selectedField}),(function(t){var r="all"===t?["*"]:[t];D(e.searchQuery,{attributesToSearchOn:r})})),(0,n.watch)(k,(function(e){l("update:hitCount",e)}),{immediate:!0});var P=(0,n.computed)((function(){return 0===k.value?0:12*(E.value-1)+1})),R=function(){var e,t=(e=C().mark((function e(t){var r,n;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=u.value.includes(t.id),e.next=4,S.Z.put(route("news.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=u.value.indexOf(t.id))>-1&&u.value.splice(n,1):u.value.push(t.id),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error toggling bookmark:",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){B(a,n,o,i,l,"next",e)}function l(e){B(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return"undefined"!=typeof window&&window.addEventListener("resize",(function(){s.value=window.innerWidth<640})),{isMobileView:s,bookmarkedIds:u,selectedCategory:f,newsCategories:e.newsCategories,perPage:12,currentSort:p,sortOptions:[{value:"publish_at:desc",label:"Newest"},{value:"publish_at:asc",label:"Oldest"}],showing:P,hits:y,totalHits:k,totalPages:x,currentPage:E,isLoading:I,error:L,facetDistribution:V,goToPage:j,handleCategoryChange:function(){h()},handleSortChange:function(e){p.value=e;var t=N(e.split(":"),2),r=t[0],n=t[1];A([r+":"+n]),h()},handleBookmark:R,formatArticle:function(e){return{id:e.id,title:e.title,image:e.primaryImageUrl,date:new Date(e.publish_at).toLocaleDateString(),slug:e.slug,views:e.views||0,description:e.description,nbVisits:e.nbVisits||0,is_bookmarked:u.value.includes(e.id)}}}}};const V=(0,r(83744).Z)(L,[["render",function(e,t,r,a,b,w){var k=(0,n.resolveComponent)("NewsCard"),x=(0,n.resolveComponent)("BaseTabContentDirect");return(0,n.openBlock)(),(0,n.createBlock)(x,{showing:a.showing,total:a.totalHits,"current-page":a.currentPage,"total-pages":a.totalPages,"is-loading":a.isLoading,"supports-sorting":!0,"sort-options":a.sortOptions,"current-sort":a.currentSort,onPageChange:a.goToPage,onSortChange:a.handleSortChange},{filters:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("div",c,[(0,n.withDirectives)((0,n.createElementVNode)("select",{"onUpdate:modelValue":t[0]||(t[0]=function(e){return a.selectedCategory=e}),class:"flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg border px-4 py-2.5 bg-white w-full border-gray-200 font-medium",onChange:t[1]||(t[1]=function(){return a.handleCategoryChange&&a.handleCategoryChange.apply(a,arguments)})},[t[2]||(t[2]=(0,n.createElementVNode)("option",{value:""},"All Categories",-1)),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.newsCategories,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("option",{key:e.id,value:e.id},(0,n.toDisplayString)(e.name),9,s)})),128))],544),[[n.vModelSelect,a.selectedCategory]])])])])]})),"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("news.index"),class:"block"},o(t[3]||(t[3]=[(0,n.createElementVNode)("div",{class:"flex items-center justify-between p-4 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors duration-200"},[(0,n.createElementVNode)("span",{class:"font-medium text-gray-900 text-sm"},"Go to all News for Students"),(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})])],-1)])),8,u)]})),"results-header":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",d,[0===a.totalHits?((0,n.openBlock)(),(0,n.createElementBlock)("span",f,"0 results")):((0,n.openBlock)(),(0,n.createElementBlock)("span",p,"Showing "+(0,n.toDisplayString)(a.showing)+"-"+(0,n.toDisplayString)(Math.min(a.currentPage*a.perPage,a.totalHits))+" out of "+(0,n.toDisplayString)(a.totalHits)+" results",1)),(0,n.createElementVNode)("div",h,[r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("span",m,"|")):(0,n.createCommentVNode)("",!0),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("p",g,[t[4]||(t[4]=(0,n.createTextVNode)(" Searching in ",-1)),(0,n.createElementVNode)("span",v,(0,n.toDisplayString)(r.selectedFieldLabel),1),(0,n.createTextVNode)(' for "'+(0,n.toDisplayString)(r.searchQuery)+'" ',1)])):(0,n.createCommentVNode)("",!0)])])]})),"results-grid":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",y,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.hits,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(k,{key:e.id,article:a.formatArticle(e),"is-bookmarked":a.bookmarkedIds.includes(e.id),view:a.isMobileView?"mobile":"desktop",onBookmark:a.handleBookmark},null,8,["article","is-bookmarked","view","onBookmark"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","sort-options","current-sort","onPageChange","onSortChange"])}]])},23270:(e,t,r)=>{r.r(t),r.d(t,{default:()=>A});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"space-y-2"},l=["href"],c={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 text-gray-600"},s={key:0},u={key:1},d={class:"flex items-center gap-2"},f={key:0,class:"text-gray-400 hidden sm:inline"},p={key:1,class:"text-sm sm:text-base"},h={class:"font-medium"},m={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6"};var g=r(87879),v=r(9482),y=r(23044),b=r(8953),w=r(2708),k=r(62662),x=r(38320),S=r(5121);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function C(){C=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(I([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,146 bytes, line 2
2))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==E(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),B(r),d}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function B(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function L(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==E(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===E(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(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}const _={name:"ProfessionalDevelopmentContentDirect",components:{BaseTabContentDirect:b.default,OpportunityItem:w.default,GenericFacetFilter:k.Z,RegionsFilterDirect:x.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},bookmarkedProfessionalOpportunitiesIds:{type:Array,default:function(){return[]}},initialResults:{type:Object,default:null},isFederatedLoading:{type:Boolean,default:!1}},emits:["update:searchQuery","update:hitCount"],setup:function(e,t){var r,o,a,i,l=t.emit,c=(0,g.qt)().props.tenantId,s=(null===(r=(0,g.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.pdIndex)||(null===(a=(0,g.qt)().props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.pdIndex)||"professional_opportunities",u=(0,n.ref)("undefined"!=typeof window&&window.innerWidth<640),d=(0,n.ref)(e.bookmarkedProfessionalOpportunitiesIds||[]),f="undefined"!=typeof window?new URLSearchParams(window.location.search):new URLSearchParams,p={},h=["type","formats","cost","credit","months","grades","subjects"];h.forEach((function(e){var t=f.get(e);t&&(p[e]=t.split(","))}));var m=(0,n.ref)(p),b=(0,n.ref)(f.get("regions")||""),w=(0,n.computed)((function(){var e="enabled=1 AND tenant_ids IN [".concat(c,"]");return Object.entries(m.value).forEach((function(t){var r=V(t,2),n=r[0],o=r[1];if(o&&o.length>0){var a=o.map((function(e){return"".concat(n,"='").concat(e.replace(/'/g,"\\'"),"'")})).join(" OR ");e+=" AND (".concat(a,")")}})),b.value&&(e+=" AND ".concat(b.value)),e})),k=(0,v.x)(s,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialFilters:w.value,facets:["type","formats","cost","credit","months","grades","subjects","regions.level1","regions.level2","regions.level3","regi
2ons.level4","regions.level5"],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),x=k.hits,E=k.totalHits,N=k.totalPages,T=k.currentPage,_=k.isLoading,A=k.error,j=k.facetDistribution,D=k.setQuery,O=k.setFilters,F=k.goToPage,P=k.search,R=k.setResults,U=function(){return Object.keys(m.value).some((function(e){var t;return(null===(t=m.value[e])||void 0===t?void 0:t.length)>0}))||b.value};e.initialResults&&!U()&&R(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&(U()?P():R(e))}));(0,n.watch)(w,(function(e){O(e)})),(0,n.watch)((function(){return e.searchQuery}),(function(e){D(e||"",!1,!1)}),{immediate:!0}),(0,n.watch)((function(){return e.selectedField}),(function(t){var r="all"===t?["*"]:[t];P(e.searchQuery,{attributesToSearchOn:r})})),(0,n.watch)(E,(function(e){l("update:hitCount",e)}),{immediate:!0});var M=(0,n.computed)((function(){return 0===E.value?0:12*(T.value-1)+1})),G=function(){var e,t=(e=C().mark((function e(t){var r,n;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=d.value.includes(t.id),e.next=4,S.Z.put(route("plos.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=d.value.indexOf(t.id))>-1&&d.value.splice(n,1):d.value.push(t.id),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error toggling bookmark:",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){B(a,n,o,i,l,"next",e)}function l(e){B(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return"undefined"!=typeof window&&window.addEventListener("resize",(function(){u.value=window.innerWidth<640})),{isMobileView:u,bookmarkedIds:d,selectedFacets:m,regionsFilterString:b,perPage:12,showing:M,hits:x,totalHits:E,totalPages:N,currentPage:T,isLoading:_,error:A,facetDistribution:j,goToPage:F,sortGrades:function(e,t){var r=V(e,1)[0],n=V(t,1)[0];if("PK"===r)return-1;if("PK"===n)return 1;if("K"===r)return-1;if("K"===n)return 1;var o=parseInt(r),a=parseInt(n);return isNaN(o)||isNaN(a)?r.localeCompare(n):o-a},sortMonths:function(e,t){var r=V(e,1)[0],n=V(t,1)[0],o=["January","February","March","April","May","June","July","August","September","October","November","December"],a=o.indexOf(r),i=o.indexOf(n);return-1!==a&&-1!==i?a-i:-1!==a?-1:-1!==i?1:r.localeCompare(n)},handleFacetFilterChange:function(e){var t=e.attribute,r=e.values,n=e.filterString;void 0!==n?("regions"===t&&(b.value=n),n&&(0,y.K)({tenantId:c,filters:L({},t,[n])})):void 0!==r&&(m.value=I(I({},m.value),{},L({},t,r)),r&&r.length>0&&(0,y.K)({tenantId:c,filters:L({},t,r)})),function(){if("undefined"!=typeof window){var e=new URL(window.location);h.forEach((function(t){return e.searchParams.delete(t)})),Object.entries(m.value).forEach((function(t){var r=V(t,2),n=r[0],o=r[1];o&&o.length>0&&e.searchParams.set(n,o.join(","))})),b.value?e.searchParams.set("regions",b.value):e.searchParams.delete("regions"),window.history.replaceState({},"",e)}}()},handleBookmark:G}}};const A=(0,r(83744).Z)(_,[["render",function(e,t,r,a,g,v){var y=(0,n.resolveComponent)("GenericFacetFilter"),b=(0,n.resolveComponent)("RegionsFilterDirect"),w=(0,n.resolveComponent)("OpportunityItem"),k=(0,n.resolveComponent)("BaseTabContentDirect");return(0,n.openBlock)(),(0,n.createBlock)(k,{showing:a.showing,total:a.totalHits,"current-page":a.currentPage,"total-pages":a.totalPages,"is-loading":a.isLoading,"supports-sorting":!1,onPageChange:a.goToPage},{filters:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,[a.facetDistribution.type?((0,n.openBlock)(),(0,n.createBlock)(y,{key:0,title:"Opportunity type",attribute:"type",facets:a.facetDistribution.type,"current-filters":a.selectedFacets.type||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.formats?((0,n.openBlock)(),(0,n.createBlock)(y,{key:1,title:"Format",attribute:"formats",facets:a.facetDistribution.formats,"current-filters":a.selectedFacets.formats||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution["regions.level1"]?((0,n.openBlock)(),(0,n.createBlock)(b,{key:2,"facets-level1":a.facetDistribution["regions.level1"],"facets-level2":a.facetDistribution["regions.level2"]||{},"facets-level3":a.facetDistribution["regions.level3"]||{},"facets-level4":a.facetDistribution["regions.level4"]||{},"facets-level5":a.facetDistribution["regions.level5"]||{}
2,"current-filters":a.regionsFilterString,"single-select":!0,onFilterChange:a.handleFacetFilterChange},null,8,["facets-level1","facets-level2","facets-level3","facets-level4","facets-level5","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.cost?((0,n.openBlock)(),(0,n.createBlock)(y,{key:3,title:"Cost",attribute:"cost",facets:a.facetDistribution.cost,"current-filters":a.selectedFacets.cost||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.credit?((0,n.openBlock)(),(0,n.createBlock)(y,{key:4,title:"Credit",attribute:"credit",facets:a.facetDistribution.credit,"current-filters":a.selectedFacets.credit||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.months?((0,n.openBlock)(),(0,n.createBlock)(y,{key:5,title:"Dates",attribute:"months",facets:a.facetDistribution.months,"current-filters":a.selectedFacets.months||[],"sort-function":a.sortMonths,onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","sort-function","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.grades?((0,n.openBlock)(),(0,n.createBlock)(y,{key:6,title:"Grades",attribute:"grades",facets:a.facetDistribution.grades,"current-filters":a.selectedFacets.grades||[],"sort-function":a.sortGrades,onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","sort-function","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.subjects?((0,n.openBlock)(),(0,n.createBlock)(y,{key:7,title:"Subjects",attribute:"subjects",facets:a.facetDistribution.subjects,"current-filters":a.selectedFacets.subjects||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0)])]})),"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("plos.index"),class:"block"},o(t[0]||(t[0]=[(0,n.createElementVNode)("div",{class:"flex items-center justify-between p-4 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors duration-200"},[(0,n.createElementVNode)("span",{class:"font-medium text-gray-900 text-sm"},"Go to all Professional Development"),(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})])],-1)])),8,l)]})),"results-header":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",c,[0===a.totalHits?((0,n.openBlock)(),(0,n.createElementBlock)("span",s,"0 results")):((0,n.openBlock)(),(0,n.createElementBlock)("span",u,"Showing "+(0,n.toDisplayString)(a.showing)+"-"+(0,n.toDisplayString)(Math.min(a.currentPage*a.perPage,a.totalHits))+" out of "+(0,n.toDisplayString)(a.totalHits)+" results",1)),(0,n.createElementVNode)("div",d,[r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("span",f,"|")):(0,n.createCommentVNode)("",!0),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("p",p,[t[1]||(t[1]=(0,n.createTextVNode)(" Searching in ",-1)),(0,n.createElementVNode)("span",h,(0,n.toDisplayString)(r.selectedFieldLabel),1),(0,n.createTextVNode)(' for "'+(0,n.toDisplayString)(r.searchQuery)+'" ',1)])):(0,n.createCommentVNode)("",!0)])])]})),"results-grid":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",m,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.hits,(function(e,t){return(0,n.openBlock)(),(0,n.createBlock)(w,{key:e.id,opportunity:e,isAlgolia:!1,level:a.isMobileView?"mobile":"desktop",isBookmarked:a.bookmarkedIds.includes(e.id),onBookmarkUpdated:a.handleBookmark},null,8,["opportunity","level","isBookmarked","onBookmarkUpdated"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","onPageChange"])}]])},17129:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i=["href"],l={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 text-gray-600"},c={key:0},s={key:1},u={class:"flex items-center gap-2"},d={key:0,class:"text-gray-400 hidden sm:inline"},f={key:1,class:"text-sm sm:text-base"},p={class:"font-medium"},h={class:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6"};var m=r(87879),g=r(9482),v=r(8953),y=r(35122),b=r(5121);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(){k=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:S(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(I([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,146 bytes, line 2
2))}function x(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==w(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=E(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),c(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),B(r),d}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function x(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function S(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(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}const C={name:"TeacherGuidesContentDirect",components:{BaseTabContentDirect:v.default,TeacherGuideItem:y.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},bookmarkedTeacherGuidesIds:{type:Array,default:function(){return[]}},initialResults:{type:Object,default:null},isFederatedLoading:{type:Boolean,default:!1}},emits:["update:searchQuery","update:hitCount"],setup:function(e,t){var r,o,a,i,l=t.emit,c=(null===(r=(0,m.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.teacherGuidesIndex)||(null===(a=(0,m.qt)().props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.teacherGuidesIndex)||"teacher_guides",s=(0,n.ref)(e.bookmarkedTeacherGuidesIds||[]),u=new URLSearchParams("undefined"!=typeof window?window.location.search:""),d=(0,n.ref)(u.get("sort")||"publish_at:desc"),f=(0,n.computed)((function(){var e=S(d.value.split(":"),2);return{attribute:e[0],direction:e[1]}})),p=(0,g.x)(c,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialSort:[f.value.attribute+":"+f.value.direction],facets:[],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),h=p.hits,v=p.totalHits,y=p.totalPages,w=p.currentPage,E=p.isLoading,C=p.error,B=p.facetDistribution,N=p.setQuery,I=(p.setFilters,p.setSort),L=p.goToPage,V=p.search,T=p.setResults;e.initialResults&&T(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&T(e)})),(0,n.watch)((function(){return e.searchQuery}),(function(e){N(e||"",!1,!1)}),{immediate:!0}),(0,n.watch)((function(){return e.selectedField}),(function(t){var r="all"===t?["*"]:[t];V(e.searchQuery,{attributesToSearchOn:r})})),(0,n.watch)(v,(function(e){l("update:hitCount",e)}),{immediate:!0});var _=(0,n.computed)((function(){return 0===v.value?0:12*(w.value-1)+1})),A=function(){var e,t=(e=k().mark((function e(t){var r,n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=s.value.includes(t.id),e.next=4,b.Z.put(route("teacherGuides.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=s.value.indexOf(t.id))>-1&&s.value.splice(n,1):s.value.push(t.id),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error toggling bookmark:",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){x(a,n,o,i,l,"next",e)}function l(e){x(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return{bookmarkedIds:s,perPage:12,currentSort:d,sortOptions:[{value:"publish_at:desc",label:"Newest"},{value:"publish_at:asc",label:"Oldest"}],showing:_,hits:h,totalHits:v,totalPages:y,currentPage:w,isLoading:E,error:C,facetDistribution:B,goToPage:L,handleSortChange:function(e){d.value=e;var t,r=S(e.split(":"),2),n=r[0],o=r[1];I([n+":"+o]),t=new URL(window.location),d.value&&"publish_at:desc"!==d.value?t.searchParams.set("sort",d.value):t.searchParams.delete("sort"),window.history.replaceState({},"",t)},handleBookmark:A}}};const B=(0,r(83744).Z)(C,[["render",function(e,t,r,a,m,g){var v=(0,n.resolveComponent)("TeacherGuideItem"),y=(0,n.resolveComponent)("BaseTabContentDirect");return(0,n.openBlock)(),(0,n.createBlock)(y,{showing:a.showing,total:a.totalHits,"current-page":a.currentPage,"total-pages":a.totalPages,"is-loading":a.isLoading,"supports-sorting":!0,"sort-options":a.sortOptions,"current-sort":a.currentSort,onPageChange:a.goToPage,onSortChange:a.handleSortChange},{"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("teacherGuides.index"),class:"block"},o(t[0]||(t[0]=[(0,n.createElementVNode)("div",{class:"flex items-center justify-between p-4 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors duration-200"},[(0,n.createElementVNode)("span",{class:"font-medium text-gray-900 text-sm"},"Go to all Teacher Guides"),(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})])],-1)])),8,i)]})),"results-header":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",l,[0===a.totalHits?((0,n.openBlock)(),(0,n.createElementBlock)("span",c,"0 results")):((0,n.openBlock)(),(0,n.createElementBlock)("span",s,"Showing "+(0,n.toDisplayString)(a.showing)+"-"+(0,n.toDisplayString)(Math.min(a.currentPage*a.perPage,a.totalHits))+" out of "+(0,n.toDisplayString)(a.totalHits)+" results",1)),(0,n.createElementVNode)("div",u,[r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("span",d,"|")):(0,n.createCommentVNode)("",!0),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("p",f,[t[1]||(t[1]=(0,n.createTextVNode)(" Searching in ",-1)),(0,n.createElementVNode)("span",p,(0,n.toDisplayString)(r.selectedFieldLabel),1),(0,n.createTextVNode)(' for "'+(0,n.toDisplayString)(r.searchQuery)+'" ',1)])):(0,n.createCommentVNode)("",!0)])])]})),"results-grid":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",h,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.hits,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(v,{key:e.id,teacherGuide:e,isBookmarked:a.bookmarkedIds.includes(e.id),onBookmark:a.handleBookmark},null,8,["teacherGuide","isBookmarked","onBookmark"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","sort-options","current-sort","onPageChange","onSortChange"])}]])},92881:(e,t,r)=>{r.r(t),r.d(t,{default:()=>O});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"space-y-2"},l=["href"],c={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 text-gray-600"},s={key:0},u={key:1},d={class:"flex items-center gap-2"},f={key:0,class:"text-gray-400 hidden sm:inline"},p={key:1,class:"text-sm sm:text-base"},h={class:"font-medium"},m={class:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6"};var g=r(87879),v=r(9482),y=r(23044),b=r(8953),w=r(87202),k=r(62662),x=r(51725),S=r(73593),E=r(38320),C=r(90099),B=r(5121);function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function I(){I=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new C(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(B([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,146 bytes, line 2
2))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==N(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function B(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=B,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),d}},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 o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function L(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==N(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===N(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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}const D={name:"TeachingMaterialsContentDirect",components:{BaseTabContentDirect:b.default,TeachingMaterialItem:w.default,GenericFacetFilter:k.Z,SubjectsFilterHierarchical:x.Z,StandardsFilterHierarchical:S.Z,RegionsFilterDirect:E.default,SelectedKeywordsDirect:C.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},bookmarkedTeachingMaterialIds:{type:Array,default:function(){return[]}},initialResults:{type:Object,default:null},isFederatedLoading:{type:Boolean,default:!1}},emits:["update:searchQuery","update:hitCount"],setup:function(e,t){var r,o,a,i,l=t.emit,c=(0,g.qt)().props.tenantId,s=(0,g.qt)().props.tenantSlug,u=(null===(r=(0,g.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.teachingMaterialsIndex)||(null===(a=(0,g.qt)().props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.teachingMaterialsIndex)||"teaching_materials",d=(0,n.ref)(e.bookmarkedTeachingMaterialIds||[]),f=new URLSearchParams("undefined"!=typeof window?window.location.search:""),p={},h=f.get("grades");h&&(p.grades=h.split(","));var m=f.get("type");m&&(p.type=m.split(","));var b=f.get("provider");b&&(p["teachable.provider.name"]=b.split(","));var w=(0,n.ref)(p),k=(0,n.ref)(f.get("subjects")||""),x=(0,n.ref)(f.get("standards")||""),S=(0,n.ref)(f.get("regions")||""),E=(0,n.ref)(f.get("sort")||"published_at:desc"),C=function(){var e=new URL(window.location),t={grades:"grades",type:"type","teachable.provider.name":"provider"};Object.values(t).forEach((function(t){return e.searchParams.delete(t)})),Object.entries(w.value).forEach((function(r){var n=A(r,2),o=n[0],a=n[1];if(a&&a.length>0){var i=t[o]||o;e.searchParams.set(i,a.join(","))}})),k.value?e.searchParams.set("subjects",k.value):e.searchParams.delete("subjects"),x.value?e.searchParams.set("standards",x.value):e.searchParams.delete("standards"),S.value?e.searchParams.set("regions",S.value):e.searchParams.delete("regions"),E.value&&"published_at:desc"!==E.value?e.searchParams.set("sort",E.value):e.searchParams.delete("sort"),window.history.replaceState({},"",e)},N=(0,n.computed)((function(){var e="is_live=true AND tenantIds=".concat(c);return Object.entries(w.value).forEach((function(t){var r=A(t,2),n=r[0],o=r[1];if(o&&o.length>0){var a=o.map((function(e){return"".concat(n,"='").concat(e.replace(/'/g,"\\'"),"'")})).join(" OR ");e+=" AND (".concat(a,")")}})),k.value&&(e+=" AND ".concat(k.value)),x.value&&(e+=" AND ".concat(x.value)),S.value&&(e+=" AND ".concat(S.value)),e})),V=(0,n.computed)((function(){var e=A(E.value.split(":"),2);return{attribute:e[0],direction:e[1]}})),j=(0,v.x)(u,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialFilters:N.value,initialSort:[V.value.attribute+":"+V.value.direction],facets:["grades","subjects.level1","subjects.level2","subjects.level3","standards.".concat(s,".standards"),"standards.".concat(s,".performances"),"type","teachable.provider.name","regi
2ons.level1","regions.level2","regions.level3","regions.level4","regions.level5"],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),D=j.hits,O=j.totalHits,F=j.totalPages,P=j.currentPage,R=j.isLoading,U=j.error,M=j.facetDistribution,G=j.setQuery,H=j.setFilters,q=j.setSort,Q=j.goToPage,Z=j.search,z=j.setResults,$=function(){return Object.keys(w.value).some((function(e){var t;return(null===(t=w.value[e])||void 0===t?void 0:t.length)>0}))||k.value||x.value||S.value};e.initialResults&&!$()&&z(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&($()?Z():z(e))})),(0,n.watch)(N,(function(e){H(e)})),(0,n.watch)((function(){return e.searchQuery}),(function(e){G(e||"",!1,!1)}),{immediate:!0}),(0,n.watch)((function(){return e.selectedField}),(function(t){var r="all"===t?["*"]:[t];Z(e.searchQuery,{attributesToSearchOn:r})})),(0,n.watch)(O,(function(e){l("update:hitCount",e)}),{immediate:!0});var K=(0,n.computed)((function(){return 0===O.value?0:12*(P.value-1)+1})),W=function(){var e,t=(e=I().mark((function e(t){var r,n;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=d.value.includes(t.id),e.next=4,B.Z.put(route("tm.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=d.value.indexOf(t.id))>-1&&d.value.splice(n,1):d.value.push(t.id),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error toggling bookmark:",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){L(a,n,o,i,l,"next",e)}function l(e){L(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return{bookmarkedIds:d,selectedFacets:w,subjectsFilterString:k,standardsFilterString:x,regionsFilterString:S,tenantSlug:s,perPage:12,currentSort:E,sortOptions:[{value:"published_at:desc",label:"Newest"},{value:"published_at:asc",label:"Oldest"},{value:"nb_views:desc",label:"Most Viewed"}],showing:K,hits:D,totalHits:O,totalPages:F,currentPage:P,isLoading:R,error:U,facetDistribution:M,goToPage:Q,sortGrades:function(e,t){var r=A(e,1)[0],n=A(t,1)[0];if("PK"===r)return-1;if("PK"===n)return 1;if("K"===r)return-1;if("K"===n)return 1;var o=parseInt(r),a=parseInt(n);return isNaN(o)||isNaN(a)?r.localeCompare(n):o-a},handleFacetFilterChange:function(e){var t=e.attribute,r=e.values,n=e.filterString;void 0!==n?("subjects"===t?k.value=n:"standards"===t?x.value=n:"regions"===t&&(S.value=n),n&&(0,y.K)({tenantId:c,filters:_({},t,[n])})):void 0!==r&&(w.value=T(T({},w.value),{},_({},t,r)),r&&r.length>0&&(0,y.K)({tenantId:c,filters:_({},t,r)})),C()},handleSortChange:function(e){E.value=e;var t=A(e.split(":"),2),r=t[0],n=t[1];q([r+":"+n]),C()},handleBookmark:W}}};const O=(0,r(83744).Z)(D,[["render",function(e,t,r,a,g,v){var y=(0,n.resolveComponent)("SelectedKeywordsDirect"),b=(0,n.resolveComponent)("GenericFacetFilter"),w=(0,n.resolveComponent)("SubjectsFilterHierarchical"),k=(0,n.resolveComponent)("StandardsFilterHierarchical"),x=(0,n.resolveComponent)("RegionsFilterDirect"),S=(0,n.resolveComponent)("TeachingMaterialItem"),E=(0,n.resolveComponent)("BaseTabContentDirect");return(0,n.openBlock)(),(0,n.createBlock)(E,{showing:a.showing,total:a.totalHits,"current-page":a.currentPage,"total-pages":a.totalPages,"is-loading":a.isLoading,"supports-sorting":!0,"sort-options":a.sortOptions,"current-sort":a.currentSort,onPageChange:a.goToPage,onSortChange:a.handleSortChange},{"selected-keywords":(0,n.withCtx)((function(){return[(0,n.createVNode)(y,{"selected-facets":a.selectedFacets,"subjects-filter-string":a.subjectsFilterString,"standards-filter-string":a.standardsFilterString,"regions-filter-string":a.regionsFilterString,"white-background":!0,onFilterChange:a.handleFacetFilterChange},null,8,["selected-facets","subjects-filter-string","standards-filter-string","regions-filter-string","onFilterChange"])]})),filters:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,[a.facetDistribution.grades?((0,n.openBlock)(),(0,n.createBlock)(b,{key:0,title:"Grades",attribute:"grades",facets:a.facetDistribution.grades,"current-filters":a.selectedFacets.grades||[],"sort-function":a.sortGrades,onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","sort-function","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution["subjects.level1"]?((0,n.openBlock)(),(0,n.createBlock)(w,{key:1,"facets-level1":a.facetDistribution["subjects.level1"],"facets-level2":a.facetDistribution["subjects.level2"]||{},"facets-level3":a.facetDistribution["subjects.level3"]||{}
2,"current-filters":a.subjectsFilterString,"single-select":!0,onFilterChange:a.handleFacetFilterChange},null,8,["facets-level1","facets-level2","facets-level3","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.type?((0,n.openBlock)(),(0,n.createBlock)(b,{key:2,title:"Resource Type",attribute:"type",facets:a.facetDistribution.type,"current-filters":a.selectedFacets.type||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution["standards.".concat(a.tenantSlug,".standards")]?((0,n.openBlock)(),(0,n.createBlock)(k,{key:3,"facets-level1":a.facetDistribution["standards.".concat(a.tenantSlug,".standards")],"facets-level2":a.facetDistribution["standards.".concat(a.tenantSlug,".performances")]||{},"current-filters":a.standardsFilterString,"tenant-slug":a.tenantSlug,"single-select":!0,onFilterChange:a.handleFacetFilterChange},null,8,["facets-level1","facets-level2","current-filters","tenant-slug","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution["teachable.provider.name"]?((0,n.openBlock)(),(0,n.createBlock)(b,{key:4,title:"Providers",attribute:"teachable.provider.name",facets:a.facetDistribution["teachable.provider.name"],"current-filters":a.selectedFacets["teachable.provider.name"]||[],"show-search":!0,"max-items":8,onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution["regions.level1"]?((0,n.openBlock)(),(0,n.createBlock)(x,{key:5,"facets-level1":a.facetDistribution["regions.level1"],"facets-level2":a.facetDistribution["regions.level2"]||{},"facets-level3":a.facetDistribution["regions.level3"]||{},"facets-level4":a.facetDistribution["regions.level4"]||{},"facets-level5":a.facetDistribution["regions.level5"]||{},"current-filters":a.regionsFilterString,"single-select":!0,onFilterChange:a.handleFacetFilterChange},null,8,["facets-level1","facets-level2","facets-level3","facets-level4","facets-level5","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0)])]})),"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("resources.index"),class:"block"},o(t[0]||(t[0]=[(0,n.createElementVNode)("div",{class:"flex items-center justify-between p-4 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors duration-200"},[(0,n.createElementVNode)("span",{class:"font-medium text-gray-900 text-sm"},"Go to all Teaching Resources"),(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})])],-1)])),8,l)]})),"results-header":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",c,[0===a.totalHits?((0,n.openBlock)(),(0,n.createElementBlock)("span",s,"0 results")):((0,n.openBlock)(),(0,n.createElementBlock)("span",u,"Showing "+(0,n.toDisplayString)(a.showing)+"-"+(0,n.toDisplayString)(Math.min(a.currentPage*a.perPage,a.totalHits))+" out of "+(0,n.toDisplayString)(a.totalHits)+" results",1)),(0,n.createElementVNode)("div",d,[r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("span",f,"|")):(0,n.createCommentVNode)("",!0),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("p",p,[t[1]||(t[1]=(0,n.createTextVNode)(" Searching in ",-1)),(0,n.createElementVNode)("span",h,(0,n.toDisplayString)(r.selectedFieldLabel),1),(0,n.createTextVNode)(' for "'+(0,n.toDisplayString)(r.searchQuery)+'" ',1)])):(0,n.createCommentVNode)("",!0)])])]})),"results-grid":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",m,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.hits,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(S,{key:e.id,resource:e,isLoadedFromAlgolia:!1,isBookmarked:a.bookmarkedIds.includes(e.id),onBookmark:a.handleBookmark},null,8,["resource","isBookmarked","onBookmark"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","sort-options","current-sort","onPageChange","onSortChange"])}]])},98032:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var n=r(41916),o={class:"overflow-hidden flex-shrink-0 bottom-0 left-0 pr-2 pl-1 -ml-1 -mb-1 absolute bg-white flex items-center justify-center rounded-tr-xl rounded-bl-xl text-sm z-10"},a={key:0},i={key:1},l={class:"w-full h-full resource-card duration-150 object-cover overflow-hidden rounded-bl-[13px] rounded-tr-xl rounded-tl-xl rounded-br-xl"},c=["src"],s=["href"],u={key:1,class:"line-clamp-3 mt-[12px] font-semibold"};var d=r(15973),f=r(76306),p=r(87879),h=r(72326),m=r(3754),g=r(47393);const v={components:{ItemCard:d.Z,AisHighlight:f.YE,Grades:m.Z},props:{fromUnitPlanPage:{type:Boolean,default:!1},isUnitPlan:{type:Boolean,default:!1},isLoadedFromAlgolia:{default:!0,type:Boolean},isActivity:{type:Boolean,default:!1},material:Object,index:{type:Number,default:0},position:{type:Number,default:null},queryUid:{type:String,default:null},buttonTextColor:{type:String,default:null},ctaColor:{type:String,default:null}},computed:{url:function(){if(!this.material.slug)return"#";var e;if(this.material.is_internal_resource?e=route("stc.show",this.material.slug):this.material.is_internal_unit_plan&&(e=route("stc.unit",this.material.slug)),e&&this.queryUid){var t=e.includes("?")?"&":"?";return e+t+"queryUid="+encodeURIComponent(this.queryUid)}return e},providerImageUrl:function(){var e;return null!==(e=this.material.firstProviderCircleImageUrl)&&void 0!==e?e:this.material.firstProviderImageUrl},imageUrl:function(){return this.material.image_conversions&&this.material.image_conversions[240]?this.material.image_conversions[240]:this.material.image_conversions&&this.material.image_conversions[360]?this.material.image_conversions[360]:this.material.image}},methods:{notifyAlgoliaAboutClick:function(){var e=this.teachingMaterialsIndex||"teaching_materials";if((0,g.ob)({indexUid:e,objectId:String(this.material.id),objectName:this.material.title,position:this.position,queryUid:this.queryUid}),this.aa){var t=this.material.id;this.aa("clickedObjectIDs",{objectIDs:[t.toString()],eventName:"Internal Resource Clicked",index:this.teachingMaterialsIndex})}},sortGradeBands:h.dP},mounted:function(){console.log("iruetghriutghirutgh")},setup:function(){var e,t,r,o,a=(0,n.inject)("initAndGetAlgoliaEventDispatcher")(),i=(0,p.qt)();return{aa:a,teachingMaterialsIndex:(null===(e=i.props.integrations)||void 0===e||null===(t=e.meilisearch)||void 0===t?void 0:t.teachingMaterialsIndex)||(null===(r=i.props.integrations)||void 0===r||null===(o=r.algolia)||void 0===o?void 0:o.teachingMaterialsIndex)||"teaching_materials"}}};const y=(0,r(83744).Z)(v,[["render",function(e,t,r,d,f,p){var h=(0,n.resolveComponent)("Grades"),m=(0,n.resolveComponent)("AisHighlight"),g=(0,n.resolveComponent)("ItemCard");return(0,n.openBlock)(),(0,n.createBlock)(g,{item:r.material,imageUrl:p.imageUrl,isBookmarked:!0,showBookMark:!r.isUnitPlan,bookmarkRoute:"tm.bookmark",actionUrl:p.url,onClick:t[0]||(t[0]=function(e){return p.notifyAlgoliaAboutClick()})},{badge:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",o,[r.material.is_internal_unit_plan?((0,n.openBlock)(),(0,n.createElementBlock)("span",a,"Unit Plan")):((0,n.openBlock)(),(0,n.createElementBlock)("span",i,(0,n.toDisplayString)(r.material.type),1))])]})),image:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("img",{class:"w-full h-full object-cover group-hover:scale-105 duration-150",src:p.imageUrl,alt:"Avatar"},null,8,c)])]})),bands:(0,n.withCtx)((function(){return[(0,n.createVNode)(h,{grades:r.material.grades},null,8,["grades"])]})),title:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{href:p.url},[r.isLoadedFromAlgolia?((0,n.openBlock)(),(0,n.createBlock)(m,{key:0,attribute:"title",hit:r.material,"class-names":{"ais-Highlight":"font-semibold line-clamp-3"}},null,8,["hit"])):((0,n.openBlock)(),(0,n.createElementBlock)("h3",u,(0,n.toDisplayString)(r.material.title),
21))],8,s)]})),tags:(0,n.withCtx)((function(){return[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.material.subjects_list_short,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,class:"text-xs rounded-2xl bg-[#EEF1F6] px-2.5 py-0.5"},(0,n.toDisplayString)(e),1)})),128))]})),_:1},8,["item","imageUrl","showBookMark","actionUrl"])}]])},5441:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:""},l={key:0,class:"mb-4"},c={class:"-ml-2 flex flex-wrap"},s=["onClick"],u={class:"text-start flex-shrink-[100]"},d={key:1,class:"mb-4"},f={class:"-ml-2 flex flex-wrap"},p={class:"text-start flex-shrink-[100]"},h={key:2,class:"mb-4"},m={class:"-ml-2 flex flex-wrap"},g={class:"text-start flex-shrink-[100]"},v={key:3,class:"mb-4"},y={class:"-ml-2 flex flex-wrap"},b=["onClick"],w={class:"text-start flex-shrink-[100]"};const k={props:{selectedFacets:{type:Object,required:!0},subjectsFilterString:{type:String,default:""},standardsFilterString:{type:String,default:""},whiteBackground:{type:Boolean,default:!1}},emits:["filter-change"],computed:{selectedGrades:function(){return this.selectedFacets.grades||[]},selectedTypes:function(){return this.selectedFacets.type||[]},selectedUnitPlan:function(){return(this.selectedFacets.is_internal_unit_plan||[]).includes("true")},displayedSubject:function(){if(!this.subjectsFilterString)return null;var e=this.subjectsFilterString.match(/subjects\.level3='([^']+)'/);if(e)return this.formatKeyword(e[1]);var t=this.subjectsFilterString.match(/subjects\.level2='([^']+)'/);if(t)return this.formatKeyword(t[1]);var r=this.subjectsFilterString.match(/subjects\.level1='([^']+)'/);return r?this.formatKeyword(r[1]):null},displayedStandard:function(){if(!this.standardsFilterString)return null;var e=this.standardsFilterString.match(/performances='([^']+)'/);if(e)return this.formatKeyword(e[1]);var t=this.standardsFilterString.match(/standards='([^']+)'/);return t?this.formatKeyword(t[1]):null}},methods:{formatKeyword:function(e){var t=e.split(">");return t[t.length-1].trim()},removeGrade:function(e){var t=this.selectedGrades.filter((function(t){return t!==e}));this.$emit("filter-change",{attribute:"grades",values:t})},removeType:function(e){var t=this.selectedTypes.filter((function(t){return t!==e}));this.$emit("filter-change",{attribute:"type",values:t})},removeUnitPlan:function(){this.$emit("filter-change",{attribute:"is_internal_unit_plan",values:[]})},clearSubjects:function(){this.$emit("filter-change",{attribute:"subjects",filterString:""})},clearStandards:function(){this.$emit("filter-change",{attribute:"standards",filterString:""})}}};const x=(0,r(83744).Z)(k,[["render",function(e,t,r,a,k,x){return(0,n.openBlock)(),(0,n.createElementBlock)("div",i,[x.selectedGrades.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",l,[t[4]||(t[4]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Grades",-1)),(0,n.createElementVNode)("div",c,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(x.selectedGrades,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:e,onClick:function(t){return x.removeGrade(e)},class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",u,(0,n.toDisplayString)(e),1),t[3]||(t[3]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,s)})),128))])])):(0,n.createCommentVNode)("",!0),x.displayedSubject?((0,n.openBlock)(),(0,n.createElementBlock)("div",d,[t[6]||(t[6]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Subjects",-1)),(0,n.createElementVNode)("div",f,[(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=function(){return x.clearSubjects&&x.clearSubjects.apply(x,arguments)}
2),class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",p,(0,n.toDisplayString)(x.displayedSubject),1),t[5]||(t[5]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],2)])])):(0,n.createCommentVNode)("",!0),x.displayedStandard?((0,n.openBlock)(),(0,n.createElementBlock)("div",h,[t[8]||(t[8]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Standards",-1)),(0,n.createElementVNode)("div",m,[(0,n.createElementVNode)("button",{onClick:t[1]||(t[1]=function(){return x.clearStandards&&x.clearStandards.apply(x,arguments)}),class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",g,(0,n.toDisplayString)(x.displayedStandard),1),t[7]||(t[7]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],2)])])):(0,n.createCommentVNode)("",!0),x.selectedTypes.length||x.selectedUnitPlan?((0,n.openBlock)(),(0,n.createElementBlock)("div",v,[t[11]||(t[11]=(0,n.createElementVNode)("h3",{class:"text-lg capitalize font-medium overflow-ellipsis w-full"},"Resource Type",-1)),(0,n.createElementVNode)("div",y,[x.selectedUnitPlan?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:t[2]||(t[2]=function(){return x.removeUnitPlan&&x.removeUnitPlan.apply(x,arguments)}),class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},o(t[9]||(t[9]=[(0,n.createElementVNode)("span",{class:"text-start flex-shrink-[100]"},"Unit Plan",-1),(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),2)):(0,n.createCommentVNode)("",!0),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(x.selectedTypes,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:e,onClick:function(t){return x.removeType(e)},class:(0,n.normalizeClass)([r.whiteBackground?"bg-white":"bg-primary-100","flex items-center space-x-2 py-2 px-3 rounded-xl mt-2 ml-2 text-lg"])},[(0,n.createElementVNode)("span",w,(0,n.toDisplayString)(e),1),t[10]||(t[10]=(0,n.createElementVNode)("svg",{class:"w-3 h-3 flex-shrink-0",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],10,b)})),128))])])):(0,n.createCommentVNode)("",!0)])}]])},30379:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"text-sm text-gray-500"},l=["innerHTML"];var c=r(28415),s=r(47393),u=r(87879);const d={components:{BaseCard:c.Z},props:{article:{type:Object,required:!0},view:{type:String,default:"mobile",validator:function(e){return["mobile","mobile-grid","desktop"].includes(e)}},isBookmarked:{type:Boolean,default:!1},position:{type:Number,default:null},queryUid:{type:String,default:null}},emits:["bookmark"],setup:function(e){var t,r,n,o,a={title:e.article.title,image:e.article.image,subtitle:e.article.date,description:e.article.description},i=(0,u.qt)();return{formattedArticle:a,newsIndex:(null===(t=i.props.integrations)||void 0===t||null===(r=t.meilisearch)||void 0===r?void 0:r.newsIndex)||(null===(n=i.props.integrations)||void 0===n||null===(o=n.algolia)||void 0===o?void 0:o.newsIndex)||"news"}},computed:{articleUrl:function(){var e=route("news.show",this.article.slug);
2if(e&&this.queryUid){var t=e.includes("?")?"&":"?";return e+t+"queryUid="+encodeURIComponent(this.queryUid)}return e}},methods:{stripHtmlTags:function(e){return e.replace(/<[^>]*>/g,"").replace(/ /g," ")},handleClick:function(){(0,s.ob)({indexUid:this.newsIndex,objectId:String(this.article.id),objectName:this.article.title,position:this.position,queryUid:this.queryUid})}}};var f=r(93379),p=r.n(f),h=r(48365),m={insert:"head",singleton:!1};p()(h.Z,m);h.Z.locals;const g=(0,r(83744).Z)(d,[["render",function(e,t,r,a,c,s){var u=(0,n.resolveComponent)("BaseCard");return(0,n.openBlock)(),(0,n.createBlock)(u,{item:a.formattedArticle,view:r.view,"is-bookmarked":r.isBookmarked,"show-stats":!0,"clamp-title":!1,to:s.articleUrl,"fallback-image":"/img/news/placeholder.webp",onBookmark:t[0]||(t[0]=function(t){return e.$emit("bookmark",r.article)}),onClick:s.handleClick},{"stats-icon":(0,n.withCtx)((function(){return o(t[1]||(t[1]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)]))})),pretitle:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("p",i,(0,n.toDisplayString)(r.article.date),1)]})),"stats-text":(0,n.withCtx)((function(){return[(0,n.createTextVNode)((0,n.toDisplayString)(r.article.nbVisits),1)]})),description:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("p",{innerHTML:s.stripHtmlTags(r.article.description),class:"text-sm text-gray-600 mb-2"},null,8,l)]})),subtitle:(0,n.withCtx)((function(){return o(t[2]||(t[2]=[]))})),_:1},8,["item","view","is-bookmarked","to","onClick"])}],["__scopeId","data-v-75873320"]])},2708:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:"overflow-hidden flex-shrink-0 bottom-0 left-0 pr-2 pl-1 pb-0.5 -ml-1 -mb-1 absolute bg-white flex items-center justify-center rounded-tr-xl rounded-bl-xl text-sm z-10"},l={class:"w-full h-full resource-card duration-150 object-cover overflow-hidden rounded-bl-[13px] rounded-tr-xl rounded-tl-xl rounded-br-xl"},c=["src"],s=["href"],u={key:1,class:"line-clamp-3 mt-[12px] font-semibold"},d={class:"space-x-1 mb-[12px] flex items-center"},f={key:0,class:"text-[12px]"},p={key:1,class:"text-[12px]"},h={class:"-m-4 p-[12px] space-x-2 overflow-x-scroll",style:{"-ms-overflow-style":"none","scrollbar-width":"none"}},m={class:"text-xs rounded-2xl bg-[#EEF1F6] px-2.5 py-0.5 whitespace-nowrap"};var g=r(15973),v=r(76306),y=r(87879),b=r(72326),w=r(3754),k=r(47393);function x(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}const C={components:{ItemCard:g.Z,AisHighlight:v.YE,Grades:w.Z},props:{opportunity:Object,isAlgolia:{default:!0,type:Boolean},tenantState:{type:String,default:null},position:{type:Number,default:null},queryUid:{type:String,default:null}},computed:{url:function(){var e,t=route("plos.show",null!==(e=this.opportunity.slug)&&void 0!==e?e:this.opportunity.id);if(t&&this.queryUid){var r=t.includes("?")?"&":"?";return t+r+"queryUid="+encodeURIComponent(this.queryUid)}return t},normalizedStates:function(){return this.opportunity.states?Array.isArray(this.opportunity.states)?this.opportunity.states:"object"===E(this.opportunity.states)?Object.values(this.opportunity.states):[]:[]},sortedStates:function(){var e=this;if(!this.normalizedStates.length)return[];var t=this.normalizedStates.find((function(t){return t===e.tenantState}));return t?[t].concat(x(this.normalizedStates.filter((function(t){return t!==e.tenantState})))):this.normalizedStates},dateRangeText:function(){var e;return null!==(e=this.opportunity)&&void 0!==e&&e.starts_at?this.opportunity.ends_at?"".concat(this.opportunity.starts_at," - ").concat(this.opportunity.ends_at):this.opportunity.starts_at:null},mergedGrades:function(){return this.opportunity.grades.map((function(e){return"object"===E(e)?e.name:e}))},opportunityType:function(){return"object"===E(this.opportunity.type)?this.opportunity.type.name:this.opportunity.type}},methods:{notifyAlgoliaAboutClick:function(){var e=this.pdIndex||"professional_opportunities";if((0,k.ob)({indexUid:e,objectId:String(this.opportunity.id),objectName:this.opportunity.name,position:this.position,queryUid:this.queryUid}),this.aa){var t=this.opportunity.id;this.aa("clickedObjectIDs",{objectIDs:[t.toString()],eventName:"Professional Development Clicked",index:this.teachingMaterialsIndex})}},sortGradeBands:b.dP},setup:function(){var e,t,r,o,a,i,l=(0,n.inject)("initAndGetAlgoliaEventDispatcher")(),c=(0,y.qt)();return{aa:l,teachingMaterialsIndex:(null===(e=c.props.integrations)||void 0===e||null===(t=e.algolia)||void 0===t?void 0:t.teachingMaterialsIndex)||"teaching_materials",pdIndex:(null===(r=c.props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.pdIndex)||(null===(a=c.props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.pdIndex)||"professional_opportunities"}}};const B=(0,r(83744).Z)(C,[["render",function(e,t,r,a,g,v){var y=(0,n.resolveComponent)("Grades"),b=(0,n.resolveComponent)("AisHighlight"),w=(0,n.resolveComponent)("PrimaryButton"),k=(0,n.resolveComponent)("ItemCard");return(0,n.openBlock)(),(0,n.createBlock)(k,{item:r.opportunity,imageUrl:r.opportunity.thumbnailUrl,bookmarkRoute:"plos.bookmark",actionUrl:v.url,onClick:t[1]||(t[1]=function(e){return v.notifyAlgoliaAboutClick()})},(0,n.createSlots)({badge:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,(0,n.toDisplayString)(v.opportunityType)+" - "+(0,n.toDisplayString)(r.opportunity.is_online?"Online":"In Person"),1)]})),image:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("img",{alt:"Thumbn
2ail",class:"w-full h-full object-cover group-hover:scale-105 duration-150",src:r.opportunity.thumbnailUrl},null,8,c)])]})),bands:(0,n.withCtx)((function(){return[(0,n.createVNode)(y,{grades:v.mergedGrades},null,8,["grades"])]})),title:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{href:v.url},[r.isAlgolia?((0,n.openBlock)(),(0,n.createBlock)(b,{key:0,attribute:"name",hit:r.opportunity,"class-names":{"ais-Highlight":"font-semibold line-clamp-3"}},null,8,["hit"])):((0,n.openBlock)(),(0,n.createElementBlock)("div",u,(0,n.toDisplayString)(r.opportunity.name),1))],8,s)]})),description:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",d,[t[2]||(t[2]=(0,n.createElementVNode)("svg",{width:"12",height:"14",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M2.16667 17.3334C1.70833 17.3334 1.31597 17.1702 0.989583 16.8438C0.663194 16.5174 0.5 16.1251 0.5 15.6667V4.00008C0.5 3.54175 0.663194 3.14939 0.989583 2.823C1.31597 2.49661 1.70833 2.33341 2.16667 2.33341H3V1.50008C3 1.26397 3.07986 1.06605 3.23958 0.906331C3.39931 0.746609 3.59722 0.666748 3.83333 0.666748C4.06944 0.666748 4.26736 0.746609 4.42708 0.906331C4.58681 1.06605 4.66667 1.26397 4.66667 1.50008V2.33341H11.3333V1.50008C11.3333 1.26397 11.4132 1.06605 11.5729 0.906331C11.7326 0.746609 11.9306 0.666748 12.1667 0.666748C12.4028 0.666748 12.6007 0.746609 12.7604 0.906331C12.9201 1.06605 13 1.26397 13 1.50008V2.33341H13.8333C14.2917 2.33341 14.684 2.49661 15.0104 2.823C15.3368 3.14939 15.5 3.54175 15.5 4.00008V15.6667C15.5 16.1251 15.3368 16.5174 15.0104 16.8438C14.684 17.1702 14.2917 17.3334 13.8333 17.3334H2.16667ZM2.16667 15.6667H13.8333V7.33341H2.16667V15.6667ZM2.16667 5.66675H13.8333V4.00008H2.16667V5.66675ZM8 10.6667C7.76389 10.6667 7.56597 10.5869 7.40625 10.4272C7.24653 10.2674 7.16667 10.0695 7.16667 9.83341C7.16667 9.5973 7.24653 9.39939 7.40625 9.23966C7.56597 9.07994 7.76389 9.00008 8 9.00008C8.23611 9.00008 8.43403 9.07994 8.59375 9.23966C8.75347 9.39939 8.83333 9.5973 8.83333 9.83341C8.83333 10.0695 8.75347 10.2674 8.59375 10.4272C8.43403 10.5869 8.23611 10.6667 8 10.6667ZM4.66667 10.6667C4.43056 10.6667 4.23264 10.5869 4.07292 10.4272C3.91319 10.2674 3.83333 10.0695 3.83333 9.83341C3.83333 9.5973 3.91319 9.39939 4.07292 9.23966C4.23264 9.07994 4.43056 9.00008 4.66667 9.00008C4.90278 9.00008 5.10069 9.07994 5.26042 9.23966C5.42014 9.39939 5.5 9.5973 5.5 9.83341C5.5 10.0695 5.42014 10.2674 5.26042 10.4272C5.10069 10.5869 4.90278 10.6667 4.66667 10.6667ZM11.3333 10.6667C11.0972 10.6667 10.8993 10.5869 10.7396 10.4272C10.5799 10.2674 10.5 10.0695 10.5 9.83341C10.5 9.5973 10.5799 9.39939 10.7396 9.23966C10.8993 9.07994 11.0972 9.00008 11.3333 9.00008C11.5694 9.00008 11.7674 9.07994 11.9271 9.23966C12.0868 9.39939 12.1667 9.5973 12.1667 9.83341C12.1667 10.0695 12.0868 10.2674 11.9271 10.4272C11.7674 10.5869 11.5694 10.6667 11.3333 10.6667ZM8 14.0001C7.76389 14.0001 7.56597 13.9202 7.40625 13.7605C7.24653 13.6008 7.16667 13.4029 7.16667 13.1667C7.16667 12.9306 7.24653 12.7327 7.40625 12.573C7.56597 12.4133 7.76389 12.3334 8 12.3334C8.23611 12.3334 8.43403 12.4133 8.59375 12.573C8.75347 12.7327 8.83333 12.9306 8.83333 13.1667C8.83333 13.4029 8.75347 13.6008 8.59375 13.7605C8.43403 13.9202 8.23611 14.0001 8 14.0001ZM4.66667 14.0001C4.43056 14.0001 4.23264 13.9202 4.07292 13.7605C3.91319 13.6008 3.83333 13.4029 3.83333 13.1667C3.83333 12.9306 3.91319 12.7327 4.07292 12.573C4.23264 12.4133 4.43056 12.3334 4.66667 12.3334C4.90278 12.3334 5.10069 12.4133 5.26042 12.573C5.42014 12.7327 5.5 12.9306 5.5 13.1667C5.5 13.4029 5.42014 13.6008 5.26042 13.7605C5.10069 13.9202 4.90278 14.0001 4.66667 14.0001ZM11.3333 14.0001C11.0972 14.0001 10.8993 13.9202 10.7396 13.7605C10.5799 13.6008 10.5 13.4029 10.5 13.1667C10.5 12.9306 10.5799 12.7327 10.7396 12.573C10.8993 12.4133 11.0972 12.3334 11.3333 12.3334C11.5694 12.3334 11.7674 12.4133 11.9271 12.573C12.0868 12.7327 12.1667 12.9306 12.1667 13.1667C12.1667 13.4029 12.0868 13.6008 11.9271 13.7605C11.7674 13.9202 11.5694 14.0001 11.3333 14.0001Z",fill:"#1C1B1F"})],-1)),v.dateRangeText?((0,n.openBlock)(),(0,n.createElementBlock)("span",f,(0,n.toDisplayString)(v.dateRangeText),1)):((0,n.openBlock)(),(0,n.createElementBlock)("span",p,"Ongoing"))])]})),_:2},[v.url?{name:"action",fn:(0,n.withCtx)((function(){return[(0,n.createVNode)(w,{onClick:t[0]||(t[0]=function(e){return v.notifyAlgoliaAboutClick()}),href:v.url},{default:(0,n.withCtx)((function(){return o(t[3]||(t[3]=[(0,n.createElementVNode)("span",{class:"capitalize"},"View Resource",-1)]))})),_:1},8,["href"])]})),key:"0"}:void 0,v.normalizedStates.length>0?{name:"tags",fn:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",h,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(v.sortedStates,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",m,(0,n.toDisplayString)(e),1)})),256))])]})),key:"1"}:void 0]),1032,["item","imageUrl","actionUrl"])}]])},38320:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var n=r(41916),o={class:(0,n.normalizeClass)(["rounded-xl bg-primary-100 relative group"])},a={class:""}
2,i={xmlns:"http://www.w3.org/2000/svg",height:"24",fill:"currentColor",viewBox:"0 96 960 960",width:"24"},l={key:0,class:"",d:"m296 711-56-56 240-240 240 240-56 56-184-184-184 184Z"},c={key:1,class:"",d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},s={class:"px-[13px] py-[19px] -mt-2 text-lg overflow-hidden"},u={class:"group"},d={class:"flex space-x-2"},f=["id","value","checked","onChange"],p=["onClick"],h={class:"text-xs"},m={key:0,class:"ml-2"},g={class:"flex space-x-4 mt-1"},v=["id","value","checked","onChange"],y=["onClick"],b={class:"text-xs"},w={key:0,class:"ml-2"},k={class:"flex space-x-4 mt-1"},x=["id","value","checked","onChange"],S=["onClick"],E={class:"text-xs"},C={key:0,class:"ml-2"},B={class:"flex space-x-4 mt-1"},N=["id","value","checked","onChange"],I=["onClick"],L={class:"text-xs"},V={key:0,class:"ml-2"},T={class:"flex space-x-4 mt-1"},_=["id","value","checked","onChange"],A=["onClick"],j={class:"text-xs"};function D(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||F(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||F(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){if(e){if("string"==typeof e)return P(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)?P(e,t):void 0}}function P(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}const R={name:"RegionsFiltererDirect",props:{facetsLevel1:{type:Object,default:function(){return{}}},facetsLevel2:{type:Object,default:function(){return{}}},facetsLevel3:{type:Object,default:function(){return{}}},facetsLevel4:{type:Object,default:function(){return{}}},facetsLevel5:{type:Object,default:function(){return{}}},currentFilters:{type:Object,default:function(){return{}}},extraHeaderContainerClasses:{type:String,default:""},singleSelect:{type:Boolean,default:!1}},emits:["filter-change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(!1),a=(0,n.ref)([]),i=(0,n.ref)(""),l=(0,n.computed)((function(){return Object.entries(e.facetsLevel1||{}).map((function(e){var t=O(e,2);return{value:t[0],count:t[1]}})).sort((function(e,t){return e.value.localeCompare(t.value)}))})),c=function(t,r){var n=[],o={};switch(r){case 2:o=e.facetsLevel2||{};break;case 3:o=e.facetsLevel3||{};break;case 4:o=e.facetsLevel4||{};break;case 5:o=e.facetsLevel5||{};break;default:return[]}return Object.entries(o).forEach((function(e){var r=O(e,2),o=r[0],a=r[1],i=o.split(" > "),l=t.split(" > ");i.length===l.length+1&&o.startsWith(t+" > ")&&n.push({value:o,count:a})})),n.sort((function(e,t){return e.value.localeCompare(t.value)}))},s=function(e){return a.value.includes(e)};return{expanded:o,selectedRegions:a,sortedRegionsLevel1:l,getSubRegions:c,getRegionLabel:function(e){var t=e.split(" > ");return t[t.length-1]},isRegionSelected:s,shouldExpandParent:function(e){return!!s(e)||c(e,2).some((function(e){return s(e.value)}))},toggleRegion:function(t){if(a.value.includes(t))a.value=a.value.filter((function(e){return e!==t})),a.value=a.value.filter((function(e){return!e.startsWith(t+" > ")}));else if(e.singleSelect){a.value=[t];for(var n=t.split(" > "),o=1;o<n.length;o++){var l=n.slice(0,o).join(" > ");a.value.push(l)}}else{a.value=D(new Set(a.value)),a.value.includes(t)||a.value.push(t);for(var c=t.split(" > "),s=1;s<c.length;s++){var u=c.slice(0,s).join(" > ");a.value.includes(u)||a.value.push(u)}}if(console.log("[REG-FILTER-08] Final selectedRegions:",a.value),a.value.length>0){console.log("[REG-FILTER-09] Building filter, selectedRegions length:",a.value.length);var d=a.value.map((function(e){return(e.match(/>/g)||[]).length})),f=Math.max.apply(Math,D(d));console.log("[REG-FILTER-10] Max level:",f);var p=a.value.filter((function(e){return(e.match(/>/g)||[]).length===f}));console.log("[REG-FILTER-11] Deepest level selections:",p);var h=a.value.filter((function(e){return(e.match(/>/g)||[]).length<f})).filter((function(e){return!a.value.some((function(t){return t.startsWith(e+" > ")}))}));console.log("[REG-FILTER-12] Parents without children:",h),p=D(new Set([].concat(D(p),D(h)))),console.log("[REG-FILTER-13] Final deepest level selections (deduplicated):",p);var m=p.map((function(e){var t=(e.match(/>/g)||[]).length+1;return"regions.level".concat(t,"='").concat(e.replace(/'/g,"\\'"),"'")}));console.log("[REG-FILTER-14] Filter parts:",m);var g=m.join(" OR ");i.value=g,console.log("[REG-FILTER-14b] Storing lastEmittedFilter:",i.value),r("filter-change",{attribute:"regions",filterString:g})}else i.value="",r("filter-change",{attribute:"regions",filterString:""})}}}};var U=r(93379),M=r.n(U),G=r(57264),H={insert:"head",singleton:!1};M()(G.Z,H);G.Z.locals;const q=(0,r(83744).Z)(R,[["render",function(e,t,r,D,O,F){return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createElementVNode)("div",{onClick:t[0]||(t[0]=function(e){return D.expanded=!D.expanded}),class:(0,n.normalizeClass)(["flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg border px-4 py-2.5 bg-white"])},[t[1]||(t[1]=(0,n.createElementVNode)("span",{class:"text-base font-medium"},"Locations",-1)),(0,n.createElementVNode)("button",a,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",i,[D.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("path",l)):((0,n.openBlock)(),(0,n.createElementBlock)("path",c))]))])]),(0,n.createVNode)(n.Transition,{name:"filter-expand"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("div",u,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(D.sortedRegionsLevel1,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value,class:"group"},[(0,n.createElementVNode)("div",d,[(0,n.createElementVNode)("input",{ref_for:!0,ref:"topLevelCheckbox",type:"checkbox",class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500",i
2d:"region-".concat(e.value),value:e.value,checked:D.isRegionSelected(e.value),onChange:function(t){return D.toggleRegion(e.value)}},null,40,f),(0,n.createElementVNode)("span",{onClick:function(t){return D.toggleRegion(e.value)},class:"line-clamp-2 cursor-pointer"},[(0,n.createTextVNode)((0,n.toDisplayString)(e.value)+" ",1),(0,n.createElementVNode)("span",h,"("+(0,n.toDisplayString)(e.count)+")",1)],8,p)]),D.shouldExpandParent(e.value)&&D.getSubRegions(e.value,2).length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",m,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(D.getSubRegions(e.value,2),(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value},[(0,n.createElementVNode)("div",g,[(0,n.createElementVNode)("input",{type:"checkbox",id:"region-".concat(e.value),value:e.value,checked:D.isRegionSelected(e.value),onChange:function(t){return D.toggleRegion(e.value)},class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500"},null,40,v),(0,n.createElementVNode)("span",{class:"line-clamp-2 cursor-pointer",onClick:function(t){return D.toggleRegion(e.value)}},[(0,n.createTextVNode)((0,n.toDisplayString)(D.getRegionLabel(e.value))+" ",1),(0,n.createElementVNode)("span",b,"("+(0,n.toDisplayString)(e.count)+")",1)],8,y)]),D.shouldExpandParent(e.value)&&D.getSubRegions(e.value,3).length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",w,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(D.getSubRegions(e.value,3),(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value},[(0,n.createElementVNode)("div",k,[(0,n.createElementVNode)("input",{type:"checkbox",id:"region-".concat(e.value),value:e.value,checked:D.isRegionSelected(e.value),onChange:function(t){return D.toggleRegion(e.value)},class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500"},null,40,x),(0,n.createElementVNode)("span",{class:"line-clamp-2 cursor-pointer",onClick:function(t){return D.toggleRegion(e.value)}},[(0,n.createTextVNode)((0,n.toDisplayString)(D.getRegionLabel(e.value))+" ",1),(0,n.createElementVNode)("span",E,"("+(0,n.toDisplayString)(e.count)+")",1)],8,S)]),D.shouldExpandParent(e.value)&&D.getSubRegions(e.value,4).length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",C,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(D.getSubRegions(e.value,4),(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value},[(0,n.createElementVNode)("div",B,[(0,n.createElementVNode)("input",{type:"checkbox",id:"region-".concat(e.value),value:e.value,checked:D.isRegionSelected(e.value),onChange:function(t){return D.toggleRegion(e.value)},class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500"},null,40,N),(0,n.createElementVNode)("span",{class:"line-clamp-2 cursor-pointer",onClick:function(t){return D.toggleRegion(e.value)}},[(0,n.createTextVNode)((0,n.toDisplayString)(D.getRegionLabel(e.value))+" ",1),(0,n.createElementVNode)("span",L,"("+(0,n.toDisplayString)(e.count)+")",1)],8,I)]),D.shouldExpandParent(e.value)&&D.getSubRegions(e.value,5).length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",V,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(D.getSubRegions(e.value,5),(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value},[(0,n.createElementVNode)("div",T,[(0,n.createElementVNode)("input",{type:"checkbox",id:"region-".concat(e.value),value:e.value,checked:D.isRegionSelected(e.value),onChange:function(t){return D.toggleRegion(e.value)},class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500"},null,40,_),(0,n.createElementVNode)("span",{class:"line-clamp-2 cursor-pointer",onClick:function(t){return D.toggleRegion(e.value)}},[(0,n.createTextVNode)((0,n.toDisplayString)(D.getRegionLabel(e.value))+" ",1),(0,n.createElementVNode)("span",j,"("+(0,n.toDisplayString)(e.count)+")",1)],8,A)])])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))])):(0,n.createCommentVNode)("",!0)])}
2)),128))])],512),[[n.vShow,D.expanded]])]})),_:1})])}],["__scopeId","data-v-19d7f00a"]])},60578:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={width:"41",height:"45",viewBox:"0 0 41 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const l={},c=(0,r(83744).Z)(l,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("svg",i,o(t[0]||(t[0]=[(0,n.createStaticVNode)('<g filter="url(#filter0_d_1092_2850)"><path d="M4 0H20.5H37V33.7574C37 36.4301 33.7686 37.7686 31.8787 35.8787L22.6213 26.6213C21.4497 25.4497 19.5503 25.4497 18.3787 26.6213L9.12132 35.8787C7.23142 37.7686 4 36.4301 4 33.7574V0Z" fill="currentColor"></path><path d="M4.25 0.25H20.5H36.75V33.7574C36.75 36.2073 33.7879 37.4343 32.0555 35.7019L22.7981 26.4445C21.5289 25.1753 19.4711 25.1753 18.2019 26.4445L8.94454 35.7019C7.21214 37.4343 4.25 36.2073 4.25 33.7574V0.25Z" stroke="currentColor" stroke-width="0.5"></path></g><defs><filter id="filter0_d_1092_2850" x="0" y="0" width="41" height="44.7632" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1092_2850"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1092_2850" result="shape"></feBlend></filter></defs>',2)])))}]])},35122:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var n=r(41916),o=["href"],a={class:"bg-white w-full rounded-lg overflow-hidden h-124 shadow-lg group border flex flex-col relative hover:scale-[1.02] duration-150"},i={class:""},l={class:"w-full rounded-t-lg overflow-hidden h-48"},c=["src"],s={class:"p-4"},u={class:"h-20 line-clamp-2 text-sm lg:text-base"},d={class:"text-sm font-light text-neutral-500"};var f=r(76306),p=r(5121),h=(r(72326),r(60578)),m=r(87879),g=r(47393);function v(e){return v="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},v(e)}function y(){y=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:S(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(I([])));b&&b!==t&&r.call(b,a)&&(m=b);var w=h.prototype=f.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,146 bytes, line 2
2))}function x(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==v(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=E(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(w,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(x.prototype),c(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(w),c(w,l,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),B(r),d}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function b(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){b(a,n,o,i,l,"next",e)}function l(e){b(a,n,o,i,l,"throw",e)}i(void 0)}))}}const k={components:{AisHighlight:f.YE,BookmarkingIcon:h.default},data:function(){return{bookmarked:this.isBookmarked}},mounted:function(){return w(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},methods:{removeTags:function(e){return null===e||""===e?null:(e=e.toString()).replace(/(<([^>]+)>)/gi,"")},toggleBookmark:function(){var e=this;return w(y().mark((function t(){var r;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.user&&("object"!==v(e.user)||e.user.id)){t.next=3;break}return window.location.href=route("login"),t.abrupt("return");case 3:return r=!e.isBookmarked,e.$emit("bookmarkUpdated",{id:e.teacherGuide.id,is_bookmarked:r}),t.prev=5,e.bookmarked=r,t.next=9,p.Z.put(route("teacherGuides.bookmark",e.teacherGuide.id),{is_bookmarked:r}).then((function(e){return e.data}));case 9:t.sent,t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),console.error(t.t0);case 15:return t.prev=15,t.finish(15);case 17:case"end":return t.stop()}}),t,null,[[5,12,15,17]])})))()},handleClick:function(){(0,g.ob)({indexUid:this.teacherGuidesIndex,objectId:String(this.teacherGuide.id),objectName:this.teacherGuide.title,position:this.position,queryUid:this.queryUid})}},computed:{imageUrl:function(){return this.teacherGuide.primaryImageUrl},timeToRead:function(){var e="".concat(this.teacherGuide.time_to_read," minute");return e>1&&(e+="s"),e+=" Read"},user:function(){return(0,m.qt)().props.auth.user},guideUrl:function(){var e,t=route("teacherGuides.show",null!==(e=this.teacherGuide.slug)&&void 0!==e?e:this.teacherGuide.id);if(t&&this.queryUid){var r=t.includes("?")?"&":"?";return t+r+"queryUid="+encodeURIComponent(this.queryUid)}return t},teacherGuidesIndex:function(){var e,t,r,n,o=(0,m.qt)();return(null===(e=o.props.integrations)||void 0===e||null===(t=e.meilisearch)||void 0===t?void 0:t.teacherGuidesIndex)||(null===(r=o.props.integrations)||void 0===r||null===(n=r.algolia)||void 0===n?void 0:n.teacherGuidesIndex)||"teacher_guides"}},props:{teacherGuide:Object,isBookmarked:{type:Boolean,default:!1},position:{type:Number,default:null},queryUid:{type:String,default:null}},setup:function(){return{}}};const x=(0,r(83744).Z)(k,[["render",function(e,t,r,f,p,h){var m,g,v=(0,n.resolveComponent)("BookmarkingIcon");return(0,n.openBlock)(),(0,n.createElementBlock)("a",{href:h.guideUrl,onClick:t[1]||(t[1]=function(){return h.handleClick&&h.handleClick.apply(h,arguments)})},[(0,n.createElementVNode)("div",a,[r.teacherGuide.badge?((0,n.openBlock)(),(0,n.createElementBlock)("span",{key:0,class:(0,n.normalizeClass)(["absolute top-0 left-4 z-10 hover:scale-105 duration-150 text-white px-4 py-1 shadow rounded-b-lg"]),style:(0,n.normalizeStyle)("background-color : ".concat(null!==(m=r.teacherGuide.badge_color)&&void 0!==m?m:"#00ff00"))},(0,n.toDisplayString)(r.teacherGuide.badge),5)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=(0,n.withModifiers)((function(e){return h.toggleBookmark()}),["prevent"])),class:(0,n.normalizeClass)(["absolute top-0 right-4 z-10 hover:scale-105 duration-150 ",p.bookmarked?"text-[#FF8B8B]":"text-[#FFF4F4] hover:text-[#ffdddd]"])},[(0,n.createVNode)(v)],2),(0,n.createElementVNode)("div",i,[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("img",{alt:"Avatar",class:"w-full h-full duration-150 object-cover",src:[null!==(g=h.imageUrl)&&void 0!==g?g:"https://subjecttoclimate.nyc3.digitaloceanspaces.com/4365/conversions/adryan-ra-ysT-xbhhK2c-unsplash-thumb.jpg"]},null,8,c)])]),(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("h3",u,(0,n.toDisplayString)(r.teacherGuide.title),
21),(0,n.createElementVNode)("h2",d,(0,n.toDisplayString)(h.timeToRead),1)])])],8,o)}]])},85521:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={width:"41",height:"45",viewBox:"0 0 41 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const l={},c=(0,r(83744).Z)(l,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("svg",i,o(t[0]||(t[0]=[(0,n.createStaticVNode)('<g filter="url(#filter0_d_1092_2850)"><path d="M4 0H20.5H37V33.7574C37 36.4301 33.7686 37.7686 31.8787 35.8787L22.6213 26.6213C21.4497 25.4497 19.5503 25.4497 18.3787 26.6213L9.12132 35.8787C7.23142 37.7686 4 36.4301 4 33.7574V0Z" fill="currentColor"></path><path d="M4.25 0.25H20.5H36.75V33.7574C36.75 36.2073 33.7879 37.4343 32.0555 35.7019L22.7981 26.4445C21.5289 25.1753 19.4711 25.1753 18.2019 26.4445L8.94454 35.7019C7.21214 37.4343 4.25 36.2073 4.25 33.7574V0.25Z" stroke="currentColor" stroke-width="0.5"></path></g><defs><filter id="filter0_d_1092_2850" x="0" y="0" width="41" height="44.7632" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1092_2850"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1092_2850" result="shape"></feBlend></filter></defs>',2)])))}]])},3754:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(41916),o={key:0},a={key:1,class:"flex flex-wrap gap-2"};var i=r(72326);function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(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}const s={props:{grades:{type:Array,required:!0},showColors:{type:Boolean,default:!0},plain:{type:Boolean,default:!1}},computed:{processedGrades:function(){return this.grades?function(e){if(!e||e.length<=7)return l(e).sort(i.dP);for(var t=function(e){return-1===e?"PK":0===e?"K":13===e?"AP":e.toString()},r=l(e).sort(i.dP).map((function(e){return"PK"===e?-1:"K"===e?0:"AP"===e?13:parseInt(e)})),n=[],o=r[0],a=r[0],c=1;c<r.length;c++)r[c]===a+1||(o===a?n.push(t(o)):n.push("".concat(t(o),"-").concat(t(a))),o=r[c]),a=r[c];return o===a?n.push(t(o)):n.push("".concat(t(o),"-").concat(t(a))),n.sort(i.dP)}(this.grades):[]},nonK12Grades:function(){if(!this.processedGrades)return[];var e=["K","1","2","3","4","5","6","7","8","9","10","11","12"];return this.processedGrades.filter((function(t){return!e.includes(t)}))},plainGradesText:function(){return this.processedGrades.length?this.hasK12(this.processedGrades)?["K-12"].concat(l(this.nonK12Grades)).join(", "):this.processedGrades.join(", "):""}},methods:{gradeColorMap:function(e){return e?e.includes("-")?"#FFEDB8":{PK:"#FFEDB8",K:"#FFEDB8",1:"#FFEDB8",2:"#FFEDB8",3:"#FFEDB8",4:"#FFEDB8",5:"#FFEDB8",6:"#FFEDB8",7:"#FFEDB8",8:"#FFEDB8",9:"#FFEDB8",10:"#FFEDB8",11:"#FFEDB8",12:"#FFEDB8",AP:"#FFEDB8","K-12":"#FFEDB8"}[e]||"#FFEDB8":"#FFEDB8"},sortGradeBands:i.dP,hasK12:function(e){if(!e)return!1;return["K","1","2","3","4","5","6","7","8","9","10","11","12"].every((function(t){return e.includes(t)}))}}};const u=(0,r(83744).Z)(s,[["render",function(e,t,r,i,l,c){return r.plain?((0,n.openBlock)(),(0,n.createElementBlock)("span",o,(0,n.toDisplayString)(c.plainGradesText),1)):((0,n.openBlock)(),(0,n.createElementBlock)("div",a,[c.hasK12(c.processedGrades)?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createElementVNode)("span",{style:(0,n.normalizeStyle)({backgroundColor:r.showColors?c.gradeColorMap("K-12"):""}),class:"px-3 py-1.5 rounded-full uppercase text-xs font-medium whitespace-nowrap flex-shrink-0"}," K-12 ",4),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(c.nonK12Grades,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,style:(0,n.normalizeStyle)({backgroundColor:r.showColors?c.gradeColorMap(e):""}),class:"px-2 py-1.5 rounded-full uppercase text-xs font-medium whitespace-nowrap flex-shrink-0"},(0,n.toDisplayString)(e),5)})),128))],64)):((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,{key:1},(0,n.renderList)(c.processedGrades,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,style:(0,n.normalizeStyle)({backgroundColor:r.showColors?c.gradeColorMap(e):""}),class:"px-2 py-1.5 rounded-full uppercase text-xs font-medium whitespace-nowrap flex-shrink-0"},(0,n.toDisplayString)(e),5)})),128))]))}]])},15973:(e,t,r)=>{r.d(t,{Z:()=>B});var n=r(41916),o=["href"],a={class:"bg-white w-full rounded-xl overflow-hidden h-full shadow-lg group border flex flex-col relative group"},i={class:"p-[12px] pb-0 flex-shrink-0"},l={class:"relative w-full overflow-hidden h-32 rounded-r-xl rounded-tl-lg"},c=["src"],s={class:"flex flex-col flex-1 min-h-0"},u={class:"p-4 pb-0 border-b flex-1 flex flex-col"},d={class:"flex items-center space-x-1.5 flex-shrink-0"},f={class:"flex items-center my-3 flex-shrink-0"}
vendor: 4,808 bytes, line 2
2,p={class:"flex items-center min-h-[60px]"},h={class:"flex-shrink-0"},m={class:"p-4 flex items-center space-x-1.5 flex-shrink-0"};var g=r(76306),v=r(5121),y=r(72326),b=r(95785),w=r(85521),k=r(87879);function x(){x=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:k(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function p(){}function h(){}var m={};c(m,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(I([])));v&&v!==t&&r.call(v,a)&&(m=v);var y=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,a,i,l){var c=u(e[n],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==S(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=E(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,l,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(B),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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,d):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),d},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),B(r),d}},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 o=n.arg;B(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function E(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}const C={components:{AisHighlight:g.YE,BookmarkingIcon:w.Z,PrimaryButton:b.Z},data:function(){return{subjectsExpanded:!1,topicsExpanded:!1,bookmarked:this.isBookmarked}},methods:{removeTags:function(e){return null===e||""===e?null:(e=e.toString()).replace(/(<([^>]+)>)/gi,"")},toggleBookmark:function(){var e,t=this;return(e=x().mark((function e(){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.user&&("object"!==S(t.user)||t.user.id)){e.next=3;break}return window.location.href=route("login"),e.abrupt("return");case 3:return r=!t.isBookmarked,e.prev=4,t.bookmarked=r,e.next=8,v.Z.put(route(t.bookmarkRoute,t.item.id),{is_bookmarked:r}).then((function(e){return e.data}));case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),console.error(e.t0);case 13:return e.prev=13,t.$emit("bookmarkUpdated",{id:t.item.id,is_bookmarked:r}),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[4,10,13,16]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){E(a,n,o,i,l,"next",e)}function l(e){E(a,n,o,i,l,"throw",e)}i(void 0)}))})()}},computed:{user:function(){return(0,k.qt)().props.auth.user}},props:{item:Object,hitType:String,buttonTextColor:{type:String,defeault:"white"},isAlgoliaItem:{type:Boolean,default:!0},isBookmarked:{type:Boolean,default:!1},imageUrl:{type:String,default:"https://subjecttoclimate.nyc3.digitaloceanspaces.com/4365/conversions/adryan-ra-ysT-xbhhK2c-unsplash-thumb.jpg"},showBookMark:{type:Boolean,default:!0},bookmarkRoute:{type:String},actionUrl:{type:String,default:null}},setup:function(){return{mergeContinuousLevels:y.aV}}};const B=(0,r(83744).Z)(C,[["render",function(e,t,r,g,v,y){var b=(0,n.resolveComponent)("BookmarkingIcon");return(0,n.openBlock)(),(0,n.createElementBlock)("a",{href:r.actionUrl,class:"h-full block"},[(0,n.createElementVNode)("div",a,[r.showBookMark?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:t[0]||(t[0]=(0,n.withModifiers)((function(e){return y.toggleBookmark()}),["prevent"])),class:(0,n.normalizeClass)(["absolute top-0 right-4 z-10 hover:scale-105 duration-150 ",v.bookmarked?"text-[#FF8B8B]":"text-[#FFF4F4] hover:text-[#ffdddd]"])},[(0,n.createVNode)(b)],2)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",i,[(0,n.createElementVNode)("div",l,[(0,n.renderSlot)(e.$slots,"image",{},(function(){return[(0,n.createElementVNode)("img",{alt:"Avatar",class:"w-full absolute h-full duration-150 object-cover group-hover:scale-105",src:r.imageUrl},null,8,c)]})),(0,n.renderSlot)(e.$slots,"badge")])]),(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("div",d,[(0,n.renderSlot)(e.$slots,"bands")]),(0,n.createElementVNode)("div",f,[(0,n.createElementVNode)("div",p,[(0,n.renderSlot)(e.$slots,"title")])]),(0,n.createElementVNode)("div",h,[(0,n.renderSlot)(e.$slots,"description")])]),(0,n.createElementVNode)("div",m,[(0,n.renderSlot)(e.$slots,"tags")])])])],8,o)}]])},62662:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(41916);function o(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}
2finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:(0,n.normalizeClass)(["rounded-lg bg-primary-100"])},l={class:"text-base font-medium whitespace-nowrap"},c={class:""},s={xmlns:"http://www.w3.org/2000/svg",height:"24",fill:"currentColor",viewBox:"0 96 960 960",width:"24"},u={key:0,class:"",d:"m296 711-56-56 240-240 240 240-56 56-184-184-184 184Z"},d={key:1,class:"",d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},f={class:"p-2 overflow-hidden"},p={key:0,class:"mb-2"},h={class:"flex space-x-2"},m=["id","value","checked","onChange"],g={class:"text-xs"};var v=r(90222);function y(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||w(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 b(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return k(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)?k(e,t):void 0}}function k(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}const x={name:"GenericFacetFilter",props:{title:{type:String,required:!0},attribute:{type:String,required:!0},facets:{type:Object,default:function(){return{}}},currentFilters:{type:Array,default:function(){return[]}},extraHeaderContainerClasses:{type:String,default:""},sortFunction:{type:Function,default:null},showSearch:{type:Boolean,default:!1},maxItems:{type:Number,default:0}},emits:["filter-change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(!1),a=(0,n.ref)([]),i=(0,n.ref)(""),l=(0,n.ref)(!1);(0,n.watch)((function(){return e.currentFilters}),(function(e){a.value=b(e||[])}),{immediate:!0,deep:!0}),(0,n.watch)(o,(function(e){e||(i.value="",l.value=!1)}));var c=(0,n.computed)((function(){var t=Object.entries(e.facets||{}),r=e.sortFunction||function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0};return t.sort(r)})),s=(0,n.computed)((function(){if(!i.value.trim())return c.value;var e=i.value.toLowerCase();return c.value.filter((function(t){var r=y(t,1)[0];return(0,v.T)(r).toLowerCase().includes(e)}))})),u=(0,n.computed)((function(){return e.maxItems<=0||l.value||i.value.trim()?s.value:s.value.slice(0,e.maxItems)})),d=(0,n.computed)((function(){return e.maxItems>0&&!l.value&&!i.value.trim()&&s.value.length>e.maxItems}));return{expanded:o,selectedValues:a,searchQuery:i,showAll:l,sortedFacets:c,filteredFacets:s,displayedFacets:u,hasMoreItems:d,toggleValue:function(t){a.value.includes(t)?a.value=a.value.filter((function(e){return e!==t})):a.value.push(t),r("filter-change",{attribute:e.attribute,values:b(a.value)})},getLeafItem:v.T,nestCount:v.O}}};var S=r(93379),E=r.n(S),C=r(69026),B={insert:"head",singleton:!1};E()(C.Z,B);C.Z.locals;const N=(0,r(83744).Z)(x,[["render",function(e,t,r,a,v,y){return(0,n.openBlock)(),(0,n.createElementBlock)("div",i,[(0,n.createElementVNode)("div",{onClick:t[0]||(t[0]=function(e){return a.expanded=!a.expanded}),class:(0,n.normalizeClass)(["flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg shadow py-2 px-4 bg-white",r.extraHeaderContainerClasses])},[(0,n.createElementVNode)("h3",l,(0,n.toDisplayString)(r.title),
21),(0,n.createElementVNode)("button",c,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",s,[a.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("path",u)):((0,n.openBlock)(),(0,n.createElementBlock)("path",d))]))])],2),(0,n.createVNode)(n.Transition,{name:"filter-expand"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",f,[r.showSearch?((0,n.openBlock)(),(0,n.createElementBlock)("div",p,[(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.searchQuery=e}),type:"text",placeholder:"Search...",class:"w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:border-primary-500"},null,512),[[n.vModelText,a.searchQuery]])])):(0,n.createCommentVNode)("",!0),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.displayedFacets,(function(e){var t=o(e,2),i=t[0],l=t[1];return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:i,class:(0,n.normalizeClass)(["flex mr-2",(a.nestCount(i),""),2==a.nestCount(i)?"mt-2 mb-1":"",3==a.nestCount(i)?"mt-2 mb-1":""]),style:(0,n.normalizeStyle)({marginLeft:"".concat(a.nestCount(i),"rem")})},[(0,n.createElementVNode)("div",h,[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",id:"".concat(r.attribute,"-").concat(i),value:i,checked:a.selectedValues.includes(i),onChange:function(e){return a.toggleValue(i)}},null,40,m),(0,n.createElementVNode)("h3",{class:(0,n.normalizeClass)(["text-base",a.nestCount(i)>1?"text-sm":"","leading-5"])},[(0,n.createTextVNode)((0,n.toDisplayString)(a.getLeafItem(i))+" ",1),(0,n.createElementVNode)("span",g,"("+(0,n.toDisplayString)(l)+")",1)],2)])],6)})),128)),a.hasMoreItems?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:1,onClick:t[2]||(t[2]=function(e){return a.showAll=!0}),class:"mt-2 text-sm text-primary-600 hover:text-primary-800 underline cursor-pointer"},"Show more ("+(0,n.toDisplayString)(a.filteredFacets.length-r.maxItems)+")",1)):(0,n.createCommentVNode)("",!0),a.showAll&&r.maxItems>0&&a.filteredFacets.length>r.maxItems?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:2,onClick:t[3]||(t[3]=function(e){return a.showAll=!1}),class:"mt-2 text-sm text-primary-600 hover:text-primary-800 underline cursor-pointer"},"Show less")):(0,n.createCommentVNode)("",!0)],512),[[n.vShow,a.expanded]])]})),_:1})])}],["__scopeId","data-v-16607474"]])},73593:(e,t,r)=>{r.d(t,{Z:()=>I});var n=r(41916),o={class:(0,n.normalizeClass)(["rounded-lg bg-primary-100"])},a={class:""},i={xmlns:"http://www.w3.org/2000/svg",height:"24",fill:"currentColor",viewBox:"0 96 960 960",width:"24"},l={key:0,class:"",d:"m296 711-56-56 240-240 240 240-56 56-184-184-184 184Z"},c={key:1,class:"",d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},s={class:"p-2 overflow-hidden"},u={class:"flex space-x-2"},d=["id","value","checked","onChange"],f={class:"text-base leading-5"},p={class:"text-xs"},h={key:0,class:"ml-4 mt-1"},m={class:"flex space-x-2"},g=["id","value","checked","onChange"],v={class:"text-sm leading-5"},y={class:"text-xs"};function b(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||k(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 k(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function x(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}
2const S={name:"StandardsFilterHierarchical",props:{facetsLevel1:{type:Object,default:function(){return{}}},facetsLevel2:{type:Object,default:function(){return{}}},currentFilters:{type:String,default:""},tenantSlug:{type:String,required:!0},singleSelect:{type:Boolean,default:!1}},emits:["filter-change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(!1),a=(0,n.ref)([]),i=(0,n.ref)("");(0,n.watch)((function(){return e.currentFilters}),(function(e){if(e!==i.value)if(e){var t=e.match(/standards\.[^']*='([^']+)'/g);a.value=t?t.map((function(e){return e.match(/'([^']+)'/)[1]})):[]}else a.value=[]}),{immediate:!0});var l=(0,n.computed)((function(){return Object.entries(e.facetsLevel1||{}).sort((function(e,t){return e[0].localeCompare(t[0])})).reduce((function(e,t){var r=w(t,2),n=r[0],o=r[1];return e[n]=o,e}),{})})),c=function(t){var r=e.facetsLevel2||{},n={};return Object.entries(r).forEach((function(e){var r=w(e,2),o=r[0],a=r[1];o.startsWith(t+" > ")&&(n[o]=a)})),Object.entries(n).sort((function(e,t){return e[0].localeCompare(t[0])})).reduce((function(e,t){var r=w(t,2),n=r[0],o=r[1];return e[n]=o,e}),{})},s=function(e){return a.value.includes(e)};return{expanded:o,selectedStandards:a,sortedStandardsLevel1:l,getPerformances:c,getStandardLabel:function(e){var t=e.split(" > ");return t[t.length-1]},isStandardSelected:s,shouldExpandParent:function(e){if(s(e))return!0;var t=c(e);return Object.keys(t).some((function(e){return s(e)}))},toggleStandard:function(t){if(s(t))a.value=a.value.filter((function(e){return e!==t})),a.value=a.value.filter((function(e){return!e.startsWith(t+" > ")}));else if(e.singleSelect){if(a.value=[t],t.includes(" > ")){var n=t.split(" > ")[0];a.value.push(n)}}else if(a.value=b(new Set(a.value)),a.value.includes(t)||a.value.push(t),t.includes(" > ")){var o=t.split(" > ")[0];a.value.includes(o)||a.value.push(o)}if(0===a.value.length)return i.value="",void r("filter-change",{attribute:"standards",filterString:""});var l=a.value.some((function(e){return e.includes(" > ")}))?a.value.filter((function(e){return e.includes(" > ")})):a.value,u=a.value.filter((function(e){return!e.includes(" > ")})).filter((function(e){var t=c(e);return!Object.keys(t).some((function(e){return a.value.includes(e)}))})),d=(l=b(new Set([].concat(b(l),b(u))))).map((function(t){var r=t.includes(" > ")?"performances":"standards";return"standards.".concat(e.tenantSlug,".").concat(r,"='").concat(t,"'")})),f="(".concat(d.join(" OR "),")");i.value=f,r("filter-change",{attribute:"standards",filterString:f})}}}};var E=r(93379),C=r.n(E),B=r(84468),N={insert:"head",singleton:!1};C()(B.Z,N);B.Z.locals;const I=(0,r(83744).Z)(S,[["render",function(e,t,r,b,w,k){return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createElementVNode)("div",{onClick:t[0]||(t[0]=function(e){return b.expanded=!b.expanded}),class:(0,n.normalizeClass)(["flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg shadow py-2 px-4 bg-white"])},[t[1]||(t[1]=(0,n.createElementVNode)("h3",{class:"text-base font-medium whitespace-nowrap"},"Standards",-1)),(0,n.createElementVNode)("button",a,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",i,[b.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("path",l)):((0,n.openBlock)(),(0,n.createElementBlock)("path",c))]))])]),(0,n.createVNode)(n.Transition,{name:"filter-expand"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",s,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(b.sortedStandardsLevel1,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:t,class:"mb-2"},[(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",id:"standard-".concat(t),value:t,checked:b.isStandardSelected(t),onChange:function(e){return b.toggleStandard(t)}},null,40,d),(0,n.createElementVNode)("h3",f,[(0,n.createTextVNode)((0,n.toDisplayString)(b.getStandardLabel(t))+" ",1),(0,n.createElementVNode)("span",p,"("+(0,n.toDisplayString)(e)+")",1)])]),b.shouldExpandParent(t)?((0,n.openBlock)(),(0,n.createElementBlock)("div",h,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(b.getPerformances(t),(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:t,class:"mb-1"},[(0,n.createElementVNode)("div",m,[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",i
2d:"standard-".concat(t),value:t,checked:b.isStandardSelected(t),onChange:function(e){return b.toggleStandard(t)}},null,40,g),(0,n.createElementVNode)("h3",v,[(0,n.createTextVNode)((0,n.toDisplayString)(b.getStandardLabel(t))+" ",1),(0,n.createElementVNode)("span",y,"("+(0,n.toDisplayString)(e)+")",1)])])])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))],512),[[n.vShow,b.expanded]])]})),_:1})])}],["__scopeId","data-v-1fbe49ec"]])},51725:(e,t,r)=>{r.d(t,{Z:()=>A});var n=r(41916),o={class:(0,n.normalizeClass)(["rounded-lg bg-primary-100"])},a={class:""},i={xmlns:"http://www.w3.org/2000/svg",height:"24",fill:"currentColor",viewBox:"0 96 960 960",width:"24"},l={key:0,class:"",d:"m296 711-56-56 240-240 240 240-56 56-184-184-184 184Z"},c={key:1,class:"",d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},s={class:"p-2 overflow-hidden"},u={class:"flex space-x-2"},d=["id","value","checked","onChange"],f={class:"text-base leading-5"},p={class:"text-xs"},h={key:0,class:"ml-4 mt-1"},m={class:"flex space-x-2"},g=["id","value","checked","onChange"],v={class:"text-sm leading-5"},y={class:"text-xs"},b={key:0,class:"ml-4 mt-1"},w={class:"flex space-x-2"},k=["id","value","checked","onChange"],x={class:"text-xs leading-5"},S={class:"text-xs"};function E(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||B(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function 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,o,a,i,l=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||B(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 B(e,t){if(e){if("string"==typeof e)return N(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)?N(e,t):void 0}}function N(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}const I={name:"SubjectsFilterHierarchical",props:{facetsLevel1:{type:Object,default:function(){return{}}},facetsLevel2:{type:Object,default:function(){return{}}},facetsLevel3:{type:Object,default:function(){return{}}},currentFilters:{type:String,default:""},singleSelect:{type:Boolean,default:!1}},emits:["filter-change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(!1),a=(0,n.ref)([]),i=(0,n.ref)("");(0,n.watch)((function(){return e.currentFilters}),(function(e){if(e!==i.value)if(e){var t=e.match(/subjects\.level\d+='([^']+)'/g);a.value=t?t.map((function(e){return e.match(/'([^']+)'/)[1]})):[]}else a.value=[]}),{immediate:!0});var l=(0,n.computed)((function(){return Object.entries(e.facetsLevel1||{}).sort((function(e,t){return e[0].localeCompare(t[0])})).reduce((function(e,t){var r=C(t,2),n=r[0],o=r[1];return e[n]=o,e}),{})})),c=function(t,r){var n=2===r?e.facetsLevel2:e.facetsLevel3,o={};return Object.entries(n||{}).forEach((function(e){var r=C(e,2),n=r[0],a=r[1];n.startsWith(t+" > ")&&(o[n]=a)})),Object.entries(o).sort((function(e,t){return e[0].localeCompare(t[0])})).reduce((function(e,t){var r=C(t,2),n=r[0],o=r[1];return e[n]=o,e}),{})},s=function(e){return a.value.includes(e)};return{expanded:o,selectedSubjects:a,sortedSubjectsLevel1:l,getSubSubjects:c,getSubjectLabel:function(e){var t=e.split(" > ");return t[t.length-1]},isSubjectSelected:s,shouldExpandParent:function(e){if(s(e))return!0;var t=c(e,2);return Object.keys(t).some((function(e){return s(e)}))},toggleSubject:function(t){if(s(t))a.value=a.value.filter((function(e){return e!==t})),a.value=a.value.filter((function(e){return!e.startsWith(t+" > ")}));else if(e.singleSelect){a.value=[t];for(var n=t.split(" > "),o=1;o<n.length;o++){var l=n.slice(0,o).join(" > ");a.value.push(l)}}else{a.value=E(new Set(a.value)),a.value.includes(t)||a.value.push(t);for(var c=t.split(" > "),u=1;u<c.length;u++){var d=c.slice(0,u).join(" > ");a.value.includes(d)||a.value.push(d)}}if(0===a.value.length)return i.value="",void r("filter-change",{attribute:"subjects",filterString:""});var f=a.value.map((function(e){return e.split(" > ").length})),p=Math.max.apply(Math,E(f)),h=a.value.filter((function(e){return e.split(" > ").length===p})),m=a.value.filter((function(e){return e.split(" > ").length<p})).filter((function(e){return!a.value.some((function(t){return t.startsWith(e+" > ")}))})),g=(h=[].concat(E(h),E(m))).map((function(e){var t=e.split(" > ").length;return"subjects.level".concat(t,"='").concat(e,"'")})),v="(".concat(g.join(" OR "),")");i.value=v,r("filter-change",{attribute:"subjects",filterString:v})}}}};var L=r(93379),V=r.n(L),T=r(81735),_={insert:"head",singleton:!1};V()(T.Z,_);T.Z.locals;const A=(0,r(83744).Z)(I,[["render",function(e,t,r,E,C,B){return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createElementVNode)("div",{onClick:t[0]||(t[0]=function(e){return E.expanded=!E.expanded}),class:(0,n.normalizeClass)(["flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg shadow py-2 px-4 bg-white"])},[t[1]||(t[1]=(0,n.createElementVNode)("h3",{class:"text-base font-medium whitespace-nowrap"},"Subjects",-1)),(0,n.createElementVNode)("button",a,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",i,[E.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("path",l)):((0,n.openBlock)(),(0,n.createElementBlock)("path",c))]))])]),(0,n.createVNode)(n.Transition,{name:"filter-expand"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",s,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(E.sortedSubjectsLevel1,(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:t,class:"mb-2"},[(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",i
2d:"subject-".concat(t),value:t,checked:E.isSubjectSelected(t),onChange:function(e){return E.toggleSubject(t)}},null,40,d),(0,n.createElementVNode)("h3",f,[(0,n.createTextVNode)((0,n.toDisplayString)(E.getSubjectLabel(t))+" ",1),(0,n.createElementVNode)("span",p,"("+(0,n.toDisplayString)(e)+")",1)])]),E.shouldExpandParent(t)?((0,n.openBlock)(),(0,n.createElementBlock)("div",h,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(E.getSubSubjects(t,2),(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:t,class:"mb-1"},[(0,n.createElementVNode)("div",m,[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",id:"subject-".concat(t),value:t,checked:E.isSubjectSelected(t),onChange:function(e){return E.toggleSubject(t)}},null,40,g),(0,n.createElementVNode)("h3",v,[(0,n.createTextVNode)((0,n.toDisplayString)(E.getSubjectLabel(t))+" ",1),(0,n.createElementVNode)("span",y,"("+(0,n.toDisplayString)(e)+")",1)])]),E.shouldExpandParent(t)?((0,n.openBlock)(),(0,n.createElementBlock)("div",b,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(E.getSubSubjects(t,3),(function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:t,class:"mb-1"},[(0,n.createElementVNode)("div",w,[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",id:"subject-".concat(t),value:t,checked:E.isSubjectSelected(t),onChange:function(e){return E.toggleSubject(t)}},null,40,k),(0,n.createElementVNode)("h3",x,[(0,n.createTextVNode)((0,n.toDisplayString)(E.getSubjectLabel(t))+" ",1),(0,n.createElementVNode)("span",S,"("+(0,n.toDisplayString)(e)+")",1)])])])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))],512),[[n.vShow,E.expanded]])]})),_:1})])}],["__scopeId","data-v-68aab014"]])},28415:(e,t,r)=>{r.d(t,{Z:()=>R});var n=r(41916);var o={class:"bg-white rounded-xl overflow-hidden border border-gray-900/10 group flex h-28"},a={class:"overflow-hidden w-1/3"};var i=r(87879),l={class:"relative"},c={class:"absolute inset-0 bg-gray-200 animate-pulse"},s=["src","alt"];const u={props:{image:{type:String,required:!0},title:{type:String,required:!0},fallbackImage:{type:String,required:!0}},setup:function(e){var t=(0,n.ref)(!0);return{isLoading:t,handleImageError:function(r){r.target.src=e.fallbackImage,t.value=!1}}}};var d=r(93379),f=r.n(d),p=r(38923),h={insert:"head",singleton:!1};f()(p.Z,h);p.Z.locals;var m=r(83744);const g=(0,m.Z)(u,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("div",l,[(0,n.withDirectives)((0,n.createElementVNode)("div",c,null,512),[[n.vShow,o.isLoading]]),(0,n.createElementVNode)("img",{src:r.image,alt:r.title,onLoad:t[0]||(t[0]=function(e){return o.isLoading=!1}),onError:t[1]||(t[1]=function(){return o.handleImageError&&o.handleImageError.apply(o,arguments)}),class:(0,n.normalizeClass)(["w-full h-full object-cover group-hover:opacity-80 duration-150 group-hover:scale-105",{"opacity-0":o.isLoading}])},null,42,s)])}],["__scopeId","data-v-03bc7326"]]);function v(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(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 b={class:"p-4"},w={key:0,class:"animate-pulse"};const k={props:{title:{type:String,required:!0},view:{type:String,required:!0,validator:function(e){return["mobile","mobile-grid","desktop"].includes(e)}},pretitle:{type:String,default:""},clampTitle:{type:Boolean,default:!0}},setup:function(){return{isLoading:(0,n.ref)(!1)}}};var x=r(91274),S={insert:"head",singleton:!1};f()(x.Z,S);x.Z.locals;const E=(0,m.Z)(k,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("div",b,[o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",w,v(t[0]||(t[0]=[(0,n.createElementVNode)("div",{class:"h-4 bg-gray-200 rounded w-3/4 mb-2"},null,-1),(0,n.createElementVNode)("div",{class:"h-3 bg-gray-200 rounded w-1/4"},null,-1)])))):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[e.$slots.pretitle||r.pretitle?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,class:(0,n.normalizeClass)(["text-sm text-gray-600 mb-1","mobile-grid"===r.view?"text-xs":""])},[(0,n.renderSlot)(e.$slots,"pretitle",{},(function(){return[(0,n.createTextVNode)((0,n.toDisplayString)(r.pretitle),1)]}),!0)],2)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("h3",{class:(0,n.normalizeClass)(["font-medium mb-2",r.clampTitle?"line-clamp-3":"","mobile"===r.view?"text-sm":"","mobile-grid"===r.view?"text-sm":"","desktop"===r.view?"text-lg group-hover:text-blue-600":""])},[(0,n.renderSlot)(e.$slots,"title",{},(function(){return[(0,n.createTextVNode)((0,n.toDisplayString)(r.title),
21)]}),!0)],2),(0,n.renderSlot)(e.$slots,"description",{},void 0,!0),(0,n.renderSlot)(e.$slots,"subtitle",{},void 0,!0)],64))])}],["__scopeId","data-v-1d6d3356"]]),C={components:{Link:i.rU,CardImage:g,CardContent:E},props:{item:{type:Object,required:!0},to:{type:String,required:!0},fallbackImage:{type:String,required:!0}},emits:["click"]},B=(0,m.Z)(C,[["render",function(e,t,r,i,l,c){var s=(0,n.resolveComponent)("CardImage"),u=(0,n.resolveComponent)("CardContent"),d=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createVNode)(d,{href:r.to,class:"block w-full h-full flex",onClick:t[0]||(t[0]=function(t){return e.$emit("click")})},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",a,[(0,n.createVNode)(s,{image:r.item.image,title:r.item.title,"fallback-image":r.fallbackImage,class:"h-full"},null,8,["image","title","fallback-image"])]),(0,n.createVNode)(u,{title:r.item.title,view:"mobile",class:"flex-1"},{pretitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"pretitle")]})),subtitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"subtitle")]})),_:3},8,["title"])]})),_:3},8,["href"])])}]]);var N={class:"bg-white rounded-xl overflow-hidden border border-gray-900/10 group block"},I={class:"overflow-hidden w-full"};const L={components:{Link:i.rU,CardImage:g,CardContent:E},props:{item:{type:Object,required:!0},to:{type:String,required:!0},fallbackImage:{type:String,required:!0}},emits:["click"]},V=(0,m.Z)(L,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("CardImage"),c=(0,n.resolveComponent)("CardContent"),s=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",N,[(0,n.createVNode)(s,{href:r.to,class:"block w-full h-full flex flex-col",onClick:t[0]||(t[0]=function(t){return e.$emit("click")})},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",I,[(0,n.createVNode)(l,{image:r.item.image,title:r.item.title,"fallback-image":r.fallbackImage,style:{"aspect-ratio":"16/9"}},null,8,["image","title","fallback-image"])]),(0,n.createVNode)(c,{title:r.item.title,view:"mobile-grid",class:"flex-1"},{pretitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"pretitle")]})),subtitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"subtitle")]})),_:3},8,["title"])]})),_:3},8,["href"])])}]]);var T={class:"bg-white rounded-xl overflow-hidden border border-gray-900/10 group shadow-sm hover:border-gray-900/20 relative"},_={class:"overflow-hidden w-full"},A={key:0,class:"absolute top-3 left-3 bg-white/90 backdrop-blur-sm px-2 py-1 rounded-full items-center space-x-1 border border-gray-900/10 hidden lg:flex"},j={class:"text-sm text-gray-700"};var D=r(85521);const O={components:{Link:i.rU,CardImage:g,CardContent:E,BookmarkingIcon:D.Z},props:{item:{type:Object,required:!0},to:{type:String,required:!0},isBookmarked:{type:Boolean,default:!1},showBookmark:{type:Boolean,default:!0},showStats:{type:Boolean,default:!1},fallbackImage:{type:String,required:!0}},emits:["bookmark","click"]},F=(0,m.Z)(O,[["render",function(e,t,r,o,a,i){var l=(0,n.resolveComponent)("BookmarkingIcon"),c=(0,n.resolveComponent)("CardImage"),s=(0,n.resolveComponent)("CardContent"),u=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",T,[(0,n.createVNode)(u,{href:r.to,class:"block w-full h-full",onClick:t[1]||(t[1]=function(t){return e.$emit("click")})},{default:(0,n.withCtx)((function(){return[r.showBookmark?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:t[0]||(t[0]=(0,n.withModifiers)((function(t){return e.$emit("bookmark")}),["prevent","stop"])),class:"absolute top-0 right-0 w-8 h-8 flex items-center justify-center z-10 hidden sm:flex"},[(0,n.createVNode)(l,{class:(0,n.normalizeClass)(["absolute top-0 right-4 z-10 hover:scale-105 duration-150",r.isBookmarked?"text-[#FF8B8B]":"text-[#FFF4F4] hover:text-[#ffdddd]"])},null,8,["class"])])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",_,[(0,n.createVNode)(c,{image:r.item.image,title:r.item.title,"fallback-image":r.fallbackImage,style:{"aspect-ratio":"16/9"}}
2,null,8,["image","title","fallback-image"]),r.showStats?((0,n.openBlock)(),(0,n.createElementBlock)("div",A,[(0,n.renderSlot)(e.$slots,"stats-icon"),(0,n.createElementVNode)("span",j,[(0,n.renderSlot)(e.$slots,"stats-text")])])):(0,n.createCommentVNode)("",!0)]),(0,n.createVNode)(s,{title:r.item.title,view:"desktop"},{pretitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"pretitle")]})),subtitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"subtitle")]})),description:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"description")]})),_:3},8,["title"])]})),_:3},8,["href"])])}]]),P={props:{item:{type:Object,required:!0,validator:function(e){return e.title&&e.image}},to:{type:String,required:!0},view:{type:String,default:"mobile",validator:function(e){return["mobile","mobile-grid","desktop"].includes(e)}},isBookmarked:{type:Boolean,default:!1},showBookmark:{type:Boolean,default:!0},showStats:{type:Boolean,default:!1},fallbackImage:{type:String,default:"/img/placeholder.webp"}},emits:["bookmark","click"],setup:function(e){return{cardComponent:(0,n.computed)((function(){switch(e.view){case"mobile":default:return B;case"mobile-grid":return V;case"desktop":return F}}))}}},R=(0,m.Z)(P,[["render",function(e,t,r,o,a,i){return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(o.cardComponent),{item:r.item,to:r.to,"is-bookmarked":r.isBookmarked,"show-bookmark":r.showBookmark,"show-stats":r.showStats,"fallback-image":r.fallbackImage,onBookmark:t[0]||(t[0]=function(t){return e.$emit("bookmark",r.item)}),onClick:t[1]||(t[1]=function(t){return e.$emit("click")})},(0,n.createSlots)({_:2},[e.$slots.pretitle?{name:"pretitle",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"pretitle")]})),key:"0"}:void 0,e.$slots["stats-icon"]?{name:"stats-icon",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"stats-icon")]})),key:"1"}:void 0,e.$slots["stats-text"]?{name:"stats-text",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"stats-text")]})),key:"2"}:void 0,e.$slots.description?{name:"description",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"description")]})),key:"3"}:void 0,e.$slots.subtitle?{name:"subtitle",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"subtitle")]})),key:"4"}:void 0]),1064,["item","to","is-bookmarked","show-bookmark","show-stats","fallback-image"])}]])}}]); 3//# sourceMappingURL=Search-UniversalSearchPage-vue.ecae29be.js.map
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.