@searchcraft/vue-sdk 0.9.7 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1034 -1807
- package/dist/index.es.js +2720 -3339
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +7 -17
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
package/dist/index.umd.js
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
(function(O,V){typeof exports=="object"&&typeof module<"u"?V(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],V):(O=typeof globalThis<"u"?globalThis:O||self,V(O.SearchcraftVueSdk={},O.Vue))})(this,function(O,V){"use strict";var zc=Object.defineProperty;var Hc=(O,V,Ue)=>V in O?zc(O,V,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):O[V]=Ue;var h=(O,V,Ue)=>Hc(O,typeof V!="symbol"?V+"":V,Ue);var Qa;var Ue=Object.defineProperty,As=(e,t,r)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F=(e,t,r)=>As(e,typeof t!="symbol"?t+"":t,r);function be(e,t,r,a){return new(r||(r=Promise))(function(n,o){function s(l){try{u(a.next(l))}catch(i){o(i)}}function c(l){try{u(a.throw(l))}catch(i){o(i)}}function u(l){var i;l.done?n(l.value):(i=l.value,i instanceof r?i:new r(function(p){p(i)})).then(s,c)}u((a=a.apply(e,[])).next())})}function ye(e,t){var r,a,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(u){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(s=0)),s;)try{if(r=1,a&&(n=2&i[0]?a.return:i[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;switch(a=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,a=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||i[0]!==6&&i[0]!==2)){s=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){s.label=i[1];break}if(i[0]===6&&s.label<n[1]){s.label=n[1],n=i;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(i);break}n[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(p){i=[6,p],a=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([u,l])}}}var Se={exclude:[]},Mr={},Is={timeout:"true"},pe=function(e,t){typeof window<"u"&&(Mr[e]=t)},Ms=function(){return Object.fromEntries(Object.entries(Mr).filter(function(e){var t,r=e[0];return!(!((t=Se==null?void 0:Se.exclude)===null||t===void 0)&&t.includes(r))}).map(function(e){return[e[0],(0,e[1])()]}))};function pt(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var Y=new Uint32Array([597399067,2869860233,951274213,2716044179]);function he(e,t){return e<<t|e>>>32-t}function zt(e,t){var r;if(t===void 0&&(t=0),t=t?0|t:0,typeof e=="string"&&(r=e,e=new TextEncoder().encode(r).buffer),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var a=new Uint32Array([t,t,t,t]);(function(o,s){for(var c=o.byteLength/16|0,u=new Uint32Array(o,0,4*c),l=0;l<c;l++){var i=u.subarray(4*l,4*(l+1));i[0]=Math.imul(i[0],Y[0]),i[0]=he(i[0],15),i[0]=Math.imul(i[0],Y[1]),s[0]=s[0]^i[0],s[0]=he(s[0],19),s[0]=s[0]+s[1],s[0]=Math.imul(s[0],5)+1444728091,i[1]=Math.imul(i[1],Y[1]),i[1]=he(i[1],16),i[1]=Math.imul(i[1],Y[2]),s[1]=s[1]^i[1],s[1]=he(s[1],17),s[1]=s[1]+s[2],s[1]=Math.imul(s[1],5)+197830471,i[2]=Math.imul(i[2],Y[2]),i[2]=he(i[2],17),i[2]=Math.imul(i[2],Y[3]),s[2]=s[2]^i[2],s[2]=he(s[2],15),s[2]=s[2]+s[3],s[2]=Math.imul(s[2],5)+2530024501,i[3]=Math.imul(i[3],Y[3]),i[3]=he(i[3],18),i[3]=Math.imul(i[3],Y[0]),s[3]=s[3]^i[3],s[3]=he(s[3],13),s[3]=s[3]+s[0],s[3]=Math.imul(s[3],5)+850148119}})(e,a),function(o,s){var c=o.byteLength/16|0,u=o.byteLength%16,l=new Uint32Array(4),i=new Uint8Array(o,16*c,u);switch(u){case 15:l[3]=l[3]^i[14]<<16;case 14:l[3]=l[3]^i[13]<<8;case 13:l[3]=l[3]^i[12]<<0,l[3]=Math.imul(l[3],Y[3]),l[3]=he(l[3],18),l[3]=Math.imul(l[3],Y[0]),s[3]=s[3]^l[3];case 12:l[2]=l[2]^i[11]<<24;case 11:l[2]=l[2]^i[10]<<16;case 10:l[2]=l[2]^i[9]<<8;case 9:l[2]=l[2]^i[8]<<0,l[2]=Math.imul(l[2],Y[2]),l[2]=he(l[2],17),l[2]=Math.imul(l[2],Y[3]),s[2]=s[2]^l[2];case 8:l[1]=l[1]^i[7]<<24;case 7:l[1]=l[1]^i[6]<<16;case 6:l[1]=l[1]^i[5]<<8;case 5:l[1]=l[1]^i[4]<<0,l[1]=Math.imul(l[1],Y[1]),l[1]=he(l[1],16),l[1]=Math.imul(l[1],Y[2]),s[1]=s[1]^l[1];case 4:l[0]=l[0]^i[3]<<24;case 3:l[0]=l[0]^i[2]<<16;case 2:l[0]=l[0]^i[1]<<8;case 1:l[0]=l[0]^i[0]<<0,l[0]=Math.imul(l[0],Y[0]),l[0]=he(l[0],15),l[0]=Math.imul(l[0],Y[1]),s[0]=s[0]^l[0]}}(e,a),function(o,s){s[0]=s[0]^o.byteLength,s[1]=s[1]^o.byteLength,s[2]=s[2]^o.byteLength,s[3]=s[3]^o.byteLength,s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0,s[0]=pt(s[0]),s[1]=pt(s[1]),s[2]=pt(s[2]),s[3]=pt(s[3]),s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0}(e,a);var n=new Uint8Array(a.buffer);return Array.from(n).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function Ls(e,t){return new Promise(function(r){setTimeout(function(){return r(t)},e)})}function Os(e,t,r){return Promise.all(e.map(function(a){return Promise.race([a,Ls(t,r)])}))}function Fs(){return be(this,void 0,void 0,function(){var e,t,r,a,n;return ye(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e=Ms(),t=Object.keys(e),[4,Os(Object.values(e),(Se==null?void 0:Se.timeout)||1e3,Is)];case 1:return r=o.sent(),a=r.filter(function(s){return s!==void 0}),n={},a.forEach(function(s,c){n[t[c]]=s}),[2,Lr(n,Se.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function Lr(e,t){var r={},a=function(o){if(e.hasOwnProperty(o)){var s=e[o];if(typeof s!="object"||Array.isArray(s))t.includes(o)||(r[o]=s);else{var c=Lr(s,t.map(function(u){return u.startsWith(o+".")?u.slice(o.length+1):u}));Object.keys(c).length>0&&(r[o]=c)}}};for(var n in e)a(n);return r}function Ds(e){return be(this,void 0,void 0,function(){var t,r;return ye(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Fs()];case 1:return t=a.sent(),r=zt(JSON.stringify(t)),[2,r.toString()];case 2:throw a.sent();case 3:return[2]}})})}function Ns(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function Or(e,t,r){for(var a=[],n=0;n<e[0].data.length;n++){for(var o=[],s=0;s<e.length;s++)o.push(e[s].data[n]);a.push(Us(o))}var c=new Uint8ClampedArray(a);return new ImageData(c,t,r)}function Us(e){if(e.length===0)return 0;for(var t={},r=0,a=e;r<a.length;r++)t[o=a[r]]=(t[o]||0)+1;var n=e[0];for(var o in t)t[o]>t[n]&&(n=parseInt(o,10));return n}function Je(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=0,a=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];r<a.length;r++){var n=a[r],o=e.match(n);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}pe("audio",function(){return be(this,void 0,void 0,function(){return ye(this,function(e){return[2,new Promise(function(t,r){try{var a=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),n=a.createBufferSource(),o=a.createOscillator();o.frequency.value=1e3;var s,c=a.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,o.connect(c),c.connect(a.destination),o.start(),a.oncomplete=function(u){s=u.renderedBuffer.getChannelData(0),t({sampleHash:Ns(s),oscillator:o.type,maxChannels:a.destination.maxChannelCount,channelCountMode:n.channelCountMode})},a.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),r(u)}})]})})});var zs=Je().name!=="SamsungBrowser"?1:3,Fr=280,Dr=20;Je().name!="Firefox"&&pe("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(e){var t=Array.from({length:zs},function(){return function(){var r=document.createElement("canvas"),a=r.getContext("2d");if(!a)return new ImageData(1,1);r.width=Fr,r.height=Dr;var n=a.createLinearGradient(0,0,r.width,r.height);n.addColorStop(0,"red"),n.addColorStop(.16666666666666666,"orange"),n.addColorStop(.3333333333333333,"yellow"),n.addColorStop(.5,"green"),n.addColorStop(.6666666666666666,"blue"),n.addColorStop(.8333333333333334,"indigo"),n.addColorStop(1,"violet"),a.fillStyle=n,a.fillRect(0,0,r.width,r.height);var o="Random Text WMwmil10Oo";a.font="23.123px Arial",a.fillStyle="black",a.fillText(o,-5,15),a.fillStyle="rgba(0, 0, 255, 0.5)",a.fillText(o,-3.3,17.7),a.beginPath(),a.moveTo(0,0),a.lineTo(2*r.width/7,r.height),a.strokeStyle="white",a.lineWidth=2,a.stroke();var s=a.getImageData(0,0,r.width,r.height);return s}()});e({commonImageDataHash:zt(Or(t,Fr,Dr).data.toString()).toString()})})});var Ht,Hs=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],Bs=["monospace","sans-serif","serif"];function Nr(e,t){if(!e)throw new Error("Canvas context not supported");return e.font,e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function js(){var e,t=document.createElement("canvas"),r=(e=t.getContext("webgl"))!==null&&e!==void 0?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var a=(r.getParameter(r.VENDOR)||"").toString(),n=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:a,renderer:n,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!n.length||!a.length){var s=r.getExtension("WEBGL_debug_renderer_info");if(s){var c=(r.getParameter(s.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(r.getParameter(s.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(o.vendorUnmasked=c),u&&(o.rendererUnmasked=u)}}return o}catch{}return"undefined"}function Ws(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function Vs(e,t){var r={};return t.forEach(function(a){var n=function(o){if(o.length===0)return null;var s={};o.forEach(function(l){var i=String(l);s[i]=(s[i]||0)+1});var c=o[0],u=1;return Object.keys(s).forEach(function(l){s[l]>u&&(c=l,u=s[l])}),c}(e.map(function(o){return a in o?o[a]:void 0}).filter(function(o){return o!==void 0}));n&&(r[a]=n)}),r}function Gs(){var e=[],t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach(function(r){t[r].forEach(function(a){matchMedia("(".concat(r,": ").concat(a,")")).matches&&e.push("".concat(r,": ").concat(a))})}),e}function qs(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch{return 0}return 0}Je().name!="Firefox"&&pe("fonts",function(){var e=this;return new Promise(function(t,r){try{(function(a){var n;be(this,void 0,void 0,function(){var o,s,c;return ye(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(l=50,new Promise(function(p){return setTimeout(p,l,i)}))];case 1:return u.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(s=o.style).setProperty("position","fixed"),s.setProperty("display","block","important"),s.setProperty("visibility","visible"),s.setProperty("border","0"),s.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(c=o.contentDocument||((n=o.contentWindow)===null||n===void 0?void 0:n.document)))throw new Error("Iframe document is not accessible");return a({iframe:c}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var l,i})})})(function(a){var n=a.iframe;return be(e,void 0,void 0,function(){var o,s,c,u;return ye(this,function(l){return o=n.createElement("canvas"),s=o.getContext("2d"),c=Bs.map(function(i){return Nr(s,i)}),u={},Hs.forEach(function(i){var p=Nr(s,i);c.includes(p)||(u[i]=p)}),t(u),[2]})})})}catch{r({error:"unsupported"})}})}),pe("hardware",function(){return new Promise(function(e,t){var r=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,a=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:js(),architecture:Ws(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:a.jsHeapSizeLimit||0})})}),pe("locales",function(){return new Promise(function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),pe("permissions",function(){return be(this,void 0,void 0,function(){var e;return ye(this,function(t){return Ht=(Se==null?void 0:Se.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],e=Array.from({length:(Se==null?void 0:Se.retries)||3},function(){return function(){return be(this,void 0,void 0,function(){var r,a,n,o,s;return ye(this,function(c){switch(c.label){case 0:r={},a=0,n=Ht,c.label=1;case 1:if(!(a<n.length))return[3,6];o=n[a],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return s=c.sent(),r[o]=s.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return a++,[3,1];case 6:return[2,r]}})})}()}),[2,Promise.all(e).then(function(r){return Vs(r,Ht)})]})})}),pe("plugins",function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise(function(a){a({plugins:e})})}),pe("screen",function(){return new Promise(function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:Gs()})})}),pe("system",function(){return new Promise(function(e){var t=Je();e({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:qs()})})});var Z,Ys=Je().name!=="SamsungBrowser"?1:3,R=null;pe("webgl",function(){return be(this,void 0,void 0,function(){var e;return ye(this,function(t){typeof document<"u"&&((Z=document.createElement("canvas")).width=200,Z.height=100,R=Z.getContext("webgl"));try{if(!R)throw new Error("WebGL not supported");return e=Array.from({length:Ys},function(){return function(){try{if(!R)throw new Error("WebGL not supported");var r=`
|
|
1
|
+
(function(O,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],B):(O=typeof globalThis<"u"?globalThis:O||self,B(O.SearchcraftVueSdk={},O.Vue))})(this,function(O,B){"use strict";var ci=Object.defineProperty;var ii=(O,B,_e)=>B in O?ci(O,B,{enumerable:!0,configurable:!0,writable:!0,value:_e}):O[B]=_e;var h=(O,B,_e)=>ii(O,typeof B!="symbol"?B+"":B,_e);var _s;const _e="searchcraft-javascript-sdk",Ae={allRenderFn:!0,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,cmpDidLoad:!0,cmpDidRender:!1,cmpDidUnload:!1,cmpDidUpdate:!1,cmpShouldUpdate:!1,cmpWillLoad:!1,cmpWillRender:!1,cmpWillUpdate:!1,connectedCallback:!0,constructableCSS:!0,cssAnnotations:!0,devTools:!1,disconnectedCallback:!0,element:!1,event:!0,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!1,hostListenerTarget:!1,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!1,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!1,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!1,mode:!1,modernPropertyDecls:!0,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propMutable:!1,propNumber:!0,propString:!0,reflect:!1,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,shadowDelegatesFocus:!1,shadowDom:!1,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!1,svg:!0,taskQueue:!0,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!1,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!1,watchCallback:!0};var da=Object.defineProperty,ha=(e,t)=>{for(var r in t)da(e,r,{get:t[r],enumerable:!0})},pa="http://www.w3.org/2000/svg",ma="http://www.w3.org/1999/xhtml",ga=(e,t)=>{var r;const s=t.$cmpMeta$;Object.entries((r=s.$members$)!=null?r:{}).map(([o,[n]])=>{if(n&31||n&32){const c=e[o],i=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),o);Object.defineProperty(e,o,{get(){return i.get.call(this)},set(u){i.set.call(this,u)},configurable:!0,enumerable:!0}),e[o]=t.$instanceValues$.has(o)?t.$instanceValues$.get(o):c}})},xt=new WeakMap,va=e=>xt.delete(e),Ee=e=>xt.get(e),ba=(e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};r.$onReadyPromise$=new Promise(a=>r.$onReadyResolve$=a),e["s-p"]=[],e["s-rc"]=[];const s=xt.set(e,r);return ga(e,r),s},yr=(e,t)=>t in e,at=(e,t)=>(0,console.error)(e,t),nt=typeof window<"u"?window:{},Ie=nt.document||{head:{}},F=nt.HTMLElement||class{},re={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,s)=>e.addEventListener(t,r,s),rel:(e,t,r,s)=>e.removeEventListener(t,r,s),ce:(e,t)=>new CustomEvent(e,t)},ya=Ae.shadowDom,Sa=e=>Promise.resolve(e),$t=!1,Sr=[],Er=[],Ea=(e,t)=>r=>{e.push(r),$t||($t=!0,re.$flags$&4?At(_t):re.raf(_t))},Rr=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(r){at(r)}e.length=0},_t=()=>{Rr(Sr),Rr(Er),($t=Sr.length>0)&&re.raf(_t)},At=e=>Sa().then(e),Ra=Ea(Er),It=e=>(e=typeof e,e==="object"||e==="function"),wa={};ha(wa,{err:()=>wr,map:()=>Ta,ok:()=>Mt,unwrap:()=>ka,unwrapErr:()=>Pa});var Mt=e=>({isOk:!0,isErr:!1,value:e}),wr=e=>({isOk:!1,isErr:!0,value:e});function Ta(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>Mt(s)):Mt(r)}if(e.isErr){const r=e.value;return wr(r)}throw"should never get here"}var ka=e=>{if(e.isOk)return e.value;throw e.value},Pa=e=>{if(e.isErr)return e.value;throw e.value},Tr=e=>{const t=e.__childNodes||e.childNodes;e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&kr(t,e.tagName).forEach(r=>{var s;r.nodeType===1&&r.tagName==="SLOT-FB"&&((s=Ca(r,r["s-sn"],!1))!=null&&s.length?r.hidden=!0:r.hidden=!1)});for(const r of t)r.nodeType===1&&(r.__childNodes||r.childNodes).length&&Tr(r)};function kr(e,t,r){let s=0,a=[],o;for(;s<e.length;s++)o=e[s],o["s-sr"]&&o["s-hn"]===t&&r===void 0&&a.push(o),a=[...a,...kr(o.childNodes,t,r)];return a}var Ca=(e,t,r=!0)=>{const s=[];for((r&&e["s-sr"]||!e["s-sr"])&&s.push(e);(e=e.nextSibling)&&e["s-sn"]===t;)s.push(e);return s},Pr=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",Be=(e,t="")=>()=>{},d=(e,t,...r)=>{let s=null,a=null,o=null,n=!1,c=!1;const i=[],u=p=>{for(let m=0;m<p.length;m++)s=p[m],Array.isArray(s)?u(s):s!=null&&typeof s!="boolean"&&((n=typeof e!="function"&&!It(s))&&(s=String(s)),n&&c?i[i.length-1].$text$+=s:i.push(n?ot(null,s):s),c=n)};if(u(r),t){t.key&&(a=t.key),t.name&&(o=t.name);{const p=t.className||t.class;p&&(t.class=typeof p!="object"?p:Object.keys(p).filter(m=>p[m]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,i,_a);const l=ot(e,null);return l.$attrs$=t,i.length>0&&(l.$children$=i),l.$key$=a,l.$name$=o,l},ot=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},xa={},$a=e=>e&&e.$tag$===xa,_a={forEach:(e,t)=>e.map(Cr).forEach(t),map:(e,t)=>e.map(Cr).map(t).map(Aa)},Cr=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),Aa=e=>{if(typeof e.vtag=="function"){const r={...e.vattrs};return e.vkey&&(r.key=e.vkey),e.vname&&(r.name=e.vname),d(e.vtag,r,...e.vchildren||[])}const t=ot(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},xr=(e,t)=>e!=null&&!It(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,Ia=e=>e,Re=(e,t,r)=>{const s=Ia(e);return{emit:a=>$r(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},$r=(e,t,r)=>{const s=re.ce(t,r);return e.dispatchEvent(s),s},ct=new WeakMap,_r=(e,t,r,s,a,o)=>{if(r!==s){let n=yr(e,t),c=t.toLowerCase();if(t==="class"){const i=e.classList,u=Ar(r);let l=Ar(s);e["s-si"]?(l.push(e["s-si"]),u.forEach(p=>{p.startsWith(e["s-si"])&&l.push(p)}),l=[...new Set(l)],i.add(...l),delete e["s-si"]):(i.remove(...u.filter(p=>p&&!l.includes(p))),i.add(...l.filter(p=>p&&!u.includes(p))))}else if(t==="style"){for(const i in r)(!s||s[i]==null)&&(i.includes("-")?e.style.removeProperty(i):e.style[i]="");for(const i in s)(!r||s[i]!==r[i])&&(i.includes("-")?e.style.setProperty(i,s[i]):e.style[i]=s[i])}else if(t!=="key")if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):yr(nt,c)?t=c.slice(2):t=c[2]+t.slice(3),r||s){const i=t.endsWith(Ir);t=t.replace(Oa,""),r&&re.rel(e,t,r,i),s&&re.ael(e,t,s,i)}}else{const i=It(s);if((n||i&&s!==null)&&!a)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const u=s??"";t==="list"?n=!1:(r==null||e[t]!=u)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=u:e.setAttribute(t,u))}}catch{}s==null||s===!1?(s!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!n||o&4||a)&&!i&&(s=s===!0?"":s,e.setAttribute(t,s))}}},Ma=/\s/,Ar=e=>(typeof e=="object"&&"baseVal"in e&&(e=e.baseVal),e?e.split(Ma):[]),Ir="Capture",Oa=new RegExp(Ir+"$"),Mr=(e,t,r)=>{const s=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||{},o=t.$attrs$||{};for(const n of Or(Object.keys(a)))n in o||_r(s,n,a[n],void 0,r,t.$flags$);for(const n of Or(Object.keys(o)))_r(s,n,a[n],o[n],r,t.$flags$)};function Or(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var Ot,Lt,it=!1,lt=!1,Ft=!1,ne=!1,ut=(e,t,r)=>{var s;const a=t.$children$[r];let o=0,n,c,i;if(it||(Ft=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)n=a.$elm$=Ie.createTextNode(a.$text$);else if(a.$flags$&1)n=a.$elm$=Ie.createTextNode("");else{if(ne||(ne=a.$tag$==="svg"),n=a.$elm$=Ie.createElementNS(ne?pa:ma,!it&&Ae.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),ne&&a.$tag$==="foreignObject"&&(ne=!1),Mr(null,a,ne),a.$children$)for(o=0;o<a.$children$.length;++o)c=ut(e,a,o),c&&n.appendChild(c);a.$tag$==="svg"?ne=!1:n.tagName==="foreignObject"&&(ne=!0)}return n["s-hn"]=Lt,a.$flags$&3&&(n["s-sr"]=!0,n["s-cr"]=Ot,n["s-sn"]=a.$name$||"",n["s-rf"]=(s=a.$attrs$)==null?void 0:s.ref,i=e&&e.$children$&&e.$children$[r],i&&i.$tag$===a.$tag$&&e.$elm$&&We(e.$elm$,!1)),n},We=(e,t)=>{re.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&Ae.experimentalSlotFixes;for(let s=r.length-1;s>=0;s--){const a=r[s];a["s-hn"]!==Lt&&a["s-ol"]&&(we(Ve(a).parentNode,a,Ve(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,Ft=!0),t&&We(a,t)}re.$flags$&=-2},Lr=(e,t,r,s,a,o)=>{let n=e["s-cr"]&&e["s-cr"].parentNode||e,c;for(;a<=o;++a)s[a]&&(c=ut(null,r,a),c&&(s[a].$elm$=c,we(n,c,Ve(t))))},Fr=(e,t,r)=>{for(let s=t;s<=r;++s){const a=e[s];if(a){const o=a.$elm$;o&&(lt=!0,o["s-ol"]?o["s-ol"].remove():We(o,!0),o.remove())}}},La=(e,t,r,s,a=!1)=>{let o=0,n=0,c=0,i=0,u=t.length-1,l=t[0],p=t[u],m=s.length-1,b=s[0],v=s[m],x,N;for(;o<=u&&n<=m;)if(l==null)l=t[++o];else if(p==null)p=t[--u];else if(b==null)b=s[++n];else if(v==null)v=s[--m];else if(ft(l,b,a))Me(l,b,a),l=t[++o],b=s[++n];else if(ft(p,v,a))Me(p,v,a),p=t[--u],v=s[--m];else if(ft(l,v,a))(l.$tag$==="slot"||v.$tag$==="slot")&&We(l.$elm$.parentNode,!1),Me(l,v,a),we(e,l.$elm$,p.$elm$.nextSibling),l=t[++o],v=s[--m];else if(ft(p,b,a))(l.$tag$==="slot"||v.$tag$==="slot")&&We(p.$elm$.parentNode,!1),Me(p,b,a),we(e,p.$elm$,l.$elm$),p=t[--u],b=s[++n];else{for(c=-1,i=o;i<=u;++i)if(t[i]&&t[i].$key$!==null&&t[i].$key$===b.$key$){c=i;break}c>=0?(N=t[c],N.$tag$!==b.$tag$?x=ut(t&&t[n],r,c):(Me(N,b,a),t[c]=void 0,x=N.$elm$),b=s[++n]):(x=ut(t&&t[n],r,n),b=s[++n]),x&&we(Ve(l.$elm$).parentNode,x,Ve(l.$elm$))}o>u?Lr(e,s[m+1]==null?null:s[m+1].$elm$,r,s,n,m):n>m&&Fr(t,o,u)},ft=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,Ve=e=>e&&e["s-ol"]||e,Me=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,a=e.$children$,o=t.$children$,n=t.$tag$,c=t.$text$;let i;c===null?(ne=n==="svg"?!0:n==="foreignObject"?!1:ne,n==="slot"&&!it||Mr(e,t,ne),a!==null&&o!==null?La(s,a,t,o,r):o!==null?(e.$text$!==null&&(s.textContent=""),Lr(s,null,t,o,0,o.length-1)):!r&&Ae.updatable&&a!==null&&Fr(a,0,a.length-1),ne&&n==="svg"&&(ne=!1)):(i=s["s-cr"])?i.parentNode.textContent=c:e.$text$!==c&&(s.data=c)},de=[],Dr=e=>{let t,r,s;const a=e.__childNodes||e.childNodes;for(const o of a){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const n=o["s-sn"];for(s=r.length-1;s>=0;s--)if(t=r[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if(Pr(t,n)){let c=de.find(i=>i.$nodeToRelocate$===t);lt=!0,t["s-sn"]=t["s-sn"]||n,c?(c.$nodeToRelocate$["s-sh"]=o["s-hn"],c.$slotRefNode$=o):(t["s-sh"]=o["s-hn"],de.push({$slotRefNode$:o,$nodeToRelocate$:t})),t["s-sr"]&&de.map(i=>{Pr(i.$nodeToRelocate$,t["s-sn"])&&(c=de.find(u=>u.$nodeToRelocate$===t),c&&!i.$slotRefNode$&&(i.$slotRefNode$=c.$slotRefNode$))})}else de.some(c=>c.$nodeToRelocate$===t)||de.push({$nodeToRelocate$:t})}o.nodeType===1&&Dr(o)}},we=(e,t,r)=>e==null?void 0:e.insertBefore(t,r),Fa=(e,t,r=!1)=>{var s,a,o,n;const c=e.$hostElement$,i=e.$vnode$||ot(null,null),u=$a(t)?t:d(null,null,t);if(Lt=c.tagName,r&&u.$attrs$)for(const l of Object.keys(u.$attrs$))c.hasAttribute(l)&&!["key","ref","style","class"].includes(l)&&(u.$attrs$[l]=c[l]);u.$tag$=null,u.$flags$|=4,e.$vnode$=u,u.$elm$=i.$elm$=c,it=ya,Ot=c["s-cr"],lt=!1,Me(i,u,r);{if(re.$flags$|=1,Ft){Dr(u.$elm$);for(const l of de){const p=l.$nodeToRelocate$;if(!p["s-ol"]){const m=Ie.createTextNode("");m["s-nr"]=p,we(p.parentNode,p["s-ol"]=m,p)}}for(const l of de){const p=l.$nodeToRelocate$,m=l.$slotRefNode$;if(m){const b=m.parentNode;let v=m.nextSibling;{let q=(s=p["s-ol"])==null?void 0:s.previousSibling;for(;q;){let $=(a=q["s-nr"])!=null?a:null;if($&&$["s-sn"]===p["s-sn"]&&b===($.__parentNode||$.parentNode)){for($=$.nextSibling;$===p||$!=null&&$["s-sr"];)$=$==null?void 0:$.nextSibling;if(!$||!$["s-nr"]){v=$;break}}q=q.previousSibling}}const x=p.__parentNode||p.parentNode,N=p.__nextSibling||p.nextSibling;(!v&&b!==x||N!==v)&&p!==v&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),we(b,p,v),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(o=p["s-ih"])!=null?o:!1)),p&&typeof m["s-rf"]=="function"&&m["s-rf"](p)}else p.nodeType===1&&(r&&(p["s-ih"]=(n=p.hidden)!=null?n:!1),p.hidden=!0)}}lt&&Tr(u.$elm$),re.$flags$&=-2,de.length=0}Ot=void 0},Nr=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){const r=t["s-p"].push(new Promise(s=>e.$onRenderResolve$=()=>{t["s-p"].splice(r-1,1),s()}))}},Dt=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return Nr(e,e.$ancestorComponent$),Ra(()=>Da(e,t))},Da=(e,t)=>{const r=e.$hostElement$,s=Be("scheduleUpdate",e.$cmpMeta$.$tagName$),a=r;if(!a)throw new Error(`Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return s(),Na(o,()=>za(e,a,t))},Na=(e,t)=>Ua(e)?e.then(t).catch(r=>{console.error(r),t()}):t(),Ua=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",za=async(e,t,r)=>{var s;const a=e.$hostElement$,o=Be("update",e.$cmpMeta$.$tagName$),n=a["s-rc"],c=Be("render",e.$cmpMeta$.$tagName$);Ha(e,t,a,r),n&&(n.map(i=>i()),a["s-rc"]=void 0),c(),o();{const i=(s=a["s-p"])!=null?s:[],u=()=>ja(e);i.length===0?u():(Promise.all(i).then(u),e.$flags$|=4,i.length=0)}},Ha=(e,t,r,s)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Fa(e,t,s)}catch(a){at(a,e.$hostElement$)}return null},ja=e=>{const t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,s=Be("postUpdate",t),a=r,o=e.$ancestorComponent$;e.$flags$&64?s():(e.$flags$|=64,Ur(r),Wa(a,"componentDidLoad",void 0,r),s(),e.$onReadyResolve$(r),o||Ba()),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&At(()=>Dt(e,!1)),e.$flags$&=-517},Ba=e=>{Ur(Ie.documentElement),At(()=>$r(nt,"appload",{detail:{namespace:_e}}))},Wa=(e,t,r,s)=>{if(e&&e[t])try{return e[t](r)}catch(a){at(a,s)}},Ur=e=>{var t;return e.classList.add((t=Ae.hydratedSelectorName)!=null?t:"hydrated")},Va=(e,t)=>Ee(e).$instanceValues$.get(t),zr=(e,t,r,s)=>{const a=Ee(e),o=e,n=a.$instanceValues$.get(t),c=a.$flags$,i=o;r=xr(r,s.$members$[t][0]);const u=Number.isNaN(n)&&Number.isNaN(r);if(r!==n&&!u){a.$instanceValues$.set(t,r);{if(s.$watchers$&&c&128){const p=s.$watchers$[t];p&&p.map(m=>{try{i[m](r,n,t)}catch(b){at(b,o)}})}(c&18)===2&&Dt(a,!1)}}},Ga=(e,t,r)=>{var s,a;const o=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const n=Object.entries((s=t.$members$)!=null?s:{});n.map(([c,[i]])=>{if(i&31||i&32){const{get:u,set:l}=Object.getOwnPropertyDescriptor(o,c)||{};u&&(t.$members$[c][0]|=2048),l&&(t.$members$[c][0]|=4096),Object.defineProperty(o,c,{get(){return u?u.apply(this):Va(this,c)},configurable:!0,enumerable:!0}),Object.defineProperty(o,c,{set(p){const m=Ee(this);if(l){const b=i&32?this[c]:m.$hostElement$[c];typeof b>"u"&&m.$instanceValues$.get(c)?p=m.$instanceValues$.get(c):!m.$instanceValues$.get(c)&&b&&m.$instanceValues$.set(c,b),l.apply(this,[xr(p,i)]),p=i&32?this[c]:m.$hostElement$[c],zr(this,c,p,t);return}{zr(this,c,p,t);return}}})}});{const c=new Map;o.attributeChangedCallback=function(i,u,l){re.jmp(()=>{var p;const m=c.get(i);if(!(this.hasOwnProperty(m)&&Ae.lazyLoad)){if(o.hasOwnProperty(m)&&typeof this[m]=="number"&&this[m]==l)return;if(m==null){const v=Ee(this),x=v==null?void 0:v.$flags$;if(x&&!(x&8)&&x&128&&l!==u){const q=this,$=(p=t.$watchers$)==null?void 0:p[i];$==null||$.forEach(ve=>{q[ve]!=null&&q[ve].call(q,l,u,i)})}return}}const b=Object.getOwnPropertyDescriptor(o,m);l=l===null&&typeof this[m]=="boolean"?!1:l,l!==this[m]&&(!b.get||b.set)&&(this[m]=l)})},e.observedAttributes=Array.from(new Set([...Object.keys((a=t.$watchers$)!=null?a:{}),...n.filter(([i,u])=>u[0]&15).map(([i,u])=>{const l=u[1]||i;return c.set(l,i),l})]))}}return e},qa=async(e,t,r,s)=>{if(!(t.$flags$&32)){t.$flags$|=32;{const n=e.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}}const a=t.$ancestorComponent$,o=()=>Dt(t,!0);a&&a["s-rc"]?a["s-rc"].push(o):o()},Ya=(e,t)=>{},Qa=e=>{if(!(re.$flags$&1)){const t=Ee(e),r=t.$cmpMeta$,s=Be("connectedCallback",r.$tagName$);if(t.$flags$&1)t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>Ya());else{t.$flags$|=1,r.$flags$&12&&Ka(e);{let a=e;for(;a=a.parentNode||a.host;)if(a["s-p"]){Nr(t,t.$ancestorComponent$=a);break}}r.$members$&&Object.entries(r.$members$).map(([a,[o]])=>{if(o&31&&e.hasOwnProperty(a)){const n=e[a];delete e[a],e[a]=n}}),qa(e,t)}s()}},Ka=e=>{const t=e["s-cr"]=Ie.createComment("");t["s-cn"]=!0,we(e,t,e.firstChild)},Xa=async e=>{re.$flags$&1||Ee(e),ct.has(e)&&ct.delete(e),e.shadowRoot&&ct.has(e.shadowRoot)&&ct.delete(e.shadowRoot)},D=(e,t)=>{const r={$flags$:t[0],$tagName$:t[1]};r.$members$=t[2],r.$watchers$=e.$watchers$;const s=e.prototype.connectedCallback,a=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){ba(this,r)},connectedCallback(){this.__hasHostListenerAttached||(Ee(this),this.__hasHostListenerAttached=!0),Qa(this),s&&s.call(this)},disconnectedCallback(){Xa(this),a&&a.call(this),re.raf(()=>{var o;const n=Ee(this);((o=n==null?void 0:n.$vnode$)==null?void 0:o.$elm$)instanceof Node&&!n.$vnode$.$elm$.isConnected&&delete n.$vnode$,this instanceof Node&&!this.isConnected&&va(this)})},__attachShadow(){this.shadowRoot=this}}),e.is=r.$tagName$,Ga(e,r)},Hr=(e,t)=>t,Za=Object.defineProperty,Ja=(e,t,r)=>t in e?Za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t,r)=>Ja(e,typeof t!="symbol"?t+"":t,r),Te=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Te||{});class en{constructor(t){I(this,"logLevel"),I(this,"logFormatter"),this.logLevel=t.logLevel||1,this.logFormatter=t.logFormatter||this.defaultFormatter}defaultFormatter(t,r){return`[${Te[t]}] ${new Date().toISOString()}: ${r}`}debug(t){this.logLevel<=0&&console.log(this.logFormatter(0,t))}info(t){this.logLevel<=1&&console.info(this.logFormatter(1,t))}warn(t){this.logLevel<=2&&console.warn(this.logFormatter(2,t))}error(t){this.logLevel<=3&&console.error(this.logFormatter(3,t))}log(t,r){switch(t){case 0:this.debug(r);break;case 1:this.info(r);break;case 2:this.warn(r);break;case 3:this.error(r);break}}}function he(e,t,r,s){return new(r||(r=Promise))(function(a,o){function n(u){try{i(s.next(u))}catch(l){o(l)}}function c(u){try{i(s.throw(u))}catch(l){o(l)}}function i(u){var l;u.done?a(u.value):(l=u.value,l instanceof r?l:new r(function(p){p(l)})).then(n,c)}i((s=s.apply(e,[])).next())})}function pe(e,t){var r,s,a,o,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(i){return function(u){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,s&&(a=2&l[0]?s.return:l[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,l[1])).done)return a;switch(s=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,s=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!((a=a.length>0&&a[a.length-1])||l[0]!==6&&l[0]!==2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(p){l=[6,p],s=0}finally{r=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([i,u])}}}var me={exclude:[]},jr={},tn={timeout:"true"},ie=function(e,t){typeof window<"u"&&(jr[e]=t)},rn=function(){return Object.fromEntries(Object.entries(jr).filter(function(e){var t,r=e[0];return!(!((t=me==null?void 0:me.exclude)===null||t===void 0)&&t.includes(r))}).map(function(e){return[e[0],(0,e[1])()]}))};function dt(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var G=new Uint32Array([597399067,2869860233,951274213,2716044179]);function ce(e,t){return e<<t|e>>>32-t}function Nt(e,t){var r;if(t===void 0&&(t=0),t=t?0|t:0,typeof e=="string"&&(r=e,e=new TextEncoder().encode(r).buffer),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var s=new Uint32Array([t,t,t,t]);(function(o,n){for(var c=o.byteLength/16|0,i=new Uint32Array(o,0,4*c),u=0;u<c;u++){var l=i.subarray(4*u,4*(u+1));l[0]=Math.imul(l[0],G[0]),l[0]=ce(l[0],15),l[0]=Math.imul(l[0],G[1]),n[0]=n[0]^l[0],n[0]=ce(n[0],19),n[0]=n[0]+n[1],n[0]=Math.imul(n[0],5)+1444728091,l[1]=Math.imul(l[1],G[1]),l[1]=ce(l[1],16),l[1]=Math.imul(l[1],G[2]),n[1]=n[1]^l[1],n[1]=ce(n[1],17),n[1]=n[1]+n[2],n[1]=Math.imul(n[1],5)+197830471,l[2]=Math.imul(l[2],G[2]),l[2]=ce(l[2],17),l[2]=Math.imul(l[2],G[3]),n[2]=n[2]^l[2],n[2]=ce(n[2],15),n[2]=n[2]+n[3],n[2]=Math.imul(n[2],5)+2530024501,l[3]=Math.imul(l[3],G[3]),l[3]=ce(l[3],18),l[3]=Math.imul(l[3],G[0]),n[3]=n[3]^l[3],n[3]=ce(n[3],13),n[3]=n[3]+n[0],n[3]=Math.imul(n[3],5)+850148119}})(e,s),function(o,n){var c=o.byteLength/16|0,i=o.byteLength%16,u=new Uint32Array(4),l=new Uint8Array(o,16*c,i);switch(i){case 15:u[3]=u[3]^l[14]<<16;case 14:u[3]=u[3]^l[13]<<8;case 13:u[3]=u[3]^l[12]<<0,u[3]=Math.imul(u[3],G[3]),u[3]=ce(u[3],18),u[3]=Math.imul(u[3],G[0]),n[3]=n[3]^u[3];case 12:u[2]=u[2]^l[11]<<24;case 11:u[2]=u[2]^l[10]<<16;case 10:u[2]=u[2]^l[9]<<8;case 9:u[2]=u[2]^l[8]<<0,u[2]=Math.imul(u[2],G[2]),u[2]=ce(u[2],17),u[2]=Math.imul(u[2],G[3]),n[2]=n[2]^u[2];case 8:u[1]=u[1]^l[7]<<24;case 7:u[1]=u[1]^l[6]<<16;case 6:u[1]=u[1]^l[5]<<8;case 5:u[1]=u[1]^l[4]<<0,u[1]=Math.imul(u[1],G[1]),u[1]=ce(u[1],16),u[1]=Math.imul(u[1],G[2]),n[1]=n[1]^u[1];case 4:u[0]=u[0]^l[3]<<24;case 3:u[0]=u[0]^l[2]<<16;case 2:u[0]=u[0]^l[1]<<8;case 1:u[0]=u[0]^l[0]<<0,u[0]=Math.imul(u[0],G[0]),u[0]=ce(u[0],15),u[0]=Math.imul(u[0],G[1]),n[0]=n[0]^u[0]}}(e,s),function(o,n){n[0]=n[0]^o.byteLength,n[1]=n[1]^o.byteLength,n[2]=n[2]^o.byteLength,n[3]=n[3]^o.byteLength,n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0,n[0]=dt(n[0]),n[1]=dt(n[1]),n[2]=dt(n[2]),n[3]=dt(n[3]),n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0}(e,s);var a=new Uint8Array(s.buffer);return Array.from(a).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function sn(e,t){return new Promise(function(r){setTimeout(function(){return r(t)},e)})}function an(e,t,r){return Promise.all(e.map(function(s){return Promise.race([s,sn(t,r)])}))}function nn(){return he(this,void 0,void 0,function(){var e,t,r,s,a;return pe(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e=rn(),t=Object.keys(e),[4,an(Object.values(e),(me==null?void 0:me.timeout)||1e3,tn)];case 1:return r=o.sent(),s=r.filter(function(n){return n!==void 0}),a={},s.forEach(function(n,c){a[t[c]]=n}),[2,Br(a,me.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function Br(e,t){var r={},s=function(o){if(e.hasOwnProperty(o)){var n=e[o];if(typeof n!="object"||Array.isArray(n))t.includes(o)||(r[o]=n);else{var c=Br(n,t.map(function(i){return i.startsWith(o+".")?i.slice(o.length+1):i}));Object.keys(c).length>0&&(r[o]=c)}}};for(var a in e)s(a);return r}function on(e){return he(this,void 0,void 0,function(){var t,r;return pe(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,nn()];case 1:return t=s.sent(),r=Nt(JSON.stringify(t)),[2,r.toString()];case 2:throw s.sent();case 3:return[2]}})})}function cn(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function Wr(e,t,r){for(var s=[],a=0;a<e[0].data.length;a++){for(var o=[],n=0;n<e.length;n++)o.push(e[n].data[a]);s.push(ln(o))}var c=new Uint8ClampedArray(s);return new ImageData(c,t,r)}function ln(e){if(e.length===0)return 0;for(var t={},r=0,s=e;r<s.length;r++)t[o=s[r]]=(t[o]||0)+1;var a=e[0];for(var o in t)t[o]>t[a]&&(a=parseInt(o,10));return a}function Ge(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=0,s=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];r<s.length;r++){var a=s[r],o=e.match(a);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}ie("audio",function(){return he(this,void 0,void 0,function(){return pe(this,function(e){return[2,new Promise(function(t,r){try{var s=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=s.createBufferSource(),o=s.createOscillator();o.frequency.value=1e3;var n,c=s.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,o.connect(c),c.connect(s.destination),o.start(),s.oncomplete=function(i){n=i.renderedBuffer.getChannelData(0),t({sampleHash:cn(n),oscillator:o.type,maxChannels:s.destination.maxChannelCount,channelCountMode:a.channelCountMode})},s.startRendering()}catch(i){console.error("Error creating audio fingerprint:",i),r(i)}})]})})});var un=Ge().name!=="SamsungBrowser"?1:3,Vr=280,Gr=20;Ge().name!="Firefox"&&ie("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(e){var t=Array.from({length:un},function(){return function(){var r=document.createElement("canvas"),s=r.getContext("2d");if(!s)return new ImageData(1,1);r.width=Vr,r.height=Gr;var a=s.createLinearGradient(0,0,r.width,r.height);a.addColorStop(0,"red"),a.addColorStop(.16666666666666666,"orange"),a.addColorStop(.3333333333333333,"yellow"),a.addColorStop(.5,"green"),a.addColorStop(.6666666666666666,"blue"),a.addColorStop(.8333333333333334,"indigo"),a.addColorStop(1,"violet"),s.fillStyle=a,s.fillRect(0,0,r.width,r.height);var o="Random Text WMwmil10Oo";s.font="23.123px Arial",s.fillStyle="black",s.fillText(o,-5,15),s.fillStyle="rgba(0, 0, 255, 0.5)",s.fillText(o,-3.3,17.7),s.beginPath(),s.moveTo(0,0),s.lineTo(2*r.width/7,r.height),s.strokeStyle="white",s.lineWidth=2,s.stroke();var n=s.getImageData(0,0,r.width,r.height);return n}()});e({commonImageDataHash:Nt(Wr(t,Vr,Gr).data.toString()).toString()})})});var Ut,fn=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],dn=["monospace","sans-serif","serif"];function qr(e,t){if(!e)throw new Error("Canvas context not supported");return e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function hn(){var e,t=document.createElement("canvas"),r=(e=t.getContext("webgl"))!==null&&e!==void 0?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var s=(r.getParameter(r.VENDOR)||"").toString(),a=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:s,renderer:a,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!s.length){var n=r.getExtension("WEBGL_debug_renderer_info");if(n){var c=(r.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),i=(r.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(o.vendorUnmasked=c),i&&(o.rendererUnmasked=i)}}return o}catch{}return"undefined"}function pn(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function mn(e,t){var r={};return t.forEach(function(s){var a=function(o){if(o.length===0)return null;var n={};o.forEach(function(u){var l=String(u);n[l]=(n[l]||0)+1});var c=o[0],i=1;return Object.keys(n).forEach(function(u){n[u]>i&&(c=u,i=n[u])}),c}(e.map(function(o){return s in o?o[s]:void 0}).filter(function(o){return o!==void 0}));a&&(r[s]=a)}),r}function gn(){var e=[],t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach(function(r){t[r].forEach(function(s){matchMedia("(".concat(r,": ").concat(s,")")).matches&&e.push("".concat(r,": ").concat(s))})}),e}function vn(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch{return 0}return 0}Ge().name!="Firefox"&&ie("fonts",function(){var e=this;return new Promise(function(t,r){try{(function(s){var a;he(this,void 0,void 0,function(){var o,n,c;return pe(this,function(i){switch(i.label){case 0:return document.body?[3,2]:[4,(u=50,new Promise(function(p){return setTimeout(p,u,l)}))];case 1:return i.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(n=o.style).setProperty("position","fixed"),n.setProperty("display","block","important"),n.setProperty("visibility","visible"),n.setProperty("border","0"),n.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(c=o.contentDocument||((a=o.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return s({iframe:c}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var u,l})})})(function(s){var a=s.iframe;return he(e,void 0,void 0,function(){var o,n,c,i;return pe(this,function(u){return o=a.createElement("canvas"),n=o.getContext("2d"),c=dn.map(function(l){return qr(n,l)}),i={},fn.forEach(function(l){var p=qr(n,l);c.includes(p)||(i[l]=p)}),t(i),[2]})})})}catch{r({error:"unsupported"})}})}),ie("hardware",function(){return new Promise(function(e,t){var r=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,s=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:hn(),architecture:pn(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:s.jsHeapSizeLimit||0})})}),ie("locales",function(){return new Promise(function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),ie("permissions",function(){return he(this,void 0,void 0,function(){var e;return pe(this,function(t){return Ut=(me==null?void 0:me.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],e=Array.from({length:(me==null?void 0:me.retries)||3},function(){return function(){return he(this,void 0,void 0,function(){var r,s,a,o,n;return pe(this,function(c){switch(c.label){case 0:r={},s=0,a=Ut,c.label=1;case 1:if(!(s<a.length))return[3,6];o=a[s],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return n=c.sent(),r[o]=n.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return s++,[3,1];case 6:return[2,r]}})})}()}),[2,Promise.all(e).then(function(r){return mn(r,Ut)})]})})}),ie("plugins",function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise(function(s){s({plugins:e})})}),ie("screen",function(){return new Promise(function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:gn()})})}),ie("system",function(){return new Promise(function(e){var t=Ge();e({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:vn()})})});var K,bn=Ge().name!=="SamsungBrowser"?1:3,R=null;ie("webgl",function(){return he(this,void 0,void 0,function(){var e;return pe(this,function(t){typeof document<"u"&&((K=document.createElement("canvas")).width=200,K.height=100,R=K.getContext("webgl"));try{if(!R)throw new Error("WebGL not supported");return e=Array.from({length:bn},function(){return function(){try{if(!R)throw new Error("WebGL not supported");var r=`
|
|
2
2
|
attribute vec2 position;
|
|
3
3
|
void main() {
|
|
4
4
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
5
5
|
}
|
|
6
|
-
`,
|
|
6
|
+
`,s=`
|
|
7
7
|
precision mediump float;
|
|
8
8
|
void main() {
|
|
9
9
|
gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
|
|
10
10
|
}
|
|
11
|
-
`,n=R.createShader(R.VERTEX_SHADER),o=R.createShader(R.FRAGMENT_SHADER);if(!n||!o)throw new Error("Failed to create shaders");if(R.shaderSource(n,r),R.shaderSource(o,a),R.compileShader(n),!R.getShaderParameter(n,R.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+R.getShaderInfoLog(n));if(R.compileShader(o),!R.getShaderParameter(o,R.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+R.getShaderInfoLog(o));var s=R.createProgram();if(!s)throw new Error("Failed to create shader program");if(R.attachShader(s,n),R.attachShader(s,o),R.linkProgram(s),!R.getProgramParameter(s,R.LINK_STATUS))throw new Error("Shader program linking failed: "+R.getProgramInfoLog(s));R.useProgram(s);for(var c=137,u=new Float32Array(4*c),l=2*Math.PI/c,i=0;i<c;i++){var p=i*l;u[4*i]=0,u[4*i+1]=0,u[4*i+2]=Math.cos(p)*(Z.width/2),u[4*i+3]=Math.sin(p)*(Z.height/2)}var m=R.createBuffer();R.bindBuffer(R.ARRAY_BUFFER,m),R.bufferData(R.ARRAY_BUFFER,u,R.STATIC_DRAW);var b=R.getAttribLocation(s,"position");R.enableVertexAttribArray(b),R.vertexAttribPointer(b,2,R.FLOAT,!1,0,0),R.viewport(0,0,Z.width,Z.height),R.clearColor(0,0,0,1),R.clear(R.COLOR_BUFFER_BIT),R.drawArrays(R.LINES,0,2*c);var v=new Uint8ClampedArray(Z.width*Z.height*4);return R.readPixels(0,0,Z.width,Z.height,R.RGBA,R.UNSIGNED_BYTE,v),new ImageData(v,Z.width,Z.height)}catch{return new ImageData(1,1)}finally{R&&(R.bindBuffer(R.ARRAY_BUFFER,null),R.useProgram(null),R.viewport(0,0,R.drawingBufferWidth,R.drawingBufferHeight),R.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:zt(Or(e,Z.width,Z.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var _e=function(e,t,r,a){for(var n=(r-t)/a,o=0,s=0;s<a;s++)o+=e(t+(s+.5)*n);return o*n};pe("math",function(){return be(void 0,void 0,void 0,function(){return ye(this,function(e){return[2,{acos:Math.acos(.5),asin:_e(Math.asin,-1,1,97),atan:_e(Math.atan,-1,1,97),cos:_e(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:_e(Math.sin,-Math.PI,Math.PI,97),sinh:_e(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:_e(Math.tan,0,2*Math.PI,97),tanh:_e(Math.tanh,-9/7,7/9,97)}]})})});const Qs="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let mt=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Qs[r[e]&63];return t};class Bt{constructor(t){F(this,"config"),this.config=t}async getAdsForSearchParams(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,r){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class Ks extends Bt{async getAdsForSearchParams(t){if(!this.config.admSub)return console.error("No admSub specified in config."),[];const r=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:this.config.admSub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${this.config.admTextAdQuantity||0}`,"results-pa":`${this.config.admProductAdQuantity||0}`}).toString()}`,a=await(await fetch(r,{method:"GET"})).json(),n=a.product_ads.map(s=>({id:mt(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:s})),o=a.text_ads.map(s=>({id:mt(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:s}));return n.concat(o)}async onAdContainerViewed(t){var r;const a=t.adClientResponseItem;(r=a.admAd)!=null&&r.impression_url&&fetch(a.admAd.impression_url)}}class Xs extends Bt{async getAdsForSearchParams(t){return[]}}const Js=1e3;class Zs extends Bt{constructor(t){super(t),F(this,"adCallTimeout"),this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var a;if((((a=r.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(Js)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAdsForSearchParams(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const en=500;class tn{constructor(t,r,a){F(this,"measureRequestTimeout"),F(this,"measureRequestsBatched",[]),F(this,"config"),F(this,"sdkInfo"),F(this,"userId"),F(this,"sessionId"),F(this,"sendMeasureEvent",(n,o={},s={})=>{const c={event_name:n,properties:{searchcraft_index_names:this.config.index,session_id:this.sessionId,...o},user:{...this.measureRequestUser,...s}};this.measureRequestsBatched.push(c),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const u=JSON.stringify({items:this.measureRequestsBatched}),l=`${this.baseMeasureUrl}/batch`;try{const i=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId},body:u,keepalive:!0});if(!i.ok)throw new Error(`Failed to send request: ${i.status} ${i.statusText}`);this.measureRequestsBatched=[];return}catch(i){throw console.error("Error sending MeasureRequest:",i),i}},en)}),this.config=t,this.sdkInfo=r,this.userId=a,this.sessionId=mt(),this.sendMeasureEvent("sdk_initialized")}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}function rn(e){const t=[];let r="should";return e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(a=>{var n;const o=(n=e.facetPathsForIndexFields)==null?void 0:n[a];o&&(r="must",t.push({occur:r,exact:{ctx:o.value}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(a=>{var n;const o=(n=e.rangeValueForIndexFields)==null?void 0:n[a];o&&(r="must",t.push({occur:r,exact:{ctx:o.value}}))}),e.sort==="desc"?e.order_by="date_published":e.order_by="",t.push({occur:r,[e.mode]:{ctx:e.searchTerm}}),t}const an=e=>e.endsWith("/")?e.slice(0,-1):e,sn=e=>{let t="";if(t=e.trim(),t=t.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t};class nn{constructor(t,r,a){F(this,"config"),F(this,"userId"),F(this,"parent"),F(this,"getSearchResponse",async n=>{var o,s,c,u,l;const i=sn(n.searchTerm);(o=this.parent.measureClient)==null||o.sendMeasureEvent("search_requested",{search_term:i}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:i}}),(s=this.parent.adClient)==null||s.onQuerySubmitted(n);try{const p={query:rn(n),offset:n.offset||0,limit:n.limit||this.config.searchResultsPerPage||20};n.order_by&&(p.order_by=n.order_by,p.sort=n.sort==="desc"||n.sort==="asc"?n.sort:"asc");const m={method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId},body:JSON.stringify(p)},b=await fetch(this.baseSearchUrl,m);if(!b.ok)throw new Error(`Error: ${b.statusText} (Status: ${b.status})`);const v=await b.json();return(c=this.parent.measureClient)==null||c.sendMeasureEvent("search_response_received",{search_term:i,number_of_documents:v.data.count}),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:i}}),(((u=v.data.hits)==null?void 0:u.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(l=this.parent.adClient)==null||l.onQueryFetched(n,v),v}catch(p){throw console.error("Error parsing response:",p),p}}),this.parent=t,this.config=r,this.userId=a}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.index.join(",")}/search`}}class on{constructor(t,r){if(F(this,"config"),F(this,"measureClient"),F(this,"searchClient"),F(this,"adClient"),F(this,"userId"),F(this,"requestTimeout"),F(this,"subscriptionEvents",{}),F(this,"getItems",(a,n,o)=>{const s=async()=>{(async()=>{var c,u;const l=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponse(a));if(!l)throw new Error("Search client was not initialized.");const i=(u=l.data.hits||[])==null?void 0:u.map(p=>p.doc).filter(p=>!!p).map(p=>({type:"SearchDocument",id:mt(),document:p}));n(l,i)})(),(async()=>{if(this.adClient){const c=await this.adClient.getAdsForSearchParams(a);o(c)}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(s,this.config.searchDebounceDelay):s()}),!t.endpointURL||!t.index||!t.readKey)throw new Error("Endpoint URL, Index value(s), and Read Key must be provided");this.config={...t,endpointURL:an(t.endpointURL)},this.userId="",this.initClients(this.config,r),this.initInputForms(),this.startObservingMutations()}initInputForms(){const t=document.querySelectorAll("searchcraft-input-form");setTimeout(()=>{t.forEach(r=>{r.core=this})},40)}startObservingMutations(){new MutationObserver((t,r)=>{let a=!1;for(const n of t)n.type==="childList"&&n.addedNodes.forEach(o=>{o.nodeType===1&&o.className.toLowerCase()==="searchcraft-input-form"&&(a=!0)});a&&this.initInputForms()}).observe(document.body,{childList:!0,subtree:!0})}initClients(t,r){setTimeout(async()=>{let a=this.config.userId;switch(a||(a=await Ds()),this.measureClient=new tn(t,r,a),this.searchClient=new nn(this,t,a),t.adSource){case"adMarketplace":this.adClient=new Ks(t);break;case"Nativo":this.adClient=new Zs(t);break;case"Custom":this.adClient=new Xs(t);break}},300)}emitEvent(t,r){var a;(a=this.subscriptionEvents[t])==null||a.forEach(n=>{n(r)})}subscribe(t,r){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(r),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(a=>a!==r)}}handleAdContainerRendered(t){var r;(r=this.adClient)==null||r.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var r;(r=this.adClient)==null||r.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}const cn="searchcraft-javascript-sdk",ze={allRenderFn:!0,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,cmpDidLoad:!0,cmpDidRender:!1,cmpDidUnload:!1,cmpDidUpdate:!1,cmpShouldUpdate:!1,cmpWillLoad:!1,cmpWillRender:!1,cmpWillUpdate:!1,connectedCallback:!0,constructableCSS:!0,cssAnnotations:!0,devTools:!1,disconnectedCallback:!0,element:!1,event:!0,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!1,hostListenerTarget:!1,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!1,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!1,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!1,mode:!1,modernPropertyDecls:!0,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propMutable:!1,propNumber:!0,propString:!0,reflect:!1,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,shadowDelegatesFocus:!1,shadowDom:!1,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!1,svg:!0,taskQueue:!0,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!1,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!1,watchCallback:!0};var ln=Object.defineProperty,un=(e,t)=>{for(var r in t)ln(e,r,{get:t[r],enumerable:!0})},hn="http://www.w3.org/2000/svg",dn="http://www.w3.org/1999/xhtml",fn=(e,t)=>{var r;const a=t.$cmpMeta$;Object.entries((r=a.$members$)!=null?r:{}).map(([o,[s]])=>{if(s&31||s&32){const c=e[o],u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),o);Object.defineProperty(e,o,{get(){return u.get.call(this)},set(l){u.set.call(this,l)},configurable:!0,enumerable:!0}),e[o]=t.$instanceValues$.has(o)?t.$instanceValues$.get(o):c}})},jt=new WeakMap,pn=e=>jt.delete(e),ke=e=>jt.get(e),mn=(e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};r.$onReadyPromise$=new Promise(n=>r.$onReadyResolve$=n),e["s-p"]=[],e["s-rc"]=[];const a=jt.set(e,r);return fn(e,r),a},Ur=(e,t)=>t in e,gt=(e,t)=>(0,console.error)(e,t),vt=typeof window<"u"?window:{},He=vt.document||{head:{}},N=vt.HTMLElement||class{},oe={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,a)=>e.addEventListener(t,r,a),rel:(e,t,r,a)=>e.removeEventListener(t,r,a),ce:(e,t)=>new CustomEvent(e,t)},gn=ze.shadowDom,vn=e=>Promise.resolve(e),Wt=!1,zr=[],Hr=[],bn=(e,t)=>r=>{e.push(r),Wt||(Wt=!0,oe.$flags$&4?Gt(Vt):oe.raf(Vt))},Br=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(r){gt(r)}e.length=0},Vt=()=>{Br(zr),Br(Hr),(Wt=zr.length>0)&&oe.raf(Vt)},Gt=e=>vn().then(e),yn=bn(Hr),qt=e=>(e=typeof e,e==="object"||e==="function"),Sn={};un(Sn,{err:()=>jr,map:()=>wn,ok:()=>Yt,unwrap:()=>Rn,unwrapErr:()=>En});var Yt=e=>({isOk:!0,isErr:!1,value:e}),jr=e=>({isOk:!1,isErr:!0,value:e});function wn(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(a=>Yt(a)):Yt(r)}if(e.isErr){const r=e.value;return jr(r)}throw"should never get here"}var Rn=e=>{if(e.isOk)return e.value;throw e.value},En=e=>{if(e.isErr)return e.value;throw e.value},Wr=e=>{const t=e.__childNodes||e.childNodes;e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&Vr(t,e.tagName).forEach(r=>{var a;r.nodeType===1&&r.tagName==="SLOT-FB"&&((a=Cn(r,r["s-sn"],!1))!=null&&a.length?r.hidden=!0:r.hidden=!1)});for(const r of t)r.nodeType===1&&(r.__childNodes||r.childNodes).length&&Wr(r)};function Vr(e,t,r){let a=0,n=[],o;for(;a<e.length;a++)o=e[a],o["s-sr"]&&o["s-hn"]===t&&r===void 0&&n.push(o),n=[...n,...Vr(o.childNodes,t,r)];return n}var Cn=(e,t,r=!0)=>{const a=[];for((r&&e["s-sr"]||!e["s-sr"])&&a.push(e);(e=e.nextSibling)&&e["s-sn"]===t;)a.push(e);return a},Gr=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",Ze=(e,t="")=>()=>{},f=(e,t,...r)=>{let a=null,n=null,o=null,s=!1,c=!1;const u=[],l=p=>{for(let m=0;m<p.length;m++)a=p[m],Array.isArray(a)?l(a):a!=null&&typeof a!="boolean"&&((s=typeof e!="function"&&!qt(a))&&(a=String(a)),s&&c?u[u.length-1].$text$+=a:u.push(s?bt(null,a):a),c=s)};if(l(r),t){t.key&&(n=t.key),t.name&&(o=t.name);{const p=t.className||t.class;p&&(t.class=typeof p!="object"?p:Object.keys(p).filter(m=>p[m]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,u,kn);const i=bt(e,null);return i.$attrs$=t,u.length>0&&(i.$children$=u),i.$key$=n,i.$name$=o,i},bt=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},Pn={},Tn=e=>e&&e.$tag$===Pn,kn={forEach:(e,t)=>e.map(qr).forEach(t),map:(e,t)=>e.map(qr).map(t).map(xn)},qr=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),xn=e=>{if(typeof e.vtag=="function"){const r={...e.vattrs};return e.vkey&&(r.key=e.vkey),e.vname&&(r.name=e.vname),f(e.vtag,r,...e.vchildren||[])}const t=bt(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},Yr=(e,t)=>e!=null&&!qt(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,$n=e=>e,xe=(e,t,r)=>{const a=$n(e);return{emit:n=>Qr(a,t,{bubbles:!0,composed:!0,cancelable:!0,detail:n})}},Qr=(e,t,r)=>{const a=oe.ce(t,r);return e.dispatchEvent(a),a},yt=new WeakMap,Kr=(e,t,r,a,n,o)=>{if(r!==a){let s=Ur(e,t),c=t.toLowerCase();if(t==="class"){const u=e.classList,l=Xr(r);let i=Xr(a);e["s-si"]?(i.push(e["s-si"]),l.forEach(p=>{p.startsWith(e["s-si"])&&i.push(p)}),i=[...new Set(i)],u.add(...i),delete e["s-si"]):(u.remove(...l.filter(p=>p&&!i.includes(p))),u.add(...i.filter(p=>p&&!l.includes(p))))}else if(t==="style"){for(const u in r)(!a||a[u]==null)&&(u.includes("-")?e.style.removeProperty(u):e.style[u]="");for(const u in a)(!r||a[u]!==r[u])&&(u.includes("-")?e.style.setProperty(u,a[u]):e.style[u]=a[u])}else if(t!=="key")if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):Ur(vt,c)?t=c.slice(2):t=c[2]+t.slice(3),r||a){const u=t.endsWith(Jr);t=t.replace(An,""),r&&oe.rel(e,t,r,u),a&&oe.ael(e,t,a,u)}}else{const u=qt(a);if((s||u&&a!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==a&&(e[t]=a);else{const l=a??"";t==="list"?s=!1:(r==null||e[t]!=l)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=l:e.setAttribute(t,l))}}catch{}a==null||a===!1?(a!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!s||o&4||n)&&!u&&(a=a===!0?"":a,e.setAttribute(t,a))}}},_n=/\s/,Xr=e=>(typeof e=="object"&&"baseVal"in e&&(e=e.baseVal),e?e.split(_n):[]),Jr="Capture",An=new RegExp(Jr+"$"),Zr=(e,t,r)=>{const a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,n=e&&e.$attrs$||{},o=t.$attrs$||{};for(const s of ea(Object.keys(n)))s in o||Kr(a,s,n[s],void 0,r,t.$flags$);for(const s of ea(Object.keys(o)))Kr(a,s,n[s],o[s],r,t.$flags$)};function ea(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var Qt,Kt,St=!1,wt=!1,Xt=!1,le=!1,Rt=(e,t,r)=>{var a;const n=t.$children$[r];let o=0,s,c,u;if(St||(Xt=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)s=n.$elm$=He.createTextNode(n.$text$);else if(n.$flags$&1)s=n.$elm$=He.createTextNode("");else{if(le||(le=n.$tag$==="svg"),s=n.$elm$=He.createElementNS(le?hn:dn,!St&&ze.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),le&&n.$tag$==="foreignObject"&&(le=!1),Zr(null,n,le),n.$children$)for(o=0;o<n.$children$.length;++o)c=Rt(e,n,o),c&&s.appendChild(c);n.$tag$==="svg"?le=!1:s.tagName==="foreignObject"&&(le=!0)}return s["s-hn"]=Kt,n.$flags$&3&&(s["s-sr"]=!0,s["s-cr"]=Qt,s["s-sn"]=n.$name$||"",s["s-rf"]=(a=n.$attrs$)==null?void 0:a.ref,u=e&&e.$children$&&e.$children$[r],u&&u.$tag$===n.$tag$&&e.$elm$&&et(e.$elm$,!1)),s},et=(e,t)=>{oe.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&ze.experimentalSlotFixes;for(let a=r.length-1;a>=0;a--){const n=r[a];n["s-hn"]!==Kt&&n["s-ol"]&&($e(tt(n).parentNode,n,tt(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,Xt=!0),t&&et(n,t)}oe.$flags$&=-2},ta=(e,t,r,a,n,o)=>{let s=e["s-cr"]&&e["s-cr"].parentNode||e,c;for(;n<=o;++n)a[n]&&(c=Rt(null,r,n),c&&(a[n].$elm$=c,$e(s,c,tt(t))))},ra=(e,t,r)=>{for(let a=t;a<=r;++a){const n=e[a];if(n){const o=n.$elm$;o&&(wt=!0,o["s-ol"]?o["s-ol"].remove():et(o,!0),o.remove())}}},In=(e,t,r,a,n=!1)=>{let o=0,s=0,c=0,u=0,l=t.length-1,i=t[0],p=t[l],m=a.length-1,b=a[0],v=a[m],$,z;for(;o<=l&&s<=m;)if(i==null)i=t[++o];else if(p==null)p=t[--l];else if(b==null)b=a[++s];else if(v==null)v=a[--m];else if(Et(i,b,n))Be(i,b,n),i=t[++o],b=a[++s];else if(Et(p,v,n))Be(p,v,n),p=t[--l],v=a[--m];else if(Et(i,v,n))(i.$tag$==="slot"||v.$tag$==="slot")&&et(i.$elm$.parentNode,!1),Be(i,v,n),$e(e,i.$elm$,p.$elm$.nextSibling),i=t[++o],v=a[--m];else if(Et(p,b,n))(i.$tag$==="slot"||v.$tag$==="slot")&&et(p.$elm$.parentNode,!1),Be(p,b,n),$e(e,p.$elm$,i.$elm$),p=t[--l],b=a[++s];else{for(c=-1,u=o;u<=l;++u)if(t[u]&&t[u].$key$!==null&&t[u].$key$===b.$key$){c=u;break}c>=0?(z=t[c],z.$tag$!==b.$tag$?$=Rt(t&&t[s],r,c):(Be(z,b,n),t[c]=void 0,$=z.$elm$),b=a[++s]):($=Rt(t&&t[s],r,s),b=a[++s]),$&&$e(tt(i.$elm$).parentNode,$,tt(i.$elm$))}o>l?ta(e,a[m+1]==null?null:a[m+1].$elm$,r,a,s,m):s>m&&ra(t,o,l)},Et=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,tt=e=>e&&e["s-ol"]||e,Be=(e,t,r=!1)=>{const a=t.$elm$=e.$elm$,n=e.$children$,o=t.$children$,s=t.$tag$,c=t.$text$;let u;c===null?(le=s==="svg"?!0:s==="foreignObject"?!1:le,s==="slot"&&!St||Zr(e,t,le),n!==null&&o!==null?In(a,n,t,o,r):o!==null?(e.$text$!==null&&(a.textContent=""),ta(a,null,t,o,0,o.length-1)):!r&&ze.updatable&&n!==null&&ra(n,0,n.length-1),le&&s==="svg"&&(le=!1)):(u=a["s-cr"])?u.parentNode.textContent=c:e.$text$!==c&&(a.data=c)},we=[],aa=e=>{let t,r,a;const n=e.__childNodes||e.childNodes;for(const o of n){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const s=o["s-sn"];for(a=r.length-1;a>=0;a--)if(t=r[a],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if(Gr(t,s)){let c=we.find(u=>u.$nodeToRelocate$===t);wt=!0,t["s-sn"]=t["s-sn"]||s,c?(c.$nodeToRelocate$["s-sh"]=o["s-hn"],c.$slotRefNode$=o):(t["s-sh"]=o["s-hn"],we.push({$slotRefNode$:o,$nodeToRelocate$:t})),t["s-sr"]&&we.map(u=>{Gr(u.$nodeToRelocate$,t["s-sn"])&&(c=we.find(l=>l.$nodeToRelocate$===t),c&&!u.$slotRefNode$&&(u.$slotRefNode$=c.$slotRefNode$))})}else we.some(c=>c.$nodeToRelocate$===t)||we.push({$nodeToRelocate$:t})}o.nodeType===1&&aa(o)}},$e=(e,t,r)=>e==null?void 0:e.insertBefore(t,r),Mn=(e,t,r=!1)=>{var a,n,o,s;const c=e.$hostElement$,u=e.$vnode$||bt(null,null),l=Tn(t)?t:f(null,null,t);if(Kt=c.tagName,r&&l.$attrs$)for(const i of Object.keys(l.$attrs$))c.hasAttribute(i)&&!["key","ref","style","class"].includes(i)&&(l.$attrs$[i]=c[i]);l.$tag$=null,l.$flags$|=4,e.$vnode$=l,l.$elm$=u.$elm$=c,St=gn,Qt=c["s-cr"],wt=!1,Be(u,l,r);{if(oe.$flags$|=1,Xt){aa(l.$elm$);for(const i of we){const p=i.$nodeToRelocate$;if(!p["s-ol"]){const m=He.createTextNode("");m["s-nr"]=p,$e(p.parentNode,p["s-ol"]=m,p)}}for(const i of we){const p=i.$nodeToRelocate$,m=i.$slotRefNode$;if(m){const b=m.parentNode;let v=m.nextSibling;{let K=(a=p["s-ol"])==null?void 0:a.previousSibling;for(;K;){let _=(n=K["s-nr"])!=null?n:null;if(_&&_["s-sn"]===p["s-sn"]&&b===(_.__parentNode||_.parentNode)){for(_=_.nextSibling;_===p||_!=null&&_["s-sr"];)_=_==null?void 0:_.nextSibling;if(!_||!_["s-nr"]){v=_;break}}K=K.previousSibling}}const $=p.__parentNode||p.parentNode,z=p.__nextSibling||p.nextSibling;(!v&&b!==$||z!==v)&&p!==v&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),$e(b,p,v),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(o=p["s-ih"])!=null?o:!1)),p&&typeof m["s-rf"]=="function"&&m["s-rf"](p)}else p.nodeType===1&&(r&&(p["s-ih"]=(s=p.hidden)!=null?s:!1),p.hidden=!0)}}wt&&Wr(l.$elm$),oe.$flags$&=-2,we.length=0}Qt=void 0},sa=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){const r=t["s-p"].push(new Promise(a=>e.$onRenderResolve$=()=>{t["s-p"].splice(r-1,1),a()}))}},Jt=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return sa(e,e.$ancestorComponent$),yn(()=>Ln(e,t))},Ln=(e,t)=>{const r=e.$hostElement$,a=Ze("scheduleUpdate",e.$cmpMeta$.$tagName$),n=r;if(!n)throw new Error(`Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return a(),On(o,()=>Dn(e,n,t))},On=(e,t)=>Fn(e)?e.then(t).catch(r=>{console.error(r),t()}):t(),Fn=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",Dn=async(e,t,r)=>{var a;const n=e.$hostElement$,o=Ze("update",e.$cmpMeta$.$tagName$),s=n["s-rc"],c=Ze("render",e.$cmpMeta$.$tagName$);Nn(e,t,n,r),s&&(s.map(u=>u()),n["s-rc"]=void 0),c(),o();{const u=(a=n["s-p"])!=null?a:[],l=()=>Un(e);u.length===0?l():(Promise.all(u).then(l),e.$flags$|=4,u.length=0)}},Nn=(e,t,r,a)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Mn(e,t,a)}catch(n){gt(n,e.$hostElement$)}return null},Un=e=>{const t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,a=Ze("postUpdate",t),n=r,o=e.$ancestorComponent$;e.$flags$&64?a():(e.$flags$|=64,na(r),Hn(n,"componentDidLoad",void 0,r),a(),e.$onReadyResolve$(r),o||zn()),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&Gt(()=>Jt(e,!1)),e.$flags$&=-517},zn=e=>{na(He.documentElement),Gt(()=>Qr(vt,"appload",{detail:{namespace:cn}}))},Hn=(e,t,r,a)=>{if(e&&e[t])try{return e[t](r)}catch(n){gt(n,a)}},na=e=>{var t;return e.classList.add((t=ze.hydratedSelectorName)!=null?t:"hydrated")},Bn=(e,t)=>ke(e).$instanceValues$.get(t),oa=(e,t,r,a)=>{const n=ke(e),o=e,s=n.$instanceValues$.get(t),c=n.$flags$,u=o;r=Yr(r,a.$members$[t][0]);const l=Number.isNaN(s)&&Number.isNaN(r);if(r!==s&&!l){n.$instanceValues$.set(t,r);{if(a.$watchers$&&c&128){const p=a.$watchers$[t];p&&p.map(m=>{try{u[m](r,s,t)}catch(b){gt(b,o)}})}(c&18)===2&&Jt(n,!1)}}},jn=(e,t,r)=>{var a,n;const o=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const s=Object.entries((a=t.$members$)!=null?a:{});s.map(([c,[u]])=>{if(u&31||u&32){const{get:l,set:i}=Object.getOwnPropertyDescriptor(o,c)||{};l&&(t.$members$[c][0]|=2048),i&&(t.$members$[c][0]|=4096),Object.defineProperty(o,c,{get(){return l?l.apply(this):Bn(this,c)},configurable:!0,enumerable:!0}),Object.defineProperty(o,c,{set(p){const m=ke(this);if(i){const b=u&32?this[c]:m.$hostElement$[c];typeof b>"u"&&m.$instanceValues$.get(c)?p=m.$instanceValues$.get(c):!m.$instanceValues$.get(c)&&b&&m.$instanceValues$.set(c,b),i.apply(this,[Yr(p,u)]),p=u&32?this[c]:m.$hostElement$[c],oa(this,c,p,t);return}{oa(this,c,p,t);return}}})}});{const c=new Map;o.attributeChangedCallback=function(u,l,i){oe.jmp(()=>{var p;const m=c.get(u);if(!(this.hasOwnProperty(m)&&ze.lazyLoad)){if(o.hasOwnProperty(m)&&typeof this[m]=="number"&&this[m]==i)return;if(m==null){const v=ke(this),$=v==null?void 0:v.$flags$;if($&&!($&8)&&$&128&&i!==l){const K=this,_=(p=t.$watchers$)==null?void 0:p[u];_==null||_.forEach(Ee=>{K[Ee]!=null&&K[Ee].call(K,i,l,u)})}return}}const b=Object.getOwnPropertyDescriptor(o,m);i=i===null&&typeof this[m]=="boolean"?!1:i,i!==this[m]&&(!b.get||b.set)&&(this[m]=i)})},e.observedAttributes=Array.from(new Set([...Object.keys((n=t.$watchers$)!=null?n:{}),...s.filter(([u,l])=>l[0]&15).map(([u,l])=>{const i=l[1]||u;return c.set(i,u),i})]))}}return e},Wn=async(e,t,r,a)=>{if(!(t.$flags$&32)){t.$flags$|=32;{const s=e.localName;customElements.whenDefined(s).then(()=>t.$flags$|=128)}}const n=t.$ancestorComponent$,o=()=>Jt(t,!0);n&&n["s-rc"]?n["s-rc"].push(o):o()},Vn=(e,t)=>{},Gn=e=>{if(!(oe.$flags$&1)){const t=ke(e),r=t.$cmpMeta$,a=Ze("connectedCallback",r.$tagName$);if(t.$flags$&1)t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>Vn());else{t.$flags$|=1,r.$flags$&12&&qn(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){sa(t,t.$ancestorComponent$=n);break}}r.$members$&&Object.entries(r.$members$).map(([n,[o]])=>{if(o&31&&e.hasOwnProperty(n)){const s=e[n];delete e[n],e[n]=s}}),Wn(e,t)}a()}},qn=e=>{const t=e["s-cr"]=He.createComment("");t["s-cn"]=!0,$e(e,t,e.firstChild)},Yn=async e=>{oe.$flags$&1||ke(e),yt.has(e)&&yt.delete(e),e.shadowRoot&&yt.has(e.shadowRoot)&&yt.delete(e.shadowRoot)},U=(e,t)=>{const r={$flags$:t[0],$tagName$:t[1]};r.$members$=t[2],r.$watchers$=e.$watchers$;const a=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){mn(this,r)},connectedCallback(){this.__hasHostListenerAttached||(ke(this),this.__hasHostListenerAttached=!0),Gn(this),a&&a.call(this)},disconnectedCallback(){Yn(this),n&&n.call(this),oe.raf(()=>{var o;const s=ke(this);((o=s==null?void 0:s.$vnode$)==null?void 0:o.$elm$)instanceof Node&&!s.$vnode$.$elm$.isConnected&&delete s.$vnode$,this instanceof Node&&!this.isConnected&&pn(this)})},__attachShadow(){this.shadowRoot=this}}),e.is=r.$tagName$,jn(e,r)},Zt=(e,t)=>t,Qn=Object.defineProperty,Kn=(e,t,r)=>t in e?Qn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ia=(e,t,r)=>Kn(e,typeof t!="symbol"?t+"":t,r),Ae=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Ae||{});class Xn{constructor(t){ia(this,"logLevel"),ia(this,"logFormatter"),this.logLevel=t.logLevel||1,this.logFormatter=t.logFormatter||this.defaultFormatter}defaultFormatter(t,r){return`[${Ae[t]}] ${new Date().toISOString()}: ${r}`}debug(t){this.logLevel<=0&&console.log(this.logFormatter(0,t))}info(t){this.logLevel<=1&&console.info(this.logFormatter(1,t))}warn(t){this.logLevel<=2&&console.warn(this.logFormatter(2,t))}error(t){this.logLevel<=3&&console.error(this.logFormatter(3,t))}log(t,r){switch(t){case 0:this.debug(r);break;case 1:this.info(r);break;case 2:this.warn(r);break;case 3:this.error(r);break}}}function Ie(e,t,r,a){return new(r||(r=Promise))(function(n,o){function s(l){try{u(a.next(l))}catch(i){o(i)}}function c(l){try{u(a.throw(l))}catch(i){o(i)}}function u(l){var i;l.done?n(l.value):(i=l.value,i instanceof r?i:new r(function(p){p(i)})).then(s,c)}u((a=a.apply(e,[])).next())})}function Me(e,t){var r,a,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(u){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(s=0)),s;)try{if(r=1,a&&(n=2&i[0]?a.return:i[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;switch(a=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,a=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!((n=n.length>0&&n[n.length-1])||i[0]!==6&&i[0]!==2)){s=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){s.label=i[1];break}if(i[0]===6&&s.label<n[1]){s.label=n[1],n=i;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(i);break}n[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(p){i=[6,p],a=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([u,l])}}}var Ct={exclude:[]},Jn={},me=function(e,t){typeof window<"u"&&(Jn[e]=t)};function Pt(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var Q=new Uint32Array([597399067,2869860233,951274213,2716044179]);function de(e,t){return e<<t|e>>>32-t}function ca(e,t){var r;if(t===void 0&&(t=0),t=t?0|t:0,typeof e=="string"&&(r=e,e=new TextEncoder().encode(r).buffer),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var a=new Uint32Array([t,t,t,t]);(function(o,s){for(var c=o.byteLength/16|0,u=new Uint32Array(o,0,4*c),l=0;l<c;l++){var i=u.subarray(4*l,4*(l+1));i[0]=Math.imul(i[0],Q[0]),i[0]=de(i[0],15),i[0]=Math.imul(i[0],Q[1]),s[0]=s[0]^i[0],s[0]=de(s[0],19),s[0]=s[0]+s[1],s[0]=Math.imul(s[0],5)+1444728091,i[1]=Math.imul(i[1],Q[1]),i[1]=de(i[1],16),i[1]=Math.imul(i[1],Q[2]),s[1]=s[1]^i[1],s[1]=de(s[1],17),s[1]=s[1]+s[2],s[1]=Math.imul(s[1],5)+197830471,i[2]=Math.imul(i[2],Q[2]),i[2]=de(i[2],17),i[2]=Math.imul(i[2],Q[3]),s[2]=s[2]^i[2],s[2]=de(s[2],15),s[2]=s[2]+s[3],s[2]=Math.imul(s[2],5)+2530024501,i[3]=Math.imul(i[3],Q[3]),i[3]=de(i[3],18),i[3]=Math.imul(i[3],Q[0]),s[3]=s[3]^i[3],s[3]=de(s[3],13),s[3]=s[3]+s[0],s[3]=Math.imul(s[3],5)+850148119}})(e,a),function(o,s){var c=o.byteLength/16|0,u=o.byteLength%16,l=new Uint32Array(4),i=new Uint8Array(o,16*c,u);switch(u){case 15:l[3]=l[3]^i[14]<<16;case 14:l[3]=l[3]^i[13]<<8;case 13:l[3]=l[3]^i[12]<<0,l[3]=Math.imul(l[3],Q[3]),l[3]=de(l[3],18),l[3]=Math.imul(l[3],Q[0]),s[3]=s[3]^l[3];case 12:l[2]=l[2]^i[11]<<24;case 11:l[2]=l[2]^i[10]<<16;case 10:l[2]=l[2]^i[9]<<8;case 9:l[2]=l[2]^i[8]<<0,l[2]=Math.imul(l[2],Q[2]),l[2]=de(l[2],17),l[2]=Math.imul(l[2],Q[3]),s[2]=s[2]^l[2];case 8:l[1]=l[1]^i[7]<<24;case 7:l[1]=l[1]^i[6]<<16;case 6:l[1]=l[1]^i[5]<<8;case 5:l[1]=l[1]^i[4]<<0,l[1]=Math.imul(l[1],Q[1]),l[1]=de(l[1],16),l[1]=Math.imul(l[1],Q[2]),s[1]=s[1]^l[1];case 4:l[0]=l[0]^i[3]<<24;case 3:l[0]=l[0]^i[2]<<16;case 2:l[0]=l[0]^i[1]<<8;case 1:l[0]=l[0]^i[0]<<0,l[0]=Math.imul(l[0],Q[0]),l[0]=de(l[0],15),l[0]=Math.imul(l[0],Q[1]),s[0]=s[0]^l[0]}}(e,a),function(o,s){s[0]=s[0]^o.byteLength,s[1]=s[1]^o.byteLength,s[2]=s[2]^o.byteLength,s[3]=s[3]^o.byteLength,s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0,s[0]=Pt(s[0]),s[1]=Pt(s[1]),s[2]=Pt(s[2]),s[3]=Pt(s[3]),s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0}(e,a);var n=new Uint8Array(a.buffer);return Array.from(n).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function Zn(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function la(e,t,r){for(var a=[],n=0;n<e[0].data.length;n++){for(var o=[],s=0;s<e.length;s++)o.push(e[s].data[n]);a.push(eo(o))}var c=new Uint8ClampedArray(a);return new ImageData(c,t,r)}function eo(e){if(e.length===0)return 0;for(var t={},r=0,a=e;r<a.length;r++)t[o=a[r]]=(t[o]||0)+1;var n=e[0];for(var o in t)t[o]>t[n]&&(n=parseInt(o,10));return n}function rt(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=0,a=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];r<a.length;r++){var n=a[r],o=e.match(n);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}me("audio",function(){return Ie(this,void 0,void 0,function(){return Me(this,function(e){return[2,new Promise(function(t,r){try{var a=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),n=a.createBufferSource(),o=a.createOscillator();o.frequency.value=1e3;var s,c=a.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,o.connect(c),c.connect(a.destination),o.start(),a.oncomplete=function(u){s=u.renderedBuffer.getChannelData(0),t({sampleHash:Zn(s),oscillator:o.type,maxChannels:a.destination.maxChannelCount,channelCountMode:n.channelCountMode})},a.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),r(u)}})]})})});var to=rt().name!=="SamsungBrowser"?1:3,ua=280,ha=20;rt().name!="Firefox"&&me("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(e){var t=Array.from({length:to},function(){return function(){var r=document.createElement("canvas"),a=r.getContext("2d");if(!a)return new ImageData(1,1);r.width=ua,r.height=ha;var n=a.createLinearGradient(0,0,r.width,r.height);n.addColorStop(0,"red"),n.addColorStop(.16666666666666666,"orange"),n.addColorStop(.3333333333333333,"yellow"),n.addColorStop(.5,"green"),n.addColorStop(.6666666666666666,"blue"),n.addColorStop(.8333333333333334,"indigo"),n.addColorStop(1,"violet"),a.fillStyle=n,a.fillRect(0,0,r.width,r.height);var o="Random Text WMwmil10Oo";a.font="23.123px Arial",a.fillStyle="black",a.fillText(o,-5,15),a.fillStyle="rgba(0, 0, 255, 0.5)",a.fillText(o,-3.3,17.7),a.beginPath(),a.moveTo(0,0),a.lineTo(2*r.width/7,r.height),a.strokeStyle="white",a.lineWidth=2,a.stroke();var s=a.getImageData(0,0,r.width,r.height);return s}()});e({commonImageDataHash:ca(la(t,ua,ha).data.toString()).toString()})})});var er,ro=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],ao=["monospace","sans-serif","serif"];function da(e,t){if(!e)throw new Error("Canvas context not supported");return e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function so(){var e,t=document.createElement("canvas"),r=(e=t.getContext("webgl"))!==null&&e!==void 0?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var a=(r.getParameter(r.VENDOR)||"").toString(),n=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:a,renderer:n,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!n.length||!a.length){var s=r.getExtension("WEBGL_debug_renderer_info");if(s){var c=(r.getParameter(s.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(r.getParameter(s.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(o.vendorUnmasked=c),u&&(o.rendererUnmasked=u)}}return o}catch{}return"undefined"}function no(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function oo(e,t){var r={};return t.forEach(function(a){var n=function(o){if(o.length===0)return null;var s={};o.forEach(function(l){var i=String(l);s[i]=(s[i]||0)+1});var c=o[0],u=1;return Object.keys(s).forEach(function(l){s[l]>u&&(c=l,u=s[l])}),c}(e.map(function(o){return a in o?o[a]:void 0}).filter(function(o){return o!==void 0}));n&&(r[a]=n)}),r}function io(){var e=[],t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach(function(r){t[r].forEach(function(a){matchMedia("(".concat(r,": ").concat(a,")")).matches&&e.push("".concat(r,": ").concat(a))})}),e}function co(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch{return 0}return 0}rt().name!="Firefox"&&me("fonts",function(){var e=this;return new Promise(function(t,r){try{(function(a){var n;Ie(this,void 0,void 0,function(){var o,s,c;return Me(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(l=50,new Promise(function(p){return setTimeout(p,l,i)}))];case 1:return u.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(s=o.style).setProperty("position","fixed"),s.setProperty("display","block","important"),s.setProperty("visibility","visible"),s.setProperty("border","0"),s.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(c=o.contentDocument||((n=o.contentWindow)===null||n===void 0?void 0:n.document)))throw new Error("Iframe document is not accessible");return a({iframe:c}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var l,i})})})(function(a){var n=a.iframe;return Ie(e,void 0,void 0,function(){var o,s,c,u;return Me(this,function(l){return o=n.createElement("canvas"),s=o.getContext("2d"),c=ao.map(function(i){return da(s,i)}),u={},ro.forEach(function(i){var p=da(s,i);c.includes(p)||(u[i]=p)}),t(u),[2]})})})}catch{r({error:"unsupported"})}})}),me("hardware",function(){return new Promise(function(e,t){var r=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,a=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:so(),architecture:no(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:a.jsHeapSizeLimit||0})})}),me("locales",function(){return new Promise(function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),me("permissions",function(){return Ie(this,void 0,void 0,function(){var e;return Me(this,function(t){return er=(Ct==null?void 0:Ct.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],e=Array.from({length:(Ct==null?void 0:Ct.retries)||3},function(){return function(){return Ie(this,void 0,void 0,function(){var r,a,n,o,s;return Me(this,function(c){switch(c.label){case 0:r={},a=0,n=er,c.label=1;case 1:if(!(a<n.length))return[3,6];o=n[a],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return s=c.sent(),r[o]=s.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return a++,[3,1];case 6:return[2,r]}})})}()}),[2,Promise.all(e).then(function(r){return oo(r,er)})]})})}),me("plugins",function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise(function(a){a({plugins:e})})}),me("screen",function(){return new Promise(function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:io()})})}),me("system",function(){return new Promise(function(e){var t=rt();e({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:co()})})});var ee,lo=rt().name!=="SamsungBrowser"?1:3,E=null;me("webgl",function(){return Ie(this,void 0,void 0,function(){var e;return Me(this,function(t){typeof document<"u"&&((ee=document.createElement("canvas")).width=200,ee.height=100,E=ee.getContext("webgl"));try{if(!E)throw new Error("WebGL not supported");return e=Array.from({length:lo},function(){return function(){try{if(!E)throw new Error("WebGL not supported");var r=`
|
|
12
|
-
attribute vec2 position;
|
|
13
|
-
void main() {
|
|
14
|
-
gl_Position = vec4(position, 0.0, 1.0);
|
|
15
|
-
}
|
|
16
|
-
`,a=`
|
|
17
|
-
precision mediump float;
|
|
18
|
-
void main() {
|
|
19
|
-
gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
|
|
20
|
-
}
|
|
21
|
-
`,n=E.createShader(E.VERTEX_SHADER),o=E.createShader(E.FRAGMENT_SHADER);if(!n||!o)throw new Error("Failed to create shaders");if(E.shaderSource(n,r),E.shaderSource(o,a),E.compileShader(n),!E.getShaderParameter(n,E.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+E.getShaderInfoLog(n));if(E.compileShader(o),!E.getShaderParameter(o,E.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+E.getShaderInfoLog(o));var s=E.createProgram();if(!s)throw new Error("Failed to create shader program");if(E.attachShader(s,n),E.attachShader(s,o),E.linkProgram(s),!E.getProgramParameter(s,E.LINK_STATUS))throw new Error("Shader program linking failed: "+E.getProgramInfoLog(s));E.useProgram(s);for(var c=137,u=new Float32Array(4*c),l=2*Math.PI/c,i=0;i<c;i++){var p=i*l;u[4*i]=0,u[4*i+1]=0,u[4*i+2]=Math.cos(p)*(ee.width/2),u[4*i+3]=Math.sin(p)*(ee.height/2)}var m=E.createBuffer();E.bindBuffer(E.ARRAY_BUFFER,m),E.bufferData(E.ARRAY_BUFFER,u,E.STATIC_DRAW);var b=E.getAttribLocation(s,"position");E.enableVertexAttribArray(b),E.vertexAttribPointer(b,2,E.FLOAT,!1,0,0),E.viewport(0,0,ee.width,ee.height),E.clearColor(0,0,0,1),E.clear(E.COLOR_BUFFER_BIT),E.drawArrays(E.LINES,0,2*c);var v=new Uint8ClampedArray(ee.width*ee.height*4);return E.readPixels(0,0,ee.width,ee.height,E.RGBA,E.UNSIGNED_BYTE,v),new ImageData(v,ee.width,ee.height)}catch{return new ImageData(1,1)}finally{E&&(E.bindBuffer(E.ARRAY_BUFFER,null),E.useProgram(null),E.viewport(0,0,E.drawingBufferWidth,E.drawingBufferHeight),E.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:ca(la(e,ee.width,ee.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var Le=function(e,t,r,a){for(var n=(r-t)/a,o=0,s=0;s<a;s++)o+=e(t+(s+.5)*n);return o*n};me("math",function(){return Ie(void 0,void 0,void 0,function(){return Me(this,function(e){return[2,{acos:Math.acos(.5),asin:Le(Math.asin,-1,1,97),atan:Le(Math.atan,-1,1,97),cos:Le(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:Le(Math.sin,-Math.PI,Math.PI,97),sinh:Le(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:Le(Math.tan,0,2*Math.PI,97),tanh:Le(Math.tanh,-9/7,7/9,97)}]})})});var fa={},tr={};const pa=e=>{let t;const r=new Set,a=(l,i)=>{const p=typeof l=="function"?l(t):l;if(!Object.is(p,t)){const m=t;t=i??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(b=>b(t,m))}},n=()=>t,c={setState:a,getState:n,getInitialState:()=>u,subscribe:l=>(r.add(l),()=>r.delete(l))},u=t=e(a,n,c);return c},uo=e=>e?pa(e):pa;tr.createStore=uo;var rr={},ma={exports:{}},C={};/**
|
|
11
|
+
`,a=R.createShader(R.VERTEX_SHADER),o=R.createShader(R.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(R.shaderSource(a,r),R.shaderSource(o,s),R.compileShader(a),!R.getShaderParameter(a,R.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+R.getShaderInfoLog(a));if(R.compileShader(o),!R.getShaderParameter(o,R.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+R.getShaderInfoLog(o));var n=R.createProgram();if(!n)throw new Error("Failed to create shader program");if(R.attachShader(n,a),R.attachShader(n,o),R.linkProgram(n),!R.getProgramParameter(n,R.LINK_STATUS))throw new Error("Shader program linking failed: "+R.getProgramInfoLog(n));R.useProgram(n);for(var c=137,i=new Float32Array(4*c),u=2*Math.PI/c,l=0;l<c;l++){var p=l*u;i[4*l]=0,i[4*l+1]=0,i[4*l+2]=Math.cos(p)*(K.width/2),i[4*l+3]=Math.sin(p)*(K.height/2)}var m=R.createBuffer();R.bindBuffer(R.ARRAY_BUFFER,m),R.bufferData(R.ARRAY_BUFFER,i,R.STATIC_DRAW);var b=R.getAttribLocation(n,"position");R.enableVertexAttribArray(b),R.vertexAttribPointer(b,2,R.FLOAT,!1,0,0),R.viewport(0,0,K.width,K.height),R.clearColor(0,0,0,1),R.clear(R.COLOR_BUFFER_BIT),R.drawArrays(R.LINES,0,2*c);var v=new Uint8ClampedArray(K.width*K.height*4);return R.readPixels(0,0,K.width,K.height,R.RGBA,R.UNSIGNED_BYTE,v),new ImageData(v,K.width,K.height)}catch{return new ImageData(1,1)}finally{R&&(R.bindBuffer(R.ARRAY_BUFFER,null),R.useProgram(null),R.viewport(0,0,R.drawingBufferWidth,R.drawingBufferHeight),R.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Nt(Wr(e,K.width,K.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var ke=function(e,t,r,s){for(var a=(r-t)/s,o=0,n=0;n<s;n++)o+=e(t+(n+.5)*a);return o*a};ie("math",function(){return he(void 0,void 0,void 0,function(){return pe(this,function(e){return[2,{acos:Math.acos(.5),asin:ke(Math.asin,-1,1,97),atan:ke(Math.atan,-1,1,97),cos:ke(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:ke(Math.sin,-Math.PI,Math.PI,97),sinh:ke(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:ke(Math.tan,0,2*Math.PI,97),tanh:ke(Math.tanh,-9/7,7/9,97)}]})})});const yn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ht=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=yn[r[e]&63];return t};class zt{constructor(t){I(this,"config"),this.config=t}async getAdsForSearchParams(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,r){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class Sn extends zt{async getAdsForSearchParams(t){if(!this.config.admSub)return console.error("No admSub specified in config."),[];const r=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:this.config.admSub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${this.config.admTextAdQuantity||0}`,"results-pa":`${this.config.admProductAdQuantity||0}`}).toString()}`,s=await(await fetch(r,{method:"GET"})).json(),a=s.product_ads.map(n=>({id:ht(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:n})),o=s.text_ads.map(n=>({id:ht(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:n}));return a.concat(o)}async onAdContainerViewed(t){var r;const s=t.adClientResponseItem;(r=s.admAd)!=null&&r.impression_url&&fetch(s.admAd.impression_url)}}class En extends zt{async getAdsForSearchParams(t){return[]}}const Rn=1e3;class wn extends zt{constructor(t){super(t),I(this,"adCallTimeout"),this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var s;if((((s=r.data.hits)==null?void 0:s.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(Rn)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAdsForSearchParams(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const Tn=500;class kn{constructor(t,r,s){I(this,"measureRequestTimeout"),I(this,"measureRequestsBatched",[]),I(this,"config"),I(this,"sdkInfo"),I(this,"userId"),I(this,"sessionId"),I(this,"sendMeasureEvent",(a,o={},n={})=>{const c={event_name:a,properties:{searchcraft_index_names:this.config.index,session_id:this.sessionId,...o},user:{...this.measureRequestUser,...n}};this.measureRequestsBatched.push(c),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const i=JSON.stringify({items:this.measureRequestsBatched}),u=`${this.baseMeasureUrl}/batch`;try{const l=await fetch(u,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId},body:i,keepalive:!0});if(!l.ok)throw new Error(`Failed to send request: ${l.status} ${l.statusText}`);this.measureRequestsBatched=[];return}catch(l){throw console.error("Error sending MeasureRequest:",l),l}},Tn)}),this.config=t,this.sdkInfo=r,this.userId=s,this.sessionId=ht(),this.sendMeasureEvent("sdk_initialized")}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}function Pn(e){const t=[];let r="should";return e.facetPathsForIndexFields&&Object.keys(e.facetPathsForIndexFields).forEach(s=>{var a;const o=(a=e.facetPathsForIndexFields)==null?void 0:a[s];o&&(r="must",t.push({occur:r,exact:{ctx:o.value}}))}),e.rangeValueForIndexFields&&Object.keys(e.rangeValueForIndexFields).forEach(s=>{var a;const o=(a=e.rangeValueForIndexFields)==null?void 0:a[s];o&&(r="must",t.push({occur:r,exact:{ctx:o.value}}))}),e.sort==="desc"?e.order_by="date_published":e.order_by="",t.push({occur:r,[e.mode]:{ctx:e.searchTerm}}),t}const Cn=e=>e.endsWith("/")?e.slice(0,-1):e,xn=e=>{let t="";if(t=e.trim(),t=t.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t};class $n{constructor(t,r,s){I(this,"config"),I(this,"userId"),I(this,"parent"),I(this,"getSearchResponse",async a=>{var o,n,c,i,u;const l=xn(a.searchTerm);(o=this.parent.measureClient)==null||o.sendMeasureEvent("search_requested",{search_term:l}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:l}}),(n=this.parent.adClient)==null||n.onQuerySubmitted(a);try{const p={query:Pn(a),offset:a.offset||0,limit:a.limit||this.config.searchResultsPerPage||20};a.order_by&&(p.order_by=a.order_by,p.sort=a.sort==="desc"||a.sort==="asc"?a.sort:"asc");const m={method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId},body:JSON.stringify(p)},b=await fetch(this.baseSearchUrl,m);if(!b.ok)throw new Error(`Error: ${b.statusText} (Status: ${b.status})`);const v=await b.json();return(c=this.parent.measureClient)==null||c.sendMeasureEvent("search_response_received",{search_term:l,number_of_documents:v.data.count}),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:l}}),(((i=v.data.hits)==null?void 0:i.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(u=this.parent.adClient)==null||u.onQueryFetched(a,v),v}catch(p){throw console.error("Error parsing response:",p),p}}),this.parent=t,this.config=r,this.userId=s}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.index.join(",")}/search`}}class _n{constructor(t,r){if(I(this,"config"),I(this,"measureClient"),I(this,"searchClient"),I(this,"adClient"),I(this,"userId"),I(this,"requestTimeout"),I(this,"subscriptionEvents",{}),I(this,"getItems",(s,a,o)=>{const n=async()=>{(async()=>{var c,i;const u=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponse(s));if(!u)throw new Error("Search client was not initialized.");const l=(i=u.data.hits||[])==null?void 0:i.map(p=>p.doc).filter(p=>!!p).map(p=>({type:"SearchDocument",id:ht(),document:p}));a(u,l)})(),(async()=>{if(this.adClient){const c=await this.adClient.getAdsForSearchParams(s);o(c)}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(n,this.config.searchDebounceDelay):n()}),!t.endpointURL||!t.index||!t.readKey)throw new Error("Endpoint URL, Index value(s), and Read Key must be provided");this.config={...t,endpointURL:Cn(t.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&r.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),typeof window<"u"&&(this.initClients(this.config,r),this.initInputForms(),this.startObservingMutations())}initInputForms(){const t=document.querySelectorAll("searchcraft-input-form");setTimeout(()=>{t.forEach(r=>{r.core=this})},40)}startObservingMutations(){new MutationObserver((t,r)=>{let s=!1;for(const a of t)a.type==="childList"&&a.addedNodes.forEach(o=>{o.nodeType===1&&o.className.toLowerCase()==="searchcraft-input-form"&&(s=!0)});s&&this.initInputForms()}).observe(document.body,{childList:!0,subtree:!0})}initClients(t,r){setTimeout(async()=>{let s=this.config.userId;switch(s||(s=await on()),this.measureClient=new kn(t,r,s),this.searchClient=new $n(this,t,s),t.adSource){case"adMarketplace":this.adClient=new Sn(t);break;case"Nativo":this.adClient=new wn(t);break;case"Custom":this.adClient=new En(t);break}},300)}emitEvent(t,r){var s;(s=this.subscriptionEvents[t])==null||s.forEach(a=>{a(r)})}subscribe(t,r){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(r),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(s=>s!==r)}}handleAdContainerRendered(t){var r;(r=this.adClient)==null||r.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var r;(r=this.adClient)==null||r.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}var Yr={},Ht={};const Qr=e=>{let t;const r=new Set,s=(u,l)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const m=t;t=l??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(b=>b(t,m))}},a=()=>t,c={setState:s,getState:a,getInitialState:()=>i,subscribe:u=>(r.add(u),()=>r.delete(u))},i=t=e(s,a,c);return c},An=e=>e?Qr(e):Qr;Ht.createStore=An;var jt={},Kr={exports:{}},w={};/**
|
|
22
12
|
* @license React
|
|
23
13
|
* react.production.js
|
|
24
14
|
*
|
|
@@ -26,11 +16,11 @@
|
|
|
26
16
|
*
|
|
27
17
|
* This source code is licensed under the MIT license found in the
|
|
28
18
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/var ar=Symbol.for("react.transitional.element"),ho=Symbol.for("react.portal"),fo=Symbol.for("react.fragment"),po=Symbol.for("react.strict_mode"),mo=Symbol.for("react.profiler"),go=Symbol.for("react.consumer"),vo=Symbol.for("react.context"),bo=Symbol.for("react.forward_ref"),yo=Symbol.for("react.suspense"),So=Symbol.for("react.memo"),ga=Symbol.for("react.lazy"),va=Symbol.iterator;function wo(e){return e===null||typeof e!="object"?null:(e=va&&e[va]||e["@@iterator"],typeof e=="function"?e:null)}var ba={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ya=Object.assign,Sa={};function je(e,t,r){this.props=e,this.context=t,this.refs=Sa,this.updater=r||ba}je.prototype.isReactComponent={},je.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},je.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wa(){}wa.prototype=je.prototype;function sr(e,t,r){this.props=e,this.context=t,this.refs=Sa,this.updater=r||ba}var nr=sr.prototype=new wa;nr.constructor=sr,ya(nr,je.prototype),nr.isPureReactComponent=!0;var Ra=Array.isArray,M={H:null,A:null,T:null,S:null},Ea=Object.prototype.hasOwnProperty;function or(e,t,r,a,n,o){return r=o.ref,{$$typeof:ar,type:e,key:t,ref:r!==void 0?r:null,props:o}}function Ro(e,t){return or(e.type,t,void 0,void 0,void 0,e.props)}function ir(e){return typeof e=="object"&&e!==null&&e.$$typeof===ar}function Eo(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ca=/\/+/g;function cr(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Eo(""+e.key):t.toString(36)}function Pa(){}function Co(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Pa,Pa):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function We(e,t,r,a,n){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case ar:case ho:s=!0;break;case ga:return s=e._init,We(s(e._payload),t,r,a,n)}}if(s)return n=n(e),s=a===""?"."+cr(e,0):a,Ra(n)?(r="",s!=null&&(r=s.replace(Ca,"$&/")+"/"),We(n,t,r,"",function(l){return l})):n!=null&&(ir(n)&&(n=Ro(n,r+(n.key==null||e&&e.key===n.key?"":(""+n.key).replace(Ca,"$&/")+"/")+s)),t.push(n)),1;s=0;var c=a===""?".":a+":";if(Ra(e))for(var u=0;u<e.length;u++)a=e[u],o=c+cr(a,u),s+=We(a,t,r,o,n);else if(u=wo(e),typeof u=="function")for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,o=c+cr(a,u++),s+=We(a,t,r,o,n);else if(o==="object"){if(typeof e.then=="function")return We(Co(e),t,r,a,n);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function Tt(e,t,r){if(e==null)return e;var a=[],n=0;return We(e,a,"","",function(o){return t.call(r,o,n++)}),a}function Po(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ta=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function To(){}C.Children={map:Tt,forEach:function(e,t,r){Tt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Tt(e,function(){t++}),t},toArray:function(e){return Tt(e,function(t){return t})||[]},only:function(e){if(!ir(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},C.Component=je,C.Fragment=fo,C.Profiler=mo,C.PureComponent=sr,C.StrictMode=po,C.Suspense=yo,C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,C.act=function(){throw Error("act(...) is not supported in production builds of React.")},C.cache=function(e){return function(){return e.apply(null,arguments)}},C.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=ya({},e.props),n=e.key,o=void 0;if(t!=null)for(s in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(n=""+t.key),t)!Ea.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(a[s]=t[s]);var s=arguments.length-2;if(s===1)a.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];a.children=c}return or(e.type,n,void 0,void 0,o,a)},C.createContext=function(e){return e={$$typeof:vo,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:go,_context:e},e},C.createElement=function(e,t,r){var a,n={},o=null;if(t!=null)for(a in t.key!==void 0&&(o=""+t.key),t)Ea.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(n[a]=t[a]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];n.children=c}if(e&&e.defaultProps)for(a in s=e.defaultProps,s)n[a]===void 0&&(n[a]=s[a]);return or(e,o,void 0,void 0,null,n)},C.createRef=function(){return{current:null}},C.forwardRef=function(e){return{$$typeof:bo,render:e}},C.isValidElement=ir,C.lazy=function(e){return{$$typeof:ga,_payload:{_status:-1,_result:e},_init:Po}},C.memo=function(e,t){return{$$typeof:So,type:e,compare:t===void 0?null:t}},C.startTransition=function(e){var t=M.T,r={};M.T=r;try{var a=e(),n=M.S;n!==null&&n(r,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(To,Ta)}catch(o){Ta(o)}finally{M.T=t}},C.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},C.use=function(e){return M.H.use(e)},C.useActionState=function(e,t,r){return M.H.useActionState(e,t,r)},C.useCallback=function(e,t){return M.H.useCallback(e,t)},C.useContext=function(e){return M.H.useContext(e)},C.useDebugValue=function(){},C.useDeferredValue=function(e,t){return M.H.useDeferredValue(e,t)},C.useEffect=function(e,t){return M.H.useEffect(e,t)},C.useId=function(){return M.H.useId()},C.useImperativeHandle=function(e,t,r){return M.H.useImperativeHandle(e,t,r)},C.useInsertionEffect=function(e,t){return M.H.useInsertionEffect(e,t)},C.useLayoutEffect=function(e,t){return M.H.useLayoutEffect(e,t)},C.useMemo=function(e,t){return M.H.useMemo(e,t)},C.useOptimistic=function(e,t){return M.H.useOptimistic(e,t)},C.useReducer=function(e,t,r){return M.H.useReducer(e,t,r)},C.useRef=function(e){return M.H.useRef(e)},C.useState=function(e){return M.H.useState(e)},C.useSyncExternalStore=function(e,t,r){return M.H.useSyncExternalStore(e,t,r)},C.useTransition=function(){return M.H.useTransition()},C.version="19.0.0",ma.exports=C;var ka=ma.exports,ko=tr;const xo=e=>e;function xa(e,t=xo){const r=ka.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return ka.useDebugValue(r),r}const $a=e=>{const t=ko.createStore(e),r=a=>xa(t,a);return Object.assign(r,t),r},$o=e=>e?$a(e):$a;rr.create=$o,rr.useStore=xa,function(e){var t=tr,r=rr;Object.keys(t).forEach(function(a){a!=="default"&&!Object.prototype.hasOwnProperty.call(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[a]}})}),Object.keys(r).forEach(function(a){a!=="default"&&!Object.prototype.hasOwnProperty.call(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:function(){return r[a]}})})}(fa);const _o={adClientResponseItems:[],core:void 0,logger:void 0,facetPathsForIndexFields:{},isPopoverVisible:!1,isSearchInProgress:!1,searchTerm:"",rangeValueForIndexFields:{},searchMode:"fuzzy",searchClientResponseItems:[],searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:"asc"},A=fa.createStore((e,t)=>{const r={addFacetPathsForIndexField:n=>e(o=>({facetPathsForIndexFields:{...o.facetPathsForIndexFields,[n.fieldName]:n}})),addRangeValueForIndexField:n=>e(o=>({rangeValueForIndexFields:{...o.rangeValueForIndexFields,[n.fieldName]:n}})),getSearchcraftInstance:()=>{const{core:n}=t();return n},initialize:(n,o=!1)=>{const s=n,c=o?new Xn({logLevel:Ae.DEBUG}):void 0;e({core:s,logger:c,searchResultsPerPage:s.config.searchResultsPerPage||20})},removeFacetPathsForIndexField:n=>e(o=>{const s=o.facetPathsForIndexFields;return delete s[n],{facetPathsForIndexFields:{...s}}}),removeRangeValueForIndexField:n=>e(o=>{const s=o.rangeValueForIndexFields;return delete s[n],{rangeValueForIndexFields:{...s}}}),resetFacetPaths:()=>{e({facetPathsForIndexFields:{}})},search:async()=>{var c,u;const n=t();if((c=n.logger)==null||c.log(Ae.INFO,`Starting search with search term: "${n.searchTerm}"`),!n.core)throw new Error("Searchcraft instance is not initialized.");if(!n.searchTerm.trim()){(u=n.logger)==null||u.log(Ae.INFO,"No search request was made: search term was empty."),e({searchClientResponseItems:[],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}e({isSearchInProgress:!0});const o=(l,i)=>{var m,b;const p=l.data.facets;e(v=>({isSearchInProgress:!1,searchClientResponseItems:i,searchResponseTimeTaken:l.data.time_taken||0,searchResultsPage:l.data.count===v.searchResultsCount?v.searchResultsPage:1,searchResultsCount:l.data.count||0})),p&&e({searchResponseFacetPrime:p}),(m=n.logger)==null||m.log(Ae.DEBUG,`Search results: ${JSON.stringify(i)}`),(b=n.logger)==null||b.log(Ae.DEBUG,`Facets from response: ${JSON.stringify(p)}`)},s=l=>{e({adClientResponseItems:l})};n.core.getItems({searchTerm:n.searchTerm,mode:n.searchMode,sort:n.sortType,facetPathsForIndexFields:n.facetPathsForIndexFields,rangeValueForIndexFields:n.rangeValueForIndexFields,offset:n.searchResultsPerPage?n.searchResultsPerPage*(n.searchResultsPage-1):0,limit:n.searchResultsPerPage},o,s)},setPopoverVisibility:n=>{e({isPopoverVisible:n})},setSearchMode:n=>e({searchMode:n}),setSortType:n=>e({sortType:n}),setSearchTerm:n=>{const{core:o}=t();n.length===0&&(o==null||o.handleInputCleared()),e({searchTerm:n,facetPathsForIndexFields:{},...n.trim().length===0&&{searchMode:"fuzzy",sortType:"asc"}})},setSearchClientResponseItems:n=>e({searchClientResponseItems:n}),setSearchResultsPage:async n=>{e({searchResultsPage:n}),await r.search()},setSearchResultsPerPage:async n=>{e({searchResultsPerPage:n}),await r.search()}};return{..._o,...r}});var Ao=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_a={exports:{}};/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */(function(e,t){(function(r,a){e.exports=a()})(Ao,function(){const{entries:r,setPrototypeOf:a,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:c,seal:u,create:l}=Object,{apply:i,construct:p}=typeof Reflect<"u"&&Reflect;c||(c=function(S){return S}),u||(u=function(S){return S}),i||(i=function(S,x,k){return S.apply(x,k)}),p||(p=function(S,x){return new S(...x)});const m=re(Array.prototype.forEach),b=re(Array.prototype.lastIndexOf),v=re(Array.prototype.pop),$=re(Array.prototype.push),z=re(Array.prototype.splice),K=re(String.prototype.toLowerCase),_=re(String.prototype.toString),Ee=re(String.prototype.match),ue=re(String.prototype.replace),Oe=re(String.prototype.indexOf),H=re(String.prototype.trim),ie=re(Object.prototype.hasOwnProperty),B=re(RegExp.prototype.test),Fe=rc(TypeError);function re(T){return function(S){for(var x=arguments.length,k=new Array(x>1?x-1:0),X=1;X<x;X++)k[X-1]=arguments[X];return i(T,S,k)}}function rc(T){return function(){for(var S=arguments.length,x=new Array(S),k=0;k<S;k++)x[k]=arguments[k];return p(T,x)}}function P(T,S){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:K;a&&a(T,null);let k=S.length;for(;k--;){let X=S[k];if(typeof X=="string"){const Ce=x(X);Ce!==X&&(n(S)||(S[k]=Ce),X=Ce)}T[X]=!0}return T}function ac(T){for(let S=0;S<T.length;S++)ie(T,S)||(T[S]=null);return T}function De(T){const S=l(null);for(const[x,k]of r(T))ie(T,x)&&(Array.isArray(k)?S[x]=ac(k):k&&typeof k=="object"&&k.constructor===Object?S[x]=De(k):S[x]=k);return S}function nt(T,S){for(;T!==null;){const k=s(T,S);if(k){if(k.get)return re(k.get);if(typeof k.value=="function")return re(k.value)}T=o(T)}function x(){return null}return x}const Ka=c(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fr=c(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pr=c(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sc=c(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mr=c(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),nc=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xa=c(["#text"]),Ja=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),gr=c(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Za=c(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),_t=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),oc=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ic=u(/<%[\w\W]*|[\w\W]*%>/gm),cc=u(/\$\{[\w\W]*/gm),lc=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),uc=u(/^aria-[\-\w]+$/),es=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hc=u(/^(?:\w+script|data):/i),dc=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ts=u(/^html$/i),fc=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var rs=Object.freeze({__proto__:null,ARIA_ATTR:uc,ATTR_WHITESPACE:dc,CUSTOM_ELEMENT:fc,DATA_ATTR:lc,DOCTYPE_NAME:ts,ERB_EXPR:ic,IS_ALLOWED_URI:es,IS_SCRIPT_OR_DATA:hc,MUSTACHE_EXPR:oc,TMPLIT_EXPR:cc});const ot={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},pc=function(){return typeof window>"u"?null:window},mc=function(S,x){if(typeof S!="object"||typeof S.createPolicy!="function")return null;let k=null;const X="data-tt-policy-suffix";x&&x.hasAttribute(X)&&(k=x.getAttribute(X));const Ce="dompurify"+(k?"#"+k:"");try{return S.createPolicy(Ce,{createHTML(Ve){return Ve},createScriptURL(Ve){return Ve}})}catch{return console.warn("TrustedTypes policy "+Ce+" could not be created."),null}},as=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ss(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pc();const S=w=>ss(w);if(S.version="3.2.4",S.removed=[],!T||!T.document||T.document.nodeType!==ot.document||!T.Element)return S.isSupported=!1,S;let{document:x}=T;const k=x,X=k.currentScript,{DocumentFragment:Ce,HTMLTemplateElement:Ve,Node:vr,Element:ns,NodeFilter:it,NamedNodeMap:vc=T.NamedNodeMap||T.MozNamedAttrMap,HTMLFormElement:bc,DOMParser:yc,trustedTypes:At}=T,ct=ns.prototype,Sc=nt(ct,"cloneNode"),wc=nt(ct,"remove"),Rc=nt(ct,"nextSibling"),Ec=nt(ct,"childNodes"),It=nt(ct,"parentNode");if(typeof Ve=="function"){const w=x.createElement("template");w.content&&w.content.ownerDocument&&(x=w.content.ownerDocument)}let ae,lt="";const{implementation:br,createNodeIterator:Cc,createDocumentFragment:Pc,getElementsByTagName:Tc}=x,{importNode:kc}=k;let se=as();S.isSupported=typeof r=="function"&&typeof It=="function"&&br&&br.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:yr,ERB_EXPR:Sr,TMPLIT_EXPR:wr,DATA_ATTR:xc,ARIA_ATTR:$c,IS_SCRIPT_OR_DATA:_c,ATTR_WHITESPACE:os,CUSTOM_ELEMENT:Ac}=rs;let{IS_ALLOWED_URI:is}=rs,j=null;const cs=P({},[...Ka,...fr,...pr,...mr,...Xa]);let G=null;const ls=P({},[...Ja,...gr,...Za,..._t]);let D=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ut=null,Rr=null,us=!0,Er=!0,hs=!1,ds=!0,Ge=!1,Cr=!0,Ne=!1,Pr=!1,Tr=!1,qe=!1,Mt=!1,Lt=!1,fs=!0,ps=!1;const Ic="user-content-";let kr=!0,ht=!1,Ye={},Qe=null;const ms=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let gs=null;const vs=P({},["audio","video","img","source","image","track"]);let xr=null;const bs=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ot="http://www.w3.org/1998/Math/MathML",Ft="http://www.w3.org/2000/svg",Pe="http://www.w3.org/1999/xhtml";let Ke=Pe,$r=!1,_r=null;const Mc=P({},[Ot,Ft,Pe],_);let Dt=P({},["mi","mo","mn","ms","mtext"]),Nt=P({},["annotation-xml"]);const Lc=P({},["title","style","font","a","script"]);let dt=null;const Oc=["application/xhtml+xml","text/html"],Fc="text/html";let W=null,Xe=null;const Dc=x.createElement("form"),ys=function(d){return d instanceof RegExp||d instanceof Function},Ar=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Xe&&Xe===d)){if((!d||typeof d!="object")&&(d={}),d=De(d),dt=Oc.indexOf(d.PARSER_MEDIA_TYPE)===-1?Fc:d.PARSER_MEDIA_TYPE,W=dt==="application/xhtml+xml"?_:K,j=ie(d,"ALLOWED_TAGS")?P({},d.ALLOWED_TAGS,W):cs,G=ie(d,"ALLOWED_ATTR")?P({},d.ALLOWED_ATTR,W):ls,_r=ie(d,"ALLOWED_NAMESPACES")?P({},d.ALLOWED_NAMESPACES,_):Mc,xr=ie(d,"ADD_URI_SAFE_ATTR")?P(De(bs),d.ADD_URI_SAFE_ATTR,W):bs,gs=ie(d,"ADD_DATA_URI_TAGS")?P(De(vs),d.ADD_DATA_URI_TAGS,W):vs,Qe=ie(d,"FORBID_CONTENTS")?P({},d.FORBID_CONTENTS,W):ms,ut=ie(d,"FORBID_TAGS")?P({},d.FORBID_TAGS,W):{},Rr=ie(d,"FORBID_ATTR")?P({},d.FORBID_ATTR,W):{},Ye=ie(d,"USE_PROFILES")?d.USE_PROFILES:!1,us=d.ALLOW_ARIA_ATTR!==!1,Er=d.ALLOW_DATA_ATTR!==!1,hs=d.ALLOW_UNKNOWN_PROTOCOLS||!1,ds=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ge=d.SAFE_FOR_TEMPLATES||!1,Cr=d.SAFE_FOR_XML!==!1,Ne=d.WHOLE_DOCUMENT||!1,qe=d.RETURN_DOM||!1,Mt=d.RETURN_DOM_FRAGMENT||!1,Lt=d.RETURN_TRUSTED_TYPE||!1,Tr=d.FORCE_BODY||!1,fs=d.SANITIZE_DOM!==!1,ps=d.SANITIZE_NAMED_PROPS||!1,kr=d.KEEP_CONTENT!==!1,ht=d.IN_PLACE||!1,is=d.ALLOWED_URI_REGEXP||es,Ke=d.NAMESPACE||Pe,Dt=d.MATHML_TEXT_INTEGRATION_POINTS||Dt,Nt=d.HTML_INTEGRATION_POINTS||Nt,D=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&ys(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(D.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&ys(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(D.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(D.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ge&&(Er=!1),Mt&&(qe=!0),Ye&&(j=P({},Xa),G=[],Ye.html===!0&&(P(j,Ka),P(G,Ja)),Ye.svg===!0&&(P(j,fr),P(G,gr),P(G,_t)),Ye.svgFilters===!0&&(P(j,pr),P(G,gr),P(G,_t)),Ye.mathMl===!0&&(P(j,mr),P(G,Za),P(G,_t))),d.ADD_TAGS&&(j===cs&&(j=De(j)),P(j,d.ADD_TAGS,W)),d.ADD_ATTR&&(G===ls&&(G=De(G)),P(G,d.ADD_ATTR,W)),d.ADD_URI_SAFE_ATTR&&P(xr,d.ADD_URI_SAFE_ATTR,W),d.FORBID_CONTENTS&&(Qe===ms&&(Qe=De(Qe)),P(Qe,d.FORBID_CONTENTS,W)),kr&&(j["#text"]=!0),Ne&&P(j,["html","head","body"]),j.table&&(P(j,["tbody"]),delete ut.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw Fe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Fe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ae=d.TRUSTED_TYPES_POLICY,lt=ae.createHTML("")}else ae===void 0&&(ae=mc(At,X)),ae!==null&&typeof lt=="string"&&(lt=ae.createHTML(""));c&&c(d),Xe=d}},Ss=P({},[...fr,...pr,...sc]),ws=P({},[...mr,...nc]),Nc=function(d){let g=It(d);(!g||!g.tagName)&&(g={namespaceURI:Ke,tagName:"template"});const y=K(d.tagName),I=K(g.tagName);return _r[d.namespaceURI]?d.namespaceURI===Ft?g.namespaceURI===Pe?y==="svg":g.namespaceURI===Ot?y==="svg"&&(I==="annotation-xml"||Dt[I]):!!Ss[y]:d.namespaceURI===Ot?g.namespaceURI===Pe?y==="math":g.namespaceURI===Ft?y==="math"&&Nt[I]:!!ws[y]:d.namespaceURI===Pe?g.namespaceURI===Ft&&!Nt[I]||g.namespaceURI===Ot&&!Dt[I]?!1:!ws[y]&&(Lc[y]||!Ss[y]):!!(dt==="application/xhtml+xml"&&_r[d.namespaceURI]):!1},ge=function(d){$(S.removed,{element:d});try{It(d).removeChild(d)}catch{wc(d)}},Ut=function(d,g){try{$(S.removed,{attribute:g.getAttributeNode(d),from:g})}catch{$(S.removed,{attribute:null,from:g})}if(g.removeAttribute(d),d==="is")if(qe||Mt)try{ge(g)}catch{}else try{g.setAttribute(d,"")}catch{}},Rs=function(d){let g=null,y=null;if(Tr)d="<remove></remove>"+d;else{const q=Ee(d,/^[\r\n\t ]+/);y=q&&q[0]}dt==="application/xhtml+xml"&&Ke===Pe&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");const I=ae?ae.createHTML(d):d;if(Ke===Pe)try{g=new yc().parseFromString(I,dt)}catch{}if(!g||!g.documentElement){g=br.createDocument(Ke,"template",null);try{g.documentElement.innerHTML=$r?lt:I}catch{}}const J=g.body||g.documentElement;return d&&y&&J.insertBefore(x.createTextNode(y),J.childNodes[0]||null),Ke===Pe?Tc.call(g,Ne?"html":"body")[0]:Ne?g.documentElement:J},Es=function(d){return Cc.call(d.ownerDocument||d,d,it.SHOW_ELEMENT|it.SHOW_COMMENT|it.SHOW_TEXT|it.SHOW_PROCESSING_INSTRUCTION|it.SHOW_CDATA_SECTION,null)},Ir=function(d){return d instanceof bc&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof vc)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},Cs=function(d){return typeof vr=="function"&&d instanceof vr};function Te(w,d,g){m(w,y=>{y.call(S,d,g,Xe)})}const Ps=function(d){let g=null;if(Te(se.beforeSanitizeElements,d,null),Ir(d))return ge(d),!0;const y=W(d.nodeName);if(Te(se.uponSanitizeElement,d,{tagName:y,allowedTags:j}),d.hasChildNodes()&&!Cs(d.firstElementChild)&&B(/<[/\w]/g,d.innerHTML)&&B(/<[/\w]/g,d.textContent)||d.nodeType===ot.progressingInstruction||Cr&&d.nodeType===ot.comment&&B(/<[/\w]/g,d.data))return ge(d),!0;if(!j[y]||ut[y]){if(!ut[y]&&ks(y)&&(D.tagNameCheck instanceof RegExp&&B(D.tagNameCheck,y)||D.tagNameCheck instanceof Function&&D.tagNameCheck(y)))return!1;if(kr&&!Qe[y]){const I=It(d)||d.parentNode,J=Ec(d)||d.childNodes;if(J&&I){const q=J.length;for(let ce=q-1;ce>=0;--ce){const ve=Sc(J[ce],!0);ve.__removalCount=(d.__removalCount||0)+1,I.insertBefore(ve,Rc(d))}}}return ge(d),!0}return d instanceof ns&&!Nc(d)||(y==="noscript"||y==="noembed"||y==="noframes")&&B(/<\/no(script|embed|frames)/i,d.innerHTML)?(ge(d),!0):(Ge&&d.nodeType===ot.text&&(g=d.textContent,m([yr,Sr,wr],I=>{g=ue(g,I," ")}),d.textContent!==g&&($(S.removed,{element:d.cloneNode()}),d.textContent=g)),Te(se.afterSanitizeElements,d,null),!1)},Ts=function(d,g,y){if(fs&&(g==="id"||g==="name")&&(y in x||y in Dc))return!1;if(!(Er&&!Rr[g]&&B(xc,g))){if(!(us&&B($c,g))){if(!G[g]||Rr[g]){if(!(ks(d)&&(D.tagNameCheck instanceof RegExp&&B(D.tagNameCheck,d)||D.tagNameCheck instanceof Function&&D.tagNameCheck(d))&&(D.attributeNameCheck instanceof RegExp&&B(D.attributeNameCheck,g)||D.attributeNameCheck instanceof Function&&D.attributeNameCheck(g))||g==="is"&&D.allowCustomizedBuiltInElements&&(D.tagNameCheck instanceof RegExp&&B(D.tagNameCheck,y)||D.tagNameCheck instanceof Function&&D.tagNameCheck(y))))return!1}else if(!xr[g]){if(!B(is,ue(y,os,""))){if(!((g==="src"||g==="xlink:href"||g==="href")&&d!=="script"&&Oe(y,"data:")===0&&gs[d])){if(!(hs&&!B(_c,ue(y,os,"")))){if(y)return!1}}}}}}return!0},ks=function(d){return d!=="annotation-xml"&&Ee(d,Ac)},xs=function(d){Te(se.beforeSanitizeAttributes,d,null);const{attributes:g}=d;if(!g||Ir(d))return;const y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let I=g.length;for(;I--;){const J=g[I],{name:q,namespaceURI:ce,value:ve}=J,ft=W(q);let ne=q==="value"?ve:H(ve);if(y.attrName=ft,y.attrValue=ne,y.keepAttr=!0,y.forceKeepAttr=void 0,Te(se.uponSanitizeAttribute,d,y),ne=y.attrValue,ps&&(ft==="id"||ft==="name")&&(Ut(q,d),ne=Ic+ne),Cr&&B(/((--!?|])>)|<\/(style|title)/i,ne)){Ut(q,d);continue}if(y.forceKeepAttr||(Ut(q,d),!y.keepAttr))continue;if(!ds&&B(/\/>/i,ne)){Ut(q,d);continue}Ge&&m([yr,Sr,wr],_s=>{ne=ue(ne,_s," ")});const $s=W(d.nodeName);if(Ts($s,ft,ne)){if(ae&&typeof At=="object"&&typeof At.getAttributeType=="function"&&!ce)switch(At.getAttributeType($s,ft)){case"TrustedHTML":{ne=ae.createHTML(ne);break}case"TrustedScriptURL":{ne=ae.createScriptURL(ne);break}}try{ce?d.setAttributeNS(ce,q,ne):d.setAttribute(q,ne),Ir(d)?ge(d):v(S.removed)}catch{}}}Te(se.afterSanitizeAttributes,d,null)},Uc=function w(d){let g=null;const y=Es(d);for(Te(se.beforeSanitizeShadowDOM,d,null);g=y.nextNode();)Te(se.uponSanitizeShadowNode,g,null),Ps(g),xs(g),g.content instanceof Ce&&w(g.content);Te(se.afterSanitizeShadowDOM,d,null)};return S.sanitize=function(w){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,y=null,I=null,J=null;if($r=!w,$r&&(w="<!-->"),typeof w!="string"&&!Cs(w))if(typeof w.toString=="function"){if(w=w.toString(),typeof w!="string")throw Fe("dirty is not a string, aborting")}else throw Fe("toString is not a function");if(!S.isSupported)return w;if(Pr||Ar(d),S.removed=[],typeof w=="string"&&(ht=!1),ht){if(w.nodeName){const ve=W(w.nodeName);if(!j[ve]||ut[ve])throw Fe("root node is forbidden and cannot be sanitized in-place")}}else if(w instanceof vr)g=Rs("<!---->"),y=g.ownerDocument.importNode(w,!0),y.nodeType===ot.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?g=y:g.appendChild(y);else{if(!qe&&!Ge&&!Ne&&w.indexOf("<")===-1)return ae&&Lt?ae.createHTML(w):w;if(g=Rs(w),!g)return qe?null:Lt?lt:""}g&&Tr&&ge(g.firstChild);const q=Es(ht?w:g);for(;I=q.nextNode();)Ps(I),xs(I),I.content instanceof Ce&&Uc(I.content);if(ht)return w;if(qe){if(Mt)for(J=Pc.call(g.ownerDocument);g.firstChild;)J.appendChild(g.firstChild);else J=g;return(G.shadowroot||G.shadowrootmode)&&(J=kc.call(k,J,!0)),J}let ce=Ne?g.outerHTML:g.innerHTML;return Ne&&j["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&B(ts,g.ownerDocument.doctype.name)&&(ce="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
|
|
30
|
-
`+ce),Ge&&m([yr,Sr,wr],ve=>{ce=ue(ce,ve," ")}),ae&&Lt?ae.createHTML(ce):ce},S.setConfig=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ar(w),Pr=!0},S.clearConfig=function(){Xe=null,Pr=!1},S.isValidAttribute=function(w,d,g){Xe||Ar({});const y=W(w),I=W(d);return Ts(y,I,g)},S.addHook=function(w,d){typeof d=="function"&&$(se[w],d)},S.removeHook=function(w,d){if(d!==void 0){const g=b(se[w],d);return g===-1?void 0:z(se[w],g,1)[0]}return v(se[w])},S.removeHooks=function(w){se[w]=[]},S.removeAllHooks=function(){se=as()},S}var gc=ss();return gc})})(_a);const Io=_a.exports,Mo="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let te=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Mo[r[e]&63];return t};const Lo=U(class extends N{constructor(){super();h(this,"adSource","Custom");h(this,"adClientResponseItem");h(this,"adContainerId",te());h(this,"searchTerm");h(this,"isSearchInProgress",!1);h(this,"core");h(this,"intersectionObserver");h(this,"storeUnsubscribe");h(this,"adContainerRenderedTimeout");h(this,"isComponentConnected",!0);this.__registerHost()}get hostElement(){return this}connectedCallback(){const r=A.getState();this.core=r.core,this.searchTerm=r.searchTerm,this.isSearchInProgress=r.isSearchInProgress,this.storeUnsubscribe=A.subscribe(a=>{this.searchTerm=a.searchTerm,this.isSearchInProgress=a.isSearchInProgress})}componentDidLoad(){this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{var a;r!=null&&r.isIntersecting&&!this.isSearchInProgress&&((a=this.core)==null||a.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""}))},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var r,a;(r=this.storeUnsubscribe)==null||r.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){const r=this.adClientResponseItem;if(r.admAd)return f("a",{class:"searchcraft-adm-ad",href:r.admAd.click_url},r.admAd.image_url&&f("div",{class:"searchcraft-adm-ad-image-wrapper"},f("img",{alt:r.admAd.term||"image",src:r.admAd.image_url,class:"searchcraft-adm-ad-image"})),f("div",{class:"searchcraft-adm-ad-info-wrapper"},f("p",{class:"searchcraft-adm-ad-title"},r.admAd.term),r.admAd.price&&f("p",{class:"searchcraft-adm-ad-subtitle"},r.admAd.price)))}renderCustomAd(){var o,s;const r=(s=(o=this.core)==null?void 0:o.config)==null?void 0:s.customAdTemplate,a=`searchcraft-custom-ad-${this.adContainerId}`;let n="<p>Custom Ad Placeholder</p>";return r&&(n=r({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId})),f("div",{class:"searchcraft-custom-ad",id:a,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:Io.sanitize(n)})}renderNativoAd(){var a;const r=((a=this.core)==null?void 0:a.config.nativoAdClassName)||"ntv-item";return f("div",{class:r})}render(){var r,a;if(!this.isSearchInProgress)switch(this.isComponentConnected&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var n;(n=this.core)==null||n.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""})},((a=(r=this.core)==null?void 0:r.config)==null?void 0:a.adContainerRenderedDebounceDelay)||500)),this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[0,"searchcraft-ad",{adSource:[1,"ad-source"],adClientResponseItem:[16],adContainerId:[1,"ad-container-id"],searchTerm:[32],isSearchInProgress:[32]}]);function kt(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,Lo);break}})}const Oo=kt;function fe(e,t){if(e&&t)return t.fieldNames.map(r=>{let a=e[r.fieldName];if(a)switch(r.dataType){case"date":{a=Fo(a);break}case"number":{a=Intl.NumberFormat(r.numberFormatLocale,r.numberFormatOptions).format(a*(r.numberScale||1));break}}return a}).filter(r=>!!r).join(t.delimiter||" ")}function Aa(e){switch(e){case"hour":return 36e5;case"day":return 864e5;case"month":return 2592e6;case"year":return 31536e6;default:return 36e5}}function lr(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Fo(e){const t=new Date,r=new Date(e),a=Math.floor((t.getTime()-r.getTime())/1e3),n=Math.floor(a/60),o=Math.floor(n/60),s=Math.floor(o/24),c=Math.floor(s/365);return n<60?`${n}m ago`:o<24?`${o}h ago`:s<365?`${s}d ago`:`${c}y ago`}const Do=U(class extends N{constructor(){super();h(this,"item");h(this,"searchResultMappings");h(this,"containerTarget","_blank");h(this,"containerRel");h(this,"buttonTarget","_blank");h(this,"buttonRel");h(this,"imagePlacement","right");h(this,"customStyles");h(this,"documentPosition",0);h(this,"titleContent");h(this,"subtitleContent");h(this,"bodyContent");h(this,"footerContent");h(this,"buttonLabel");h(this,"buttonHref");h(this,"containerHref");h(this,"imageSrc");h(this,"imageAlt");h(this,"searchcraftStore",A.getState());h(this,"handleLinkClick",()=>{var a;const r=this.searchcraftStore.getSearchcraftInstance();if(r){const n=this.documentPosition,o=this.searchcraftStore.searchTerm,s=this.searchcraftStore.searchClientResponseItems.length;(a=r.measureClient)==null||a.sendMeasureEvent("document_clicked",{document_position:n,number_of_documents:s,search_term:o})}});h(this,"parseStyles",()=>{if(this.customStyles)try{return JSON.parse(this.customStyles)}catch(r){return console.error("Error parsing custom styles:",r),{}}return{}});this.__registerHost()}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}mapValuesFromDocument(r){var a,n,o,s,c,u,l;this.titleContent=fe(r,(a=this.searchResultMappings)==null?void 0:a.title),this.subtitleContent=fe(r,(n=this.searchResultMappings)==null?void 0:n.subtitle),this.bodyContent=fe(r,(o=this.searchResultMappings)==null?void 0:o.body),this.containerHref=fe(r,(s=this.searchResultMappings)==null?void 0:s.containerHref),this.buttonHref=fe(r,(c=this.searchResultMappings)==null?void 0:c.buttonHref),this.imageSrc=fe(r,(u=this.searchResultMappings)==null?void 0:u.imageSource),this.footerContent=fe(r,(l=this.searchResultMappings)==null?void 0:l.footer)}render(){const r=this.parseStyles(),a=this.imageSrc&&f("img",{alt:this.imageAlt,class:"searchcraft-search-result-image",src:this.imageSrc,style:r.image||{}}),n=f(Zt,null,this.imageSrc&&this.imagePlacement==="left"&&a,f("div",{class:"searchcraft-base-search-result-content-container"},this.titleContent&&f("h2",{class:"searchcraft-base-search-result-title",style:r.title||{}},this.titleContent),this.subtitleContent&&f("h3",{class:"searchcraft-base-search-result-subtitle",style:r.subtitle||{}},this.subtitleContent),this.bodyContent&&f("p",{class:"searchcraft-base-search-result-body-content",style:r.primaryContent||{}},this.bodyContent),this.footerContent&&f("p",{class:"searchcraft-base-search-result-footer-content",style:r.secondaryContent||{}},this.footerContent),this.buttonHref&&!this.containerHref&&this.buttonLabel&&f("a",{class:"searchcraft-search-result-button",href:this.buttonHref,style:r.button||{},target:this.buttonTarget,rel:this.buttonRel},this.buttonLabel)),this.imageSrc&&this.imagePlacement==="right"&&a);return this.containerHref?f("a",{class:"searchcraft-search-result-container",onClick:this.handleLinkClick,href:this.containerHref,rel:this.containerRel,style:r.container||{},tabindex:"0",target:this.containerTarget},n):f("div",{class:"searchcraft-search-result-container",style:r.container||{}},n)}},[0,"searchcraft-base-search-result",{item:[16],searchResultMappings:[16],containerTarget:[1,"container-target"],containerRel:[1,"container-rel"],buttonTarget:[1,"button-target"],buttonRel:[1,"button-rel"],imagePlacement:[1,"image-placement"],customStyles:[1,"custom-styles"],documentPosition:[2,"document-position"],titleContent:[32],subtitleContent:[32],bodyContent:[32],footerContent:[32],buttonLabel:[32],buttonHref:[32],containerHref:[32],imageSrc:[32],imageAlt:[32]}]);function Ia(){if(typeof customElements>"u")return;["searchcraft-base-search-result"].forEach(t=>{switch(t){case"searchcraft-base-search-result":customElements.get(t)||customElements.define(t,Do);break}})}const No=Ia;function at(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return console.error("Invalid customStyles format:",e),{}}return e||{}}function Uo(e){try{return JSON.stringify(e)}catch(t){return console.error("Error serializing styles:",t),"{}"}}const zo=U(class extends N{constructor(){super();h(this,"errorMessage");this.__registerHost()}render(){return f("p",{key:"dc97bb66da10a98fca027f928deaaf80d945417b",class:"searchcraft-error-message"},this.errorMessage||"Search term is required.")}},[0,"searchcraft-error-message",{errorMessage:[1,"error-message"]}]);function xt(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,zo);break}})}const Ho=U(class extends N{constructor(){super();h(this,"customStylesForResults");h(this,"searchResultMappings");h(this,"resultImagePlacement","right");h(this,"buttonLabel");h(this,"buttonTarget","_blank");h(this,"buttonRel");h(this,"containerTarget","_blank");h(this,"containerRel");h(this,"searchTerm","");h(this,"searchClientResponseItems");h(this,"adClientResponseItems",[]);h(this,"searchResultsPerPage");h(this,"searchResultsPage");h(this,"isSearchInProgress",!0);h(this,"config");h(this,"unsubscribe",()=>{});this.__registerHost()}get serializedStyles(){let r="";return this.customStylesForResults&&(r=typeof this.customStylesForResults=="string"?this.customStylesForResults:Uo(this.customStylesForResults)),r}componentDidLoad(){var a;this.unsubscribe=A.subscribe(n=>this.handleStateChange(n));const r=A.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(a=r.core)==null?void 0:a.config}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleStateChange(r){var a;this.searchClientResponseItems=[...r.searchClientResponseItems],this.adClientResponseItems=[...r.adClientResponseItems],this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.config=(a=r.core)==null?void 0:a.config,this.isSearchInProgress=r.isSearchInProgress}renderEmptyState(){return f("div",{class:"searchcraft-search-results-empty-state-container"},f("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return f("div",{class:"searchcraft-search-results-container"},f("div",{class:"searchcraft-search-results-error-message-container"},f("searchcraft-error-message",{"error-message":`No search results found for "${this.searchTerm}" query`})))}renderWithADMAds(){var r,a;return f("div",{class:"searchcraft-search-results-container"},(r=this.adClientResponseItems)==null?void 0:r.map(n=>f("searchcraft-ad",{adSource:"adMarketplace",adClientResponseItem:n,adContainerId:te(),key:n.id})),(a=this.searchClientResponseItems)==null?void 0:a.map((n,o)=>f("searchcraft-base-search-result",{key:n.id,"custom-styles":this.serializedStyles,"image-placement":this.resultImagePlacement,"container-rel":this.containerRel,"container-target":this.containerTarget,"button-label":this.buttonLabel||"View more","button-rel":this.buttonRel,"button-target":this.buttonTarget,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+o,searchResultMappings:this.searchResultMappings,item:n})))}renderWithCustomAds(){var u,l,i,p;const r=[],a=((u=this.config)==null?void 0:u.customAdInterstitialInterval)||0,n=((l=this.config)==null?void 0:l.customAdInterstitialQuantity)||1,o=((i=this.config)==null?void 0:i.customAdStartQuantity)||0,s=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let m=0;m<o;m++)r.push(f("searchcraft-ad",{adSource:"Custom",adContainerId:te(),key:`${m}-ad`}));c.forEach((m,b)=>{if(a&&b%a===0&&b+a<c.length&&b>=a)for(let v=0;v<n;v++)r.push(f("searchcraft-ad",{adSource:"Custom",adContainerId:te(),key:`${m.id}-ad-${v}`}));r.push(f("searchcraft-base-search-result",{key:m.id,"custom-styles":this.serializedStyles,"image-placement":this.resultImagePlacement,"container-rel":this.containerRel,"container-target":this.containerTarget,"button-label":this.buttonLabel||"View more","button-rel":this.buttonRel,"button-target":this.buttonTarget,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+b,searchResultMappings:this.searchResultMappings,item:m}))});for(let m=0;m<s;m++)r.push(f("searchcraft-ad",{adSource:"Custom",adContainerId:te(),key:`${m}-ad`}));return f("div",{class:"searchcraft-search-results-container"},r)}renderWithNativoAds(){var l,i,p,m,b;const r=[],a=((l=this.config)==null?void 0:l.nativoAdInterstialStartIndex)||0,n=((i=this.config)==null?void 0:i.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,s=((m=this.config)==null?void 0:m.nativoAdStartQuantity)||0,c=((b=this.config)==null?void 0:b.nativoAdEndQuantity)||0,u=this.searchClientResponseItems||[];for(let v=0;v<s;v++)r.push(f("searchcraft-ad",{adSource:"Nativo",adContainerId:te(),key:`${v}-ad`}));u.forEach((v,$)=>{if(n&&($+a)%n===0&&$+n<u.length&&$>=n)for(let z=0;z<o;z++)r.push(f("searchcraft-ad",{adSource:"Nativo",adContainerId:te(),key:`${v.id}-ad-${z}`}));r.push(f("searchcraft-base-search-result",{key:v.id,"custom-styles":this.serializedStyles,"image-placement":this.resultImagePlacement,"container-rel":this.containerRel,"container-target":this.containerTarget,"button-label":this.buttonLabel||"View more","button-rel":this.buttonRel,"button-target":this.buttonTarget,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+$,searchResultMappings:this.searchResultMappings,item:v}))});for(let v=0;v<c;v++)r.push(f("searchcraft-ad",{adSource:"Nativo",adContainerId:te(),key:`${v}-ad`}));return f("div",{class:"searchcraft-search-results-container"},r)}renderWithNoAds(){var r;return f("div",{class:"searchcraft-search-results-container"},(r=this.searchClientResponseItems)==null?void 0:r.map((a,n)=>f("searchcraft-base-search-result",{key:a.id,"custom-styles":this.serializedStyles,"image-placement":this.resultImagePlacement,"container-rel":this.containerRel,"container-target":this.containerTarget,"button-label":this.buttonLabel||"View more","button-rel":this.buttonRel,"button-target":this.buttonTarget,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,searchResultMappings:this.searchResultMappings,item:a})))}render(){var r;if(this.searchTerm.trim()==="")return this.renderEmptyState();if(this.searchTerm.length>0&&(this.searchClientResponseItems||[]).length===0&&!this.isSearchInProgress)return this.renderNoResultsFoundState();switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[4,"searchcraft-base-search-results",{customStylesForResults:[1,"custom-styles-for-results"],searchResultMappings:[16],resultImagePlacement:[1,"result-image-placement"],buttonLabel:[1,"button-label"],buttonTarget:[1,"button-target"],buttonRel:[1,"button-rel"],containerTarget:[1,"container-target"],containerRel:[1,"container-rel"],searchTerm:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchResultsPerPage:[32],searchResultsPage:[32],isSearchInProgress:[32],config:[32]}]);function Bo(){if(typeof customElements>"u")return;["searchcraft-base-search-results","searchcraft-ad","searchcraft-base-search-result","searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-base-search-results":customElements.get(t)||customElements.define(t,Ho);break;case"searchcraft-ad":customElements.get(t)||kt();break;case"searchcraft-base-search-result":customElements.get(t)||Ia();break;case"searchcraft-error-message":customElements.get(t)||xt();break}})}const jo=Bo;var Ma={exports:{}};/*!
|
|
19
|
+
*/var Bt=Symbol.for("react.transitional.element"),In=Symbol.for("react.portal"),Mn=Symbol.for("react.fragment"),On=Symbol.for("react.strict_mode"),Ln=Symbol.for("react.profiler"),Fn=Symbol.for("react.consumer"),Dn=Symbol.for("react.context"),Nn=Symbol.for("react.forward_ref"),Un=Symbol.for("react.suspense"),zn=Symbol.for("react.memo"),Xr=Symbol.for("react.lazy"),Zr=Symbol.iterator;function Hn(e){return e===null||typeof e!="object"?null:(e=Zr&&e[Zr]||e["@@iterator"],typeof e=="function"?e:null)}var Jr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},es=Object.assign,ts={};function Oe(e,t,r){this.props=e,this.context=t,this.refs=ts,this.updater=r||Jr}Oe.prototype.isReactComponent={},Oe.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},Oe.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rs(){}rs.prototype=Oe.prototype;function Wt(e,t,r){this.props=e,this.context=t,this.refs=ts,this.updater=r||Jr}var Vt=Wt.prototype=new rs;Vt.constructor=Wt,es(Vt,Oe.prototype),Vt.isPureReactComponent=!0;var ss=Array.isArray,M={H:null,A:null,T:null,S:null},as=Object.prototype.hasOwnProperty;function Gt(e,t,r,s,a,o){return r=o.ref,{$$typeof:Bt,type:e,key:t,ref:r!==void 0?r:null,props:o}}function jn(e,t){return Gt(e.type,t,void 0,void 0,void 0,e.props)}function qt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bt}function Bn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ns=/\/+/g;function Yt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Bn(""+e.key):t.toString(36)}function os(){}function Wn(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(os,os):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Le(e,t,r,s,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var n=!1;if(e===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(e.$$typeof){case Bt:case In:n=!0;break;case Xr:return n=e._init,Le(n(e._payload),t,r,s,a)}}if(n)return a=a(e),n=s===""?"."+Yt(e,0):s,ss(a)?(r="",n!=null&&(r=n.replace(ns,"$&/")+"/"),Le(a,t,r,"",function(u){return u})):a!=null&&(qt(a)&&(a=jn(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(ns,"$&/")+"/")+n)),t.push(a)),1;n=0;var c=s===""?".":s+":";if(ss(e))for(var i=0;i<e.length;i++)s=e[i],o=c+Yt(s,i),n+=Le(s,t,r,o,a);else if(i=Hn(e),typeof i=="function")for(e=i.call(e),i=0;!(s=e.next()).done;)s=s.value,o=c+Yt(s,i++),n+=Le(s,t,r,o,a);else if(o==="object"){if(typeof e.then=="function")return Le(Wn(e),t,r,s,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return n}function pt(e,t,r){if(e==null)return e;var s=[],a=0;return Le(e,s,"","",function(o){return t.call(r,o,a++)}),s}function Vn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var cs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Gn(){}w.Children={map:pt,forEach:function(e,t,r){pt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return pt(e,function(){t++}),t},toArray:function(e){return pt(e,function(t){return t})||[]},only:function(e){if(!qt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},w.Component=Oe,w.Fragment=Mn,w.Profiler=Ln,w.PureComponent=Wt,w.StrictMode=On,w.Suspense=Un,w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,w.act=function(){throw Error("act(...) is not supported in production builds of React.")},w.cache=function(e){return function(){return e.apply(null,arguments)}},w.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=es({},e.props),a=e.key,o=void 0;if(t!=null)for(n in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(a=""+t.key),t)!as.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=r;else if(1<n){for(var c=Array(n),i=0;i<n;i++)c[i]=arguments[i+2];s.children=c}return Gt(e.type,a,void 0,void 0,o,s)},w.createContext=function(e){return e={$$typeof:Dn,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Fn,_context:e},e},w.createElement=function(e,t,r){var s,a={},o=null;if(t!=null)for(s in t.key!==void 0&&(o=""+t.key),t)as.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=t[s]);var n=arguments.length-2;if(n===1)a.children=r;else if(1<n){for(var c=Array(n),i=0;i<n;i++)c[i]=arguments[i+2];a.children=c}if(e&&e.defaultProps)for(s in n=e.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return Gt(e,o,void 0,void 0,null,a)},w.createRef=function(){return{current:null}},w.forwardRef=function(e){return{$$typeof:Nn,render:e}},w.isValidElement=qt,w.lazy=function(e){return{$$typeof:Xr,_payload:{_status:-1,_result:e},_init:Vn}},w.memo=function(e,t){return{$$typeof:zn,type:e,compare:t===void 0?null:t}},w.startTransition=function(e){var t=M.T,r={};M.T=r;try{var s=e(),a=M.S;a!==null&&a(r,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Gn,cs)}catch(o){cs(o)}finally{M.T=t}},w.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},w.use=function(e){return M.H.use(e)},w.useActionState=function(e,t,r){return M.H.useActionState(e,t,r)},w.useCallback=function(e,t){return M.H.useCallback(e,t)},w.useContext=function(e){return M.H.useContext(e)},w.useDebugValue=function(){},w.useDeferredValue=function(e,t){return M.H.useDeferredValue(e,t)},w.useEffect=function(e,t){return M.H.useEffect(e,t)},w.useId=function(){return M.H.useId()},w.useImperativeHandle=function(e,t,r){return M.H.useImperativeHandle(e,t,r)},w.useInsertionEffect=function(e,t){return M.H.useInsertionEffect(e,t)},w.useLayoutEffect=function(e,t){return M.H.useLayoutEffect(e,t)},w.useMemo=function(e,t){return M.H.useMemo(e,t)},w.useOptimistic=function(e,t){return M.H.useOptimistic(e,t)},w.useReducer=function(e,t,r){return M.H.useReducer(e,t,r)},w.useRef=function(e){return M.H.useRef(e)},w.useState=function(e){return M.H.useState(e)},w.useSyncExternalStore=function(e,t,r){return M.H.useSyncExternalStore(e,t,r)},w.useTransition=function(){return M.H.useTransition()},w.version="19.0.0",Kr.exports=w;var is=Kr.exports,qn=Ht;const Yn=e=>e;function ls(e,t=Yn){const r=is.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return is.useDebugValue(r),r}const us=e=>{const t=qn.createStore(e),r=s=>ls(t,s);return Object.assign(r,t),r},Qn=e=>e?us(e):us;jt.create=Qn,jt.useStore=ls,function(e){var t=Ht,r=jt;Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[s]}})}),Object.keys(r).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return r[s]}})})}(Yr);const Kn={adClientResponseItems:[],core:void 0,logger:void 0,facetPathsForIndexFields:{},isPopoverVisible:!1,isSearchInProgress:!1,searchTerm:"",rangeValueForIndexFields:{},searchMode:"fuzzy",searchClientResponseItems:[],searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:"asc"},_=Yr.createStore((e,t)=>{const r={addFacetPathsForIndexField:a=>e(o=>({facetPathsForIndexFields:{...o.facetPathsForIndexFields,[a.fieldName]:a}})),addRangeValueForIndexField:a=>e(o=>({rangeValueForIndexFields:{...o.rangeValueForIndexFields,[a.fieldName]:a}})),getSearchcraftInstance:()=>{const{core:a}=t();return a},initialize:(a,o=!1)=>{const n=a,c=o?new en({logLevel:Te.DEBUG}):void 0;e({core:n,logger:c,searchResultsPerPage:n.config.searchResultsPerPage||20})},removeFacetPathsForIndexField:a=>e(o=>{const n=o.facetPathsForIndexFields;return delete n[a],{facetPathsForIndexFields:{...n}}}),removeRangeValueForIndexField:a=>e(o=>{const n=o.rangeValueForIndexFields;return delete n[a],{rangeValueForIndexFields:{...n}}}),resetFacetPaths:()=>{e({facetPathsForIndexFields:{}})},search:async()=>{var c,i;const a=t();if((c=a.logger)==null||c.log(Te.INFO,`Starting search with search term: "${a.searchTerm}"`),!a.core)throw new Error("Searchcraft instance is not initialized.");if(!a.searchTerm.trim()){(i=a.logger)==null||i.log(Te.INFO,"No search request was made: search term was empty."),e({searchClientResponseItems:[],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}e({isSearchInProgress:!0});const o=(u,l)=>{var m,b;const p=u.data.facets;e(v=>({isSearchInProgress:!1,searchClientResponseItems:l,searchResponseTimeTaken:u.data.time_taken||0,searchResultsPage:u.data.count===v.searchResultsCount?v.searchResultsPage:1,searchResultsCount:u.data.count||0})),p&&e({searchResponseFacetPrime:p}),(m=a.logger)==null||m.log(Te.DEBUG,`Search results: ${JSON.stringify(l)}`),(b=a.logger)==null||b.log(Te.DEBUG,`Facets from response: ${JSON.stringify(p)}`)},n=u=>{e({adClientResponseItems:u})};a.core.getItems({searchTerm:a.searchTerm,mode:a.searchMode,sort:a.sortType,facetPathsForIndexFields:a.facetPathsForIndexFields,rangeValueForIndexFields:a.rangeValueForIndexFields,offset:a.searchResultsPerPage?a.searchResultsPerPage*(a.searchResultsPage-1):0,limit:a.searchResultsPerPage},o,n)},setPopoverVisibility:a=>{e({isPopoverVisible:a})},setSearchMode:a=>e({searchMode:a}),setSortType:a=>e({sortType:a}),setSearchTerm:a=>{const{core:o}=t();a.length===0&&(o==null||o.handleInputCleared()),e({searchTerm:a,facetPathsForIndexFields:{},...a.trim().length===0&&{searchMode:"fuzzy",sortType:"asc"}})},setSearchClientResponseItems:a=>e({searchClientResponseItems:a}),setSearchResultsPage:async a=>{e({searchResultsPage:a}),await r.search()},setSearchResultsPerPage:async a=>{e({searchResultsPerPage:a}),await r.search()}};return{...Kn,...r}});var Xn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fs={exports:{}};/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */(function(e,t){(function(r,s){e.exports=s()})(Xn,function(){const{entries:r,setPrototypeOf:s,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:n}=Object;let{freeze:c,seal:i,create:u}=Object,{apply:l,construct:p}=typeof Reflect<"u"&&Reflect;c||(c=function(S){return S}),i||(i=function(S){return S}),l||(l=function(S,C,P){return S.apply(C,P)}),p||(p=function(S,C){return new S(...C)});const m=Z(Array.prototype.forEach),b=Z(Array.prototype.lastIndexOf),v=Z(Array.prototype.pop),x=Z(Array.prototype.push),N=Z(Array.prototype.splice),q=Z(String.prototype.toLowerCase),$=Z(String.prototype.toString),ve=Z(String.prototype.match),oe=Z(String.prototype.replace),Pe=Z(String.prototype.indexOf),U=Z(String.prototype.trim),se=Z(Object.prototype.hasOwnProperty),z=Z(RegExp.prototype.test),Ce=wc(TypeError);function Z(k){return function(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),Y=1;Y<C;Y++)P[Y-1]=arguments[Y];return l(k,S,P)}}function wc(k){return function(){for(var S=arguments.length,C=new Array(S),P=0;P<S;P++)C[P]=arguments[P];return p(k,C)}}function T(k,S){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:q;s&&s(k,null);let P=S.length;for(;P--;){let Y=S[P];if(typeof Y=="string"){const be=C(Y);be!==Y&&(a(S)||(S[P]=be),Y=be)}k[Y]=!0}return k}function Tc(k){for(let S=0;S<k.length;S++)se(k,S)||(k[S]=null);return k}function xe(k){const S=u(null);for(const[C,P]of r(k))se(k,C)&&(Array.isArray(P)?S[C]=Tc(P):P&&typeof P=="object"&&P.constructor===Object?S[C]=xe(P):S[C]=P);return S}function Qe(k,S){for(;k!==null;){const P=n(k,S);if(P){if(P.get)return Z(P.get);if(typeof P.value=="function")return Z(P.value)}k=o(k)}function C(){return null}return C}const As=c(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Jt=c(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),er=c(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),kc=c(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),tr=c(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Pc=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Is=c(["#text"]),Ms=c(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),rr=c(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Os=c(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),bt=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cc=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xc=i(/<%[\w\W]*|[\w\W]*%>/gm),$c=i(/\$\{[\w\W]*/gm),_c=i(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ac=i(/^aria-[\-\w]+$/),Ls=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ic=i(/^(?:\w+script|data):/i),Mc=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fs=i(/^html$/i),Oc=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ds=Object.freeze({__proto__:null,ARIA_ATTR:Ac,ATTR_WHITESPACE:Mc,CUSTOM_ELEMENT:Oc,DATA_ATTR:_c,DOCTYPE_NAME:Fs,ERB_EXPR:xc,IS_ALLOWED_URI:Ls,IS_SCRIPT_OR_DATA:Ic,MUSTACHE_EXPR:Cc,TMPLIT_EXPR:$c});const Ke={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Lc=function(){return typeof window>"u"?null:window},Fc=function(S,C){if(typeof S!="object"||typeof S.createPolicy!="function")return null;let P=null;const Y="data-tt-policy-suffix";C&&C.hasAttribute(Y)&&(P=C.getAttribute(Y));const be="dompurify"+(P?"#"+P:"");try{return S.createPolicy(be,{createHTML(Fe){return Fe},createScriptURL(Fe){return Fe}})}catch{return console.warn("TrustedTypes policy "+be+" could not be created."),null}},Ns=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Us(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Lc();const S=E=>Us(E);if(S.version="3.2.4",S.removed=[],!k||!k.document||k.document.nodeType!==Ke.document||!k.Element)return S.isSupported=!1,S;let{document:C}=k;const P=C,Y=P.currentScript,{DocumentFragment:be,HTMLTemplateElement:Fe,Node:sr,Element:zs,NodeFilter:Xe,NamedNodeMap:Nc=k.NamedNodeMap||k.MozNamedAttrMap,HTMLFormElement:Uc,DOMParser:zc,trustedTypes:yt}=k,Ze=zs.prototype,Hc=Qe(Ze,"cloneNode"),jc=Qe(Ze,"remove"),Bc=Qe(Ze,"nextSibling"),Wc=Qe(Ze,"childNodes"),St=Qe(Ze,"parentNode");if(typeof Fe=="function"){const E=C.createElement("template");E.content&&E.content.ownerDocument&&(C=E.content.ownerDocument)}let J,Je="";const{implementation:ar,createNodeIterator:Vc,createDocumentFragment:Gc,getElementsByTagName:qc}=C,{importNode:Yc}=P;let ee=Ns();S.isSupported=typeof r=="function"&&typeof St=="function"&&ar&&ar.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:nr,ERB_EXPR:or,TMPLIT_EXPR:cr,DATA_ATTR:Qc,ARIA_ATTR:Kc,IS_SCRIPT_OR_DATA:Xc,ATTR_WHITESPACE:Hs,CUSTOM_ELEMENT:Zc}=Ds;let{IS_ALLOWED_URI:js}=Ds,H=null;const Bs=T({},[...As,...Jt,...er,...tr,...Is]);let W=null;const Ws=T({},[...Ms,...rr,...Os,...bt]);let L=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),et=null,ir=null,Vs=!0,lr=!0,Gs=!1,qs=!0,De=!1,ur=!0,$e=!1,fr=!1,dr=!1,Ne=!1,Et=!1,Rt=!1,Ys=!0,Qs=!1;const Jc="user-content-";let hr=!0,tt=!1,Ue={},ze=null;const Ks=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xs=null;const Zs=T({},["audio","video","img","source","image","track"]);let pr=null;const Js=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wt="http://www.w3.org/1998/Math/MathML",Tt="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let He=ye,mr=!1,gr=null;const ei=T({},[wt,Tt,ye],$);let kt=T({},["mi","mo","mn","ms","mtext"]),Pt=T({},["annotation-xml"]);const ti=T({},["title","style","font","a","script"]);let rt=null;const ri=["application/xhtml+xml","text/html"],si="text/html";let j=null,je=null;const ai=C.createElement("form"),ea=function(f){return f instanceof RegExp||f instanceof Function},vr=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(je&&je===f)){if((!f||typeof f!="object")&&(f={}),f=xe(f),rt=ri.indexOf(f.PARSER_MEDIA_TYPE)===-1?si:f.PARSER_MEDIA_TYPE,j=rt==="application/xhtml+xml"?$:q,H=se(f,"ALLOWED_TAGS")?T({},f.ALLOWED_TAGS,j):Bs,W=se(f,"ALLOWED_ATTR")?T({},f.ALLOWED_ATTR,j):Ws,gr=se(f,"ALLOWED_NAMESPACES")?T({},f.ALLOWED_NAMESPACES,$):ei,pr=se(f,"ADD_URI_SAFE_ATTR")?T(xe(Js),f.ADD_URI_SAFE_ATTR,j):Js,Xs=se(f,"ADD_DATA_URI_TAGS")?T(xe(Zs),f.ADD_DATA_URI_TAGS,j):Zs,ze=se(f,"FORBID_CONTENTS")?T({},f.FORBID_CONTENTS,j):Ks,et=se(f,"FORBID_TAGS")?T({},f.FORBID_TAGS,j):{},ir=se(f,"FORBID_ATTR")?T({},f.FORBID_ATTR,j):{},Ue=se(f,"USE_PROFILES")?f.USE_PROFILES:!1,Vs=f.ALLOW_ARIA_ATTR!==!1,lr=f.ALLOW_DATA_ATTR!==!1,Gs=f.ALLOW_UNKNOWN_PROTOCOLS||!1,qs=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=f.SAFE_FOR_TEMPLATES||!1,ur=f.SAFE_FOR_XML!==!1,$e=f.WHOLE_DOCUMENT||!1,Ne=f.RETURN_DOM||!1,Et=f.RETURN_DOM_FRAGMENT||!1,Rt=f.RETURN_TRUSTED_TYPE||!1,dr=f.FORCE_BODY||!1,Ys=f.SANITIZE_DOM!==!1,Qs=f.SANITIZE_NAMED_PROPS||!1,hr=f.KEEP_CONTENT!==!1,tt=f.IN_PLACE||!1,js=f.ALLOWED_URI_REGEXP||Ls,He=f.NAMESPACE||ye,kt=f.MATHML_TEXT_INTEGRATION_POINTS||kt,Pt=f.HTML_INTEGRATION_POINTS||Pt,L=f.CUSTOM_ELEMENT_HANDLING||{},f.CUSTOM_ELEMENT_HANDLING&&ea(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(L.tagNameCheck=f.CUSTOM_ELEMENT_HANDLING.tagNameCheck),f.CUSTOM_ELEMENT_HANDLING&&ea(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(L.attributeNameCheck=f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(L.allowCustomizedBuiltInElements=f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(lr=!1),Et&&(Ne=!0),Ue&&(H=T({},Is),W=[],Ue.html===!0&&(T(H,As),T(W,Ms)),Ue.svg===!0&&(T(H,Jt),T(W,rr),T(W,bt)),Ue.svgFilters===!0&&(T(H,er),T(W,rr),T(W,bt)),Ue.mathMl===!0&&(T(H,tr),T(W,Os),T(W,bt))),f.ADD_TAGS&&(H===Bs&&(H=xe(H)),T(H,f.ADD_TAGS,j)),f.ADD_ATTR&&(W===Ws&&(W=xe(W)),T(W,f.ADD_ATTR,j)),f.ADD_URI_SAFE_ATTR&&T(pr,f.ADD_URI_SAFE_ATTR,j),f.FORBID_CONTENTS&&(ze===Ks&&(ze=xe(ze)),T(ze,f.FORBID_CONTENTS,j)),hr&&(H["#text"]=!0),$e&&T(H,["html","head","body"]),H.table&&(T(H,["tbody"]),delete et.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ce('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ce('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=f.TRUSTED_TYPES_POLICY,Je=J.createHTML("")}else J===void 0&&(J=Fc(yt,Y)),J!==null&&typeof Je=="string"&&(Je=J.createHTML(""));c&&c(f),je=f}},ta=T({},[...Jt,...er,...kc]),ra=T({},[...tr,...Pc]),ni=function(f){let g=St(f);(!g||!g.tagName)&&(g={namespaceURI:He,tagName:"template"});const y=q(f.tagName),A=q(g.tagName);return gr[f.namespaceURI]?f.namespaceURI===Tt?g.namespaceURI===ye?y==="svg":g.namespaceURI===wt?y==="svg"&&(A==="annotation-xml"||kt[A]):!!ta[y]:f.namespaceURI===wt?g.namespaceURI===ye?y==="math":g.namespaceURI===Tt?y==="math"&&Pt[A]:!!ra[y]:f.namespaceURI===ye?g.namespaceURI===Tt&&!Pt[A]||g.namespaceURI===wt&&!kt[A]?!1:!ra[y]&&(ti[y]||!ta[y]):!!(rt==="application/xhtml+xml"&&gr[f.namespaceURI]):!1},ue=function(f){x(S.removed,{element:f});try{St(f).removeChild(f)}catch{jc(f)}},Ct=function(f,g){try{x(S.removed,{attribute:g.getAttributeNode(f),from:g})}catch{x(S.removed,{attribute:null,from:g})}if(g.removeAttribute(f),f==="is")if(Ne||Et)try{ue(g)}catch{}else try{g.setAttribute(f,"")}catch{}},sa=function(f){let g=null,y=null;if(dr)f="<remove></remove>"+f;else{const V=ve(f,/^[\r\n\t ]+/);y=V&&V[0]}rt==="application/xhtml+xml"&&He===ye&&(f='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+f+"</body></html>");const A=J?J.createHTML(f):f;if(He===ye)try{g=new zc().parseFromString(A,rt)}catch{}if(!g||!g.documentElement){g=ar.createDocument(He,"template",null);try{g.documentElement.innerHTML=mr?Je:A}catch{}}const Q=g.body||g.documentElement;return f&&y&&Q.insertBefore(C.createTextNode(y),Q.childNodes[0]||null),He===ye?qc.call(g,$e?"html":"body")[0]:$e?g.documentElement:Q},aa=function(f){return Vc.call(f.ownerDocument||f,f,Xe.SHOW_ELEMENT|Xe.SHOW_COMMENT|Xe.SHOW_TEXT|Xe.SHOW_PROCESSING_INSTRUCTION|Xe.SHOW_CDATA_SECTION,null)},br=function(f){return f instanceof Uc&&(typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||!(f.attributes instanceof Nc)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function")},na=function(f){return typeof sr=="function"&&f instanceof sr};function Se(E,f,g){m(E,y=>{y.call(S,f,g,je)})}const oa=function(f){let g=null;if(Se(ee.beforeSanitizeElements,f,null),br(f))return ue(f),!0;const y=j(f.nodeName);if(Se(ee.uponSanitizeElement,f,{tagName:y,allowedTags:H}),f.hasChildNodes()&&!na(f.firstElementChild)&&z(/<[/\w]/g,f.innerHTML)&&z(/<[/\w]/g,f.textContent)||f.nodeType===Ke.progressingInstruction||ur&&f.nodeType===Ke.comment&&z(/<[/\w]/g,f.data))return ue(f),!0;if(!H[y]||et[y]){if(!et[y]&&ia(y)&&(L.tagNameCheck instanceof RegExp&&z(L.tagNameCheck,y)||L.tagNameCheck instanceof Function&&L.tagNameCheck(y)))return!1;if(hr&&!ze[y]){const A=St(f)||f.parentNode,Q=Wc(f)||f.childNodes;if(Q&&A){const V=Q.length;for(let ae=V-1;ae>=0;--ae){const fe=Hc(Q[ae],!0);fe.__removalCount=(f.__removalCount||0)+1,A.insertBefore(fe,Bc(f))}}}return ue(f),!0}return f instanceof zs&&!ni(f)||(y==="noscript"||y==="noembed"||y==="noframes")&&z(/<\/no(script|embed|frames)/i,f.innerHTML)?(ue(f),!0):(De&&f.nodeType===Ke.text&&(g=f.textContent,m([nr,or,cr],A=>{g=oe(g,A," ")}),f.textContent!==g&&(x(S.removed,{element:f.cloneNode()}),f.textContent=g)),Se(ee.afterSanitizeElements,f,null),!1)},ca=function(f,g,y){if(Ys&&(g==="id"||g==="name")&&(y in C||y in ai))return!1;if(!(lr&&!ir[g]&&z(Qc,g))){if(!(Vs&&z(Kc,g))){if(!W[g]||ir[g]){if(!(ia(f)&&(L.tagNameCheck instanceof RegExp&&z(L.tagNameCheck,f)||L.tagNameCheck instanceof Function&&L.tagNameCheck(f))&&(L.attributeNameCheck instanceof RegExp&&z(L.attributeNameCheck,g)||L.attributeNameCheck instanceof Function&&L.attributeNameCheck(g))||g==="is"&&L.allowCustomizedBuiltInElements&&(L.tagNameCheck instanceof RegExp&&z(L.tagNameCheck,y)||L.tagNameCheck instanceof Function&&L.tagNameCheck(y))))return!1}else if(!pr[g]){if(!z(js,oe(y,Hs,""))){if(!((g==="src"||g==="xlink:href"||g==="href")&&f!=="script"&&Pe(y,"data:")===0&&Xs[f])){if(!(Gs&&!z(Xc,oe(y,Hs,"")))){if(y)return!1}}}}}}return!0},ia=function(f){return f!=="annotation-xml"&&ve(f,Zc)},la=function(f){Se(ee.beforeSanitizeAttributes,f,null);const{attributes:g}=f;if(!g||br(f))return;const y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let A=g.length;for(;A--;){const Q=g[A],{name:V,namespaceURI:ae,value:fe}=Q,st=j(V);let te=V==="value"?fe:U(fe);if(y.attrName=st,y.attrValue=te,y.keepAttr=!0,y.forceKeepAttr=void 0,Se(ee.uponSanitizeAttribute,f,y),te=y.attrValue,Qs&&(st==="id"||st==="name")&&(Ct(V,f),te=Jc+te),ur&&z(/((--!?|])>)|<\/(style|title)/i,te)){Ct(V,f);continue}if(y.forceKeepAttr||(Ct(V,f),!y.keepAttr))continue;if(!qs&&z(/\/>/i,te)){Ct(V,f);continue}De&&m([nr,or,cr],fa=>{te=oe(te,fa," ")});const ua=j(f.nodeName);if(ca(ua,st,te)){if(J&&typeof yt=="object"&&typeof yt.getAttributeType=="function"&&!ae)switch(yt.getAttributeType(ua,st)){case"TrustedHTML":{te=J.createHTML(te);break}case"TrustedScriptURL":{te=J.createScriptURL(te);break}}try{ae?f.setAttributeNS(ae,V,te):f.setAttribute(V,te),br(f)?ue(f):v(S.removed)}catch{}}}Se(ee.afterSanitizeAttributes,f,null)},oi=function E(f){let g=null;const y=aa(f);for(Se(ee.beforeSanitizeShadowDOM,f,null);g=y.nextNode();)Se(ee.uponSanitizeShadowNode,g,null),oa(g),la(g),g.content instanceof be&&E(g.content);Se(ee.afterSanitizeShadowDOM,f,null)};return S.sanitize=function(E){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,y=null,A=null,Q=null;if(mr=!E,mr&&(E="<!-->"),typeof E!="string"&&!na(E))if(typeof E.toString=="function"){if(E=E.toString(),typeof E!="string")throw Ce("dirty is not a string, aborting")}else throw Ce("toString is not a function");if(!S.isSupported)return E;if(fr||vr(f),S.removed=[],typeof E=="string"&&(tt=!1),tt){if(E.nodeName){const fe=j(E.nodeName);if(!H[fe]||et[fe])throw Ce("root node is forbidden and cannot be sanitized in-place")}}else if(E instanceof sr)g=sa("<!---->"),y=g.ownerDocument.importNode(E,!0),y.nodeType===Ke.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?g=y:g.appendChild(y);else{if(!Ne&&!De&&!$e&&E.indexOf("<")===-1)return J&&Rt?J.createHTML(E):E;if(g=sa(E),!g)return Ne?null:Rt?Je:""}g&&dr&&ue(g.firstChild);const V=aa(tt?E:g);for(;A=V.nextNode();)oa(A),la(A),A.content instanceof be&&oi(A.content);if(tt)return E;if(Ne){if(Et)for(Q=Gc.call(g.ownerDocument);g.firstChild;)Q.appendChild(g.firstChild);else Q=g;return(W.shadowroot||W.shadowrootmode)&&(Q=Yc.call(P,Q,!0)),Q}let ae=$e?g.outerHTML:g.innerHTML;return $e&&H["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&z(Fs,g.ownerDocument.doctype.name)&&(ae="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
|
|
20
|
+
`+ae),De&&m([nr,or,cr],fe=>{ae=oe(ae,fe," ")}),J&&Rt?J.createHTML(ae):ae},S.setConfig=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vr(E),fr=!0},S.clearConfig=function(){je=null,fr=!1},S.isValidAttribute=function(E,f,g){je||vr({});const y=j(E),A=j(f);return ca(y,A,g)},S.addHook=function(E,f){typeof f=="function"&&x(ee[E],f)},S.removeHook=function(E,f){if(f!==void 0){const g=b(ee[E],f);return g===-1?void 0:N(ee[E],g,1)[0]}return v(ee[E])},S.removeHooks=function(E){ee[E]=[]},S.removeAllHooks=function(){ee=Ns()},S}var Dc=Us();return Dc})})(fs);const Zn=fs.exports,Qt=(e,...t)=>{let r=e[0];for(let s=0;s<t.length;s++)r+=Zn.sanitize(t[s]?String(t[s]):"")+e[s+1];return r||""},Jn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let X=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Jn[r[e]&63];return t};const eo=D(class extends F{constructor(){super();h(this,"adSource","Custom");h(this,"adClientResponseItem");h(this,"adContainerId",X());h(this,"searchTerm");h(this,"isSearchInProgress",!1);h(this,"core");h(this,"intersectionObserver");h(this,"storeUnsubscribe");h(this,"adContainerRenderedTimeout");h(this,"isComponentConnected",!0);this.__registerHost()}get hostElement(){return this}connectedCallback(){const r=_.getState();this.core=r.core,this.searchTerm=r.searchTerm,this.isSearchInProgress=r.isSearchInProgress,this.storeUnsubscribe=_.subscribe(s=>{this.searchTerm=s.searchTerm,this.isSearchInProgress=s.isSearchInProgress})}componentDidLoad(){this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{var s;r!=null&&r.isIntersecting&&!this.isSearchInProgress&&((s=this.core)==null||s.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""}))},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var r,s;(r=this.storeUnsubscribe)==null||r.call(this),(s=this.intersectionObserver)==null||s.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){const r=this.adClientResponseItem;if(r.admAd)return d("a",{class:"searchcraft-adm-ad",href:r.admAd.click_url},r.admAd.image_url&&d("div",{class:"searchcraft-adm-ad-image-wrapper"},d("img",{alt:r.admAd.term||"image",src:r.admAd.image_url,class:"searchcraft-adm-ad-image"})),d("div",{class:"searchcraft-adm-ad-info-wrapper"},d("p",{class:"searchcraft-adm-ad-title"},r.admAd.term),r.admAd.price&&d("p",{class:"searchcraft-adm-ad-subtitle"},r.admAd.price)))}renderCustomAd(){var o,n;const r=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdTemplate,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return r&&(a=r({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:Qt})),d("div",{class:"searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s;const r=((s=this.core)==null?void 0:s.config.nativoAdClassName)||"ntv-item";return d("div",{class:r})}render(){var r,s;if(!this.isSearchInProgress)switch(this.isComponentConnected&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var a;(a=this.core)==null||a.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""})},((s=(r=this.core)==null?void 0:r.config)==null?void 0:s.adContainerRenderedDebounceDelay)||500)),this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[0,"searchcraft-ad",{adSource:[1,"ad-source"],adClientResponseItem:[16],adContainerId:[1,"ad-container-id"],searchTerm:[32],isSearchInProgress:[32]}]);function mt(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,eo);break}})}const to=mt;var ds={exports:{}};/*!
|
|
31
21
|
Copyright (c) 2018 Jed Watson.
|
|
32
22
|
Licensed under the MIT License (MIT), see
|
|
33
23
|
http://jedwatson.github.io/classnames
|
|
34
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",s=0;s<arguments.length;s++){var c=arguments[s];c&&(o=n(o,a(c)))}return o}function a(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var c in o)t.call(o,c)&&o[c]&&(s=n(s,c));return s}function n(o,s){return s?o?o+" "+s:o+s:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ma);const L=Ma.exports,Wo=U(class extends N{constructor(){super();h(this,"hierarchy","primary");h(this,"disabled",!1);h(this,"icon");h(this,"iconOnly",!1);h(this,"iconPosition","left");h(this,"label","Search");h(this,"type","button");h(this,"buttonClick");h(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=xe(this,"buttonClick")}render(){return f("button",{key:"ff883b930d03da6cbfb40badd3be1de0a873f853","aria-label":this.label,class:L("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:f(Zt,null,this.iconPosition==="left"&&this.icon,f("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[0,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function $t(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,Wo);break}})}const Vo=$t,Go=xt;function La(e,t){const r={...e};for(const a in t)t.hasOwnProperty(a)&&(t[a]instanceof Object&&e[a]instanceof Object?r[a]=La(e[a],t[a]):r[a]=t[a]);return r}function qo(e){return e.filter((t,r,a)=>!a.some((n,o)=>o!==r&&n.includes(t)))}function Oa(e){const t={},r=a=>{var n;t[a.path]={count:a.count,path:a.path},(n=a.children)==null||n.forEach(o=>{r(o)})};return r(e),t}function Yo(e){const t={count:0,path:"/",children:{}};return Object.keys(e).forEach(r=>{const a=e[r];if(!a||a.path==="/")return;const n=a.path.substring(1).split("/");let o=t,s="";n.forEach((c,u)=>{const l=`${s}/${c}`;o.children[l]||(o.children[l]={count:0,path:l,children:{}}),u===n.length-1&&(o.children[l].count=a.count),s=l,o=o.children[l]})}),t}function Fa(e){const t={count:e.count,path:e.path,children:[]};return Object.keys(e.children).length>0&&(t.children=Object.values(e.children).map(r=>Fa(r))),t}function Qo(e,t){const r=Object.keys(e),a=Object.keys(t),n=new Set(a.filter(s=>s.split("/").length>2).map(s=>s.substring(0,s.lastIndexOf("/"))));return Object.fromEntries(r.filter(s=>!n.has(s.substring(0,s.lastIndexOf("/")))).map(s=>[s,e[s]]))}function Ko(e,t,r){const a=t[e],n=r[e],o={count:0,path:"/",children:a},s={count:0,path:"/",children:n},c=Oa(o),u=Oa(s),l=Qo(c,u),i=La(l,u),p=Yo(i),m=Fa(p);return{[e]:m.children}}const Xo=U(class extends N{constructor(){super();h(this,"fieldName","");h(this,"facetSelectionUpdated");h(this,"baseFacetRoot");h(this,"facetRoot");h(this,"selectedPaths",{});h(this,"lastTimeTaken");h(this,"hasNewSearchTerm",!1);h(this,"lastSearchTerm");h(this,"lastSearchMode");h(this,"lastSortType");h(this,"unsubscribe");h(this,"searchStore",A.getState());h(this,"formatLabel",r=>{const a=r.path.replace(/^\//,""),n=r.count;return`${a.replace(/-/g," ").replace(/\b\w/g,o=>o.toUpperCase())} (${n})`});h(this,"formatSubLabel",(r,a)=>{const o=r.path.substring(a.path.length).replace(/^\//,""),s=r.count;return`${o.replace(/-/g," ").replace(/\b\w/g,c=>c.toUpperCase())} (${s})`});this.__registerHost(),this.facetSelectionUpdated=xe(this,"facetSelectionUpdated")}handleStateUpdate(r){const a=r.searchResponseFacetPrime,n=r.searchResponseTimeTaken;if(this.fieldName){if((r.searchTerm!==this.lastSearchTerm||r.searchMode!==this.lastSearchMode||r.sortType!==this.lastSortType)&&(this.selectedPaths={},this.hasNewSearchTerm=!0),n!==this.lastTimeTaken&&a){this.facetRoot=void 0;const o=a.find(s=>this.fieldName===Object.keys(s)[0]);this.hasNewSearchTerm?(this.baseFacetRoot=o,this.facetRoot=o,this.hasNewSearchTerm=!1):this.baseFacetRoot&&o&&(this.facetRoot=Ko(this.fieldName,this.baseFacetRoot,o))}this.lastSearchTerm=r.searchTerm,this.lastSearchMode=r.searchMode,this.lastSortType=r.sortType,this.lastTimeTaken=n}}connectedCallback(){this.handleStateUpdate(this.searchStore),this.unsubscribe=A.subscribe(r=>{this.handleStateUpdate(r)})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleCheckboxChange(r){var s;if(!this.selectedPaths[r])this.selectedPaths={...this.selectedPaths,[r]:!0};else{const c=Object.keys(this.selectedPaths).filter(u=>!u.includes(r));this.selectedPaths=c.reduce((u,l)=>(u[l]=!0,u),{})}const n=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),o=qo(n);(s=this.facetSelectionUpdated)==null||s.emit({paths:o})}render(){var a;if(!this.fieldName)return;const r=(a=this.facetRoot)==null?void 0:a[this.fieldName];return f("div",{class:L("filtersListContainer","searchcraft-filters-list-container")},!r&&f("p",{class:"searchcraft-facet-message"},"Enter a search to view facets."),r==null?void 0:r.map(n=>{var s;const o=n.children?(s=n.children)==null?void 0:s.some(c=>this.selectedPaths[c.path]):!1;return f("div",{key:n.path,class:L("searchcraft-filters-list-item")},f("label",{class:L("filterCheckboxLabel","searchcraft-filters-list-checkbox-label")},f("input",{checked:this.selectedPaths[n.path],onChange:c=>this.handleCheckboxChange(n.path),type:"checkbox"}),o?f("div",{class:L("dashContainer","searchcraft-filter-list-dash-container")},f("svg",{width:"14",height:"3",viewBox:"0 0 14 3",fill:"none"},f("title",null,"Checkbox Dash"),f("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):f("div",{class:L("checkContainer","searchcraft-filter-list-check-container")},f("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},f("title",null,"Checkbox Check"),f("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}))),this.formatLabel(n)),n.children&&n.children.length>0&&f(Zt,null,n.children.map(c=>f("label",{key:c.path,class:L("childFilterCheckboxLabel","searchcraft-child-filter-checkbox-label"),style:{display:this.selectedPaths[n.path]?"flex":"none"}},f("input",{checked:this.selectedPaths[c.path],onChange:u=>{this.handleCheckboxChange(c.path)},type:"checkbox"}),f("div",{class:L("checkContainer","searchcraft-filter-list-check-container")},f("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},f("title",null,"Checkbox Check"),f("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}))),this.formatSubLabel(c,n)))))}))}},[0,"searchcraft-facet-list",{fieldName:[1,"field-name"],baseFacetRoot:[32],facetRoot:[32],selectedPaths:[32],lastTimeTaken:[32],hasNewSearchTerm:[32],lastSearchTerm:[32],lastSearchMode:[32],lastSortType:[32],unsubscribe:[32]}]);function Da(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,Xo);break}})}const Jo=Da,Zo=U(class extends N{constructor(){super();h(this,"max",100);h(this,"min",0);h(this,"granularity",Aa("month"));h(this,"dataType","number");h(this,"endValue",this.max);h(this,"startValue",this.min);h(this,"lastFocusedHandle","max");h(this,"rangeChanged");h(this,"emitUpdate",async()=>{var r;(r=this.rangeChanged)==null||r.emit({startValue:this.startValue,endValue:this.endValue})});h(this,"handleStartValueChange",r=>{const a=r.target,n=Number.parseInt(a.value,10);this.lastFocusedHandle="min",n<=this.endValue?(this.startValue=n,this.emitUpdate()):(this.startValue=this.endValue,a.value=`${this.endValue}`)});h(this,"handleEndValueChange",r=>{const a=r.target,n=Number.parseInt(a.value,10);this.lastFocusedHandle="max",n>=this.startValue?(this.endValue=n,this.emitUpdate()):(this.endValue=this.startValue,a.value=`${this.startValue}`)});this.__registerHost(),this.rangeChanged=xe(this,"rangeChanged")}componentDidLoad(){this.startValue=this.min,this.endValue=this.max}render(){const r=this.min,a=this.max,n=(this.startValue-r)/(a-r)*100,o=(this.endValue-r)/(a-r)*100,s=this.dataType==="number"?this.startValue:new Date(this.startValue).getFullYear(),c=this.dataType==="number"?this.endValue:new Date(this.endValue).getFullYear();return f("div",{key:"ec4a36e1ce6534b7c077114086d759e0b1e7a24e",class:"searchcraft-slider-container"},f("div",{key:"35487cbeaeeb23052631804704645ca929340f70",class:"searchcraft-slider-range-container"},f("div",{key:"186e699def8e7a6e58e8ad5f04953ac1c6584344",class:"searchcraft-slider-active-range",style:{left:`${n}%`,width:`${o-n}%`}}),f("input",{key:"97638e2a1471888c2be47f7526e9dd98fea58683",class:L("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.max,min:this.min,onInput:this.handleStartValueChange.bind(this),step:this.granularity,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),f("input",{key:"db2abded80b606d17bde1677e4acc09a85e6e20e",class:L("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.max,min:this.min,onInput:this.handleEndValueChange.bind(this),step:this.granularity,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),f("div",{key:"83954b6955a872a17377d506d2d8458059acac03",class:"searchcraft-slider-label-container"},f("span",{key:"b5315b4438385ecf5df3f76579fdf102b6a8c39c",class:"searchcraft-slider-label"},s),f("span",{key:"875094ac7ee69e04c3a16407388dd27f167b3c8f",class:"searchcraft-slider-label"},c)))}},[0,"searchcraft-slider",{max:[2],min:[2],granularity:[2],dataType:[1,"data-type"],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function Na(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,Zo);break}})}const ei=U(class extends N{constructor(){super();h(this,"label","Toggle");h(this,"subLabel");h(this,"toggleUpdated");h(this,"isActive",!1);h(this,"unsubscribe");h(this,"lastSearchTerm");h(this,"handleToggle",async()=>{var r;this.isActive=!this.isActive,(r=this.toggleUpdated)==null||r.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=xe(this,"toggleUpdated")}connectedCallback(){this.unsubscribe=A.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return f("div",{key:"25f3acd2b5dd6837182c8f07c092c54c35542c2f",class:"searchcraft-toggle-button-container"},f("div",{key:"d2951f2673af55159ad6f39d381d272a3f9f872b"},f("p",{key:"2468e261d46b454ce896b614ca2a076d27a31a8b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&f("p",{key:"1d9887dc12f30fb1982cf0d8a692ebfeca8edc1a",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),f("button",{key:"f51bb553d6b210233aa6ebfc4318aa521036d922",class:L("searchcraft-toggle-button-background",{active:this.isActive}),onClick:this.handleToggle,type:"button"},f("div",{key:"a34339f1bb5ab4742d897b01b61fe6c8c23e7e1e",class:L("searchcraft-toggle-button-handle",{active:this.isActive})})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],isActive:[32],unsubscribe:[32],lastSearchTerm:[32]}]);function Ua(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,ei);break}})}const ti=U(class extends N{constructor(){super();h(this,"items",[]);h(this,"unsubscribe");h(this,"lastSearchTerm");h(this,"searchStore",A.getState());this.__registerHost()}componentDidLoad(){this.unsubscribe=A.subscribe(r=>{this.lastSearchTerm=r.searchTerm||""})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleDateRangeChanged(r,a,n){const o=new Date(new Date(a).getFullYear(),0,1),s=new Date(new Date(n).getFullYear()+1,0,0);this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${o.toISOString()} TO ${s.toISOString()}]`}),this.searchStore.search()}handleNumericRangeChanged(r,a,n){this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${a} TO ${n}]`}),this.searchStore.search()}handleFacetSelectionUpdated(r,a){a.length>0?this.searchStore.addFacetPathsForIndexField({fieldName:r,value:`${r}: IN [${a.join(" ")}]`}):this.searchStore.removeFacetPathsForIndexField(r),this.searchStore.search()}handleExactMatchToggleUpdated(r){this.searchStore.setSearchMode(r?"exact":"fuzzy"),this.searchStore.search()}handleMostRecentToggleUpdated(r){this.searchStore.setSortType(r?"desc":"asc"),this.searchStore.search()}render(){return f("div",{key:"73ca2e0efab911c5095c23ba33e85a26cc440b4a",class:"searchcraft-filter-panel"},this.items.map(r=>{switch(r.type){case"dateRange":{const a=r,n=new Date(a.options.minDate).getTime(),o=new Date(a.options.maxDate).getTime(),s=Aa(a.options.granularity);return f("div",{class:"searchcraft-filter-panel-section"},f("p",{class:"searchcraft-filter-panel-label"},r.label),f("searchcraft-slider",{min:n,max:o,granularity:s,dataType:"date",onRangeChanged:c=>{this.handleDateRangeChanged(a.fieldName,c.detail.startValue,c.detail.endValue)}}))}case"numericRange":{const a=r;return f("div",{class:"searchcraft-filter-panel-section"},f("p",{class:"searchcraft-filter-panel-label"},r.label),f("searchcraft-slider",{min:a.options.min,max:a.options.max,granularity:a.options.granularity,onRangeChanged:n=>{this.handleNumericRangeChanged(a.fieldName,n.detail.startValue,n.detail.endValue)}}))}case"facets":{const a=r;return f("div",{class:"searchcraft-filter-panel-section"},f("p",{class:"searchcraft-filter-panel-label"},r.label),f("searchcraft-facet-list",{fieldName:a.fieldName,onFacetSelectionUpdated:n=>{this.handleFacetSelectionUpdated(a.fieldName,n.detail.paths)}}))}case"exactMatchToggle":{const a=r;return f("searchcraft-toggle-button",{label:a.label,subLabel:a.options.subLabel,onToggleUpdated:n=>{this.handleExactMatchToggleUpdated(n.detail)}})}case"mostRecentToggle":{const a=r;return f("searchcraft-toggle-button",{label:a.label,subLabel:a.options.subLabel,onToggleUpdated:n=>{this.handleMostRecentToggleUpdated(n.detail)}})}}}))}},[0,"searchcraft-filter-panel",{items:[16],unsubscribe:[32],lastSearchTerm:[32]}]);function ri(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-filter-panel":customElements.get(t)||customElements.define(t,ti);break;case"searchcraft-facet-list":customElements.get(t)||Da();break;case"searchcraft-slider":customElements.get(t)||Na();break;case"searchcraft-toggle-button":customElements.get(t)||Ua();break}})}const ai=ri,si=U(class extends N{constructor(){super();h(this,"inputLabelClassName","");h(this,"label","");this.__registerHost()}render(){return f("label",{key:"528396d4be9f22ff0c02d95d8bcea056576aed41",class:L("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function ur(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,si);break}})}const ni=U(class extends N{constructor(){super();h(this,"autoSearch",!0);h(this,"buttonPlacement","none");h(this,"buttonLabel");h(this,"inputLabel");h(this,"customStyles",{});h(this,"placeholderValue","Enter Search");h(this,"inputFocus");h(this,"inputBlur");h(this,"inputInit");h(this,"inputValue","");h(this,"searchTerm","");h(this,"error",!1);h(this,"core");h(this,"searchStore",A.getState());h(this,"handleOnInput",r=>{const a=r.target;this.inputValue=a.value,this.autoSearch&&this.performSearch(a.value)});h(this,"performSearch",async r=>{if(r!==A.getState().searchTerm){this.searchTerm=r.trim(),this.error=!1,this.searchStore.setSearchTerm(this.searchTerm);try{await this.searchStore.search()}catch(a){console.log(a),this.error=!0}}});h(this,"handleClearInput",()=>{this.inputValue="",this.searchTerm="",this.searchStore.setSearchTerm(""),this.searchStore.setSearchClientResponseItems([]),this.error=!1});h(this,"handleFormSubmit",async r=>{r.preventDefault(),await this.performSearch(this.searchTerm)});this.__registerHost(),this.inputFocus=xe(this,"inputFocus"),this.inputBlur=xe(this,"inputBlur"),this.inputInit=xe(this,"inputInit")}init(){var r;this.core&&(this.searchStore.initialize(this.core),(r=this.inputInit)==null||r.emit())}connectedCallback(){this.init()}onCoreChange(){this.init()}render(){const r=at(this.customStyles),a=this.inputValue.length>0,n=L("searchcraft-input-grid",{"searchcraft-input-grid-buttonLeft":this.buttonPlacement==="left","searchcraft-input-grid-buttonRight":this.buttonPlacement==="right","searchcraft-input-grid-buttonNone":this.buttonPlacement==="none"}),s={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return f("form",{key:"f08b30d8688e110230c99dbdc0b08aaa259680d1",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},f("div",{key:"32e8cbea58acd0d1e8b14a3ca7363f648df052f1",class:n,style:s},f("div",{key:"769484880d0228a5b865fad2c83e6537ae55686a",class:"searchcraft-input-button-wrapper"},f("searchcraft-button",{key:"75902602813c266d77c038d106f5a033ff64c477",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&f("div",{key:"356356b1eac93b52f8622c9c2f414fe76b70e0fe",class:"searchcraft-input-label-wrapper"},f("searchcraft-input-label",{key:"4c5a680712b8d26a6326dde48223317b690e7a30",label:this.inputLabel})),this.error&&f("div",{key:"e2275fe0907d60e13ac3cb6b2a23e0872c475eb3",class:"searchcraft-input-error-wrapper"},f("searchcraft-error-message",{key:"26e7ffbe8fe43f3f5340176e68cf7763d71c4eab",errorMessage:"Something went wrong."})),f("div",{key:"cfc0d53d4ec644fd453fe39b3091986d9abf2b49",class:"searchcraft-input-wrapper"},f("input",{key:"44dcf30e32dcf4de2aeb5c64d445db468fde605b",autoComplete:"off",class:"searchcraft-input",onFocus:()=>{var c;return(c=this.inputFocus)==null?void 0:c.emit()},onBlur:()=>{var c;return(c=this.inputBlur)==null?void 0:c.emit()},onInput:c=>{this.handleOnInput(c)},placeholder:this.placeholderValue,style:r,type:"text",value:this.inputValue}),f("div",{key:"a510ee45c5c1fcd8991220dcaed42bdbcef39b49",class:"searchcraft-input-search-icon-wrapper"},f("svg",{key:"5dc9bc129a7f550f400aa23b09b38df7aa412821",class:"searchcraft-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},f("title",{key:"af9c2cb95db7d1f182d4312bccefa97ac95e06aa",id:"searchcraft-title"},"Searchcraft Search Icon Light"),f("path",{key:"c2e8b250f1113670cb2435664a57725563d34efd",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),a&&f("button",{key:"0630c1533ab1c9654e9e984a1194759dec2ab535",type:"button",class:"searchcraft-input-clear-button",onClick:this.handleClearInput},f("svg",{key:"052abaa409746a98ee94e09e87e5345c05687dba",class:"searchcraft-input-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},f("title",{key:"795d7435b5cac2069063a6e6bf40868ddba76516",id:"icon-title"},"Searchcraft Clear Input Icon Light"),f("path",{key:"29be529ce60d62136bde73baa2600f3664479c7f",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"]}}},[0,"searchcraft-input-form",{autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],customStyles:[1,"custom-styles"],placeholderValue:[1,"placeholder-value"],core:[16],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function za(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-form":customElements.get(t)||customElements.define(t,ni);break;case"searchcraft-button":customElements.get(t)||$t();break;case"searchcraft-error-message":customElements.get(t)||xt();break;case"searchcraft-input-label":customElements.get(t)||ur();break}})}const oi=za,ii=ur,ci=U(class extends N{constructor(){super();h(this,"customStyles");h(this,"searchTerm");h(this,"searchResultsPerPage");h(this,"searchResultsPage");h(this,"searchResultsCount");h(this,"searchResultsPagesCount",1);h(this,"searchResultsRangeMin",1);h(this,"searchResultsRangeMax",1);h(this,"setSearchResultsPage",()=>{});h(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=A.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=r.setSearchResultsPage})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleGoToPage(r){this.setSearchResultsPage(r)}renderOddPaginationItem(r){return f("li",null,f("button",{class:L("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r))}renderEvenPaginationItem(r){if(!(this.searchResultsPagesCount<=r))return(this.searchResultsPagesCount<=5||r<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=r+1:this.searchResultsPage>=r-1)?f("li",null,f("button",{class:L("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r)):f("li",null,f("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?f("li",null,f("button",{class:L("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):f("li",null,f("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return f("div",{class:L("searchcraft-pagination",at(this.customStyles||{}))},f("div",{class:"searchcraft-pagination-control"},f("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:f("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("title",null,"Previous page icon"),f("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),f("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),f("div",{class:"searchcraft-pagination-control"},f("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:f("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("title",null,"Next page icon"),f("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[0,"searchcraft-pagination",{customStyles:[1,"custom-styles"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function li(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,ci);break;case"searchcraft-button":customElements.get(t)||$t();break}})}const ui=li,hi=U(class extends N{constructor(){super(),this.__registerHost()}handleOnClick(){A.getState().setPopoverVisibility(!0)}render(){return f("button",{key:"a8ee70b49a5309cfb1363a272ea0870c48c59688",type:"button",onClick:this.handleOnClick.bind(this)},f("slot",{key:"9ac712ed1f6e69d73e7ade3d42501fb67a02c7ff"}))}},[4,"searchcraft-popover-button"]);function di(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,hi);break}})}const fi=di,pi=U(class extends N{constructor(){super();h(this,"item");h(this,"popoverResultMappings");h(this,"documentPosition",0);h(this,"href");h(this,"imageSrc");h(this,"imageAlt");h(this,"titleContent");h(this,"subtitleContent");h(this,"handleLinkClick",()=>{var n;const r=A.getState(),a=r.getSearchcraftInstance();if(a){const o=this.documentPosition,s=r.searchTerm,c=r.searchClientResponseItems.length||0;(n=a.measureClient)==null||n.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:c,search_term:s})}});this.__registerHost()}mapValuesFromDocument(r){var a,n,o,s,c;this.titleContent=fe(r,(a=this.popoverResultMappings)==null?void 0:a.title),this.subtitleContent=fe(r,(n=this.popoverResultMappings)==null?void 0:n.subtitle),this.href=fe(r,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSrc=fe(r,(s=this.popoverResultMappings)==null?void 0:s.imageSource),this.imageAlt=fe(r,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}disconnectedCallback(){}render(){return f("a",{key:"870fae8c0019ea24d9ecd173a781a38e3b17f8de",class:"searchcraft-popover-list-item",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSrc&&f("div",{key:"9e200a2be177fed7f6303fdc1ba466fc47817b5d",class:"searchcraft-popover-list-item-image-wrapper"},f("img",{key:"22124b2856cd41220ac852a1fbc94cbf2a1cd9f9",alt:this.imageAlt,src:this.imageSrc,class:"searchcraft-popover-list-item-image"})),f("div",{key:"b3f0bb6784a36befd044e71798915994093177ab",class:"searchcraft-popover-list-item-info-wrapper"},f("p",{key:"caa22a8d68b56814ee29498db48fe1c65d8d7644",class:"searchcraft-popover-list-item-title"},this.titleContent),f("p",{key:"63e11be221d6f274855f7989b3a9dc4532c08e05",class:"searchcraft-popover-list-item-subtitle"},this.subtitleContent)))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],href:[32],imageSrc:[32],imageAlt:[32],titleContent:[32],subtitleContent:[32]}]);function hr(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,pi);break}})}const mi=U(class extends N{constructor(){super();h(this,"popoverResultMappings");h(this,"searchClientResponseItems");h(this,"adClientResponseItems");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"config",(Qa=A.getState().core)==null?void 0:Qa.config);this.__registerHost()}renderWithADMAds(){var r,a;return f("div",{class:"searchcraft-popover-list-view"},(r=this.adClientResponseItems)==null?void 0:r.map(n=>f("searchcraft-ad",{adClientResponseItem:n,adContainerId:te(),adSource:"adMarketplace",key:n.id})),(a=this.searchClientResponseItems)==null?void 0:a.map((n,o)=>f("searchcraft-popover-list-item",{item:n,key:n.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var u,l,i,p;const r=[],a=((u=this.config)==null?void 0:u.customAdInterstitialInterval)||0,n=((l=this.config)==null?void 0:l.customAdInterstitialQuantity)||1,o=((i=this.config)==null?void 0:i.customAdStartQuantity)||0,s=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let m=0;m<o;m++)r.push(f("searchcraft-ad",{adSource:"Custom",adContainerId:te(),key:`${m}-ad`}));c.forEach((m,b)=>{if(a&&b%a===0&&b+a<c.length&&b>=a)for(let v=0;v<n;v++)r.push(f("searchcraft-ad",{adSource:"Custom",adContainerId:te(),key:`${m.id}-ad-${v}`}));r.push(f("searchcraft-popover-list-item",{item:m,key:m.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+b}))});for(let m=0;m<s;m++)r.push(f("searchcraft-ad",{adSource:"Custom",adContainerId:te(),key:`${m}-ad`}));return f("div",{class:"searchcraft-popover-list-view"},r)}renderWithNativoAds(){var l,i,p,m,b;const r=[],a=((l=this.config)==null?void 0:l.nativoAdInterstialStartIndex)||0,n=((i=this.config)==null?void 0:i.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,s=((m=this.config)==null?void 0:m.nativoAdStartQuantity)||0,c=((b=this.config)==null?void 0:b.nativoAdEndQuantity)||0,u=this.searchClientResponseItems||[];for(let v=0;v<s;v++)r.push(f("searchcraft-ad",{adSource:"Nativo",adContainerId:te(),key:`${v}-ad`}));u.forEach((v,$)=>{if(n&&($+a)%n===0&&$+n<u.length&&$>=n)for(let z=0;z<o;z++)r.push(f("searchcraft-ad",{adSource:"Nativo",adContainerId:te(),key:`${v.id}-ad-${z}`}));r.push(f("searchcraft-popover-list-item",{item:v,key:v.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+$}))});for(let v=0;v<c;v++)r.push(f("searchcraft-ad",{adSource:"Nativo",adContainerId:te(),key:`${v}-ad`}));return f("div",{class:"searchcraft-popover-list-view"},r)}renderWithNoAds(){var r;return f("div",{class:"searchcraft-popover-list-view"},(r=this.searchClientResponseItems)==null?void 0:r.map((a,n)=>f("searchcraft-popover-list-item",{item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+n})))}render(){var r;switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[0,"searchcraft-popover-list-view",{popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function Ha(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-view":customElements.get(t)||customElements.define(t,mi);break;case"searchcraft-ad":customElements.get(t)||kt();break;case"searchcraft-popover-list-item":customElements.get(t)||hr();break}})}const gi=U(class extends N{constructor(){super();h(this,"type","inline");h(this,"popoverResultMappings");h(this,"hotkey","k");h(this,"hotkeyModifier","meta");h(this,"isPopoverVisibleInState",!1);h(this,"unsubscribe");h(this,"searchClientResponseItems",[]);h(this,"adClientResponseItems",[]);h(this,"searchTerm");h(this,"isFocused",!1);h(this,"breakpointSm",576);h(this,"breakpointMd",768);h(this,"breakpointLg",992);h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"modalElement");h(this,"handleDocumentClick",r=>{this.hostElement.contains(r.target)||(this.isFocused=!1)});h(this,"handleDocumentKeyDown",r=>{if(r.key===this.hotkey&&this.handleHotkeyPressed(r),!!this.hostElement.contains(document.activeElement))switch(r.key){case"ArrowDown":case"ArrowUp":r.preventDefault(),this.focusOnNextListItem(r.key);break;case"Escape":A.getState().setPopoverVisibility(!1);break;default:return}});h(this,"handleInputInit",()=>{const r=this.hostElement.querySelector(".searchcraft-input");r==null||r.focus()});this.__registerHost()}get hostElement(){return this}componentDidLoad(){const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=A.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=A.subscribe(a=>{this.isPopoverVisibleInState!==a.isPopoverVisible&&this.handlePopoverVisibilityChange(a.isPopoverVisible),this.searchClientResponseItems=[...a.searchClientResponseItems],this.adClientResponseItems=[...a.adClientResponseItems],this.searchTerm=a.searchTerm,this.searchResultsPage=a.searchResultsPage,this.searchResultsPerPage=a.searchResultsPerPage})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(r){this.isPopoverVisibleInState=r,document.body.style.overflow=r?"hidden":"auto"}handleInputFocus(){this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&(A.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(r){A.getState().setPopoverVisibility(!1)}handleHotkeyPressed(r){if(r.ctrlKey&&this.hotkeyModifier==="ctrl"||r.altKey&&this.hotkeyModifier==="alt"||r.metaKey&&this.hotkeyModifier==="meta")if(r.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const a=this.hostElement.querySelector(".searchcraft-input");a==null||a.focus()}else A.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){A.getState().setPopoverVisibility(!1)}focusOnNextListItem(r){var o,s;const a=Array.from(document.querySelectorAll("a.searchcraft-popover-list-item")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),n=a.indexOf(document.activeElement);if(r==="ArrowDown")(o=a[(n+1)%a.length])==null||o.focus();else if(r==="ArrowUp")if(n>=1)(s=a[n-1])==null||s.focus();else{const c=document.querySelector(".searchcraft-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var r,a;return this.searchTerm&&((a=(r=this.searchTerm)==null?void 0:r.trim())==null?void 0:a.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const r=this.hasResultsToShow&&this.isFocused,a=L("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":r});return f("div",{class:a},f("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this)}),r&&f("div",{class:"searchcraft-popover-inline-wrapper-outer"},f("div",{class:"searchcraft-popover-inline-wrapper-inner"},f("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}))))}renderModalPopover(){if(this.isPopoverVisibleInState){const r=L("searchcraft-popover-form",{"searchcraft-popover-form-active":this.hasResultsToShow});return f("div",{class:"searchcraft-popover-form-modal"},f("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),f("div",{class:"searchcraft-popover-form-modal-inner"},f("div",{class:r},f("div",{class:"searchcraft-popover-form-input-wrapper"},f("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),f("button",{type:"button",class:"searchcraft-popover-form-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),this.hasResultsToShow&&f("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}))))}}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return f("div",{class:"searchcraft-popover-form-fullscreen"},f("div",{class:"searchcraft-popover-form"},f("div",{class:"searchcraft-popover-form-input-wrapper"},f("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),f("button",{type:"button",class:"searchcraft-popover-form-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),this.hasResultsToShow&&f("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[0,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],isPopoverVisibleInState:[32],unsubscribe:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function Ba(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view"].forEach(t=>{switch(t){case"searchcraft-popover-form":customElements.get(t)||customElements.define(t,gi);break;case"searchcraft-ad":customElements.get(t)||kt();break;case"searchcraft-button":customElements.get(t)||$t();break;case"searchcraft-error-message":customElements.get(t)||xt();break;case"searchcraft-input-form":customElements.get(t)||za();break;case"searchcraft-input-label":customElements.get(t)||ur();break;case"searchcraft-popover-form":customElements.get(t)||Ba();break;case"searchcraft-popover-list-item":customElements.get(t)||hr();break;case"searchcraft-popover-list-view":customElements.get(t)||Ha();break}})}const vi=Ba,bi=hr,yi=Ha,Si=U(class extends N{constructor(){super();h(this,"customFormatter");h(this,"customStyles");h(this,"searchTerm");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"searchResultsCount");h(this,"count",0);h(this,"range",[0,0]);h(this,"responseTime","0");h(this,"unsubscribe",()=>{});this.__registerHost()}connectedCallback(){this.unsubscribe=A.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}disconnectedCallback(){this.unsubscribe&&this.unsubscribe()}render(){return!this.searchTerm||this.searchResultsCount===0?null:f("p",{class:L("searchcraft-results-info",at(this.customStyles||{}))},this.customFormatter?this.customFormatter([lr(this.range[0]),lr(this.range[1])],lr(this.count),this.responseTime):`${this.count} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{customFormatter:[16],customStyles:[1,"custom-styles"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function wi(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,Si);break}})}const Ri=wi,Ei=U(class extends N{constructor(){super();h(this,"caption");h(this,"disabled",!1);h(this,"inputId");h(this,"label");h(this,"labelId");h(this,"name");h(this,"options",[]);h(this,"customStyles");h(this,"selectChange");h(this,"searchResultsPerPage");h(this,"setSearchResultsPage",()=>{});h(this,"setSearchResultsPerPage",()=>{});h(this,"handleSelectChange",r=>{this.selectChange.emit(r.target.value)});this.__registerHost(),this.selectChange=xe(this,"selectChange")}handleGoToPage(r){this.setSearchResultsPage(r)}render(){return f("div",{key:"5024d49d89a3649a5de591d37ded304a9dfb36d9",class:L("searchcraft-select",at(this.customStyles||{}))},this.label&&f("label",{key:"005aea9b190e5a6c041721e20395be23f76faab6",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),f("div",{key:"209d56844c0bcd241e73bafcad24fac927fe7ffa",class:"searchcraft-select-input-wrapper"},f("select",{key:"010c9e596ef45a303f84c0ac0fa54ab67556d7b6","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:r,value:a,selected:n})=>f("option",{key:a,value:a,selected:n},r))),f("svg",{key:"51d9fb79381468ee0992475ba376df5a5961116c",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f("title",{key:"59186138953557764915d41708d4bcc23a9bb97f"},"Select dropdown icon"),f("path",{key:"ec2c962df16cb68bdaf3e2c32e57d875a63957a9",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&f("p",{key:"742bc2dbd8371938894d49bb37d429d1b7a07d7a",class:"searchcraft-select-caption"},this.caption))}},[0,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],customStyles:[1,"custom-styles"],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function ja(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,Ei);break}})}const Ci=U(class extends N{constructor(){super();h(this,"increment",20);h(this,"customStyles");h(this,"searchTerm");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"searchResultsCount");h(this,"searchResultsPagesCount");h(this,"initialSearchResultsPerPage");h(this,"setSearchResultsPerPage",()=>{});h(this,"setSearchResultsPage",()=>{});h(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=A.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=A.getState().searchResultsPerPage}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return f("div",{class:L("searchcraft-search-results-per-page",at(this.customStyles||{}))},f("div",{class:"searchcraft-search-results-per-page-select"},f("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),f("div",{class:"searchcraft-search-results-per-page-select-input"},f("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,a)=>{const n=this.initialSearchResultsPerPage+Number(this.increment)*a;return{label:`${n}`,value:n}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],customStyles:[1,"custom-styles"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Pi(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-search-results-per-page":customElements.get(t)||customElements.define(t,Ci);break;case"searchcraft-select":customElements.get(t)||ja();break}})}const Ti=Pi,ki=ja,xi=Na,$i=`:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2)}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var(--sc-color-background-hover, #fafafa);--sc-color-background-active: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, #f7f7f7 );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-secondary-hover, var(--sc-color-background-hover, #e6e6e6) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var(--sc-color-foreground-secondary, #404040);--sc-border-neutral: rgba(0, 0, 0, 0.1);--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var(--sc-color-brand-hover, #2e2e2e);--sc-color-brand-active: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var(--sc-color-brand-active, #292929);--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-surface-brand-secondary-hover: var( --sc-color-brand-secondary-hover, var(--sc-color-brand-hover, #ebebeb) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover: hsl(from var(--sc-color-success) h s 30);--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, #009900 );--sc-color-success-primary-active: hsl(from var(--sc-color-success) h s 20);--sc-surface-success-primary-active: var( --sc-color-success-primary-active, #006600 );--sc-color-success-secondary: hsl(from var(--sc-color-success) h s 90);--sc-surface-success-secondary: var(--sc-color-success-secondary, #ccffcc);--sc-color-success-secondary-hover: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, #e6ffe6 );--sc-color-success-secondary-active: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, #b2ffb2 );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover: hsl(from var(--sc-color-caution) h s 30);--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, #e57300 );--sc-color-caution-primary-active: hsl(from var(--sc-color-caution) h s 20);--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, #b25a00 );--sc-color-caution-secondary: hsl(from var(--sc-color-caution) h s 90);--sc-surface-caution-secondary: var(--sc-color-caution-secondary, #ffd9b3);--sc-color-caution-secondary-hover: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, #ffe5cc );--sc-color-caution-secondary-active: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, #ffcc99 );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover: hsl(from var(--sc-color-danger) h s 30);--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, #e50000 );--sc-color-danger-primary-active: hsl(from var(--sc-color-danger) h s 20);--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, #b30000 );--sc-color-danger-secondary: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var(--sc-color-danger-secondary, #ffcccc);--sc-color-danger-secondary-hover: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, #ffe7e7 );--sc-color-danger-secondary-active: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, #ffb3b3 );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover: hsl(from var(--sc-color-success) h s 30%);--sc-color-success-primary-active: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary: hsl(from var(--sc-color-success) h s 90%);--sc-color-success-secondary-hover: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover: hsl(from var(--sc-color-caution) h s 30%);--sc-color-caution-primary-active: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary: hsl(from var(--sc-color-caution) h s 90%);--sc-color-caution-secondary-hover: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover: hsl(from var(--sc-color-danger) h s 30%);--sc-color-danger-primary-active: hsl(from var(--sc-color-danger) h s 20%);--sc-color-danger-secondary: hsl(from var(--sc-color-danger) h s 90%);--sc-color-danger-secondary-hover: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-custom-ad{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size)}.searchcraft-adm-ad{all:unset;display:flex;flex-direction:row;cursor:pointer;gap:8px;padding-right:var(--sc-popover-list-item-padding-horizontal);padding-left:var(--sc-popover-list-item-padding-horizontal);padding-top:var(--sc-popover-list-item-padding-vertical);padding-bottom:var(--sc-popover-list-item-padding-vertical);border:1px solid blue}.searchcraft-adm-ad:focus{background-color:var(--sc-surface-neutral-secondary-active);color:var(--sc-content-neutral-secondary)}.searchcraft-adm-ad:hover{background-color:var(--sc-surface-neutral-secondary-hover);color:var(--sc-content-neutral-secondary)}.searchcraft-adm-ad-title{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);margin:0;color:inherit}.searchcraft-adm-ad-subtitle{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);margin:0;color:inherit}.searchcraft-adm-ad-image-wrapper{width:var(--sc-popover-list-item-image-size);height:var(--sc-popover-list-item-image-size);display:flex;align-items:center;justify-content:center;flex-shrink:0}.searchcraft-adm-ad-image{max-width:var(--sc-popover-list-item-image-size);max-height:var(--sc-popover-list-item-image-size)}.searchcraft-adm-ad-info-wrapper{display:flex;flex-direction:column;gap:8px;justify-content:center}.searchcraft-search-result-container{all:unset;align-items:flex-start;border-radius:var(--sc-border-radius-lg);display:flex;flex-direction:column;gap:16px;padding:8px;color:inherit;background-color:var(--sc-surface-neutral-primary)}@media(min-width: 768px){.searchcraft-search-result-container{flex-direction:row}}a.searchcraft-search-result-container{cursor:pointer;transition:background-color 100ms}.searchcraft-base-search-result-content-container{flex:1;display:flex;flex-direction:column;gap:8px}.searchcraft-search-result-image{border-radius:calc(--sc-border-radius-lg - 8px);border-radius:calc(var(--sc-border-radius-lg) - 8px);width:100%}@media(min-width: 768px){.searchcraft-search-result-image{width:200px}}.searchcraft-base-search-result-title{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin:0}.searchcraft-base-search-result-subtitle{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-disabled);margin:0}.searchcraft-base-search-result-body-content{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-base-search-result-footer-content{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-disabled);margin:0}.searchcraft-search-results-container{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state-container{text-align:center}.searchcraft-search-results-error-message-container{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-danger);margin:0}.filtersListContainer{width:100%}.filterCheckboxLabel{align-items:center;color:var(--sc-content-brand);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.filterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;width:24px}.filterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.filterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.filterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.filterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.childFilterCheckboxLabel{align-items:center;color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:12px;margin-left:24px;position:relative}.childFilterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary-hover);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px;-webkit-font-smoothing:antialiased}.childFilterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.childFilterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.childFilterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.childFilterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.checkContainer{display:none;height:16px;width:16px;position:absolute;top:9px;left:8px}.dashContainer{display:none;height:3px;width:14px;position:absolute;top:3px;left:9px}.searchcraft-facet-message{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-disabled);text-align:center}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-bold)}:root{--sc-input-border-radius: var(--sc-border-radius);--sc-input-search-icon-size: 20px;--sc-input-clear-icon-size: 20px;--sc-input-padding-left: 44px;--sc-input-padding-right: 44px}.searchcraft-input-grid{display:grid;gap:4px 8px}.searchcraft-input-grid-buttonLeft{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-grid-buttonLeft .searchcraft-input-button-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-label-wrapper{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-error-wrapper{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonRight{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-grid-buttonRight .searchcraft-input-button-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-label-wrapper{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-error-wrapper{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonNone{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-grid-buttonNone .searchcraft-input-button-wrapper{display:none}.searchcraft-input-grid-buttonNone .searchcraft-input-label-wrapper{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonNone .searchcraft-input-error-wrapper{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonNone .searchcraft-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-wrapper{position:relative;display:flex}.searchcraft-input{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-border-radius);border:none;color:var(--sc-content-neutral-primary);outline:none;padding-left:var(--sc-input-padding-left);padding-right:var(--sc-input-padding-right);padding-top:12px;padding-bottom:12px;flex:1}.searchcraft-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input:focus{outline:var(--sc-border-brand) solid 2px}.searchcraft-input:focus::placeholder{opacity:0}.searchcraft-input.error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input.error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-search-icon-wrapper{align-items:center;justify-content:center;display:flex;position:absolute;pointer-events:none;bottom:0;left:0;top:0;width:var(--sc-input-padding-left)}.searchcraft-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-search-icon-size);pointer-events:none;width:var(--sc-input-search-icon-size)}.searchcraft-input-clear-button{all:unset;align-items:center;justify-content:center;cursor:pointer;display:flex;position:absolute;border:none;outline:none;bottom:0;right:0;top:0;width:var(--sc-input-padding-right)}.searchcraft-input-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-clear-icon-size);width:var(--sc-input-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-form-border-radius: var(--sc-border-radius);--sc-popover-list-view-height: 400px;--sc-popover-list-item-image-size: 60px;--sc-popover-list-item-padding-horizontal: 8px;--sc-popover-list-item-padding-vertical: 8px;--sc-popover-modal-max-width: 570px}.searchcraft-popover-form{display:flex;flex-direction:column;flex:1}.searchcraft-popover-form .searchcraft-popover-form-input-wrapper{padding:12px;background-color:var(--sc-surface-neutral-secondary);display:flex;flex-direction:row;gap:4px}.searchcraft-popover-form .searchcraft-popover-form-input-wrapper>searchcraft-input-form{flex:1}.searchcraft-popover-form .searchcraft-popover-form-cancel-button{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px);border:0;outline:0;padding:0;flex-shrink:0;background:none;cursor:pointer;padding-left:12px;padding-right:12px}.searchcraft-popover-form .searchcraft-popover-form-cancel-button:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-popover-form .searchcraft-popover-form-cancel-button:focus{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-popover-form-inline .searchcraft-input{border-top-left-radius:var(--sc-popover-form-border-radius);border-top-right-radius:var(--sc-popover-form-border-radius);border-bottom-left-radius:var(--sc-popover-form-border-radius);border-bottom-right-radius:var(--sc-popover-form-border-radius);border:none;outline:none}.searchcraft-popover-form-inline.searchcraft-popover-form-active .searchcraft-input{border-top-left-radius:var(--sc-popover-form-border-radius);border-top-right-radius:var(--sc-popover-form-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.searchcraft-popover-form-inline .searchcraft-popover-inline-wrapper-outer{position:relative}.searchcraft-popover-form-inline .searchcraft-popover-inline-wrapper-inner{position:absolute;height:var(--sc-popover-list-view-height);z-index:1000;width:100%}.searchcraft-popover-form-inline .searchcraft-popover-list-view{display:flex;flex-direction:column;overflow:auto;background-color:var(--sc-surface-neutral-secondary);border-bottom-left-radius:var(--sc-popover-form-border-radius);border-bottom-right-radius:var(--sc-popover-form-border-radius);max-height:var(--sc-popover-list-view-height)}.searchcraft-popover-form-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding:0;background-color:var(--sc-surface-neutral-secondary)}@media(min-width: 576px){.searchcraft-popover-form-modal{padding:16px;background-color:rgba(0,0,0,0)}}.searchcraft-popover-form-modal .searchcraft-input{border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px);outline-width:1px;outline-color:var(--sc-border-neutral)}.searchcraft-popover-form-modal .searchcraft-popover-form-modal-backdrop{position:absolute;inset:0;background-color:rgba(0,0,0,.5);display:none}@media(min-width: 576px){.searchcraft-popover-form-modal .searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal .searchcraft-popover-form-modal-inner{position:absolute;inset:0;z-index:1002;margin-top:0px;display:flex;border-radius:var(--sc-popover-form-border-radius);overflow:hidden}@media(min-width: 576px){.searchcraft-popover-form-modal .searchcraft-popover-form-modal-inner{inset:auto;position:relative;width:100%;margin-top:100px;max-width:var(--sc-popover-modal-max-width)}}.searchcraft-popover-form-modal .searchcraft-popover-list-view{display:flex;flex-direction:column;overflow:auto;background-color:var(--sc-surface-neutral-secondary);border-bottom-left-radius:0;border-bottom-right-radius:0}@media(min-width: 576px){.searchcraft-popover-form-modal .searchcraft-popover-list-view{max-height:var(--sc-popover-list-view-height)}}.searchcraft-popover-form-modal searchcraft-popover-list-view{overflow:scroll}@media(min-width: 576px){.searchcraft-popover-form-modal searchcraft-popover-list-view{overflow:auto}}.searchcraft-popover-form-fullscreen{position:fixed;inset:0;z-index:1000;background-color:var(--sc-surface-neutral-secondary)}.searchcraft-popover-form-fullscreen .searchcraft-popover-form{position:absolute;inset:0}.searchcraft-popover-form-fullscreen .searchcraft-input{border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px);outline-width:1px;outline-color:var(--sc-border-neutral)}.searchcraft-popover-form-fullscreen searchcraft-popover-list-view{overflow:scroll}.searchcraft-popover-list-item{all:unset;color:var(--sc-content-neutral-secondary);display:flex;flex-direction:row;cursor:pointer;gap:8px;padding-right:var(--sc-popover-list-item-padding-horizontal);padding-left:var(--sc-popover-list-item-padding-horizontal);padding-top:var(--sc-popover-list-item-padding-vertical);padding-bottom:var(--sc-popover-list-item-padding-vertical)}.searchcraft-popover-list-item:focus{background-color:var(--sc-surface-neutral-secondary-active);color:var(--sc-content-neutral-secondary)}.searchcraft-popover-list-item:hover{background-color:var(--sc-surface-neutral-secondary-hover);color:var(--sc-content-neutral-secondary)}.searchcraft-popover-list-item-title{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);margin:0;color:inherit}.searchcraft-popover-list-item-subtitle{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);margin:0;color:inherit}.searchcraft-popover-list-item-image-wrapper{width:var(--sc-popover-list-item-image-size);height:var(--sc-popover-list-item-image-size);display:flex;align-items:center;justify-content:center;flex-shrink:0}.searchcraft-popover-list-item-image{max-width:var(--sc-popover-list-item-image-size);max-height:var(--sc-popover-list-item-image-size)}.searchcraft-popover-list-item-info-wrapper{display:flex;flex-direction:column;gap:8px;justify-content:center}.searchcraft-results-info{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-primary);margin:0}.searchcraft-slider-container{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%}.searchcraft-slider-range-container{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range-container::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range-container .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range-container .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range-container .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range-container .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range-container .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px;-webkit-appearance:none}.searchcraft-slider-range-container .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px}.searchcraft-slider-label-container{color:var(--sc-content-primary);display:flex;font-family:"Source Sans Pro",sans-serif;font-size:15px;font-weight:600;justify-content:space-between;margin-top:10px;width:100%}.searchcraft-slider-label{min-width:30px;text-align:center}.searchcraft-toggle-button-container{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);margin:0;color:var(--sc-content-neutral-primary)}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);margin:0;color:var(--sc-content-neutral-secondary)}.searchcraft-toggle-button-background{transition:background-color .2s;background:var(--sc-surface-disabled);border:none;border-radius:16px;cursor:pointer;height:26px;position:relative;width:44px;flex-shrink:0}.searchcraft-toggle-button-background.active{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-handle.active{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size)}.searchcraft-search-results-per-page-select-input{min-width:120px}/*# sourceMappingURL=hologram.css.map */
|
|
35
|
-
`,
|
|
24
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",n=0;n<arguments.length;n++){var c=arguments[n];c&&(o=a(o,s(c)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var n="";for(var c in o)t.call(o,c)&&o[c]&&(n=a(n,c));return n}function a(o,n){return n?o?o+" "+n:o+n:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ds);const le=ds.exports,ro=D(class extends F{constructor(){super();h(this,"hierarchy","primary");h(this,"disabled",!1);h(this,"icon");h(this,"iconOnly",!1);h(this,"iconPosition","left");h(this,"label","Search");h(this,"type","button");h(this,"buttonClick");h(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=Re(this,"buttonClick")}render(){return d("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:le("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:d(Hr,null,this.iconPosition==="left"&&this.icon,d("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[0,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function gt(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,ro);break}})}const so=gt,ao=D(class extends F{constructor(){super(),this.__registerHost()}render(){return d("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},d("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function vt(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,ao);break}})}const no=vt;function hs(e,t){const r={...e};for(const s in t)t.hasOwnProperty(s)&&(t[s]instanceof Object&&e[s]instanceof Object?r[s]=hs(e[s],t[s]):r[s]=t[s]);return r}function oo(e){return e.filter((t,r,s)=>!s.some((a,o)=>o!==r&&a.includes(t)))}function ps(e){const t={},r=s=>{var a;t[s.path]={count:s.count,path:s.path},(a=s.children)==null||a.forEach(o=>{r(o)})};return r(e),t}function co(e){const t={count:0,path:"/",children:{}};return Object.keys(e).forEach(r=>{const s=e[r];if(!s||s.path==="/")return;const a=s.path.substring(1).split("/");let o=t,n="";a.forEach((c,i)=>{const u=`${n}/${c}`;o.children[u]||(o.children[u]={count:0,path:u,children:{}}),i===a.length-1&&(o.children[u].count=s.count),n=u,o=o.children[u]})}),t}function ms(e){const t={count:e.count,path:e.path,children:[]};return Object.keys(e.children).length>0&&(t.children=Object.values(e.children).map(r=>ms(r))),t}function io(e,t){const r=Object.keys(e),s=Object.keys(t),a=new Set(s.filter(n=>n.split("/").length>2).map(n=>n.substring(0,n.lastIndexOf("/"))));return Object.fromEntries(r.filter(n=>!a.has(n.substring(0,n.lastIndexOf("/")))).map(n=>[n,e[n]]))}function lo(e,t,r){const s=t[e],a=r[e],o={count:0,path:"/",children:s},n={count:0,path:"/",children:a},c=ps(o),i=ps(n),u=io(c,i),l=hs(u,i),p=co(l),m=ms(p);return{[e]:m.children}}const uo=D(class extends F{constructor(){super();h(this,"fieldName","");h(this,"facetSelectionUpdated");h(this,"baseFacetRoot");h(this,"facetRoot");h(this,"selectedPaths",{});h(this,"lastTimeTaken");h(this,"hasNewSearchTerm",!1);h(this,"lastSearchTerm");h(this,"lastSearchMode");h(this,"lastSortType");h(this,"unsubscribe");h(this,"searchStore",_.getState());h(this,"formatLabel",r=>{const s=r.path.replace(/^\//,""),a=r.count;return`${s.replace(/-/g," ").replace(/\b\w/g,o=>o.toUpperCase())} (${a})`});h(this,"formatSubLabel",(r,s)=>{const o=r.path.substring(s.path.length).replace(/^\//,""),n=r.count;return`${o.replace(/-/g," ").replace(/\b\w/g,c=>c.toUpperCase())} (${n})`});this.__registerHost(),this.facetSelectionUpdated=Re(this,"facetSelectionUpdated")}handleStateUpdate(r){const s=r.searchResponseFacetPrime,a=r.searchResponseTimeTaken;if(this.fieldName){if((r.searchTerm!==this.lastSearchTerm||r.searchMode!==this.lastSearchMode||r.sortType!==this.lastSortType)&&(this.selectedPaths={},this.hasNewSearchTerm=!0),a!==this.lastTimeTaken&&s){this.facetRoot=void 0;const o=s.find(n=>this.fieldName===Object.keys(n)[0]);this.hasNewSearchTerm?(this.baseFacetRoot=o,this.facetRoot=o,this.hasNewSearchTerm=!1):this.baseFacetRoot&&o&&(this.facetRoot=lo(this.fieldName,this.baseFacetRoot,o))}this.lastSearchTerm=r.searchTerm,this.lastSearchMode=r.searchMode,this.lastSortType=r.sortType,this.lastTimeTaken=a}}connectedCallback(){this.handleStateUpdate(this.searchStore),this.unsubscribe=_.subscribe(r=>{this.handleStateUpdate(r)})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleCheckboxChange(r){var n;if(!this.selectedPaths[r])this.selectedPaths={...this.selectedPaths,[r]:!0};else{const c=Object.keys(this.selectedPaths).filter(i=>!i.includes(r));this.selectedPaths=c.reduce((i,u)=>(i[u]=!0,i),{})}const a=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),o=oo(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}render(){var s;if(!this.fieldName)return;const r=(s=this.facetRoot)==null?void 0:s[this.fieldName];return d("div",{class:"searchcraft-facet-list"},!r&&d("p",{class:"searchcraft-facet-list-message"},"Enter a search to view facets."),r==null?void 0:r.map(a=>{var n;const o=a.children?(n=a.children)==null?void 0:n.some(c=>this.selectedPaths[c.path]):!1;return d("div",{key:a.path,class:"searchcraft-facet-list-item"},d("label",{class:"searchcraft-facet-list-checkbox-label"},d("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[a.path],onChange:c=>this.handleCheckboxChange(a.path),type:"checkbox"}),o?d("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},d("svg",{width:"14",height:"3",viewBox:"0 0 14 3",fill:"none"},d("title",null,"Checkbox dash"),d("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):d("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},d("title",null,"Checkbox check"),d("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}))),this.formatLabel(a)),a.children&&a.children.length>0&&d(Hr,null,a.children.map(c=>d("label",{key:c.path,class:"searchcraft-facet-list-checkbox-label searchcraft-facet-list-child-checkbox-label",style:{display:this.selectedPaths[a.path]?"flex":"none"}},d("input",{class:"searchcraft-facet-list-checkbox-input searchcraft-facet-list-child-checkbox-input",checked:this.selectedPaths[c.path],onChange:i=>{this.handleCheckboxChange(c.path)},type:"checkbox"}),d("div",{class:"searchcraft-facet-list-checkbox-input-check-icon searchcraft-facet-list-child-checkbox-input-check-icon"},d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},d("title",null,"Checkbox check"),d("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}))),this.formatSubLabel(c,a)))))}))}},[0,"searchcraft-facet-list",{fieldName:[1,"field-name"],baseFacetRoot:[32],facetRoot:[32],selectedPaths:[32],lastTimeTaken:[32],hasNewSearchTerm:[32],lastSearchTerm:[32],lastSearchMode:[32],lastSortType:[32],unsubscribe:[32]}]);function gs(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,uo);break}})}const fo=gs;function qe(e,t){if(e&&t)return t.fieldNames.map(r=>{let s=e[r.fieldName];if(s)switch(r.dataType){case"date":{s=po(s);break}case"number":{s=Intl.NumberFormat(r.numberFormatLocale,r.numberFormatOptions).format(s*(r.numberScale||1));break}}return s}).filter(r=>!!r).join(t.delimiter||" ")}function vs(e){switch(e){case"hour":return 36e5;case"day":return 864e5;case"month":return 2592e6;case"year":return 31536e6;default:return 36e5}}function ho(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function po(e){const t=new Date,r=new Date(e),s=Math.floor((t.getTime()-r.getTime())/1e3),a=Math.floor(s/60),o=Math.floor(a/60),n=Math.floor(o/24),c=Math.floor(n/365);return a<60?`${a}m ago`:o<24?`${o}h ago`:n<365?`${n}d ago`:`${c}y ago`}const mo=D(class extends F{constructor(){super();h(this,"max",100);h(this,"min",0);h(this,"granularity",vs("month"));h(this,"dataType","number");h(this,"endValue",this.max);h(this,"startValue",this.min);h(this,"lastFocusedHandle","max");h(this,"rangeChanged");h(this,"emitUpdate",async()=>{var r;(r=this.rangeChanged)==null||r.emit({startValue:this.startValue,endValue:this.endValue})});h(this,"handleStartValueChange",r=>{const s=r.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.emitUpdate()):(this.startValue=this.endValue,s.value=`${this.endValue}`)});h(this,"handleEndValueChange",r=>{const s=r.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.emitUpdate()):(this.endValue=this.startValue,s.value=`${this.startValue}`)});this.__registerHost(),this.rangeChanged=Re(this,"rangeChanged")}componentDidLoad(){this.startValue=this.min,this.endValue=this.max}render(){const r=this.min,s=this.max,a=(this.startValue-r)/(s-r)*100,o=(this.endValue-r)/(s-r)*100,n=this.dataType==="number"?this.startValue:new Date(this.startValue).getFullYear(),c=this.dataType==="number"?this.endValue:new Date(this.endValue).getFullYear();return d("div",{key:"ad6c2b473230863408f48eee11527bc088ae4ef7",class:"searchcraft-slider"},d("div",{key:"9c89eae611cfa3aed547e18fe242e58878e20252",class:"searchcraft-slider-range"},d("div",{key:"9dfa61b66d26cc257bf878bd233b7ac02a94d7cf",class:"searchcraft-slider-active-range",style:{left:`${a}%`,width:`${o-a}%`}}),d("input",{key:"20ba4345d47a4c553d14cf70abfc1272f3423c41",class:le("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.max,min:this.min,onInput:this.handleStartValueChange.bind(this),step:this.granularity,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),d("input",{key:"e142cd75420882136d85f076678903ce4f8ef0f7",class:le("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.max,min:this.min,onInput:this.handleEndValueChange.bind(this),step:this.granularity,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),d("div",{key:"5b370071b7804fd896f87398ef8bc4e9603446d8",class:"searchcraft-slider-label"},d("span",{key:"e22e25c99fc150590e19c9b939dc9687f14f49dc",class:"searchcraft-slider-start-label"},n),d("span",{key:"a81fa0d45acdfcbaceb69fe94721fb25cac038a2",class:"searchcraft-slider-end-label"},c)))}},[0,"searchcraft-slider",{max:[2],min:[2],granularity:[2],dataType:[1,"data-type"],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function bs(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,mo);break}})}const go=D(class extends F{constructor(){super();h(this,"label","Toggle");h(this,"subLabel");h(this,"toggleUpdated");h(this,"isActive",!1);h(this,"unsubscribe");h(this,"lastSearchTerm");h(this,"handleToggle",async()=>{var r;this.isActive=!this.isActive,(r=this.toggleUpdated)==null||r.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=Re(this,"toggleUpdated")}connectedCallback(){this.unsubscribe=_.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return d("div",{key:"dd0367c381eaedcf675977c181fbdac6499f32e9",class:le("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},d("div",{key:"43b5920cad7c1d44dda3d541481a2eea1f0182b7"},d("p",{key:"1ac87d2f68ba9e8b84e9e5e4157a4108275d064c",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&d("p",{key:"e06f9a06088bede5546d8d47e84ece9cae5dfc54",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),d("button",{key:"96999c99ef38996f871ac9260f4a048561cd7003",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},d("div",{key:"f93c71f1e06531f06709140033d56aa2fa378d47",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],isActive:[32],unsubscribe:[32],lastSearchTerm:[32]}]);function ys(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,go);break}})}const vo=D(class extends F{constructor(){super();h(this,"items",[]);h(this,"unsubscribe");h(this,"lastSearchTerm");h(this,"searchStore",_.getState());this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.lastSearchTerm=r.searchTerm||""})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleDateRangeChanged(r,s,a){const o=new Date(new Date(s).getFullYear(),0,1),n=new Date(new Date(a).getFullYear()+1,0,0);this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${o.toISOString()} TO ${n.toISOString()}]`}),this.searchStore.search()}handleNumericRangeChanged(r,s,a){this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${s} TO ${a}]`}),this.searchStore.search()}handleFacetSelectionUpdated(r,s){s.length>0?this.searchStore.addFacetPathsForIndexField({fieldName:r,value:`${r}: IN [${s.join(" ")}]`}):this.searchStore.removeFacetPathsForIndexField(r),this.searchStore.search()}handleExactMatchToggleUpdated(r){this.searchStore.setSearchMode(r?"exact":"fuzzy"),this.searchStore.search()}handleMostRecentToggleUpdated(r){this.searchStore.setSortType(r?"desc":"asc"),this.searchStore.search()}render(){return d("div",{key:"6d3779476496055a83529c39cd9908a46f404e02",class:"searchcraft-filter-panel"},this.items.map(r=>{switch(r.type){case"dateRange":{const s=r,a=new Date(s.options.minDate).getTime(),o=new Date(s.options.maxDate).getTime(),n=vs(s.options.granularity);return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},r.label),d("searchcraft-slider",{min:a,max:o,granularity:n,dataType:"date",onRangeChanged:c=>{this.handleDateRangeChanged(s.fieldName,c.detail.startValue,c.detail.endValue)}}))}case"numericRange":{const s=r;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},r.label),d("searchcraft-slider",{min:s.options.min,max:s.options.max,granularity:s.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(s.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const s=r;return d("div",{class:"searchcraft-filter-panel-section"},d("p",{class:"searchcraft-filter-panel-label"},r.label),d("searchcraft-facet-list",{fieldName:s.fieldName,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=r;return d("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=r;return d("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(a.detail)}})}}}))}},[0,"searchcraft-filter-panel",{items:[16],unsubscribe:[32],lastSearchTerm:[32]}]);function bo(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-filter-panel":customElements.get(t)||customElements.define(t,vo);break;case"searchcraft-facet-list":customElements.get(t)||gs();break;case"searchcraft-slider":customElements.get(t)||bs();break;case"searchcraft-toggle-button":customElements.get(t)||ys();break}})}const yo=bo,So=D(class extends F{constructor(){super();h(this,"inputLabelClassName","");h(this,"label","");this.__registerHost()}render(){return d("label",{key:"3622c616d480e57b1dfaa2d61637a30b843cb968",class:le("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Kt(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,So);break}})}const Eo=D(class extends F{constructor(){super();h(this,"autoSearch",!0);h(this,"buttonPlacement","none");h(this,"buttonLabel");h(this,"inputLabel");h(this,"placeholderValue","Enter Search");h(this,"inputFocus");h(this,"inputBlur");h(this,"inputInit");h(this,"inputValue","");h(this,"searchTerm","");h(this,"error",!1);h(this,"core");h(this,"searchStore",_.getState());h(this,"handleOnInput",r=>{const s=r.target;this.inputValue=s.value,this.autoSearch&&this.performSearch(s.value)});h(this,"performSearch",async r=>{if(r!==_.getState().searchTerm){this.searchTerm=r.trim(),this.error=!1,this.searchStore.setSearchTerm(this.searchTerm);try{await this.searchStore.search()}catch(s){console.log(s),this.error=!0}}});h(this,"handleClearInput",()=>{this.inputValue="",this.searchTerm="",this.searchStore.setSearchTerm(""),this.searchStore.setSearchClientResponseItems([]),this.error=!1});h(this,"handleFormSubmit",async r=>{r.preventDefault(),await this.performSearch(this.searchTerm)});this.__registerHost(),this.inputFocus=Re(this,"inputFocus"),this.inputBlur=Re(this,"inputBlur"),this.inputInit=Re(this,"inputInit")}init(){var r;this.core&&(this.searchStore.initialize(this.core),(r=this.inputInit)==null||r.emit())}connectedCallback(){this.init()}onCoreChange(){this.init()}render(){const r=this.inputValue.length>0,s=le("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),o={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return d("form",{key:"862f8059b6eaae8d7ac9bd3c9de8109dd60fab8f",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},d("div",{key:"34ff1c3cff4011c9a5f0af0ff690e3a12ad80907",class:s,style:o},d("div",{key:"820506482aeea17534c4113e601f3ba2254e7fe6",class:"searchcraft-input-form-button"},d("searchcraft-button",{key:"377a6d8e9835c40379dbd0842a2f0f53638845e1",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&d("div",{key:"84d100df3793599fd3f6773d26028e43e41d1ab7",class:"searchcraft-input-form-label"},d("searchcraft-input-label",{key:"cfa7eca0b2ab3b82dd6c0a5104c19c88881f52b5",label:this.inputLabel})),this.error&&d("div",{key:"62d0e29e46ac922469e48aa822239cd645ea9c8d",class:"searchcraft-input-form-error-message"},d("searchcraft-error-message",{key:"8a989b4a2e1196b01de9082433a69d86f55910fb"},"Something went wrong.")),d("div",{key:"a3c4cd8ef20f909eec2d9e2f9515a65525fe612e",class:"searchcraft-input-form-input-wrapper"},d("input",{key:"af23902c7f7a79ced427da3aadaa30736b68c8a7",autoComplete:"off",class:"searchcraft-input-form-input",onFocus:()=>{var n;return(n=this.inputFocus)==null?void 0:n.emit()},onBlur:()=>{var n;return(n=this.inputBlur)==null?void 0:n.emit()},onInput:n=>{this.handleOnInput(n)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),d("div",{key:"66176081ef8da6bd3065ad0eeb61a397ab0fadfc",class:"searchcraft-input-form-input-icon"},d("svg",{key:"baac2f051f04a411acba0d5683255e9a37a27833",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},d("title",{key:"24230d00bd0b9466fb414246836c2477630ec254"},"Search icon"),d("path",{key:"9f1446fd1885cc63c26fa5acfcdbdb775547c5ee",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),r&&d("button",{key:"b9a42b46f7d470f6f1bbba5b95fd4031db9a1ebd",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},d("svg",{key:"cda07c19eb77c2d2d343ce8d1cf8c55c484107f2",class:"searchcraft-input-form-clear-button-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},d("title",{key:"43ba26388dc06b6ff3c5441387db9ba621bcc08e"},"Clear icon"),d("path",{key:"5f33de1e306548f1cf504e4e6c6548d51eba93d3",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"]}}},[0,"searchcraft-input-form",{autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],core:[16],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function Ss(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-form":customElements.get(t)||customElements.define(t,Eo);break;case"searchcraft-button":customElements.get(t)||gt();break;case"searchcraft-error-message":customElements.get(t)||vt();break;case"searchcraft-input-label":customElements.get(t)||Kt();break}})}const Ro=Ss,wo=Kt,To=D(class extends F{constructor(){super();h(this,"searchTerm");h(this,"searchResultsPerPage");h(this,"searchResultsPage");h(this,"searchResultsCount");h(this,"searchResultsPagesCount",1);h(this,"searchResultsRangeMin",1);h(this,"searchResultsRangeMax",1);h(this,"setSearchResultsPage",()=>{});h(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=r.setSearchResultsPage})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleGoToPage(r){this.setSearchResultsPage(r)}renderOddPaginationItem(r){return d("li",null,d("button",{class:le("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r))}renderEvenPaginationItem(r){if(!(this.searchResultsPagesCount<=r))return(this.searchResultsPagesCount<=5||r<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=r+1:this.searchResultsPage>=r-1)?d("li",null,d("button",{class:le("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r)):d("li",null,d("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?d("li",null,d("button",{class:le("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):d("li",null,d("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return d("div",{class:"searchcraft-pagination"},d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:d("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Previous page icon"),d("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),d("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),d("div",{class:"searchcraft-pagination-control"},d("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:d("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",null,"Next page icon"),d("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[0,"searchcraft-pagination",{searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function ko(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,To);break;case"searchcraft-button":customElements.get(t)||gt();break}})}const Po=ko,Co=D(class extends F{constructor(){super(),this.__registerHost()}handleOnClick(){_.getState().setPopoverVisibility(!0)}render(){return d("button",{key:"878f61ad9c93a3900e97f459f33cf526e647e583",class:"searchcraft-popover-button",onClick:this.handleOnClick.bind(this),type:"button"},d("slot",{key:"c248779f08b940fca9800375b8814d6fc49f3715"}))}},[4,"searchcraft-popover-button"]);function xo(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,Co);break}})}const $o=xo,_o=D(class extends F{constructor(){super();h(this,"item");h(this,"popoverResultMappings");h(this,"documentPosition",0);h(this,"href");h(this,"imageSrc");h(this,"imageAlt");h(this,"titleContent");h(this,"subtitleContent");h(this,"handleLinkClick",()=>{var a;const r=_.getState(),s=r.getSearchcraftInstance();if(s){const o=this.documentPosition,n=r.searchTerm,c=r.searchClientResponseItems.length||0;(a=s.measureClient)==null||a.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:c,search_term:n})}});this.__registerHost()}mapValuesFromDocument(r){var s,a,o,n,c;this.titleContent=qe(r,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitleContent=qe(r,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=qe(r,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSrc=qe(r,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=qe(r,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}disconnectedCallback(){}render(){return d("a",{key:"c4a142be2b9993b8ad83eaaa59bdd9a047e4275e",class:"searchcraft-popover-list-item",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSrc&&d("div",{key:"6a620203f4918b051835f557a00eb82c2397c56f",class:"searchcraft-popover-list-item-image-wrapper"},d("img",{key:"1a07c169119146f4f22e704098c493d67927ce82",alt:this.imageAlt,src:this.imageSrc,class:"searchcraft-popover-list-item-image"})),d("div",{key:"d0b2faa1359c004cb5c38fd615e969a7614706cc",class:"searchcraft-popover-list-item-info-wrapper"},d("p",{key:"9b8c8ba1d5c62a5251db893f3604803f83f687d2",class:"searchcraft-popover-list-item-title"},this.titleContent),d("p",{key:"930699a84405d0ea2476eb91bf9ce77fed016bb8",class:"searchcraft-popover-list-item-subtitle"},this.subtitleContent)))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],href:[32],imageSrc:[32],imageAlt:[32],titleContent:[32],subtitleContent:[32]}]);function Xt(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,_o);break}})}const Ao=D(class extends F{constructor(){super();h(this,"popoverResultMappings");h(this,"searchClientResponseItems");h(this,"adClientResponseItems");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"config",(_s=_.getState().core)==null?void 0:_s.config);this.__registerHost()}renderWithADMAds(){var r,s;return d("div",{class:"searchcraft-popover-list-view"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>d("searchcraft-ad",{adClientResponseItem:a,adContainerId:X(),adSource:"adMarketplace",key:a.id})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>d("searchcraft-popover-list-item",{item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var i,u,l,p;const r=[],s=((i=this.config)==null?void 0:i.customAdInterstitialInterval)||0,a=((u=this.config)==null?void 0:u.customAdInterstitialQuantity)||1,o=((l=this.config)==null?void 0:l.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let m=0;m<o;m++)r.push(d("searchcraft-ad",{adSource:"Custom",adContainerId:X(),key:`${m}-ad`}));c.forEach((m,b)=>{if(s&&b%s===0&&b+s<c.length&&b>=s)for(let v=0;v<a;v++)r.push(d("searchcraft-ad",{adSource:"Custom",adContainerId:X(),key:`${m.id}-ad-${v}`}));r.push(d("searchcraft-popover-list-item",{item:m,key:m.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+b}))});for(let m=0;m<n;m++)r.push(d("searchcraft-ad",{adSource:"Custom",adContainerId:X(),key:`${m}-ad`}));return d("div",{class:"searchcraft-popover-list-view"},r)}renderWithNativoAds(){var u,l,p,m,b;const r=[],s=((u=this.config)==null?void 0:u.nativoAdInterstialStartIndex)||0,a=((l=this.config)==null?void 0:l.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((m=this.config)==null?void 0:m.nativoAdStartQuantity)||0,c=((b=this.config)==null?void 0:b.nativoAdEndQuantity)||0,i=this.searchClientResponseItems||[];for(let v=0;v<n;v++)r.push(d("searchcraft-ad",{adSource:"Nativo",adContainerId:X(),key:`${v}-ad`}));i.forEach((v,x)=>{if(a&&(x+s)%a===0&&x+a<i.length&&x>=a)for(let N=0;N<o;N++)r.push(d("searchcraft-ad",{adSource:"Nativo",adContainerId:X(),key:`${v.id}-ad-${N}`}));r.push(d("searchcraft-popover-list-item",{item:v,key:v.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+x}))});for(let v=0;v<c;v++)r.push(d("searchcraft-ad",{adSource:"Nativo",adContainerId:X(),key:`${v}-ad`}));return d("div",{class:"searchcraft-popover-list-view"},r)}renderWithNoAds(){var r;return d("div",{class:"searchcraft-popover-list-view"},(r=this.searchClientResponseItems)==null?void 0:r.map((s,a)=>d("searchcraft-popover-list-item",{item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var r;switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[0,"searchcraft-popover-list-view",{popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function Es(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-view":customElements.get(t)||customElements.define(t,Ao);break;case"searchcraft-ad":customElements.get(t)||mt();break;case"searchcraft-popover-list-item":customElements.get(t)||Xt();break}})}const Io=D(class extends F{constructor(){super();h(this,"type","inline");h(this,"popoverResultMappings");h(this,"hotkey","k");h(this,"hotkeyModifier","meta");h(this,"isPopoverVisibleInState",!1);h(this,"unsubscribe");h(this,"searchClientResponseItems",[]);h(this,"adClientResponseItems",[]);h(this,"searchTerm");h(this,"isFocused",!1);h(this,"breakpointSm",576);h(this,"breakpointMd",768);h(this,"breakpointLg",992);h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"modalElement");h(this,"handleDocumentClick",r=>{this.hostElement.contains(r.target)||(this.isFocused=!1)});h(this,"handleDocumentKeyDown",r=>{if(r.key===this.hotkey&&this.handleHotkeyPressed(r),!!this.hostElement.contains(document.activeElement))switch(r.key){case"ArrowDown":case"ArrowUp":r.preventDefault(),this.focusOnNextListItem(r.key);break;case"Escape":_.getState().setPopoverVisibility(!1);break;default:return}});h(this,"handleInputInit",()=>{const r=this.hostElement.querySelector(".searchcraft-input");r==null||r.focus()});this.__registerHost()}get hostElement(){return this}componentDidLoad(){const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=_.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=_.subscribe(s=>{this.isPopoverVisibleInState!==s.isPopoverVisible&&this.handlePopoverVisibilityChange(s.isPopoverVisible),this.searchClientResponseItems=[...s.searchClientResponseItems],this.adClientResponseItems=[...s.adClientResponseItems],this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(r){this.isPopoverVisibleInState=r,document.body.style.overflow=r?"hidden":"auto"}handleInputFocus(){this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&(_.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(r){_.getState().setPopoverVisibility(!1)}handleHotkeyPressed(r){if(r.ctrlKey&&this.hotkeyModifier==="ctrl"||r.altKey&&this.hotkeyModifier==="alt"||r.metaKey&&this.hotkeyModifier==="meta")if(r.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const s=this.hostElement.querySelector(".searchcraft-input-form-input");s==null||s.focus()}else _.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){_.getState().setPopoverVisibility(!1)}focusOnNextListItem(r){var o,n;const s=Array.from(document.querySelectorAll("a.searchcraft-popover-form-list-item")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),a=s.indexOf(document.activeElement);if(r==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(r==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const c=document.querySelector(".searchcraft-input-form-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var r,s;return this.searchTerm&&((s=(r=this.searchTerm)==null?void 0:r.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const r=this.hasResultsToShow&&this.isFocused,s=le("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":r});return d("div",{class:s},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this)}),r&&d("div",{class:"searchcraft-popover-form-inline-wrapper-outer"},d("div",{class:"searchcraft-popover-form-inline-wrapper-inner"},d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}))))}renderModalPopover(){if(this.isPopoverVisibleInState){const r=le("searchcraft-popover-form",{"searchcraft-popover-form-active":this.hasResultsToShow});return d("div",{class:"searchcraft-popover-form-modal"},d("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),d("div",{class:"searchcraft-popover-form-modal-inner"},d("div",{class:r},d("div",{class:"searchcraft-popover-form-input-wrapper searchcraft-popover-form-modal-input-wrapper"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),d("button",{type:"button",class:"searchcraft-popover-form-button searchcraft-popover-form-modal-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}))))}}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return d("div",{class:"searchcraft-popover-form-fullscreen"},d("div",{class:"searchcraft-popover-form"},d("div",{class:"searchcraft-popover-form-input-wrapper searchcraft-popover-form-fullscreen-input-wrapper"},d("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),d("button",{type:"button",class:"searchcraft-popover-form-button searchcraft-popover-form-fullscreen-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),this.hasResultsToShow&&d("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[0,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],isPopoverVisibleInState:[32],unsubscribe:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function Rs(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view"].forEach(t=>{switch(t){case"searchcraft-popover-form":customElements.get(t)||customElements.define(t,Io);break;case"searchcraft-ad":customElements.get(t)||mt();break;case"searchcraft-button":customElements.get(t)||gt();break;case"searchcraft-error-message":customElements.get(t)||vt();break;case"searchcraft-input-form":customElements.get(t)||Ss();break;case"searchcraft-input-label":customElements.get(t)||Kt();break;case"searchcraft-popover-form":customElements.get(t)||Rs();break;case"searchcraft-popover-list-item":customElements.get(t)||Xt();break;case"searchcraft-popover-list-view":customElements.get(t)||Es();break}})}const Mo=Rs,Oo=Xt,Lo=Es,Fo=D(class extends F{constructor(){super();h(this,"template");h(this,"searchTerm");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"searchResultsCount");h(this,"count",0);h(this,"range",[0,0]);h(this,"responseTime","0");h(this,"unsubscribe",()=>{});this.__registerHost()}connectedCallback(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}disconnectedCallback(){this.unsubscribe&&this.unsubscribe()}render(){return!this.searchTerm||this.searchResultsCount===0?null:d("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:Qt}):`${ho(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function Do(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,Fo);break}})}const No=Do,Uo=D(class extends F{constructor(){super();h(this,"item");h(this,"index");h(this,"documentPosition",0);h(this,"template");h(this,"templateHtml");this.__registerHost()}connectedCallback(){var r;if(this.item)try{this.templateHtml=(r=this.template)==null?void 0:r.call(this,this.item.document,this.index,{html:Qt})}catch(s){console.error(`Invalid search result template: ${s}`)}}render(){if(this.item)return typeof this.template>"u"?d("div",{class:"searchcraft-search-result searchcraft-search-result-no-template"},Object.entries(this.item.document).map(([r,s])=>d("p",{key:r},d("strong",null,r),": ",s))):d("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml})}},[0,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],templateHtml:[32]}]);function ws(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-result":customElements.get(t)||customElements.define(t,Uo);break}})}const zo=ws,Ho=D(class extends F{constructor(){super();h(this,"template");h(this,"searchTerm","");h(this,"searchClientResponseItems");h(this,"adClientResponseItems",[]);h(this,"searchResultsPerPage");h(this,"searchResultsPage");h(this,"isSearchInProgress",!0);h(this,"config");h(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){var s;this.unsubscribe=_.subscribe(a=>this.handleStateChange(a));const r=_.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(s=r.core)==null?void 0:s.config}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleStateChange(r){var s;this.searchClientResponseItems=[...r.searchClientResponseItems],this.adClientResponseItems=[...r.adClientResponseItems],this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.config=(s=r.core)==null?void 0:s.config,this.isSearchInProgress=r.isSearchInProgress}renderEmptyState(){return d("div",{class:"searchcraft-search-results-empty-state"},d("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return d("div",{class:"searchcraft-search-results"},d("div",{class:"searchcraft-search-results-error-message"},d("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var r,s;return d("div",{class:"searchcraft-search-results"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>d("searchcraft-ad",{adSource:"adMarketplace",adClientResponseItem:a,adContainerId:X(),key:a.id})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>d("searchcraft-search-result",{key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+o,index:o,item:a,template:this.template})))}renderWithCustomAds(){var i,u,l,p;const r=[],s=((i=this.config)==null?void 0:i.customAdInterstitialInterval)||0,a=((u=this.config)==null?void 0:u.customAdInterstitialQuantity)||1,o=((l=this.config)==null?void 0:l.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let m=0;m<o;m++)r.push(d("searchcraft-ad",{adSource:"Custom",adContainerId:X(),key:`${m}-ad`}));c.forEach((m,b)=>{if(s&&b%s===0&&b+s<c.length&&b>=s)for(let v=0;v<a;v++)r.push(d("searchcraft-ad",{adSource:"Custom",adContainerId:X(),key:`${m.id}-ad-${v}`}));r.push(d("searchcraft-search-result",{key:m.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+b,index:b,item:m,template:this.template}))});for(let m=0;m<n;m++)r.push(d("searchcraft-ad",{adSource:"Custom",adContainerId:X(),key:`${m}-ad`}));return d("div",{class:"searchcraft-search-results"},r)}renderWithNativoAds(){var u,l,p,m,b;const r=[],s=((u=this.config)==null?void 0:u.nativoAdInterstialStartIndex)||0,a=((l=this.config)==null?void 0:l.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((m=this.config)==null?void 0:m.nativoAdStartQuantity)||0,c=((b=this.config)==null?void 0:b.nativoAdEndQuantity)||0,i=this.searchClientResponseItems||[];for(let v=0;v<n;v++)r.push(d("searchcraft-ad",{adSource:"Nativo",adContainerId:X(),key:`${v}-ad`}));i.forEach((v,x)=>{if(a&&(x+s)%a===0&&x+a<i.length&&x>=a)for(let N=0;N<o;N++)r.push(d("searchcraft-ad",{adSource:"Nativo",adContainerId:X(),key:`${v.id}-ad-${N}`}));r.push(d("searchcraft-search-result",{key:v.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+x,index:x,item:v,template:this.template}))});for(let v=0;v<c;v++)r.push(d("searchcraft-ad",{adSource:"Nativo",adContainerId:X(),key:`${v}-ad`}));return d("div",{class:"searchcraft-search-results"},r)}renderWithNoAds(){var r;return d("div",{class:"searchcraft-search-results"},(r=this.searchClientResponseItems)==null?void 0:r.map((s,a)=>d("searchcraft-search-result",{key:s.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:s,template:this.template})))}render(){var r;if(this.searchTerm.trim()==="")return this.renderEmptyState();if(this.searchTerm.length>0&&(this.searchClientResponseItems||[]).length===0&&!this.isSearchInProgress)return this.renderNoResultsFoundState();switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[4,"searchcraft-search-results",{template:[16],searchTerm:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchResultsPerPage:[32],searchResultsPage:[32],isSearchInProgress:[32],config:[32]}]);function jo(){if(typeof customElements>"u")return;["searchcraft-search-results","searchcraft-ad","searchcraft-error-message","searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-results":customElements.get(t)||customElements.define(t,Ho);break;case"searchcraft-ad":customElements.get(t)||mt();break;case"searchcraft-error-message":customElements.get(t)||vt();break;case"searchcraft-search-result":customElements.get(t)||ws();break}})}const Bo=jo,Wo=D(class extends F{constructor(){super();h(this,"caption");h(this,"disabled",!1);h(this,"inputId");h(this,"label");h(this,"labelId");h(this,"name");h(this,"options",[]);h(this,"selectChange");h(this,"searchResultsPerPage");h(this,"setSearchResultsPage",()=>{});h(this,"setSearchResultsPerPage",()=>{});h(this,"handleSelectChange",r=>{this.selectChange.emit(r.target.value)});this.__registerHost(),this.selectChange=Re(this,"selectChange")}handleGoToPage(r){this.setSearchResultsPage(r)}render(){return d("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&d("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),d("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},d("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:r,value:s,selected:a})=>d("option",{key:s,value:s,selected:a},r))),d("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),d("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&d("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[0,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function Ts(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,Wo);break}})}const Vo=D(class extends F{constructor(){super();h(this,"increment",20);h(this,"searchTerm");h(this,"searchResultsPage");h(this,"searchResultsPerPage");h(this,"searchResultsCount");h(this,"searchResultsPagesCount");h(this,"initialSearchResultsPerPage");h(this,"setSearchResultsPerPage",()=>{});h(this,"setSearchResultsPage",()=>{});h(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=_.getState().searchResultsPerPage}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return d("div",{class:"searchcraft-search-results-per-page"},d("div",{class:"searchcraft-search-results-per-page-select"},d("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),d("div",{class:"searchcraft-search-results-per-page-select-input"},d("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,s)=>{const a=this.initialSearchResultsPerPage+Number(this.increment)*s;return{label:`${a}`,value:a}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Go(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-search-results-per-page":customElements.get(t)||customElements.define(t,Vo);break;case"searchcraft-select":customElements.get(t)||Ts();break}})}const qo=Go,Yo=Ts,Qo=bs,Ko=`:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var(--sc-color-background-hover, #fafafa);--sc-color-background-active: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, #f7f7f7 );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-secondary-hover, var(--sc-color-background-hover, #e6e6e6) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var(--sc-color-foreground-secondary, #404040);--sc-border-neutral: rgba(0, 0, 0, 0.1);--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var(--sc-color-brand-hover, #2e2e2e);--sc-color-brand-active: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var(--sc-color-brand-active, #292929);--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-surface-brand-secondary-hover: var( --sc-color-brand-secondary-hover, var(--sc-color-brand-hover, #ebebeb) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover: hsl(from var(--sc-color-success) h s 30);--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, #009900 );--sc-color-success-primary-active: hsl(from var(--sc-color-success) h s 20);--sc-surface-success-primary-active: var( --sc-color-success-primary-active, #006600 );--sc-color-success-secondary: hsl(from var(--sc-color-success) h s 90);--sc-surface-success-secondary: var(--sc-color-success-secondary, #ccffcc);--sc-color-success-secondary-hover: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, #e6ffe6 );--sc-color-success-secondary-active: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, #b2ffb2 );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover: hsl(from var(--sc-color-caution) h s 30);--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, #e57300 );--sc-color-caution-primary-active: hsl(from var(--sc-color-caution) h s 20);--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, #b25a00 );--sc-color-caution-secondary: hsl(from var(--sc-color-caution) h s 90);--sc-surface-caution-secondary: var(--sc-color-caution-secondary, #ffd9b3);--sc-color-caution-secondary-hover: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, #ffe5cc );--sc-color-caution-secondary-active: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, #ffcc99 );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover: hsl(from var(--sc-color-danger) h s 30);--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, #e50000 );--sc-color-danger-primary-active: hsl(from var(--sc-color-danger) h s 20);--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, #b30000 );--sc-color-danger-secondary: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var(--sc-color-danger-secondary, #ffcccc);--sc-color-danger-secondary-hover: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, #ffe7e7 );--sc-color-danger-secondary-active: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, #ffb3b3 );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover: hsl(from var(--sc-color-success) h s 30%);--sc-color-success-primary-active: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary: hsl(from var(--sc-color-success) h s 90%);--sc-color-success-secondary-hover: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover: hsl(from var(--sc-color-caution) h s 30%);--sc-color-caution-primary-active: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary: hsl(from var(--sc-color-caution) h s 90%);--sc-color-caution-secondary-hover: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover: hsl(from var(--sc-color-danger) h s 30%);--sc-color-danger-primary-active: hsl(from var(--sc-color-danger) h s 20%);--sc-color-danger-secondary: hsl(from var(--sc-color-danger) h s 90%);--sc-color-danger-secondary-hover: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-custom-ad{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size)}.searchcraft-adm-ad{all:unset;border:2px solid blue;border-radius:var(--sc-border-radius);cursor:pointer;display:flex;flex-direction:row;gap:8px;padding:var(--sc-popover-list-item-padding-vertical) var(--sc-popover-list-item-padding-horizontal)}.searchcraft-adm-ad:focus{background-color:var(--sc-surface-neutral-secondary-active);color:var(--sc-content-neutral-secondary)}.searchcraft-adm-ad:hover{background-color:var(--sc-surface-neutral-secondary-hover);color:var(--sc-content-neutral-secondary)}.searchcraft-adm-ad-title{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:inherit;margin:0}.searchcraft-adm-ad-subtitle{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:inherit;margin:0}.searchcraft-adm-ad-image-wrapper{align-items:center;display:flex;flex-shrink:0;height:var(--sc-popover-list-item-image-size);justify-content:center;width:var(--sc-popover-list-item-image-size)}.searchcraft-adm-ad-image{max-height:var(--sc-popover-list-item-image-size);max-width:var(--sc-popover-list-item-image-size)}.searchcraft-adm-ad-info-wrapper{display:flex;flex-direction:column;gap:8px;justify-content:center}.searchcraft-search-result{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size)}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-brand);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius-sm);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:block}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:block}.searchcraft-facet-list-child-checkbox-label{margin-left:24px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:8px;position:absolute;top:9px;width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:9px;position:absolute;top:3px;width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-disabled);text-align:center}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-bold)}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px;--sc-input-form-padding-left: 44px;--sc-input-form-padding-right: 44px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px var(--sc-input-form-padding-left)}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px}.searchcraft-input-form-input:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:var(--sc-input-form-padding-left)}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:var(--sc-input-form-padding-right)}.searchcraft-input-form-clear-button-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-form-border-radius: var(--sc-border-radius);--sc-popover-list-view-height: 400px;--sc-popover-list-item-image-size: 60px;--sc-popover-list-item-padding-horizontal: 8px;--sc-popover-list-item-padding-vertical: 8px;--sc-popover-modal-max-width: 570px}.searchcraft-popover-form{display:flex;flex:1;flex-direction:column}.searchcraft-popover-form-input-wrapper{background-color:var(--sc-surface-neutral-secondary);display:flex;flex-direction:row;gap:4px;padding:12px}.searchcraft-popover-form-input-wrapper>searchcraft-input-form{flex:1}.searchcraft-popover-form-button{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);border:0;border-radius:var(--sc-popover-form-border-radius);background:none;cursor:pointer;flex-shrink:0;outline:0;padding:0 12px}.searchcraft-popover-form-button:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-popover-form-button:focus{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-popover-form-inline .searchcraft-input-form-input{border-top-left-radius:var(--sc-popover-form-border-radius);border-bottom-left-radius:var(--sc-popover-form-border-radius);border-bottom-right-radius:var(--sc-popover-form-border-radius);border-top-right-radius:var(--sc-popover-form-border-radius);border:none;outline:none}.searchcraft-popover-form-inline.searchcraft-popover-form-active .searchcraft-input-form-input{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--sc-popover-form-border-radius);border-top-right-radius:var(--sc-popover-form-border-radius)}.searchcraft-popover-form-inline-wrapper-outer{position:relative}.searchcraft-popover-form-inline-wrapper-inner{height:var(--sc-popover-list-view-height);position:absolute;width:100%;z-index:1000}.searchcraft-popover-form-inline .searchcraft-popover-list-view{background-color:var(--sc-surface-neutral-secondary);border-bottom-left-radius:var(--sc-popover-form-border-radius);border-bottom-right-radius:var(--sc-popover-form-border-radius);display:flex;flex-direction:column;max-height:var(--sc-popover-list-view-height);overflow:auto}.searchcraft-popover-form-modal{--sc-popover0-form-border-radius: var(--sc-border-radius-lg);align-items:flex-start;background-color:var(--sc-surface-neutral-secondary);display:flex;inset:0;justify-content:center;padding:0;position:fixed;z-index:1000}@media(min-width: 576px){.searchcraft-popover-form-modal{background-color:rgba(0,0,0,0);padding:16px}}.searchcraft-popover-form-modal .searchcraft-popover-list-view{background-color:var(--sc-surface-neutral-secondary);border-bottom-left-radius:0;border-bottom-right-radius:0;display:flex;flex-direction:column;overflow:auto}@media(min-width: 576px){.searchcraft-popover-form-modal .searchcraft-popover-list-view{max-height:var(--sc-popover-list-view-height)}}.searchcraft-popover-form-modal .searchcraft-popover-list-view{overflow:scroll}@media(min-width: 576px){.searchcraft-popover-form-modal .searchcraft-popover-list-view{overflow:auto}}.searchcraft-popover-form-modal{border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px);outline-width:1px;outline-color:var(--sc-border-neutral)}.searchcraft-popover-form-modal-backdrop{background-color:rgba(0,0,0,.5);display:none;inset:0;position:absolute}@media(min-width: 576px){.searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal-inner{border-radius:var(--sc-popover-form-border-radius);display:flex;inset:0;margin-top:0px;overflow:hidden;position:absolute;z-index:1002}@media(min-width: 576px){.searchcraft-popover-form-modal-inner{inset:auto;margin-top:100px;max-width:var(--sc-popover-modal-max-width);position:relative;width:100%}}.searchcraft-popover-form-modal-input-wrapper .searchcraft-input-form-input{border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px);border:1px solid var(--sc-border-neutral)}.searchcraft-popover-form-modal-button{border-radius:calc(--sc-popover-form-border-radius - 12px);border-radius:calc(var(--sc-popover-form-border-radius) - 12px)}.searchcraft-popover-form-fullscreen{position:fixed;inset:0;z-index:1000;background-color:var(--sc-surface-neutral-secondary)}.searchcraft-popover-form-fullscreen .searchcraft-popover-form{position:absolute;inset:0}.searchcraft-popover-form-fullscreen .searchcraft-popover-list-view{overflow:scroll}.searchcraft-popover-form-fullscreen-input-wrapper .searchcraft-input-form-input{border-radius:var(--sc-popover-form-border-radius);outline-width:1px;outline-color:var(--sc-border-neutral)}.searchcraft-popover-form-fullscreen-button{border-radius:var(--sc-popover-form-border-radius)}.searchcraft-popover-list-item{all:unset;color:var(--sc-content-neutral-secondary);display:flex;flex-direction:row;cursor:pointer;gap:8px;padding-right:var(--sc-popover-list-item-padding-horizontal);padding-left:var(--sc-popover-list-item-padding-horizontal);padding-top:var(--sc-popover-list-item-padding-vertical);padding-bottom:var(--sc-popover-list-item-padding-vertical)}.searchcraft-popover-list-item:focus{background-color:var(--sc-surface-neutral-secondary-active);color:var(--sc-content-neutral-secondary)}.searchcraft-popover-list-item:hover{background-color:var(--sc-surface-neutral-secondary-hover);color:var(--sc-content-neutral-secondary)}.searchcraft-popover-list-item-title{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);margin:0;color:inherit}.searchcraft-popover-list-item-subtitle{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);margin:0;color:inherit}.searchcraft-popover-list-item-image-wrapper{width:var(--sc-popover-list-item-image-size);height:var(--sc-popover-list-item-image-size);display:flex;align-items:center;justify-content:center;flex-shrink:0}.searchcraft-popover-list-item-image{max-width:var(--sc-popover-list-item-image-size);max-height:var(--sc-popover-list-item-image-size)}.searchcraft-popover-list-item-info-wrapper{display:flex;flex-direction:column;gap:8px;justify-content:center}.searchcraft-results-info{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-primary);margin:0}.searchcraft-slider{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%}.searchcraft-slider-range{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px}.searchcraft-slider-label{color:var(--sc-content-primary);display:flex;font-family:"Source Sans Pro",sans-serif;font-size:15px;font-weight:600;justify-content:space-between;margin-top:10px;width:100%}.searchcraft-slider-start-label,.searchcraft-slider-end-label{min-width:30px;text-align:center}.searchcraft-toggle-button{align-items:flex-start;display:flex;gap:10px;justify-content:space-between}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);color:var(--sc-content-neutral-primary);margin:0}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-toggle-button-background{background:var(--sc-surface-disabled);border-radius:var(--sc-border-radius-full);border:none;cursor:pointer;flex-shrink:0;height:26px;position:relative;transition:background-color .2s;width:44px}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-active .searchcraft-toggle-button-background{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-active .searchcraft-toggle-button-handle{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);font-weight:var(--sc-font-normal);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size)}.searchcraft-search-results-per-page-select-input{min-width:120px}/*# sourceMappingURL=hologram.css.map */
|
|
25
|
+
`,Xo=D(class extends F{constructor(){super(),this.__registerHost()}render(){return d("style",{key:"59491f4345817c2917f7158ae92f199281fb511b"},Ko)}},[0,"searchcraft-theme"]);function Zo(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,Xo);break}})}const Jo=Zo,ec=ys,ks=()=>{to(),so(),no(),fo(),yo(),Ro(),wo(),Po(),$o(),Mo(),Oo(),Lo(),No(),zo(),qo(),Bo(),Yo(),Qo(),Jo(),ec()};globalThis.__scDefineCustomElements__=ks;const Ps={name:"@searchcraft/vue-sdk",version:"0.10.0",private:!1,author:"Searchcraft Inc.",description:"Searchcraft Vue SDK.",type:"module",license:"Apache-2.0",keywords:["searchcraft"],scripts:{dev:"vite",clean:"rm -rf dist",build:"yarn clean && vite build",docs:"typedoc --options typedoc.json",preview:"vite preview","build-only":"vite build","type-check":"vue-tsc --build"},repository:{type:"git",url:"https://bitbucket.org/madebychalk/searchcraft-javascript-sdks/"},engines:{node:">=18.0.0",npm:">=10.0.0"},main:"./dist/index.umd.js",module:"./dist/index.es.js",types:"./dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.es.js",require:"./dist/index.umd.js"},"./components":"./dist/components/index.d.ts","./plugin":"./dist/plugin.d.ts"},files:["dist"],peerDependencies:{vue:"^3.5.13"},devDependencies:{"@searchcraft/javascript-sdk":"^0.10.0","@tsconfig/node22":"^22.0.0","@types/node":"^22.10.7","@vitejs/plugin-vue":"^5.2.1","@vitejs/plugin-vue-jsx":"^4.1.1","@vue/runtime-dom":"^3.5.13","@vue/tsconfig":"^0.7.0","npm-run-all2":"^7.0.2",vite:"^6.0.11","vite-plugin-dts":"^4.5.0","vite-plugin-vue-devtools":"^7.7.0","vue-docgen-web-types":"^0.1.8","vue-tsc":"^2.2.0"}},Zt="routerLink",Cs="navManager",tc="router",rc="aria",Ye=Symbol(),xs={default:Ye},$s=e=>(e==null?void 0:e.split(" "))||[],sc=(e,t,r=[])=>{var s;return[...Array.from(((s=e.value)==null?void 0:s.classList)||[]),...r].filter((a,o,n)=>!t.has(a)&&n.indexOf(a)===o)},ge=(e,t,r=[],s=[],a,o)=>{t!==void 0&&t();const n=B.defineComponent((c,{attrs:i,slots:u,emit:l})=>{var q;const p=B.ref(),m=new Set($s(i.class)),b=B.getCurrentInstance(),x=((q=b==null?void 0:b.appContext)==null?void 0:q.provides[Cs])?B.inject(Cs):void 0,N=$=>{const{routerLink:ve}=c;if(ve!==Ye)if(x!==void 0){$.preventDefault();let oe={event:$};for(const Pe in c){const U=c[Pe];c.hasOwnProperty(Pe)&&Pe.startsWith(tc)&&U!==Ye&&(oe[Pe]=U)}x.navigate(oe)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[a],$s(i.class).forEach(U=>{m.add(U)});const $=c.onClick,ve=U=>{$!==void 0&&$(U),U.defaultPrevented||N(U)};let oe={ref:p,class:sc(p,m),onClick:ve};for(const U in c){const se=c[U];(c.hasOwnProperty(U)&&se!==Ye||U.startsWith(rc))&&(oe[U]=se);const z="on"+U.slice(0,1).toUpperCase()+U.slice(1),Ce=i[z];p.value&&i.hasOwnProperty(z)&&"addEventListener"in p.value&&p.value.addEventListener(U,Ce)}return Zt in c&&c[Zt]!==Ye&&(oe={...oe,href:c[Zt]}),B.h(e,oe,u.default&&u.default())}});if(typeof n!="function"){let c=[],i={};i.ROUTER_LINK_VALUE=xs,r.forEach(u=>i[u]=xs),c=s,n.name=e,n.emits=c,n.props=i}return n},ac=ge("searchcraft-filter-panel",()=>{},["items"]),nc=ge("searchcraft-input-form",()=>{},["autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","core","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),oc=ge("searchcraft-pagination",()=>{}),cc=ge("searchcraft-popover-button",()=>{}),ic=ge("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier"]),lc=ge("searchcraft-results-info",()=>{},["template"]),uc=ge("searchcraft-search-results",()=>{},["template"]),fc=ge("searchcraft-search-results-per-page",()=>{},["increment"]),dc=ge("searchcraft-theme",()=>{}),hc=uc,pc=ac,mc=nc,gc=cc,vc=ic,bc=lc,yc=dc,Sc=oc,Ec=fc;class Rc extends _n{constructor(t){super(t,{sdkName:Ps.name,sdkVersion:Ps.version})}}ks(),O.Searchcraft=Rc,O.SearchcraftFilterPanel=pc,O.SearchcraftInputForm=mc,O.SearchcraftPagination=Sc,O.SearchcraftPopoverButton=gc,O.SearchcraftPopoverForm=vc,O.SearchcraftResultsInfo=bc,O.SearchcraftSearchResults=hc,O.SearchcraftSearchResultsPerPage=Ec,O.SearchcraftTheme=yc,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
|
36
26
|
//# sourceMappingURL=index.umd.js.map
|