PageSourceSearch

https://okaydev.co/dist/assets/job-listing-renderer-BJn4iNfw.js

js okaydev.co collected 2026-10-03 23:31:29 UTC 6,022 bytes, 1 lines download raw bytes

1import{l as e,a as t,i as o,D as s}from"./default-renderer-B6hd38wO.js";/* empty css                       */import{b as i,G as a,g as r}from"./HeaderLogoLetters-CMLHzChc.js";import{C as n}from"./choices-C12I8513.js";import{h as c,s as l,p as u,a as d}from"./patchChoicesSingleSelectA11y-wjOCiU88.js";import"./app-BiaPDw27.js";import"./refreshNavbarAuth-V-4DhXEm.js";import"./lazyDialog-CU88mIO4.js";import"./SplitText-VLUCmDhw.js";import"./distributeProjectAuthorCard-W_A8WnxX.js";import"./SocialPosts-Sl2W8KRq.js";import"./patchCommentsProtect-0fppbX_Y.js";import"./loadEmojiPicker-CsEuOpyk.js";const h=class{constructor(){this.initVars(),this.initAnimations(),this.initPage()}initVars(){this.isPop=!1,this.pageRoot=document.querySelector('[data-router-view="jobListing"]'),this.singleSelects=[],this.multiSelects=[],this.choicesInputs=[],this.jobListing=document.querySelector("#jobListing"),this.jobItems=document.querySelectorAll(".job-item")}initAnimations(){}initPage(){e(this.pageRoot)&&t(this.pageRoot,(()=>this.mountChoices())),this.initJobItemFocusTargets(),this.addListeners()}addListeners(){const e=this;i(e,["windowLocationReload","beforeRequest","afterSwap","afterRequest","onJobFilterBarDelegatedChange","handleJobItemTouchStart","onServdDynamicLoaded"]),window.addEventListener("popstate",e.windowLocationReload),a.on("htmx:beforeRequest",e.beforeRequest),a.on("htmx:afterSwap",e.afterSwap),a.on("htmx:afterRequest",e.afterRequest),e.pageRoot&&e.pageRoot.addEventListener("change",e.onJobFilterBarDelegatedChange),window.addEventListener("servd.dynamicloaded",e.onServdDynamicLoaded)}removeListeners(){var e;const t=this;c(this.pageRoot),window.removeEventListener("popstate",t.windowLocationReload),a.off("htmx:beforeRequest",t.beforeRequest),a.off("htmx:afterSwap",t.afterSwap),a.off("htmx:afterRequest",t.afterRequest),null==(e=t.pageRoot)||e.removeEventListener("change",t.onJobFilterBarDelegatedChange),window.removeEventListener("servd.dynamicloaded",t.onServdDynamicLoaded),t.destroyChoices(),document.querySelectorAll('.job-item[data-job-touch-focus-bound="true"]').forEach((e=>{e.removeEventListener("touchstart",t.handleJobItemTouchStart),delete e.dataset.jobTouchFocusBound,e.dataset.jobTouchFocusTarget&&(e.removeAttribute("tabindex"),delete e.dataset.jobTouchFocusTarget)}))}stopPage(){this.removeListeners(),document.body.style.removeProperty("cursor")}destroyChoices(){this.pageRoot&&(this.pageRoot.querySelectorAll("select.is-choice, select.is-choices").forEach((e=>{if(e.choices){try{e.choices.destroy()}catch(t){}delete e.choices}})),this.singleSelects=[],this.multiSelects=[],this.choicesInputs=[])}onJobFilterBarDelegatedChange(e){const t=e.target;t&&"function"==typeof t.closest&&t.closest(".filter-bar")&&(t.matches("select.is-choice")||t.matches("select.is-choices")||t.matches('input[name="search"]')&&"search"===t.getAttribute("name"))&&requestAnimationFrame((()=>this.syncJobFiltersToUrl()))}syncJobFiltersToUrl(){var e;if(!this.pageRoot)return;const t=document.querySelector("#jobListing"),o=null==(e=null==t?void 0:t.dataset)?void 0:e.currentPage;l(this.pageRoot,{page:o})}afterRequest(e){var t;const o=null==(t=e.detail)?void 0:t.target;o&&"jobListing"===o.id&&requestAnimationFrame((()=>this.syncJobFiltersToUrl()))}mountChoices(){const e=this.pageRoot;if(!e)return;const t=this;this.destroyChoices(),this.singleSelects=e.querySelectorAll("select.is-choice"),this.multiSelects=e.querySelectorAll("select.is-choices"),this.singleSelects.forEach((e=>{e.choices=new n(e,{allowHTML:!1,searchEnabled:!1,removeItemButton:!0,shouldSort:!1,shouldSortItems:!1,callbackOnInit(){var e,t;null==(t=null==(e=this.input)?void 0:e.element)||t.setAttribute("autocomplete","off")}}),u(e)})),this.multiSelects.forEach((e=>{e.choices=new n(e,{allowHTML:!1,removeItemButton:!0,shouldSort:!1,shouldSortItems:!1,callbackOnInit(){var e,t;null==(t=null==(e=this.input)?void 0:e.element)||t.setAttribute("autocomplete","off")}}),d(e),t.choicesInputs.push(e)}))}onServdDynamicLoaded(e){var s;const i=Array.isArray(null==(s=null==e?void 0:e.detail)?void 0:s.blocks)?e.detail.blocks:[];o(i)&&t(this.pageRoot,(()=>{this.mountChoices(),requestAnimationFrame((()=>this.syncJobFiltersToUrl()))}
1))}windowLocationReload(){window.location.reload()}initJobItemFocusTargets(){const e=window.matchMedia("(hover: none), (pointer: coarse)").matches;document.querySelectorAll(".job-item").forEach((t=>{e?(t.setAttribute("tabindex","0"),t.dataset.jobTouchFocusTarget="true",t.dataset.jobTouchFocusBound||(t.addEventListener("touchstart",this.handleJobItemTouchStart,{passive:!0}),t.dataset.jobTouchFocusBound="true")):(t.dataset.jobTouchFocusBound&&(t.removeEventListener("touchstart",this.handleJobItemTouchStart),delete t.dataset.jobTouchFocusBound),t.dataset.jobTouchFocusTarget&&(t.removeAttribute("tabindex"),delete t.dataset.jobTouchFocusTarget))}))}handleJobItemTouchStart(e){var t;if(!window.matchMedia("(hover: none), (pointer: coarse)").matches)return;const o=e.target.closest('.job-item[data-job-touch-focus-target="true"]');if(!o)return;const s=document.activeElement,i=null==(t=null==s?void 0:s.closest)?void 0:t.call(s,'.job-item[data-job-touch-focus-target="true"]');i&&i!==o&&"function"==typeof s.blur&&s.blur(),document.activeElement!==o&&o.focus({preventScroll:!0})}beforeRequest(e){if("jobListing"==e.detail.target.id){const e=document.querySelector("#jobListing");e.style.pointerEvents="none",r.to(e,{opacity:.5,duration:.3})}}afterSwap(e){var t;if("jobListing"==e.detail.target.id){const e=document.querySelector("#jobListing");e.style.pointerEvents="auto",e.style.opacity=1,this.jobItems=document.querySelectorAll(".job-item"),this.initJobItemFocusTargets();const o=null==(t=null==e?void 0:e.dataset)?void 0:t.currentPage;l(this.pageRoot,{page:o})}}};let m;class p extends s{onEnter(){super.onEnter()}async onLeave(){if(super.onLeave(),m)try{await m.stopPage()}finally{m=null}}onEnterCompleted(){super.onEnterCompleted(),m=new h}onLeaveCompleted(){super.onLeaveCompleted()}}export{p as default};

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.