1import{a as _,j as e}from"./external-link-DKgZU8z4.js";import{a as be,c as je,b as ve,r as x}from"./vendor-react-BpBRECMi.js";import{s as we,u as Ce,x as M,_ as ae,y as V,a6 as Se,X as ke,a7 as De,C as Le,a8 as re}from"./main-cKcwwXp3.js";import{n as oe}from"./aucyberUrls-OVJUzDq6.js";import{u as $e}from"./useModuleToggles-C3XZ286Q.js";import{u as Be}from"./TranslationContext-DyOPlQY4.js";import{P as ie}from"./PublicPageHeader-BgbvD0Kh.js";import{H as se}from"./HubFooter-vGfWMyWv.js";import{E as v}from"./careers-zVKVWE--.js";import{S as O}from"./StylableRegion-pyDL5ubz.js";import{u as Pe,l as Ae}from"./useListingCustomCss-DDO9U7VI.js";import{b as Fe}from"./useCustomEntityLayouts-BkcG458a.js";import{l as qe,C as Te}from"./CustomEntityLayout-CvbKuEKo.js";import{B as U}from"./briefcase-CptV_AS7.js";import{S as Ee}from"./search-CJysPhEv.js";import{F as Ie}from"./filter-DA_o3_iH.js";import{A as le}from"./index-BPZPAngT.js";import{m as N}from"./proxy-BYDqxMKO.js";import{B}from"./building-2-6Jf9O9vz.js";import{S as z}from"./star-CzQMex3v.js";import{M as P}from"./map-pin-CVkQla9j.js";import{D as me}from"./dollar-sign-BkwGRJmg.js";import{C as Re}from"./calendar-BW2-KD5X.js";import{A as ne}from"./arrow-right-nILsib9v.js";import{S as Me}from"./sparkles-DMwEyNRQ.js";import{C as ze}from"./clock-CHZQSQdm.js";import"./vendor-supabase-CWiu_0Sd.js";import"./client-DF_nHXpp.js";import"./consent-C4o_3IrG.js";import"./circle-check-BIASu7qA.js";import"./digitalExperienceModules-BmzCcGKj.js";import"./accessibility-D_Dc9qHX.js";import"./newspaper-DyKwNzMf.js";import"./gavel-zKC-77Dj.js";import"./book-open-COiRnr3X.js";import"./calendar-clock-3DROjXoz.js";import"./ticket-DOPIPmxr.js";import"./presentation-BPif_6y7.js";import"./useResidentAuthSafe-CZaIJ_Ct.js";import"./useResidentDashboardSettings-Cgkd1IuR.js";import"./NotificationBell-Bn0QbKEW.js";import"./usePushNotifications-DJLD8jZx.js";import"./conferenceAuthClient-CLjctj6T.js";import"./bell-ring-DLN3Mpej.js";import"./bell-off-Blo8bkXb.js";import"./bell-D2NaqWeN.js";import"./globe-C-ERAOjg.js";import"./index-BT8k09yG.js";import"./OrgBannerItem-By2Nu4aN.js";import"./security-DEBt3W5X.js";import"./purify.es-BPuvlvQ_.js";import"./OrgBannerRegion-BBfQLgHi.js";import"./usePublicSiteTargets-CpIKJIDP.js";import"./eye-CHYl_NVm.js";import"./link-Cot1q64P.js";import"./type-Bnx3EH-w.js";import"./youtube-PKZ9BUv9.js";import"./pause-Yz0-JyVJ.js";import"./mouse-pointer-2-W1TeU-Iz.js";import"./align-left-7Ft1V-WZ.js";import"./rotate-ccw-CcN2RCTN.js";import"./menu-BtporcsX.js";import"./chevron-right-DHBxVDDw.js";import"./user-D5G-KCpF.js";import"./log-in-ClDcRDFD.js";import"./linkedin-DgXOeECT.js";import"./instagram-CDeT7Mxi.js";import"./facebook-Bb_1Cm-t.js";import"./phone-COs7uhUK.js";import"./mail-B7fKYEbq.js";import"./useSupabaseQuery-BW5IcQi5.js";import"./customEntityLayout-CVnPAh2p.js";import"./CustomElementBlock-DZFc2ith.js";import"./renderTemplate-jCW0fL8T.js";import"./customElementIconSize-DQJg8IvT.js";import"./icons-Cb3uATUv.js";import"./chevron-left-lmDZqDgO.js";import"./sliders-horizontal-DY5KWDfl.js";import"./play-BwtB6WMv.js";import"./eventQueries-Dg-ylFJ3.js";import"./careersService-6kDlwuSE.js";import"./tendersService-BPJniCNl.js";import"./place-BB1xC-gw.js";import"./event-CQWYT6v9.js";import"./format-C4XpGIsG.js";import"./en-US-Bkt1-8xp.js";import"./resolveLucideIcon-BtLZPPde.js";import"./lucide-react-CINJL-0W.js";import"./activity-oOnKojpP.js";import"./align-right-BCZpux_F.js";import"./archive-restore-BpRsp0E0.js";import"./archive-VLjYh17z.js";import"./armchair-DKbOon0y.js";import"./arrow-down-right-DEn7EtE9.js";import"./arrow-down-BB56QOAK.js";import"./arrow-left-right-DF4DaSRm.js";import"./arrow-right-left-cBq40YIl.js";import"./arrow-up-down-BoR1eEjN.js";import"./arrow-up-right-BBqxbDT3.js";import"./arrow-up-BICc6rcv.js";import"./eraser-DxJ-TrbX.js";import"./atom-B72iHJR-.js";import"./award-BWvqqgyT.js";import"./shield-question-UuPXwi2L.js";import"./badge-check-DyauKdJD.js";import"./badge-dollar-sign--9PTymDt.js";import"./badge-percent-Ctz9Q6ih.js";import"./badge-Cmhcgdxa.js";import"./ban-C7nA0LEL.js";import"./banknote-CWco_V5U.js";import"./bar-chart-2-D_W40rIC.js";import"./bar-chart-3-LEFBrdLx.js";import"./beer-Btu81ADv.js";import"./blocks-Ml49gQVQ.js";import"./italic-DK9T2YJw.js";import"./star-off-C393Bmh9.js";import"./book-marked-D1wM5iMo.js";import"./server-cog-KUkvI_N5.js";import"./bookmark-plus-DRuW0VCR.js";import"./bookmark-ChcEID3h.js";import"./bot-D7QCEl6q.js";import"./utensils-BCCKKYnH.js";import"./brain-BzMloFMt.js";import"./bug-C1LmxrES.js";import"./building-eTZPUhWX.js";import"./tree-pine-Cff6XPen.js";import"./siren-C2ZzGK_F.js";import"./scan-barcode-DDKj8-mV.js";import"./calculator-Mf-9NyTM.js";import"./calendar-check-2-DqcEhIDC.js";import"./calendar-check-BJ8CFkHy.js";import"./calendar-days-D4KqLecV.js";import"./calendar-off-Y0uePrnB.js";import"./calendar-plus-CAT73L5N.js";import"./calendar-range-yTUH0TJC.js";import"./calendar-x-2-r2MRQYGX.js";import"./calendar-x-Cu2lw8XG.js";import"./camera-off-CN2OxpLc.js";import"./camera-mmGtKmWp.js";import"./check-check-CUfurfAA.js";import"./paint-bucket-DMqW-ew-.js";import"./chevrons-up-down-C3ZMPhD7.js";import"./file-lock-DEW8xrYi.js";import"./circle-dashed-DVj3OYz2.js";import"./circle-dot-DPifRXk6.js";import"./circle-pause-B5g83lDS.js";import"./circle-play-CQgVScjW.js";import"./circle-plus-CD2l0vxa.js";import"./signpost-DdSXx6Ri.js";import"./circle-user-round-DL6j5lxC.js";import"./circle-user-D4JJnoEt.js";import"./circle-x-AXDD1d5n.js";import"./circle-BXirTeWa.js";import"./clapperboard-BxtXVFg_.js";import"./clipboard-check-Dgye0Vcn.js";import"./clipboard-copy-Br1EQTXw.js";import"./clipboard-list-NM89FuZm.js";import"./clipboard-paste-dp297twN.js";
1import"./notebook-pen-CWbtlPS7.js";import"./clock-3-Bgk0PLG3.js";import"./cloud-cog-BHgsVUaB.js";import"./cloud-upload-h8Um1YfE.js";import"./cloud-BLIJUg7u.js";import"./code-xml-BESpTYCS.js";import"./code-aGlYPVqh.js";import"./coffee--QrzKVoJ.js";import"./coins-BIPOiWUc.js";import"./columns-2-HDkp94dI.js";import"./columns-3-DHOLMcIY.js";import"./compass-D7XA8AX6.js";import"./copy-vGWMgn6y.js";import"./corner-down-right-CrozZ1jP.js";import"./cpu-B5rcSrJg.js";import"./credit-card-BNzlnwfX.js";import"./film-BrQHAOOl.js";import"./crown-BHBa-k9S.js";import"./database-zap-7psge2Yl.js";import"./database-BaP4-uCi.js";import"./square-split-horizontal-DJ8c58e-.js";import"./door-open-DrWgLKp_.js";import"./earth-B01M2dSi.js";import"./repeat-2-BuR10ce2.js";import"./eye-off-DGaLC5-g.js";import"./file-image-Di51KlBy.js";import"./file-bar-chart-raa0vlYs.js";import"./file-check-Bg9vRzh7.js";import"./file-clock-Bm1WmrM_.js";import"./file-down-DUh4vOrj.js";import"./file-pen-line-7E-XwwlZ.js";import"./file-question-3T8Dj1Nq.js";import"./file-search-C8ISXTYV.js";import"./file-spreadsheet-DmPmZgdR.js";import"./file-text-BW0CVo52.js";import"./file-up-7arTbiJr.js";import"./file-warning-VRLARs8l.js";import"./file-pDa1vfJC.js";import"./files-C_y0ZddM.js";
1import"./fingerprint-6DrAHpU4.js";import"./flag-CIqGCkhW.js";import"./flame-3HUb7mqa.js";import"./flask-conical-Cg6ywouR.js";import"./folder-closed-kA_58NPM.js";import"./folder-heart-B9mZ5rU2.js";import"./folder-kanban-BdutO6lG.js";import"./folder-open-dot-Dphk1XT0.js";import"./folder-open-ViS7XxUi.js";import"./folder-plus-D_6G2oi2.js";import"./folder-search-D142b_kU.js";import"./folder-tree-CW6VH-KD.js";import"./unplug-CbJYV7wI.js";import"./meh-X87Gg4YN.js";import"./gauge-Dnredkko.js";import"./gift-rt1pCGdB.js";import"./git-branch-DxWdjMnm.js";import"./git-compare-B2Uy7evj.js";import"./graduation-cap-DDl0qEEr.js";import"./grid-2x2-Dw9rhqaD.js";import"./grid-3x3-BPW7Il6g.js";import"./grip-vertical-BYhNxjOY.js";import"./sigma-C8B1vDLq.js";import"./hand-B5AiqofN.js";import"./handshake-CFfRKND8.js";import"./hard-drive-gO0jzU8Q.js";import"./hard-hat-DhHFyk8o.js";import"./hash-B1kA-jJx.js";import"./panel-right-open-DS9nbgXT.js";import"./heading-2-CNlfkN1x.js";import"./headphones-DBf5LVt5.js";import"./headset-CEVkrzl0.js";import"./heart-handshake-CYHvtvth.js";import"./heart-pulse-C7Gc6ymJ.js";import"./heart-CaRu7F7h.js";import"./history-DDJNS6DP.js";import"./hourglass-DLbmoJUQ.js";import"./house-CoFDGzC-.js";import"./image-plus-B-36g1vZ.js";import"./image-BKCFE-fq.js";import"./images-pkGVE92X.js";import"./inbox-CIBwzpxk.js";import"./infinity-BfOxz35y.js";import"./key-DvKhcQA9.js";import"./keyboard-xLcCDuSx.js";import"./landmark-O58TaahI.js";import"./languages-ButK4Qg8.js";import"./layers-BB_i1C4w.js";import"./layout-dashboard-75M8DeFX.js";import"./layout-grid-poCuZhEH.js";import"./layout-list-seKZxxh_.js";import"./layout-template-sAMDsVhI.js";import"./library-B_O2k8F0.js";import"./life-buoy-D-UfP6rF.js";import"./lightbulb-CAwagye1.js";import"./line-chart-CzZ1EISo.js";import"./link-2-CW_P-8qH.js";import"./list-checks-DQJ2uc2G.js";import"./list-ordered-GYIwy3oS.js";import"./list-plus-BDkNVWFl.js";import"./list-DNmmyO-f.js";import"./loader-circle-CSKdgg2A.js";import"./loader-hM1BrCsw.js";import"./lock-keyhole-WbQ8NvJp.js";import"./lock-open-zdc0Ucad.js";import"./lock-Cqe5ZSYs.js";import"./log-out-Duh9xpzh.js";import"./mail-check-DmO9qyuI.js";import"./mail-plus-CHKu60_6.js";import"./mail-x-CAsxmnOY.js";import"./map-CKGZYIjg.js";import"./maximize-2-BX-zPx_U.js";import"./maximize-CqAcL7J0.js";import"./megaphone-B8X4B1yn.js";import"./message-circle-question-D8rgPEkg.js";import"./message-circle-DmtolaWZ.js";import"./message-square-plus-ZAWXelP-.js";import"./message-square-text-COadZMDa.js";import"./message-square-warning-ClZKdBBy.js";import"./message-square-DGJo-DI0.js";import"./messages-square-D6em5rhl.js";import"./mic-off-olrUgeXl.js";import"./mic-vocal-DxlR0c3Y.js";import"./mic-1_1C9kM0.js";import"./minimize-2-B9pG0f2U.js";import"./minus-B5bEapBN.js";import"./monitor-play-DUO3MtP0.js";import"./monitor-smartphone-BCKdGYk8.js";import"./monitor-Dx81jNuo.js";import"./sunrise--aukX29h.js";import"./moon-r_DvZCEP.js";import"./mouse-pointer-click-Ddzq80Oi.js";import"./mouse-pointer-Bga8we-O.js";import"./move-horizontal-CHN1I2b2.js";import"./move-right-CQ9z6kZE.js";import"./navigation-SKZ4kDzh.js";import"./network-B-F2Xsj9.js";import"./orbit-BtwHnbL5.js";import"./package-BbC7m0Xa.js";import"./paintbrush-Cnoo34r-.js";import"./palette-BEMzOZmg.js";import"./panel-left-close-CIvgYwb_.js";import"./panels-top-left-Dc81rJqf.js";import"./paperclip-C_CIp-gv.js";import"./party-popper-DzRpTr1i.js";import"./pen-line-BLCzkSKD.js";import"./pen-tool-BngCHjfY.js";import"./pen-o3EC0f1_.js";import"./pencil-line-IQjUQLX3.js";import"./pencil-ruler-Pt5K2WX5.js";import"./pencil-oe0vKTJY.js";import"./percent-BjkVoANi.js";import"./person-standing-D97qnDwb.js";import"./phone-call-8f7x_ohP.js";import"./phone-forwarded-BE41MlGq.js";import"./phone-incoming-BV1xuDgz.js";import"./phone-missed-BXa4lj2r.js";import"./phone-off-CfzpuH4u.js";import"./pie-chart-DPEOaV_g.js";import"./pin-DlYPpRkE.js";import"./plug-zap-DX8prEJ1.js";import"./plug-BipxryYc.js";import"./plus-CLCaA5kE.js";import"./power-Cp2x7ve-.js";import"./printer-DjCs7ISI.js";import"./qr-code-v4PvPfrp.js";import"./quote-B6qaoWV4.js";import"./radar-CMJ_K0Jn.js";import"./radio-B7n_ISR1.js";import"./receipt-B_3P9n77.js";import"./rectangle-ellipsis-D-d2pRjP.js";import"./redo-2-COJmitgf.js";import"./undo-D6GOSdSr.js";import"./refresh-ccw-CoG6_rF_.js";import"./repeat-BmSkYIya.js";import"./rocket-CyfkmE-7.js";import"./route-GhUf5nTd.js";import"./theater-BL80J0av.js";import"./ruler-3CqCfxnl.js";import"./save-BdWCd8KE.js";import"./scale-Bn4m1ffi.js";import"./scan-face-BcOS76yQ.js";import"./scan-line-B_MFAOg3.js";import"./scan-search-DBz0_11A.js";import"./scan-text-Bdm6-tV_.js";import"./scroll-text-CoITC40R.js";import"./search-x-BGt83Mzn.js";import"./send-r3uP2EJ9.js";import"./server-WGkZRtJf.js";import"./settings-2-BO-5TagO.js";
1import"./share-2-D-5_2Fm2.js";import"./shield-alert-bphCmJ88.js";import"./shield-check-xEcld4-3.js";import"./shield-off-CR4a3r0T.js";import"./shopping-bag-DSSQilac.js";import"./shuffle-CXX3NsR4.js";import"./skip-forward-FMe9GDaV.js";import"./smile-DUpsEPWP.js";import"./square-check-big-ryfLlkgl.js";import"./square-pen-B27EaCBZ.js";import"./square-CRDLLiol.js";import"./stamp-CdvxOgXG.js";import"./sticky-note-BRzdRmH2.js";import"./store-B35dJuls.js";import"./sun-lUNjW5aT.js";import"./table-2-BSXhM7Dz.js";import"./table-DcfPZS2m.js";import"./tablet-CjxT8brV.js";import"./tag-K6465H1c.js";import"./tags-DhtfakrN.js";import"./target-B7YIwTEf.js";import"./thumbs-down-vsal5GUf.js";import"./thumbs-up-BccJDyT2.js";import"./timer-DAsxWb_S.js";import"./toggle-left-CHkf7HoK.js";import"./toggle-right-CoGRQ3mv.js";import"./trash-2-NR6BVK-f.js";import"./trees-jFkH-Uyx.js";import"./trending-down-D3d0EEb-.js";import"./trending-up-DsiAdkP2.js";import"./trophy-BRc8lVks.js";import"./underline-BNZNnAak.js";import"./undo-2-7vN0Pgvd.js";import"./unlink-CvCwwiHU.js";import"./upload-DPq88Jgy.js";import"./user-check-K-gZOXXJ.js";import"./user-cog-Dx7vsFqL.js";import"./user-minus-cOX_Uymt.js";import"./user-plus-DLwZCZdN.js";import"./user-round-CQePJh_X.js";import"./user-search-BVmKmkJ_.js";import"./user-x-DV1F8cb5.js";import"./users-round-C5PiUXrl.js";import"./users-B9Ba2VrB.js";import"./variable-CITGtN1H.js";import"./video-S__7QoYI.js";import"./voicemail-Hb9cU6HU.js";import"./volume-2-7wBzdtRf.js";import"./volume-x-B0jIM4Al.js";import"./vote-DR6O1fFB.js";import"./wallet-B-sLZnNW.js";import"./wand-sparkles-DXLWOJc6.js";import"./waves-DEhB4a-4.js";import"./waypoints-2J9GvV4E.js";import"./webhook-C46i3DoY.js";import"./wifi-off-zLY6urVp.js";import"./workflow-CTsWKykk.js";import"./wrench-DBbFd8N0.js";import"./zap-B5m10Ctx.js";import"./zoom-in-DdpwrxA1.js";import"./zoom-out-DhMft_Fv.js";import"./entityLayoutBindings-Dvg9kHHo.js";import"./tenders-8ZkZHh5_.js";import"./membership-CaJwRnOa.js";function He(a,t=new Date){if(!a.closing_date)return!0;const o=new Date(a.closing_date);return Number.isNaN(o.getTime())?!0:(/^\d{4}-\d{2}-\d{2}$/.test(a.closing_date)&&o.setHours(23,59,59,999),o.getTime()>=t.getTime())}function Je(a,t){return[...a].sort((o,s)=>t==="title"?o.title.localeCompare(s.title):t==="newest"?new Date(s.published_at||s.created_at).getTime()-new Date(o.published_at||o.created_at).getTime():t==="closing"?o.closing_date?s.closing_date?new Date(o.closing_date).getTime()-new Date(s.closing_date).getTime():-1:1:o.featured!==s.featured?o.featured?-1:1:(o.listing_order??0)-(s.listing_order??0))}const Ge={department:"",location:"",type:"",search:""};function Ke(a,t){return a.filter(o=>{if(t.department&&o.department!==t.department||t.location&&o.location!==t.location||t.type&&o.employment_type!==t.type)return!1;if(t.search){const s=t.search.toLowerCase();if(!`${o.title} ${o.department||""} ${o.location||""} ${o.description}`.toLowerCase().includes(s))return!1}return!0})}const Oe=({listings:a,settings:t,onJobClick:o})=>{const s=a.filter(i=>i.featured),n=a.filter(i=>!i.featured);return e.jsxs("div",{children:[e.jsx(O,{target:"hero",className:"relative overflow-hidden rounded-2xl mb-8",style:{background:t.hero_image_url?`linear-gradient(rgba(0,0,0,${t.hero_overlay_opacity}), rgba(0,0,0,${t.hero_overlay_opacity})), url(${oe(t.hero_image_url)}) center/cover`:`linear-gradient(135deg, ${t.primary_color}, ${t.accent_color})`},children:e.jsxs("div",{className:"px-8 py-16 text-white",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-3",children:t.board_title}),t.board_description&&e.jsx("p",{className:"text-lg opacity-90 max-w-2xl",children:t.board_description}),e.jsxs("div",{className:"flex items-center gap-4 mt-6 text-sm opacity-80",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(U,{className:"w-4 h-4"}),a.length," open position",a.length!==1?"s":""]}),new Set(a.map(i=>i.department).filter(Boolean)).size>0&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(B,{className:"w-4 h-4"}),new Set(a.map(i=>
1i.department).filter(Boolean)).size," departments"]})]})]})}),s.length>0&&e.jsxs("div",{className:"mb-8",children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[e.jsx(z,{className:"w-5 h-5 text-amber-500"})," Featured Positions"]}),e.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:s.map((i,l)=>e.jsxs(N.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:l*.05},onClick:()=>o(i),className:"cursor-pointer bg-white rounded-xl border-2 p-6 hover:shadow-lg transition-all group",style:{borderColor:t.primary_color+"40"},children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 group-hover:text-civic-600 transition-colors",children:i.title}),e.jsx(z,{className:"w-4 h-4 text-amber-500 flex-shrink-0"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm text-gray-500 mb-3",children:[i.department&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"w-3.5 h-3.5"}),i.department]}),i.location&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"w-3.5 h-3.5"}),i.location]}),e.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full text-xs font-medium",children:v[i.employment_type]})]}),t.show_salary_range&&i.salary_display&&e.jsxs("p",{className:"text-sm text-green-700 font-medium mb-2 flex items-center gap-1",children:[e.jsx(me,{className:"w-3.5 h-3.5"}),i.salary_display]}),e.jsxs("p",{className:"text-sm text-gray-600 line-clamp-2 mb-4",children:[i.description?.replace(/<[^>]+>/g,"").slice(0,150),"..."]}),e.jsxs("div",{className:"flex items-center justify-between",children:[i.closing_date&&e.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[e.jsx(Re,{className:"w-3 h-3"}),"Closes ",new Date(i.closing_date).toLocaleDateString()]}),e.jsxs("span",{className:"text-sm font-medium flex items-center gap-1",style:{color:t.primary_color},children:["Apply Now ",e.jsx(ne,{className:"w-3.5 h-3.5"})]})]})]},i.id))})]}),e.jsx(O,{target:"list-container",className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map((i,l)=>e.jsxs(N.div,{"data-css-target":"card",initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:l*.04},onClick:()=>o(i),className:"cursor-pointer bg-white rounded-xl border border-gray-200 p-5 hover:shadow-md hover:border-gray-300 transition-all group",children:[e.jsx("h3",{className:"font-semibold text-gray-900 mb-2 group-hover:text-civic-600 transition-colors",children:i.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-500 mb-3",children:[i.department&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"w-3 h-3"}),i.department]}),i.location&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"w-3 h-3"}),i.location]})]}),e.jsx("span",{className:"inline-block px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full text-xs font-medium mb-3",children:v[i.employment_type]}),t.show_salary_range&&i.salary_display&&e.jsx("p",{className:"text-xs text-green-700 font-medium mb-2",children:i.salary_display}),e.jsxs("p",{className:"text-sm text-gray-500 line-clamp-3 mb-4",children:[i.description?.replace(/<[^>]+>/g,"").slice(0,120),"..."]}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-gray-100",children:[i.closing_date&&e.jsx("span",{className:"text-xs text-gray-500",children:new Date(i.closing_date).toLocaleDateString()}),e.jsx("button",{className:"text-sm font-medium px-3 py-1.5 rounded-lg text-white transition-colors",style:{backgroundColor:t.primary_color},children:"Apply"})]})]},i.id))})]})},Ue=({listings:a,settings:t,onJobClick:o})=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:t.board_title}),t.board_description&&e.jsx("p",{className:"text-gray-600 mt-1",children:t.board_description}),e.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:[a.length," position",a.length!==1?"s":""," available"]})]}),e.jsx("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden divide-y divide-gray-100",children:a.map((s,n)=>e.jsxs(N.div,{initial:{opacity:0,x:-8}
1,animate:{opacity:1,x:0},transition:{delay:n*.03},onClick:()=>o(s),className:`flex items-center justify-between p-4 hover:bg-gray-50 cursor-pointer transition-colors ${n%2===0?"":"bg-gray-50/50"}`,children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-medium text-gray-900",children:s.title}),s.featured&&e.jsx(z,{className:"w-3.5 h-3.5 text-amber-500"})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-gray-500",children:[s.department&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"w-3 h-3"}),s.department]}),s.location&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"w-3 h-3"}),s.location]})]})]}),e.jsxs("div",{className:"flex items-center gap-4 flex-shrink-0",children:[e.jsx("span",{className:"px-2.5 py-1 bg-gray-100 text-gray-600 rounded-full text-xs font-medium hidden sm:inline-block",children:v[s.employment_type]}),t.show_salary_range&&s.salary_display&&e.jsx("span",{className:"text-sm text-green-700 font-medium hidden md:inline",children:s.salary_display}),s.closing_date&&e.jsxs("span",{className:"text-xs text-gray-500 hidden lg:inline",children:["Closes ",new Date(s.closing_date).toLocaleDateString()]}),e.jsx("button",{className:"px-4 py-1.5 text-sm font-medium text-white rounded-lg transition-colors",style:{backgroundColor:t.primary_color},children:"Apply"})]})]},s.id))})]}),Ve=({listings:a,settings:t,onJobClick:o})=>{const s=a.find(l=>l.featured)||a[0],n=a.filter(l=>l.id!==s?.id),i=[...new Set(n.map(l=>l.department).filter(Boolean))];return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:t.board_title}),t.board_description&&e.jsx("p",{className:"text-gray-600 mt-1",children:t.board_description})]}),e.jsxs("div",{className:"flex items-center gap-6 text-sm text-gray-500",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-2xl font-bold",style:{color:t.primary_color},children:a.length}),e.jsx("p",{children:"Open Roles"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-2xl font-bold",style:{color:t.accent_color},children:i.length+(s?.department?1:0)}),e.jsx("p",{children:"Departments"})]})]})]}),s&&e.jsx(N.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},onClick:()=>o(s),className:"cursor-pointer mb-8 rounded-2xl overflow-hidden",style:{background:`linear-gradient(135deg, ${t.primary_color}15, ${t.accent_color}15)`},children:e.jsxs("div",{className:"p-8 md:p-10",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(Me,{className:"w-4 h-4",style:{color:t.primary_color}}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:t.primary_color},children:"Featured Position"})]}),e.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-gray-900 mb-3",children:s.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-gray-600 mb-4",children:[s.department&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"w-4 h-4"}),s.department]}),s.location&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"w-4 h-4"}),s.location]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ze,{className:"w-4 h-4"}),v[s.employment_type]]}),t.show_salary_range&&s.salary_display&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(me,{className:"w-4 h-4"}),s.salary_display]})]}),e.jsxs("p",{className:"text-gray-600 max-w-2xl mb-6",children:[s.description?.replace(/<[^>]+>/g,"").slice(0,250),"..."]}),e.jsxs("button",{className:"px-6 py-2.5 text-white font-medium rounded-lg transition-colors",style:{backgroundColor:t.primary_color},children:["View & Apply ",e.jsx(ne,{className:"w-4 h-4 inline ml-1"})]})]})}),i.map(l=>{const c=n.filter(m=>m.department===l);return e.jsxs("div",{className:"mb-8",children:[e.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-3 flex items-center gap-2",children:[e.jsx(B,{className:"w-4 h-4 text-gray-400"})," ",l,e.jsxs("span",{className:"text-sm font-normal text-gray-500",children:["(",c.length,")"]})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:c.map((m,k)=>e.jsxs(N.div,{initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{delay:k*.04},onClick:()=>o(m),className:"cursor-pointer bg-white rounded-xl border border-gray-200 p-5 hover:shadow-md transition-all group",children:[e.jsx("h4",{className:"font-medium text-gray-900 mb-2 group-hover:text-civic-600",children:m.title}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500 mb-2",children:[m.location&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"w-3 h-3"}),m.location]}),e.jsx("span",{children:v[m.employment_type]})]}),e.jsxs("p",{className:"text-sm text-gray-500 line-clamp-2",children:[m.description?.replace(/<[^>]+>/g,"").slice(0,100),"..."]})]},m.id))})]},l)}),n.filter(l=>!l.department).length>0&&e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-3",children:"Other Positions"}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:n.filter(l=>!l.department).map((l,c)=>e.jsxs(N.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:c*.04},onClick:()=>o(l),className:"cursor-pointer bg-white rounded-xl border border-gray-200 p-5 hover:shadow-md transition-all group",children:[e.jsx("h4",{className:"font-medium text-gray-900 mb-2 group-hover:text-civic-600",children:l.title}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500 mb-2",children:[l.location&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"w-3 h-3"}),l.location]}),e.jsx("span",{children:v[l.employment_type]})]}),e.jsxs("p",{className:"text-sm text-gray-500 line-clamp-2",children:[l.description?.replace(/<[^>]+>/g,"").slice(0,100),"..."]})]},l.id))})]})]})},We=({listings:a,settings:t,onJobClick:o})=>{const[s,n]=x.useState(null);return e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:t.board_title}),t.board_description&&e.jsx("p",{className:"text-gray-600",children:t.board_description}),e.jsxs("p",{className:"text-sm mt-3",style:{color:t.primary_color},children:[a.length," open position",a.length!==1?"s":""]})]}),e.jsx("div",{className:"divide-y divide-gray-100",children:a.map((i,l)=>{const c=s===i.id;return e.jsxs(N.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:l*.03},children:[e.jsxs("button",{onClick:()=>n(c?null:i.id),className:"w-full flex items-center justify-between py-5 text-left group",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-900 group-hover:text-civic-600 transition-colors",children:i.title}),i.featured&&e.jsx(z,{className:"w-3.5 h-3.5 text-amber-500"})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-sm text-gray-500",children:[i.location&&e.jsx("span",{children:i.location}),e.jsx("span",{children:v[i.employment_type]})]})]}),e.jsx(Le,{className:`w-5 h-5 text-gray-400 transition-transform ${c?"rotate-180":""}`})]}),e.jsx(le,{children:c&&e.jsx(N.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:e.jsxs("div",{className:"pb-6 pl-4 border-l-2",style:{borderColor:t.primary_color+"40"},children:[i.department&&e.jsxs("p",{className:"text-sm text-gray-500 mb-2",children:[e.jsx("strong",{children:"Department:"})," ",i.department]}),t.show_salary_range&&i.salary_display&&e.jsx("p",{className:"text-sm text-green-700 font-medium mb-2",children:i.salary_display}),e.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:[i.description?.replace(/<[^>]+>/g,"").slice(0,300),"..."]}),i.closing_date&&e.jsxs("p",{className:"text-xs text-gray-500 mb-4",children:["Closing: ",new Date(i.closing_date).toLocaleDateString()]}),e.jsx("button",{onClick:m=>{m.stopPropagation(),o(i)},className:"px-5 py-2 text-sm font-medium text-white rounded-lg transition-colors",style:{backgroundColor:t.primary_color},children:"View Details & Apply"})]})})})]},i.id)})})]})},Ye=()=>e.jsxs("div",{className:"animate-pulse space-y-6",children:[e.jsx("div",{className:"h-40 bg-gray-200 rounded-2xl"}),e.jsx("div",{className:"h-10 bg-gray-100 rounded-lg w-full"}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3,4,5,6].map(a=>e.jsx("div",{className:"h-48 bg-gray-100 rounded-xl"},a))})]}),Pm=()=>{const a=be(),[t,o]=je(),{isCustomDomain:s,customDomainCouncil:n,customDomainSite:i}=we(),l=i?.id??null,{slug:c,councilSlug:m}=ve(),{user:k}=Ce(),{setCouncilId:W,loadTranslationsForList:Y,getTranslation:H,isDefaultLanguage:T}=Be(),X=s?n?.id?`careersBoard:dom:${n.id}`:null:c||m?`careersBoard:slug:${c||m}`:null,w=X?M(X):null,[u,ce]=x.useState(w?.settings??null),[y,pe]=x.useState(w?.listings??[]),[de,J]=x.useState(!w),[p,A]=x.useState(()=>({search:t.get("q")||"",department:t.get("department")||"",location:t.get("location")||"",type:t.get("type")||""})),[D,xe]=x.useState(()=>t.get("sort")||"featured"),[Z,ue]=x.useState(!1),[d,he]=x.useState(w?.council??null),[b,ge]=x.useState(w?.hubSettings??null),ye=$e(d?.id,"careers");x.useEffect(()=>{fe()},[s,n,l,c,m,k?.council_id]);const fe=async()=>{try{w||J(!0);let r,h=null;if(s&&n){r=n.id;const{data:f}=await _.from("councils").select("id, name, slug, logo_url, primary_color, website").eq("id",n.id).single();f&&(h=f)}else if(c||m){const{data:f}=await _.from("councils").select("id, name, slug, logo_url, primary_color, website").eq("slug",c||m).single();f&&(r=f.id,h=f)}else if(k?.council_id){r=k.council_id;const{data:f}=await _.from("councils").select("id, name, slug, logo_url, primary_color, website").eq("id",k.council_id).single();f&&(h=f)}if(!r){J(!1);return}he(h);const[j,$,q]=await Promise.all([_.from("career_board_settings").select("*").eq("council_id",r).single(),_.from("organization_hub_settings").select("custom_menu_links, footer_links, footer_config, primary_color, hide_council_name, use_portal_menu, header_layout, italia_header_config, custom_header_css, secondary_header_enabled, secondary_header_bg_color, secondary_header_text_color, secondary_header_links").eq("council_id",r).is("site_id",null).eq("enabled",!0).maybeSingle(),ae(_.from("job_listings").select("*").eq("council_id",r).eq("status","published").order("featured",{ascending:!1}).order("listing_order",{ascending:!0}).order("published_at",{ascending:!1}),l)]);j.data&&ce(j.data),$.data&&ge($.data),q.data&&pe(q.data);const R=s?`careersBoard:dom:${r}`:c||m?`careersBoard:slug:${c||m}`:null;R&&V(R,{settings:j.data??null,listings:q.data??[],council:h,hubSettings:$.data??null})}catch(r){console.error("Error loading careers board:",r)}finally{J(!1)}};x.useEffect(()=>{d?.id&&W(d.id)},[d?.id,W]),x.useEffect(()=>{y.length>0&&!T&&Y("job_listing",y.map(r=>r.id))},[y,T,Y]);const Q=x.useMemo(()=>T?y:y.map(r=>({...r,title:H("job_listing",r.id,"title",r.title),description:r.description?H("job_listing",r.id,"description",r.description):r.description})),[y,T,H]),L=x.useMemo(()=>Q.filter(r=>He(r)),[Q]),C=x.useMemo(()=>Je(Ke(L,p),D),[L,p,D]);x.useEffect(()=>
1{const r=new URLSearchParams;p.search&&r.set("q",p.search),p.department&&r.set("department",p.department),p.location&&r.set("location",p.location),p.type&&r.set("type",p.type),D!=="featured"&&r.set("sort",D),o(r,{replace:!0})},[p,D,o]);const G=x.useMemo(()=>[...new Set(y.map(r=>r.department).filter(Boolean))],[y]),ee=x.useMemo(()=>[...new Set(y.map(r=>r.location).filter(Boolean))],[y]),te=x.useMemo(()=>[...new Set(y.map(r=>r.employment_type))],[y]),E=r=>{a(s?`/careers/job/${r.slug}`:`/${m||c}/careers/job/${r.slug}`)},K=()=>A(Ge),S=!!(p.department||p.location||p.type||p.search),{layout:F,loading:_e}=Fe(d?.id,"jobs_listing");if(Pe("jobs",F?void 0:d?.id,F?void 0:u?.board_layout||"grid"),ye.blocked)return e.jsx(Se,{});if(de||_e&&!w)return e.jsx("div",{className:"min-h-screen bg-gray-50 p-6",children:e.jsx("div",{className:"max-w-6xl mx-auto",children:e.jsx(Ye,{})})});if(!u?.is_enabled)return e.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(U,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),e.jsx("h1",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Careers Board Not Available"}),e.jsx("p",{className:"text-gray-500",children:"This organisation's careers board is not currently active."})]})});const I=u.board_layout||"grid";if(F){const r=s?"/careers/job":`/${m||c}/careers/job`,h=s?"/careers":`/${m||c}/careers`,j=t.get("department")??"",$=j?L.filter(g=>g.department===j):L,q=[{name:"All",url:h,count:L.length,active:!j},...G.map(g=>({name:g,url:`${h}?department=${encodeURIComponent(g)}`,count:L.filter(Ne=>Ne.department===g).length,active:j===g}))],R={title:u.board_title,description:u.board_description,hero_image_url:u.hero_image_url?oe(u.hero_image_url):null,job_count:$.length,categories:q,jobs:$.map(g=>({title:g.title,department:g.department,location:g.location,employment_type:g.employment_type,salary_display:u.show_salary_range?g.salary_display:"",closing_date:g.closing_date,href:`${r}/${g.slug}`}))},f=qe(F);return e.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:[d&&e.jsx("div",{className:f?"absolute inset-x-0 top-0 z-30":"",children:e.jsx(ie,{councilId:d.id,council:d,hubSettings:b,transparent:f})}),e.jsx("main",{className:"flex-grow",children:e.jsx(Te,{layout:F,record:R,councilId:d?.id,primaryColor:u.primary_color})}),d&&e.jsx(se,{footerConfig:b?.footer_config,footerLinks:b?.footer_links,councilName:d.name||"Council",councilWebsite:d.website||void 0,primaryColor:b?.primary_color})]})}return e.jsxs("div",{className:`min-h-screen bg-gray-50 flex flex-col ${Ae("jobs")}`,children:[d&&e.jsx(ie,{councilId:d.id,council:d,hubSettings:b}),e.jsx("main",{className:"flex-grow",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[e.jsxs(O,{target:"filters",className:"mb-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Ee,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{"aria-label":"Search vacancies",type:"text",placeholder:"Search positions...",value:p.search,onChange:r=>A(h=>({...h,search:r.target.value})),className:"w-full pl-10 pr-4 py-2.5 bg-white border border-gray-200 rounded-lg text-sm focus:ring-2 focus:ring-civic-500 focus:border-civic-500"})]}),e.jsxs("button",{onClick:()=>ue(!Z),className:`flex items-center gap-2 px-4 py-2.5 border rounded-lg text-sm font-medium transition-colors ${S?"border-civic-300 bg-civic-50 text-civic-700":"border-gray-200 bg-white text-gray-700 hover:bg-gray-50"}`,children:[e.jsx(Ie,{className:"w-4 h-4"}),"Filters",S&&e.jsx("span",{className:"w-2 h-2 bg-civic-500 rounded-full"})]}),e.jsx("label",{className:"sr-only",htmlFor:"careers-sort",children:"Sort vacancies"}),e.jsxs("select",{id:"careers-sort",value:D,onChange:r=>xe(r.target.value),className:"px-3 py-2.5 border border-gray-200 bg-white rounded-lg text-sm font-medium text-gray-700 focus:ring-2 focus:ring-civic-500",children:[e.jsx("option",{value:"featured",children:"Featured first"}),e.jsx("option",{value:"closing",children:"Closing soon"}),e.jsx("option",{value:"newest",children:"Newest first"}),e.jsx("option",{value:"title",children:"Job title AâZ"})]})]}),e.jsx(le,{children:Z&&e.jsx(N.div,{initial:{height:0,opacity:0}
1,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-3 p-4 bg-white rounded-lg border border-gray-200",children:[u.show_department_filter&&G.length>0&&e.jsxs("select",{value:p.department,onChange:r=>A(h=>({...h,department:r.target.value})),className:"px-3 py-2 text-sm border border-gray-200 rounded-lg bg-white",children:[e.jsx("option",{value:"",children:"All Departments"}),G.map(r=>e.jsx("option",{value:r,children:r},r))]}),u.show_location_filter&&ee.length>0&&e.jsxs("select",{value:p.location,onChange:r=>A(h=>({...h,location:r.target.value})),className:"px-3 py-2 text-sm border border-gray-200 rounded-lg bg-white",children:[e.jsx("option",{value:"",children:"All Locations"}),ee.map(r=>e.jsx("option",{value:r,children:r},r))]}),u.show_type_filter&&te.length>0&&e.jsxs("select",{value:p.type,onChange:r=>A(h=>({...h,type:r.target.value})),className:"px-3 py-2 text-sm border border-gray-200 rounded-lg bg-white",children:[e.jsx("option",{value:"",children:"All Types"}),te.map(r=>e.jsx("option",{value:r,children:v[r]},r))]}),S&&e.jsxs("button",{onClick:K,className:"flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700",children:[e.jsx(ke,{className:"w-3.5 h-3.5"})," Clear filters"]})]})})})]}),e.jsxs("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3","aria-live":"polite",children:[e.jsxs("p",{className:"text-sm text-gray-600",children:[e.jsx("span",{className:"font-semibold text-gray-900",children:C.length})," ",C.length===1?"vacancy":"vacancies"," found"]}),S&&e.jsx("button",{onClick:K,className:"text-sm font-medium text-civic-700 hover:text-civic-900",children:"Clear all filters"})]}),C.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx(U,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),e.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-2",children:S?"No matching positions":"No open positions"}),e.jsx("p",{className:"text-gray-500 mb-4",children:S?"Try adjusting your filters or search terms.":"Check back later for new opportunities."}),S&&e.jsx("button",{onClick:K,className:"text-sm font-medium text-civic-600 hover:text-civic-700",children:"Clear all filters"})]}):e.jsxs(e.Fragment,{children:[I==="grid"&&e.jsx(Oe,{listings:C,settings:u,onJobClick:E}),I==="list"&&e.jsx(Ue,{listings:C,settings:u,onJobClick:E}),I==="magazine"&&e.jsx(Ve,{listings:C,settings:u,onJobClick:E}),I==="minimal"&&e.jsx(We,{listings:C,settings:u,onJobClick:E})]})]})}),d&&e.jsx(se,{footerConfig:b?.footer_config,footerLinks:b?.footer_links,councilName:d.name||"Council",councilWebsite:d.website||void 0,primaryColor:b?.primary_color})]})};async function Xe(a){if(!a)return null;const t=M(re(a));if(t?.id)return t.id;try{const{data:o}=await _.from("councils").select("id, name, slug, logo_url, website, primary_color").eq("slug",a).maybeSingle();return o&&V(re(a),o),o?.id??null}catch{return null}}async function Am(a){try{const t=a.isCustomDomain?a.councilId??null:a.councilId??await Xe(a.councilSlug);if(!t)return;const o=a.isCustomDomain?`careersBoard:dom:${t}`:a.councilSlug?`careersBoard:slug:${a.councilSlug}`:null;if(!o||M(o))return;const s=a.isCustomDomain?M(De(window.location.hostname))?.site_id??null:null,{data:n}=await _.from("councils").select("id, name, slug, logo_url, primary_color, website").eq("id",t).single(),[i,l,c]=await Promise.all([_.from("career_board_settings").select("*").eq("council_id",t).single(),_.from("organization_hub_settings").select("custom_menu_links, footer_links, footer_config, primary_color, hide_council_name, use_portal_menu, header_layout, italia_header_config, custom_header_css, secondary_header_enabled, secondary_header_bg_color, secondary_header_text_color, secondary_header_links").eq("council_id",t).is("site_id",null).eq("enabled",!0).maybeSingle(),ae(_.from("job_listings").select("*").eq("council_id",t).eq("status","published").order("featured",{ascending:!1}).order("listing_order",{ascending:!0}).order("published_at",{ascending:!1}),s)]);V(o,{settings:i.data??null,listings:c.data??[],council:n??null,hubSettings:l.data??null})}catch{}}export{Pm as PublicCareersBoard,Am as prefetchCareersBoard};
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.