PageSourceSearch

https://kashiwabaralife.com/hubfs/hub_generated/module_assets/1/19…/1758517806720/module_search_input.min.js

js kashiwabaralife.com collected 2026-10-09 21:28:58 UTC 3,381 bytes, 2 lines download raw bytes

1var module_194792399631=function(){var searchResults,hsSearch=function(o){function r(){for(var o=[],e=(o.push(f),d.getElementsByTagName("A")),t=0;t<e.length;t++)o.push(e[t]);var a=o[0],c=o[o.length-1];h.addEventListener("keydown",(function(e){switch(e.key){case l.TAB:(r=e).target!==c||r.shiftKey?r.target===a&&r.shiftKey&&(r.preventDefault(),c.focus()):(r.preventDefault(),a.focus());break;case l.ESC:case l.ESCAPE:v();break;case l.UP:case l.ARROW_UP:(n=e).preventDefault(),n.target===a?c.focus():o.forEach((function(e){e===n.target&&o[o.indexOf(e)-1].focus()}));break;case l.DOWN:case l.ARROW_DOWN:(t=e).preventDefault(),t.target===c?a.focus():o.forEach((function(e){e===t.target&&o[o.indexOf(e)+1].focus()}))}var t,n,r}))}function n(){for(var e=[],t=o.querySelector("form"),n=0;n<t.querySelectorAll("input[type=hidden]").length;n++){var r=t.querySelectorAll("input[type=hidden]")[n];"limit"!==r.name&&e.push(encodeURIComponent(r.name)+"="+encodeURIComponent(r.value))}return p(e).join("&")}function e(){var t=new XMLHttpRequest,e="/_hcms/search?&term="+encodeURIComponent(i)+"&limit="+encodeURIComponent(3)+"&autocomplete=true&analytics=true&"+n();t.open("GET",e,!0),t.onload=function(){var e,n;200<=t.status&&t.status<400?(0<(e=JSON.parse(t.responseText)).total?((n=[]).push("<li id='results-for'>「"+e.searchTerm+"」の結果</li>"),e.results.forEach((function(e,t){n.push("<li id='result"+t+"'><a href='"+e.url+"'>"+e.title+"</a></li>")})),v(),d.innerHTML=n.join(""),h.classList.add("hs-search-field--open"),r):v)():console.error("Server reached, error retrieving results.")},t.onerror=function(){console.error("Could not reach the server.")},t.send()}var a,u,l={TAB:"Tab",ESC:"Esc",ESCAPE:"Escape",UP:"Up",ARROW_UP:"ArrowUp",DOWN:"Down",ARROW_DOWN:"ArrowDown"},i="",h=o,f=o.querySelector(".hs-search-field__input"),d=o.querySelector(".hs-search-field__suggestions"),p=function(e){var t=document.getElementById("hs-search-input__valid-content-types");if(t)try{var n=Object.freeze(JSON.parse(t.textContent)),r=new URLSearchParams(window.location.search).getAll("type"),o=[];return r.forEach((function(e){n.includes(e)&&(e="type="+encodeURIComponent(e),o.push(e))})),0<o.length?o:e}catch(e){console.warn("Error parsing valid content types:",e)}return e},v=function(){d.innerHTML="",f.focus(),h.classList.remove("hs-search-field--open")},t=(a=function(){2<(i=f.value).length?e():0===i.length&&v()},function(){var e=this,t=arguments;clearTimeout(u),u=setTimeout((function(){u=null,a.apply(e,t)}),250)});f.addEventListener("input",(function(){i!==f.value&&t()})),h.addEventListener("submit",(function(e){e.preventDefault();var t=(e=e.target).querySelector(".hs-search-field__input");t=encodeURIComponent(t.value),e=e.getAttribute("action");(t=(e+=(e.includes("?")?"&":"?")+"term="+t,n()))&&(e+="&"+t),window.location.href=e}))};(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?(searchResults=document.querySelectorAll(".hs-search-field"),Array.prototype.forEach.call(searchResults,(function(e){hsSearch(e)}))):document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelectorAll(".hs-search-field");Array.prototype.forEach.call(e,(function(e){hsSearch(e)}))}))}();
2//# sourceURL=https://8043846.fs1.hubspotusercontent-na1.net/hubfs/8043846/hub_generated/module_assets/1/194792399631/1758517806720/module_search_input.js

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.