PageSourceSearch

https://kangpro.id/_next/static/chunks/1ukv58tdzqk8u.js

js kangpro.id collected 2026-10-02 00:03:03 UTC 153,274 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,345663,205690,e=>{"use strict";var t=e.i(47579);e.s(["MicrophoneIcon",()=>t.default],345663);var n=e.i(843476),a=e.i(271645);e.s(["default",0,function({since:e}){let[t,i]=(0,a.useState)(()=>Date.now());(0,a.useEffect)(()=>{let e=setInterval(()=>i(Date.now()),1e3);return()=>clearInterval(e)},[]);let r=Math.max(0,Math.floor((t-e)/1e3)),s=Math.floor(r/60);return(0,n.jsxs)("span",{className:"tabular-nums",children:[String(s).padStart(2,"0"),":",String(r%60).padStart(2,"0")]})}],205690)},808341,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={cancelIdleCallback:function(){return s},requestIdleCallback:function(){return r}};for(var i in a)Object.defineProperty(n,i,{enumerable:!0,get:a[i]});let r="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},s="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},519083,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={ESCAPE_REGEX:function(){return s},htmlEscapeAttributeString:function(){return u},htmlEscapeJsonString:function(){return c}};for(var i in a)Object.defineProperty(n,i,{enumerable:!0,get:a[i]});let r={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},s=/[&><\u2028\u2029]/g,o={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},l=/[&"'<>]/g;function c(e){return e.replace(s,e=>r[e])}function u(e){return e.replace(l,e=>o[e])}},479520,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={default:function(){return j},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return v}};for(var i in a)Object.defineProperty(n,i,{enumerable:!0,get:a[i]});let r=e.r(555682),s=e.r(190809),o=e.r(843476),l=r._(e.r(174080)),c=s._(e.r(271645)),u=e.r(742732),d=e.r(922737),h=e.r(808341),m=e.r(519083),f=new Map,p=new Set,g=e=>{let{src:t,id:n,onLoad:a=()=>{},onReady:i=null,dangerouslySetInnerHTML:r,children:s="",strategy:o="afterInteractive",onError:c,stylesheets:u}=e,h=n||t;if(h&&p.has(h))return;if(f.has(t)){p.add(h),f.get(t).then(a,c);return}let m=()=>{i&&i(),p.add(h)},g=document.createElement("script"),x=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),a&&a.call(this,t),m()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){c&&c(e)});r?(g.innerHTML=r.__html||"",m()):s?(g.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):"",m()):t&&(g.src=t,f.set(t,x)),(0,d.setAttributesFromProps)(g,e),"worker"===o&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",o),u&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}})(u),document.body.appendChild(g)};function x(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>g(e))}):g(e)}function v(e){e.forEach(x),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");p.add(t)})}function b(e){let{id:t,src:n="",onLoad:a=()=>{},onReady:i=null,strategy:r="afterInteractive",onError:s,stylesheets:d,...f}=e,{updateScripts:x,scripts:v,getIsSsr:b,appDir:j,nonce:y}=(0,c.useContext)(u.HeadManagerContext);y=f.nonce||y;let w=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=t||n;w.current||(i&&e&&p.has(e)&&i(),w.current=!0)},[i,t,n]);let k=(0,c.useRef)(!1);if((0,c.useEffect)(()=>
1{if(!k.current){if("afterInteractive"===r)g(e);else"lazyOnload"===r&&("complete"===document.readyState?(0,h.requestIdleCallback)(()=>g(e)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>g(e))}));k.current=!0}},[e,r]),("beforeInteractive"===r||"worker"===r)&&(x?(v[r]=(v[r]||[]).concat([{id:t,src:n,onLoad:a,onReady:i,onError:s,...f,nonce:y}]),x(v)):b&&b()?p.add(t||n):b&&!b()&&g({...e,nonce:y})),j){if(d&&d.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===r)if(!n)return f.dangerouslySetInnerHTML&&(f.children=f.dangerouslySetInnerHTML.__html,delete f.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([0,{...f,id:t}]))})`}});else return l.default.preload(n,f.integrity?{as:"script",integrity:f.integrity,nonce:y,crossOrigin:f.crossOrigin}:{as:"script",nonce:y,crossOrigin:f.crossOrigin}),(0,o.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,m.htmlEscapeJsonString)(JSON.stringify([n,{...f,id:t}]))})`}});"afterInteractive"===r&&n&&l.default.preload(n,f.integrity?{as:"script",integrity:f.integrity,nonce:y,crossOrigin:f.crossOrigin}:{as:"script",nonce:y,crossOrigin:f.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});let j=b;("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},716915,(e,t,n)=>{!function(a,i){if("function"==typeof define&&define.amd){let a;void 0!==(a=i(e.r,n,t))&&e.v(a)}else t.exports=i()}(e.e,function(){var e,t,n,a={};a.version="0.2.0";var i=a.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function r(e,t,n){return e<t?t:e>n?n:e}a.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(i[t]=n);return this},a.status=null,a.set=function(e){var t=a.isStarted();a.status=1===(e=r(e,i.minimum,1))?null:e;var n=a.render(!t),l=n.querySelector(i.barSelector),c=i.speed,u=i.easing;return n.offsetWidth,s(function(t){var r,s,d,h;""===i.positionUsing&&(i.positionUsing=a.getPositioningCSS()),o(l,(r=e,s=c,d=u,(h="translate3d"===i.positionUsing?{transform:"translate3d("+(-1+r)*100+"%,0,0)"}:"translate"===i.positionUsing?{transform:"translate("+(-1+r)*100+"%,0)"}:{"margin-left":(-1+r)*100+"%"}).transition="all "+s+"ms "+d,h)),1===e?(o(n,{transition:"none",opacity:1}),n.offsetWidth,setTimeout(function(){o(n,{transition:"all "+c+"ms linear",opacity:0}),setTimeout(function(){a.remove(),t()},c)},c)):setTimeout(t,c)}),this},a.isStarted=function(){return"number"==typeof a.status},a.start=function(){a.status||a.set(0);var e=function(){setTimeout(function(){a.status&&(a.trickle(),e())},i.trickleSpeed)};return i.trickle&&e(),this},a.done=function(e){return e||a.status?a.inc(.3+.5*Math.random()).set(1):this},a.inc=function(e){var t=a.status;return t?("number"!=typeof e&&(e=(1-t)*r(Math.random()*t,.1,.95)),t=r(t+e,0,.994),a.set(t)):a.start()},a.trickle=function(){return a.inc(Math.random()*i.trickleRate)},e=0,t=0,a.promise=function(n){return n&&"resolved"!==n.state()&&(0===t&&a.start(),e++,t++,n.always(function(){0==--t?(e=0,a.done()):a.set((e-t)/e)})),this},a.render=function(e){if(a.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=i.template;var n,r=t.querySelector(i.barSelector),s=e?"-100":(-1+(a.status||0))*100,l=document.querySelector(i.parent);return o(r,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),!i.showSpinner&&(n=t.querySelector(i.spinnerSelector))&&h(n),l!=document.body&&c(l,"nprogress-custom-parent"),l.appendChild(t),t},a.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(i.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&h(e)},a.isRendered=function(){return!!document.getElementById("nprogress")},a.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=(n=[],function(e){n.push(e),1==n.length&&function e(){var t=n.shift();t&&t(e)}()}),o=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n,a,i){var r;a=t[r=(r=a).replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})]||(t[r]=function(t){var n=document.body.style;if(t in n)return t;for(var a,i=e.length,r=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((a=e[i]+r)in n)return a;return t}(r)),n.style[a]=i}return function(e,t){var a,i,r=arguments;
1if(2==r.length)for(a in t)void 0!==(i=t[a])&&t.hasOwnProperty(a)&&n(e,a,i);else n(e,r[1],r[2])}}();function l(e,t){return("string"==typeof e?e:d(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=d(e),a=n+t;l(n,t)||(e.className=a.substring(1))}function u(e,t){var n,a=d(e);l(e,t)&&(e.className=(n=a.replace(" "+t+" "," ")).substring(1,n.length-1))}function d(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function h(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return a})},818421,(e,t,n)=>{var a=Object.create,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t)=>i(e,"name",{value:t,configurable:!0}),u=(e,t,n,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))l.call(e,o)||o===n||i(e,o,{get:()=>t[o],enumerable:!(a=r(t,o))||a.enumerable});return e},d=(e,t,n)=>(n=null!=e?a(o(e)):{},u(!t&&e&&e.__esModule?n:i(n,"default",{value:e,enumerable:!0}),e)),h={},m={default:()=>y,useTopLoader:()=>b};for(var f in m)i(h,f,{get:m[f],enumerable:!0});t.exports=u(i({},"__esModule",{value:!0}),h);var p=d(e.r(745009)),g=d(e.r(271645)),x=d(e.r(716915)),v=d(e.r(716915)),b=c(()=>({start:()=>v.start(),done:e=>v.done(e),remove:()=>v.remove(),setProgress:e=>v.set(e),inc:e=>v.inc(e),trickle:()=>v.trickle(),isStarted:()=>v.isStarted(),isRendered:()=>v.isRendered(),getPositioningCSS:()=>v.getPositioningCSS()}),"useTopLoader"),j=c(({color:e,height:t,showSpinner:n,crawl:a,crawlSpeed:i,initialPosition:r,easing:s,speed:o,shadow:l,template:u,zIndex:d=1600,showAtBottom:h=!1,showForHashAnchor:m=!0,nonce:f})=>{let p=null!=e?e:"#29d",v=l||void 0===l?l?`box-shadow:${l}`:`box-shadow:0 0 10px ${p},0 0 5px ${p}`:"",b=g.createElement("style",{nonce:f},`#nprogress{pointer-events:none}#nprogress .bar{background:${p};position:fixed;z-index:${d};${h?"bottom: 0;":"top: 0;"}left:0;width:100%;height:${null!=t?t:3}px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;${v};opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translate(0px,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:${d};${h?"bottom: 15px;":"top: 15px;"}right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:${p};border-left-color:${p};border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}`),j=c(e=>new URL(e,window.location.href).href,"toAbsoluteURL"),y=c((e,t)=>{let n=new URL(j(e)),a=new URL(j(t));return n.href.split("#")[0]===a.href.split("#")[0]},"isHashAnchor"),w=c((e,t)=>{let n=new URL(j(e)),a=new URL(j(t));return n.hostname.replace(/^www\./,"")===a.hostname.replace(/^www\./,"")},"isSameHostName");return g.useEffect(()=>{let e,t;function l(e,t){let n=new URL(e),a=new URL(t);if(n.hostname===a.hostname&&n.pathname===a.pathname&&n.search===a.search){let e=n.hash,t=a.hash;return e!==t&&n.href.replace(e,"")===a.href.replace(t,"")}return!1}x.configure({showSpinner:null==n||n,trickle:null==a||a,trickleSpeed:null!=i?i:200,minimum:null!=r?r:.08,easing:null!=s?s:"ease",speed:null!=o?o:200,template:null!=u?u:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'}),c(l,"isAnchorOfCurrentUrl");var d,h,f=document.querySelectorAll("html");let p=c(()=>f.forEach(e=>e.classList.remove("nprogress-busy")),"removeNProgressClass");function g(e){for(;e&&"a"!==e.tagName.toLowerCase();)e=e.parentElement;return e}function v(e){try{let t=e.target,n=g(t),a=null==n?void 0:n.href;if(a){let t=window.location.href,i=""!==n.target,r=["tel:","mailto:","sms:","blob:","download:"].some(e=>a.startsWith(e));if(!w(window.location.href,n.href))return;let s=l(t,a)||y(window.location.href,n.href);if(!m&&s)return;a===t||i||r||s||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||!j(n.href).startsWith("http")?(x.start(),x.done(),p()):x.start()}}catch(e){x.start(),x.done()}}function b(){x.done(),p()}function k(){x.done()}return c(g,"findClosestAnchor"),c(v,"handleClick"),e=(d=window.history).pushState,d.pushState=(...t)=>(x.done(),p(),e.apply(d,t)),t=(h=window.history).replaceState,h.replaceState=(...e)=>(x.done(),p(),t.apply(h,e)),c(b,"handlePageHide"),c(k,"handleBackAndForth"),window.addEventListener("popstate",k),document.addEventListener("click",v),window.addEventListener("pagehide",b),()=>{document.removeEventListener("click",v),window.removeEventListener("pagehide",b),window.removeEventListener("popstate",k)}},[]),b},"NextTopLoader"),y=j;j.propTypes={color:p.string,height:p.number,showSpinner:p.bool,crawl:p.bool,crawlSpeed:p.number,initialPosition:p.number,easing:p.string,
1speed:p.number,template:p.string,shadow:p.oneOfType([p.string,p.bool]),zIndex:p.number,showAtBottom:p.bool}},719691,e=>{"use strict";var t=e.i(843476),n=e.i(271645);e.i(514560);var a=e.i(42300),i=e.i(618566),r=e.i(846696),s=e.i(639095),o=e.i(180673);let l=(0,n.createContext)({permission:"unsupported",token:null,requestPermission:async()=>"unsupported"}),c=e=>new Promise(t=>setTimeout(t,e)),u=[],d=e=>(u=[...u,e],()=>{u=u.filter(t=>t!==e)}),h=()=>"Notification"in window?Notification.permission:"unsupported",m=()=>"unsupported";async function f(){for(let e=0;e<=2;e+=1){let t=await (0,s.fetchToken)();if(t)return t;e<2&&await c(1e3)}return null}e.s(["default",0,function({children:e,authenticated:c}){let p=(0,i.useRouter)(),g=(0,n.useSyncExternalStore)(d,h,m),[x,v]=(0,n.useState)(null),b=(0,n.useRef)(null),j=(0,n.useRef)(0),y=(0,n.useCallback)(async()=>(j.current=Date.now(),f()),[]);(0,n.useEffect)(()=>{if("granted"!==g||x)return;let e=!1;return y().then(t=>{!e&&t&&v(t)}),()=>{e=!0}},[g,x,y]),(0,n.useEffect)(()=>{if("granted"!==g)return;let e=()=>{"visible"!==document.visibilityState||Date.now()-j.current<36e5||y().then(e=>{e&&v(e)}
1)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[g,y]);let w=(0,n.useCallback)(async()=>{if(!("Notification"in window))return"unsupported";if("default"!==Notification.permission)return Notification.permission;let e=await Notification.requestPermission();return u.forEach(e=>e()),e},[]);return(0,n.useEffect)(()=>{c&&x&&b.current!==x&&(b.current=x,(0,o.updateCurrentDeviceOnClient)(x).catch(()=>{b.current=null}))},[c,x]),(0,n.useEffect)(()=>{if(!x)return;let e=null,t=!1;return(0,s.firebaseMessaging)().then(n=>{n&&!t&&(e=(0,a.onMessage)(n,e=>{let t=e.fcmOptions?.link||e.data?.link,n=e.notification?.title??"Pesan baru",a=e.notification?.body;r.toast.info(a?`${n}: ${a}`:n,{action:t?{label:"Lihat",onClick:()=>p.push(t)}:void 0})}))}),()=>{t=!0,e?.()}},[x,p]),(0,t.jsx)(l.Provider,{value:{permission:g,token:x,requestPermission:w},children:e})},"usePushNotification",0,()=>(0,n.useContext)(l)])},477789,e=>{"use strict";let t,n,a,i,r,s;var o=e.i(843476),l=e.i(616933),l=l,c=e.i(121309),u=e.i(534281),d=e.i(456420);let h={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};h.node;let m=(0,d.default)(h);var f=e.i(755566),f=f,p=e.i(846696);let g=({theme:e="light",...t})=>(0,o.jsx)(p.Toaster,{theme:e,className:"toaster group",icons:{success:(0,o.jsx)(l.default,{className:"size-4"}),info:(0,o.jsx)(c.InfoIcon,{className:"size-4"}),warning:(0,o.jsx)(f.default,{className:"size-4"}),error:(0,o.jsx)(m,{className:"size-4"}),loading:(0,o.jsx)(u.Loader2Icon,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...t});var x=e.i(746798),v=e.i(818421);let b={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},j=new class{#e=b;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},y="u"<typeof window||"Deno"in globalThis;function w(){}function k(e,t){return"function"==typeof e?e(t):e}function C(e,t){let{type:n="all",exact:a,fetchStatus:i,predicate:r,queryKey:s,stale:o}=e;if(s){if(a){if(t.queryHash!==S(s,t.options))return!1}else if(!P(t.queryKey,s))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!r||!!r(t))}function N(e,t){let{exact:n,status:a,predicate:i,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(n){if(E(t.options.mutationKey)!==E(r))return!1}else if(!P(t.options.mutationKey,r))return!1}return(!a||t.state.status===a)&&(!i||!!i(t))}function S(e,t){return(t?.queryKeyHashFn||E)(e)}function E(e){return JSON.stringify(e,(e,t)=>M(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function P(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!P(e[n],t[n]))return!1;return!0}for(let n of Object.keys(t))if(!P(e[n],t[n]))return!1;return!0}return!1}let I=Object.prototype.hasOwnProperty;function A(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function M(e){if(!T(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!T(n)&&!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function T(e){return"[object Object]"===Object.prototype.toString.call(e)}function R(e,t,n=0){let a=[...e,t];return n&&a.length>n?a.slice(1):a}function O(e,t,n=0){let a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}let D=Symbol();function _(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==D?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}var L=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};let H=new class extends L{#n;#a;#i;constructor(){super(),this.#i=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#a||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#a?.(),this.#a=void 0)}setEventListener(e){this.#i=e,this.#a?.(),this.#a=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#n!==e&&(this.#n=e,this.onFocus())}onFocus(){let e=this.isFocused();
vendor: 16,119 bytes, line 1
1this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#n?this.#n:globalThis.document?.visibilityState!=="hidden"}},z=(t=[],n=0,a=e=>{e()},i=e=>{e()},r=function(e){setTimeout(e,0)},{batch:e=>{let s;n++;try{s=e()}finally{let e;--n||(e=t,t=[],e.length&&r(()=>{i(()=>{e.forEach(e=>{a(e)})})}))}return s},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s=e=>{n?t.push(e):r(()=>{a(e)})},setNotifyFunction:e=>{a=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{r=e}}),F=new class extends L{#r=!0;#a;#i;constructor(){super(),this.#i=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#a||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#a?.(),this.#a=void 0)}setEventListener(e){this.#i=e,this.#a?.(),this.#a=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#r}};function B(e){return Math.min(1e3*2**e,3e4)}function q(e){return(e??"online")!=="online"||F.isOnline()}var K=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function V(e){let t,n,a,i=!1,r=0,s="pending",o=new Promise((e,t)=>{n=e,a=t});o.catch(w);let l=()=>H.isFocused()&&("always"===e.networkMode||F.isOnline())&&e.canRun(),c=()=>q(e.networkMode)&&e.canRun(),u=e=>{"pending"===s&&(t?.(),s="resolved",n(e))},d=e=>{"pending"===s&&(t?.(),s="rejected",a(e))},h=()=>new Promise(n=>{t=e=>{("pending"!==s||l())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,"pending"===s&&e.onContinue?.()}),m=()=>{let t;if("pending"!==s)return;let n=0===r?e.initialPromise:void 0;try{t=n??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(u).catch(t=>{if("pending"!==s)return;let n=e.retry??3*!y,a=e.retryDelay??B,o="function"==typeof a?a(r,t):a,c=!0===n||"number"==typeof n&&r<n||"function"==typeof n&&n(r,t);i||!c?d(t):(r++,e.onFail?.(r,t),new Promise(e=>{j.setTimeout(e,o)}).then(()=>l()?void 0:h()).then(()=>{i?d(t):m()}))})};return{promise:o,status:()=>s,cancel:t=>{if("pending"===s){let n=new K(t);d(n),e.onCancel?.(n)}},continue:()=>(t?.(),o),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:c,start:()=>(c()?m():h().then(m),o)}}var U=class{#s;destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.gcTime)&&e>=0&&e!==1/0&&(this.#s=j.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(y?1/0:3e5))}clearGcTimeout(){void 0!==this.#s&&(j.clearTimeout(this.#s),this.#s=void 0)}},G=class extends U{#o;#l;#c;#u;constructor(e){super(),this.#o=e.client,this.mutationId=e.mutationId,this.#c=e.mutationCache,this.#l=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#l.includes(e)||(this.#l.push(e),this.clearGcTimeout(),this.#c.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#l=this.#l.filter(t=>t!==e),this.scheduleGc(),this.#c.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#l.length||("pending"===this.state.status?this.scheduleGc():this.#c.remove(this))}continue(){return this.#u?.continue()??("pending"===this.state.status?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#d({type:"continue"})},n={client:this.#o,meta:this.options.meta,mutationKey:this.options.mutationKey},a=this.#u=V({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#c.canRun(this)}),i="pending"===this.state.status,r=!a.canStart();try{if(i)t();else{this.#d({type:"pending",variables:e,isPaused:r}),this.#c.config.onMutate&&await this.#c.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:r})}let s=await a.start();return await this.#c.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#c.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#d({type:"success",data:s}),s}catch(t){try{await this.#c.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#c.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#d({type:"error",error:t}),t}finally{this.#u===a&&(this.#u=void 0),this.#c.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),z.batch(()=>{this.#l.forEach(t=>{t.onMutationUpdate(e)}),this.#c.notify({mutation:this,type:"updated",action:e})})}},Q=class extends L{#h;#m;#f;constructor(e={}){super(),this.config=e,this.#h=new Set,this.#m=new Map,this.#f=0}build(e,t,n){let a=new G({client:e,mutationCache:this,mutationId:++this.#f,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#h.add(e);let t=$(e);if("string"==typeof t){let n=this.#m.get(t);n?n.push(e):this.#m.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#h.delete(e)){let t=$(e);if("string"==typeof t){let n=this.#m.get(t);if(n)if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#m.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=$(e);if("string"!=typeof t)return!0;{let n=this.#m.get(t)?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=$(e);return"string"==typeof t?this.#m.get(t)?.find(t=>t!==e&&t.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){z.batch(()=>{this.#h.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#h.clear(),this.#m.clear()})}getAll(){return Array.from(this.#h)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>N(t,e))}findAll(e={}){return this.getAll().filter(t=>N(e,t))}notify(e){z.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return z.batch(()=>Promise.all(e.map(e=>e.continue().catch(w))))}};function $(e){return e.options.scope?.id}function W(e,{pages:t,pageParams:n}){let a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function Z(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var J=class extends U{#p;#g;#x;#v;#o;#u;#b;#j;constructor(e){super(),this.#j=!1,this.#b=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#v=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#g=X(this.options),this.state=e.state??this.#g,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#p}get promise(){return this.#u?.promise}setOptions(e){if(this.options={...this.#b,...e},e?._type&&(this.#p=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=X(this.options);void 0!==e.data&&(this.setState(Y(e.data,e.dataUpdatedAt)),this.#g=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#v.remove(this)}setData(e,t){var n,a;let i=(n=this.state.data,"function"==typeof(a=this.options).structuralSharing?a.structuralSharing(n,e):!1!==a.structuralSharing?function e(t,n,a=0){if(t===n)return t;if(a>500)return n;let i=A(t)&&A(n);if(!i&&!(M(t)&&M(n)))return n;let r=(i?t:Object.keys(t)).length,s=i?n:Object.keys(n),o=s.length,l=i?Array(o):{},c=0;for(let u=0;u<o;u++){let o=i?u:s[u],d=t[o],h=n[o];if(d===h){l[o]=d,(i?u<r:I.call(t,o))&&c++;continue}if(null===d||null===h||"object"!=typeof d||"object"!=typeof h){l[o]=h;continue}let m=e(d,h,a+1);l[o]=m,m===d&&c++}return r===o&&c===r?t:l}(n,e):e);return this.#d({data:i,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),i}setState(e){this.#d({type:"setState",state:e})}cancel(e){let t=this.#u?.promise;return this.#u?.cancel(e),t?t.then(w).catch(w):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#g}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==k(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===D||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===k(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0))}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#u?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#u?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#v.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);-1!==t&&(this.observers.splice(t,1),this.observers.length||(this.#u&&(this.#j||"paused"===this.state.fetchStatus&&"pending"===this.state.status?this.#u.cancel({revert:!0}):this.#u.cancelRetry()),this.scheduleGc()),this.#v.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}async fetch(e,t){var n;let a;if("idle"!==this.state.fetchStatus&&this.#u?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#u)return this.#u.continueRetry(),this.#u.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#j=!0,i.signal)})},s=()=>{let e,n=_(this.options,t),a=(r(e={client:this.#o,queryKey:this.queryKey,meta:this.meta}),e);return(this.#j=!1,this.options.persister)?this.options.persister(n,a,this):n(a)},o=(r(a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s}),a);("infinite"===this.#p?(n=this.options.pages,{onFetch:(e,t)=>{let a=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],s=e.state.data?.pageParams||[],o={pages:[],pageParams:[]},l=0,c=async()=>{let t=!1,c=_(e.options,e.fetchOptions),u=async(n,a,i)=>{if(t)return Promise.reject(e.signal.reason);if(null==a&&n.pages.length)return Promise.resolve(n);let r=(()=>{var n,r;let s,o,l={client:e.client,queryKey:e.queryKey,pageParam:a,direction:i?"backward":"forward",meta:e.options.meta};return n=()=>e.signal,r=()=>t=!0,o=!1,Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(s??=n(),o||(o=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),l})(),s=await c(r),{maxPages:o}=e.options,l=i?O:R;return{pages:l(n.pages,s,o),pageParams:l(n.pageParams,a,o)}};if(i&&r.length){let e="backward"===i,t=e?Z:W,n={pages:r,pageParams:s};o=await u(n,t(a,n),e)}else{let e=n??r.length;do{let e=0===l?s[0]??a.initialPageParam:W(a,o);if(l>0&&null==e)break;o=await u(o,e),l++}while(l<e)}return o};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t):e.fetchFn=c}}):this.options.behavior)?.onFetch(o,this),this.#x=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#d({type:"fetch",meta:o.fetchOptions?.meta});let l=this.#u=V({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof K&&e.revert&&this.setState({...this.#x,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await l.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#v.config.onSuccess?.(e,this),this.#v.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof K){if(e.silent)return this.#u.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#d({type:"error",error:e}),this.#v.config.onError?.(e,this),this.#v.config.onSettled?.(this.state.data,e,this),e}finally{this.#u===l&&(this.#u=void 0),this.scheduleGc()}}#d(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var n;return{...t,...(n=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:q(this.options.networkMode)?"fetching":"paused",...void 0===n&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":let a={...t,...Y(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#x=e.manual?a:void 0,a;case"error":let i=e.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),z.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#v.notify({query:this,type:"updated",action:e})})}};function Y(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function X(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,a=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ee=class extends L{#y;constructor(e={}){super(),this.config=e,this.#y=new Map}build(e,t,n){let a=t.queryKey,i=t.queryHash??S(a,t),r=this.get(i);return r||(r=new J({client:e,queryKey:a,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(r)),r}add(e){this.#y.has(e.queryHash)||(this.#y.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#y.get(e.queryHash);t&&(e.destroy(),t===e&&this.#y.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){z.batch(()=>
1{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#y.get(e)}getAll(){return[...this.#y.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>C(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>C(e,t)):t}notify(e){z.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){z.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){z.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};let et=new class{#w;#c;#b;#k;#C;#N;#S;#E;constructor(e={}){this.#w=e.queryCache||new ee,this.#c=e.mutationCache||new Q,this.#b=e.defaultOptions||{},this.#k=new Map,this.#C=new Map,this.#N=0}mount(){this.#N++,1===this.#N&&(this.#S=H.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onFocus())}),this.#E=F.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#w.onOnline())}))}unmount(){this.#N--,0===this.#N&&(this.#S?.(),this.#S=void 0,this.#E?.(),this.#E=void 0)}isFetching(e){return this.#w.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#c.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#w.build(this,t),a=n.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(k(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#w.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let a=this.defaultQueryOptions({queryKey:e}),i=this.#w.get(a.queryHash)?.state.data,r="function"==typeof t?t(i):t;if(void 0!==r)return this.#w.build(this,a).setData(r,{...n,manual:!0})}setQueriesData(e,t,n){return z.batch(()=>this.#w.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#w.get(t.queryHash)?.state}removeQueries(e){let t=this.#w;z.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#w;return z.batch(()=>{let a=n.findAll(e),i=new Set(a);return a.forEach(e=>{e.reset()}),this.refetchQueries({type:"active",predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(z.batch(()=>this.#w.findAll(e).map(e=>e.cancel(n)))).then(w).catch(w)}invalidateQueries(e,t={}){return z.batch(()=>(this.#w.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(z.batch(()=>this.#w.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(w)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(w)}async query(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#w.build(this,t),a=n.isStaleByTime(k(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(a):a}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#w.build(this,t);return n.isStaleByTime(k(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(w).catch(w)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(w).catch(w)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return F.isOnline()?this.#c.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#w}getMutationCache(){return this.#c}getDefaultOptions(){return this.#b}setDefaultOptions(e){this.#b=e}setQueryDefaults(e,t){this.#k.set(E(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#k.values()],n={};return t.forEach(t=>{P(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#C.set(E(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#C.values()],n={};return t.forEach(t=>{P(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#b.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=S(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===D&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#b.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#w.clear(),this.#c.clear()}};var en=e.i(271645);let ea=en.createContext(void 0),ei=({client:e,children:t})=>(en.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,o.jsx)(ea.Provider,{value:e,children:t}));e.s(["default",0,function({children:e}){return(0,o.jsx)(ei,{client:et,children:(0,o.jsxs)(x.TooltipProvider,{children:[e,(0,o.jsx)(g,{richColors:!0}),(0,o.jsx)(v.default,{color:"#16a249"})]})})}],477789)},523062,e=>{"use strict";var t=e.i(843476),n=e.i(519455),a=e.i(776639),i=e.i(381561),r=e.i(792621),s=e.i(618566),o=e.i(157072),l=e.i(845476),c=e.i(630311),u=e.i(793479),d=e.i(110204),h=e.i(967489),m=e.i(936573),f=e.i(118361),p=e.i(271645);function g({defaults:e,onDone:a}){let[i,r]=(0,p.useState)(e.gender??""),[s,o]=(0,p.useState)(e.birth_date??""),[l,c]=(0,p.useState)(!1);async function x(){if(!i||!s||l)return;c(!0);let e=await (0,m.updateUserDetailOnClient)({gender:i,birth_date:s});c(!1),(0,f.isOk)(e)&&a()}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d.Label,{children:"Jenis kelamin"}),(0,t.jsxs)(h.Select,{value:i,onValueChange:r,children:[(0,t.jsx)(h.SelectTrigger,{className:"w-full",children:(0,t.jsx)(h.SelectValue,{placeholder:"Pilih jenis kelamin"})}),(0,t.jsxs)(h.SelectContent,{children:[(0,t.jsx)(h.SelectItem,{value:"male",children:"Laki-laki"}),(0,t.jsx)(h.SelectItem,{value:"female",children:"Perempuan"}),(0,t.jsx)(h.SelectItem,{value:"other",children:"Lainnya"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d.Label,{htmlFor:"profile-completion-birth-date",children:"Tanggal lahir"}),(0,t.jsx)(u.Input,{id:"profile-completion-birth-date",type:"date",value:s,onChange:e=>o(e.target.value)}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Minimal berusia 17 tahun."})]}),(0,t.jsx)(n.Button,{className:"w-full",disabled:!i||!s||l,onClick:x,children:"Simpan"})]})}var x=e.i(35485),v=e.i(297615);function b({onDone:e}){let n=async t=>{let n=await (0,v.userCreateAddress)(t);(0,f.isOk)(n)&&e()};return(0,t.jsx)(x.default,{onSubmit:n})}var j=e.i(470070),y=e.i(745833),w=e.i(458887),k=e.i(829756),C=e.i(473322),N=e.i(846696);let S=/^62\d{8,13}$/;function E({onDone:e}){let[a,i]=(0,p.useState)("number"),[r,s]=(0,p.useState)(""),[o,l]=(0,p.useState)(""),[c,h]=(0,p.useState)(!1),m=S.test(r);async function g(){if(!m||c)return;h(!0);let e=await (0,k.askUserOtpChallenge)("set_whatsapp_number",{whatsapp_number:r});h(!1),(0,f.isOk)(e)&&(l(""),i("otp"),N.toast.success("Sukses",{description:"Kode OTP telah dikirim ke nomor WhatsApp kamu."}))}async function x(){if(c)return;h(!0);let e=await (0,k.resendOtpChallenge)("user");h(!1),(0,f.isOk)(e)&&N.toast.success("Sukses",{description:"Kode OTP telah dikirim ulang."})}async function v(){if(6!==o.length||c)return;h(!0);let t=await (0,k.verifyAndSpend)(o,()=>(0,C.setWhatsappNumber)(r));if(h(!1),!(0,f.isOk)(t)){(0,k.mustStartOver)(t.data)&&i("number");return}N.toast.success("Sukses",{description:"Nomor WhatsApp tersimpan."}),e()}return"number"===a?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d.Label,{htmlFor:"profile-completion-whatsapp",children:"Nomor WhatsApp"}),(0,t.jsx)(u.Input,{id:"profile-completion-whatsapp",inputMode:"numeric",placeholder:"628123456789",value:r,onChange:e=>s(e.target.value.replace(/\D/g,""))}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Diawali 62. Kode OTP dikirim ke nomor ini lewat WhatsApp."})]}),(0,t.jsx)(n.Button,{className:"w-full",disabled:!m||c,onClick:g,children:"Kirim k
1ode OTP"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d.Label,{children:"Kode OTP"}),(0,t.jsx)(w.InputOTP,{maxLength:6,value:o,onChange:l,children:(0,t.jsx)(w.InputOTPGroup,{children:[0,1,2,3,4,5].map(e=>(0,t.jsx)(w.InputOTPSlot,{index:e},e))})}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Dikirim ke WhatsApp ",r,"."]}),(0,t.jsx)(y.default,{})]}),(0,t.jsx)(n.Button,{className:"w-full",disabled:6!==o.length||c,onClick:v,children:"Verifikasi"}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(n.Button,{variant:"link",className:"px-0",disabled:c,onClick:()=>i("number"),children:"Ganti nomor"}),(0,t.jsx)(n.Button,{variant:"link",className:"px-0",disabled:c,onClick:x,children:"Kirim ulang kode"})]})]})}let P={whatsapp_number:{title:"Nomor WhatsApp",description:"Tambahkan nomor WhatsApp untuk menerima kode OTP dan kabar pesanan."},personal_details:{title:"Data diri",description:"Jenis kelamin dan tanggal lahir."},primary_address:{title:"Alamat",description:"Alamat pertamamu menjadi alamat utama. Kamu bisa menambah alamat lain nanti."},handyman_profile:{title:"Profil tukang",description:"Headline dan biografi yang dilihat pelanggan."},handyman_category:{title:"Bidang pekerjaan",description:"Kategori utama pekerjaanmu."},survey_fee:{title:"Biaya survei",description:"Tarif datang untuk melihat pekerjaan."},job_availability_schedule:{title:"Jadwal kerja",description:"Hari-hari kamu menerima pekerjaan."}};e.s(["default",0,function({missingSteps:e,defaults:u}){let d=(0,s.useRouter)(),h=(0,s.usePathname)()===r.BECOME_A_HANDYMAN_PATH?e.filter(e=>!r.HANDYMAN_ONBOARDING_STEPS.includes(e)):e,m=h[0];if(!m)return null;let f=()=>d.refresh(),{title:p,description:x}=P[m];return(0,t.jsx)(a.Dialog,{open:!0,children:(0,t.jsxs)(a.DialogContent,{showCloseButton:!1,onEscapeKeyDown:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),className:"max-h-[90vh] overflow-y-auto sm:max-w-lg",children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:["Lengkapi profil · ",h.length," langkah lagi"]}),(0,t.jsx)(a.DialogTitle,{children:p}),(0,t.jsx)(a.DialogDescription,{children:x})]}),(0,t.jsxs)("div",{children:["whatsapp_number"===m&&(0,t.jsx)(E,{onDone:f}),"personal_details"===m&&(0,t.jsx)(g,{defaults:u,onDone:f}),"primary_address"===m&&(0,t.jsx)(b,{onDone:f}),"handyman_profile"===m&&(0,t.jsx)(l.default,{defaults:u,onDone:f}),"handyman_category"===m&&(0,t.jsx)(o.default,{onDone:f}),"survey_fee"===m&&(0,t.jsx)(j.default,{onDone:f}),"job_availability_schedule"===m&&(0,t.jsx)(c.default,{onDone:f})]},m),(0,t.jsx)(n.Button,{variant:"link",className:"mx-auto text-muted-foreground",onClick:()=>(0,i.logout)(),children:"Keluar"})]})})}],523062)},892007,e=>{"use strict";var t=e.i(843476),n=e.i(519455),a=e.i(522016),i=e.i(271645);e.s(["default",0,function(){let[e,r]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{let e=localStorage.getItem("bannerDismissedAt"),t=new Date().getTime();(!e||t-parseInt(e,10)>864e5)&&r(!0)},[]),e)?(0,t.jsx)("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-20 px-6 pb-6",children:(0,t.jsxs)("div",{className:"pointer-events-auto ml-auto max-w-xl rounded-xl bg-slate-50 p-6 shadow-lg ring-1 ring-gray-900/10",children:[(0,t.jsxs)("p",{className:"text-sm/6 text-gray-900",children:["Amankan transaksi proyek anda melalui sistem pembayaran KangPro. Dapatkan garansi uang kembali 100% jika tukang gagal menyelesaikan pekerjaan. Upah tukang otomatis dibayar ketika pekerjaan selesai. Biaya admin murah hanya 5%. KangPro mendukung pembayaran transfer bank BRI, BCA, BNI, Mandiri, Dana, Gopay, QRIS, dll. Baca"," ",(0,t.jsx)(a.default,{href:"https://blog.kangpro.id/aturan-main-kangpro/",target:"_blank",className:"font-semibold text-primary",children:"aturan main"}),", dan"," ",(0,t.jsx)(a.default,{href:"https://blog.kangpro.id/pelajari-cara-kerja-sistem-kangpro/",target:"_blank",className:"font-semibold text-primary",children:"cara kerja"})," ","KangPro. Tonton"," ",(0,t.jsx)(a.default,{target:"_blank",className:"font-semibold text-primary",href:"https://youtube.com/playlist?list=PLvkfsAuEHtqXR4tJ1XvkBiwo5Kc1Xr4WN&si=maIYefgjGJBpEYpG",children:"tutorial cara menggunakan"})," ","aplikasi KangPro di YouTube."]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col md:flex-row items-center gap-x-5 space-y-2 md:space-y-0",children:[(0,t.jsx)(n.Button,{onClick:()=>{localStorage.setItem("bannerDismissedAt",Date.now().toString()),r(!1)},className:"block w-full md:w-auto",children:"Saya setuju"}),(0,t.jsx)("a",{href:"https://blog.kangpro.id/selamat-datang-di-kangpro/",target:"_blank",className:"block w-full md:w-auto",children:(0,t.jsx)(n.Button,{variant:"ghost",className:"w-full",children:"Kenalan dengan KangPro"})})]})]})}):null}])},218250,e=>{"use strict";var t=e.i(843476),n=e.i(519455),a=e.i(754183),i=e.i(437244),r=e.i(663556),s=e.i(975157),o=e.i(271645);let l=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M15 3.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0V5.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l3.97-3.97h-2.69a.75.75 0 0 1-.75-.75Zm-12 0A.75.75 0 0 1 3.75 3h4.5a.75.75 0 0 1 0 1.5H5.56l3.97 3.97a.75.75 0 0 1-1.06 1.06L4.5 5.56v2.69a.75.75 0 0 1-1.5 0v-4.5Zm11.47 11.78a.75.75 0 1 1 1.06-1.06l3.97 3.97v-2.69a.75.75 0 0 1 1.5 0v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-3.97-3.97Zm-4.94-1.06a.75.75 0 0 1 0 1.06L5.56 19.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 1.5 0v2.69l3.97-3.97a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))});var c=e.i(345663),u=e.i(907922),d=e.i(205690);function h(e){return"video"===e?"Panggilan video":"Panggilan suara"}function m({variant:e,children:n}){return(0,t.jsx)("div",{className:(0,s.cn)("w-full bg-primary text-primary-foreground shadow-sm","panel"===e&&"shrink-0"),children:(0,t.jsx)("div",{className:(0,s.cn)("mx-auto flex items-center gap-2","page"===e?"container max-w-7xl px-4 py-2":"px-4 py-1.5"),children:n})})}function f({label:e,detail:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"relative flex size-2 shrink-0","aria-hidden":!0,children:[(0,t.jsx)("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-primary-foreground/80"}),(0,t.jsx)("span",{className:"relative inline-flex size-2 rounded-full bg-primary-foreground"})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 leading-tight",children:[(0,t.jsx)("p",{className:"truncate text-xs font-medium sm:text-sm",children:e}),(0,t.jsx)("p",{className:"truncate text-[11px] text-primary-foreground/80",children:n})]})]})}function p({label:e,onClick:a,className:i,children:r}){return(0,t.jsx)(n.Button,{size:"icon",variant:"ghost","aria-label":e,title:e,onClick:a,className:(0,s.cn)("size-8 shrink-0 rounded-full bg-primary-foreground/15 text-primary-foreground hover:bg-primary-foreground/25 hover:text-primary-foreground",i),children:r})}function g({onClick:e}){return(0,t.jsxs)(n.Button,{size:"sm","aria-label":"Akhiri panggilan",onClick:e,className:"h-8 shrink-0 gap-1.5 rounded-full bg-primary-foreground px-3 text-xs font-medium text-destructive hover:bg-primary-foreground/90",children:[(0,t.jsx)(u.PhoneXMarkIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Akhiri"})]})}e.s(["default",0,function({variant:e="page"}){let n=(0,i.default)(e=>e.phase),o=(0,i.default)(e=>e.call),u=(0,i.default)(e=>e.isExpanded),x=(0,i.default)(e=>e.elsewhere),v=(0,i.default)(e=>e.isMicOn),b=(0,i.default)(e=>e.connectedAt);return(0,i.holdsCall)(n)&&null!==o?(0,t.jsxs)(m,{variant:e,children:[(0,t.jsx)(f,{label:(0,r.callTitle)(o,(0,a.getMyUserId)()),detail:"active"!==n?"Menghubungkan...":null===b?(0,t.jsxs)(t.Fragment,{children:["Menunggu dijawab ·"," ",(0,t.jsx)(d.default,{since:Date.parse(o.started_at)})]}):(0,t.jsxs)(t.Fragment,{children:[h(o.kind)," · ",(0,t.jsx)(d.default,{since:b})]})}),"active"===n&&(0,t.jsx)(p,{label:v?"Matikan mikrofon":"Nyalakan mikrofon",onClick:()=>void(0,a.toggleMic)(),className:(0,s.cn)(!v&&"bg-primary-foreground text-primary"),children:(0,t.jsx)(c.MicrophoneIcon,{className:"size-4"})}),!u&&(0,t.jsx)(p,{label:"Buka layar panggilan",onClick:a.expandCall,children:(0,t.jsx)(l,{className:"size-4"})}),(0,t.jsx)(g,{onClick:()=>void(0,a.hangUp)()})]}):x?(0,t.jsxs)(m,{variant:e,children:[(0,t.jsx)(f,{label:x.title,detail:(0,t.jsxs)(t.Fragment,{children:[null===x.connectedAt?(0,t.jsxs)(t.Fragment,{children:["Menunggu dijawab ·"," ",(0,t.jsx)(d.default,{since:Date.parse(x.startedAt)})]}):(0,t.jsxs)(t.Fragment,{children:[h(x.kind)," ·"," ",(0,t.jsx)(d.default,{since:x.connectedAt})]})," · ",(0,t.jsx)("span",{className:"whitespace-nowrap",children:"di tab lain"})]})}),(0,t.jsx)(g,{onClick:()=>(0,a.hangUpElsewhere)(x.callId)})]}):null}],218250)},803285,e=>{"use strict";var t=e.i(843476),n=e.i(519455),a=e.i(987968),i=e.i(754183),r=e.i(437244),s=e.i(975157),o=e.i(271645);let l=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))});var c=e.i(345663),u=e.i(907922);let d=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{d:"M5.25 6.375a4.125 4.125 0 1 1 8.25 0 4.125 4.125 0 0 1-8.25 0ZM2.25 19.125a7.125 7.125 0 0 1 14.25 0v.003l-.001.119a.75.75 0 0 1-.363.63 13.067 13.067 0 0 1-6.761 1.873c-2.472 0-4.786-.684-6.76-1.873a.75.75 0 0 1-.364-.63l-.001-.122ZM18.75 7.5a.75.75 0 0 0-1.5 0v2.25H15a.75.75 0 0 0 0 1.5h2.25v2.25a.75.75 0 0 0 1.5 0v-2.25H21a.75.75 0 0 0 0-1.5h-2.25V7.5Z"}))});var h=e.i(672102),m=e.i(299401),f=e.i(205690),p=e.i(531779);function g({tile:e}){let n=(0,r.default)(t=>t.call?.participants.find(t=>t.identity===e.identity)?.profile_picture?.url??null),a=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let t=a.current,n=(0,i.getCallRoom)();if(!t||!n||!e.hasVideo)return;let r=e.isLocal?n.localParticipant:[...n.remoteParticipants.values()].find(t=>t.identity===e.identity),s=r?.getTrackPublication(p.Track.Source.Camera)?.track;if(s)return s.attach(t),()=>{s.detach(t)}},[e.identity,e.isLocal,e.hasVideo]),(0,t.jsxs)("div",{className:(0,s.cn)("relative flex min-h-0 items-center justify-center overflow-hidden rounded-xl bg-neutral-800",e.isSpeaking&&"ring-2 ring-green-500"),children:[e.hasVideo?(0,t.jsx)("video",{ref:a,autoPlay:!0,playsInline:!0,muted:e.isLocal,className:(0,s.cn)("h-full w-full object-cover",e.isLocal&&"-scale-x-100")}):(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 text-neutral-400",children:[(0,t.jsxs)("div",{className:"relative flex size-14 items-center justify-center overflow-hidden rounded-full bg-neutral-700 text-lg font-medium text-neutral-200",children:[e.name.split(" ").slice(0,2).map(e=>e[0]?.toUpperCase()??"").join("")||"?",n&&(0,t.jsx)("img",{src:n,alt:"",className:"absolute inset-0 size-full object-cover",onError:e=>{e.currentTarget.style.display="none"}})]}),(0,t.jsx)("span",{className:"text-[11px]",children:"Kamera mati"})]}),(0,t.jsxs)("div",{className:"absolute inset-x-0 bottom-0 flex items-center gap-1.5 bg-gradient-to-t from-black/70 to-transparent px-2 py-1.5",children:[(0,t.jsx)("span",{className:"truncate text-xs text-white",children:e.isLocal?"Anda":e.name}),e.isMuted&&(0,t.jsxs)("span",{className:"relative shrink-0 text-destructive",title:"Mikrofon mati",children:[(0,t.jsx)(c.MicrophoneIcon,{className:"size-3.5"}),(0,t.jsx)("span",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"h-3.5 w-px rotate-45 bg-destructive"})})]})]})]})}var x=e.i(257428),v=e.i(776639),b=e.i(663556);function j({open:e,onOpenChange:a}){let s=(0,r.default)(e=>e.call),[l,c]=(0,o.useState)([]),[u,d]=(0,o.useState)(!1),h=s?(0,b.invitableFrom)(s):[],m=async()=>{d(!0),await (0,i.inviteToCall)(l),d(!1),c([]),a(!1)};return(0,t.jsx)(v.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(v.DialogContent,{className:"max-w-xs sm:max-w-sm",children:[(0,t.jsxs)(v.DialogHeader,{children:[(0,t.jsx)(v.DialogTitle,{className:"text-base",children:"Undang ke panggilan"}),(0,t.jsx)(v.DialogDescription,{className:"text-xs",children:"Mereka akan menerima panggilan masuk dan boleh menolaknya."})]}),0===h.length?(0,t.jsx)("p",{className:"py-4 text-center text-xs text-muted-foreground",children:"Semua orang di percakapan ini sudah ada di panggilan."}):(0,t.jsx)("div",{className:"max-h-64 space-y-1 overflow-y-auto",children:h.map(e=>(0,t.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 rounded-md px-2 py-2 hover:bg-muted",children:[(0,t.jsx)(x.Checkbox,{checked:l.includes(e.user_id),onCheckedChange:()=>{var t;return t=e.user_id,void c(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])}}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs",children:e.name})]},e.user_id))}),(0,t.jsx)(v.DialogFooter,{children:(0,t.jsx)(n.Button,{className:"w-full",disabled:0===l.length||u,onClick:()=>void m(),children:l.length>0?`Undang ${l.length} orang`:"Undang"})})]})})}function y({label:e,active:a,onClick:i,children:r}){return(0,t.jsx)(n.Button,{size:"icon",variant:"ghost","aria-label":e,onClick:i,className:(0,s.cn)("size-12 rounded-full",a?"bg-white/10 text-white hover:bg-white/20 hover:text-white":"bg-white text-neutral-900 hover:bg-white/90 hover:text-neutral-900"),children:r})}e.s(["default",0,function(){var e,p;let x=(0,r.default)(e=>e.phase),v=(0,r.default)(e=>e.call),b=(0,r.default)(e=>e.isExpanded),w=(0,r.default)(e=>e.connectedAt),k=(0,r.default)(e=>e.tiles),C=(0,r.default)(e=>e.isMicOn),N=(0,r.default)(e=>e.isCameraOn),[S,E]=(0,o.useState)(!1),P=(0,r.holdsCall)(x),I=P&&b;if((0,o.useEffect)(()=>
1{if(!P)return;let e=()=>{(0,i.hangUp)()};return window.addEventListener("pagehide",e),()=>window.removeEventListener("pagehide",e)},[P]),!I||!v)return null;let A=(0,r.stillRinging)(v,k),M=k.length;return(0,t.jsxs)("div",{className:"fixed inset-0 z-100 flex flex-col bg-neutral-900 text-white",children:[(0,t.jsx)("div",{className:"absolute top-4 left-4",children:(0,t.jsxs)(n.Button,{size:"sm",variant:"ghost","aria-label":"Kecilkan panggilan",className:"gap-1.5 rounded-full bg-white/10 text-xs text-white hover:bg-white/20 hover:text-white",onClick:i.collapseCall,children:[(0,t.jsx)(l,{className:"size-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Kecilkan"})]})}),v.is_joinable&&(0,t.jsx)("div",{className:"absolute top-4 right-4",children:(0,t.jsxs)(n.Button,{size:"sm",variant:"ghost",className:"gap-1.5 rounded-full bg-white/10 text-xs text-white hover:bg-white/20 hover:text-white",onClick:()=>E(!0),children:[(0,t.jsx)(d,{className:"size-4"}),"Undang"]})}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-col items-center gap-0.5 px-4 pt-5 pb-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:(e=v.is_one_to_one,p=v.participants.length,e?"Panggilan":`Panggilan grup \xb7 ${p} orang`)}),(0,t.jsx)("p",{className:"text-xs text-neutral-400",children:"active"!==x?"outgoing"===x?"Memanggil...":"Menghubungkan...":null===w?(0,t.jsxs)(t.Fragment,{children:["Menunggu dijawab ·"," ",(0,t.jsx)(f.default,{since:Date.parse(v.started_at)})]}):(0,t.jsxs)(t.Fragment,{children:[M," dalam panggilan",A.length>0&&` \xb7 ${A.length} berdering`," · ",(0,t.jsx)(f.default,{since:w})]})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 px-3 pb-3",children:"active"===x?(0,t.jsxs)("div",{className:(0,s.cn)("grid h-full gap-2",k.length<=1&&"grid-cols-1",2===k.length&&"grid-cols-1 sm:grid-cols-2",k.length>2&&"grid-cols-2 auto-rows-fr"),children:[k.map(e=>(0,t.jsx)(g,{tile:e},e.identity)),A.map(e=>(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-neutral-700 bg-neutral-800/40 text-neutral-500",children:[(0,t.jsx)("span",{className:"text-sm",children:e.name}),(0,t.jsx)("span",{className:"text-[11px]",children:"Berdering..."})]},e.user_id))]}):(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-neutral-400",children:[(0,t.jsx)(a.Spinner,{className:"size-7"}),(0,t.jsx)("p",{className:"text-xs",children:"video"===v.kind?"Panggilan video":"Panggilan suara"})]})}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-center gap-4 px-4 pt-2 pb-8",children:[(0,t.jsx)(y,{label:C?"Matikan mikrofon":"Nyalakan mikrofon",active:C,onClick:()=>void(0,i.toggleMic)(),children:(0,t.jsx)(c.MicrophoneIcon,{className:"size-5"})}),(0,t.jsx)(n.Button,{size:"icon","aria-label":"Akhiri panggilan",className:"size-14 rounded-full bg-destructive hover:bg-destructive/90",onClick:()=>void(0,i.hangUp)(),children:(0,t.jsx)(u.PhoneXMarkIcon,{className:"size-6"})}),(0,t.jsx)(y,{label:N?"Matikan kamera":"Nyalakan kamera",active:N,onClick:()=>void(0,i.toggleCamera)(),children:N?(0,t.jsx)(h.VideoCameraIcon,{className:"size-5"}):(0,t.jsx)(m.VideoCameraSlashIcon,{className:"size-5"})})]}),(0,t.jsx)(j,{open:S,onOpenChange:E})]})}],803285)},639959,e=>{"use strict";var t=e.i(843476),n=e.i(868499),a=e.i(799676),i=e.i(754183),r=e.i(437244),s=e.i(975157),o=e.i(607731),l=e.i(907922),c=e.i(672102),u=e.i(271645);function d({label:e,action:n}){return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[n,(0,t.jsx)("span",{"aria-hidden":"true",className:"text-xs text-muted-foreground",children:e})]})}e.s(["default",0,function(){var e,h;let m,f=(0,r.default)(e=>e.phase),p=(0,r.default)(e=>e.call),g="incoming"===f&&null!==p;if(e=g,m=(0,u.useRef)(null),(0,u.useEffect)(()=>{if(!e)return;let t=!1,n=()=>{if(!t)try{let e=m.current??new(window.AudioContext||window.webkitAudioContext);m.current=e,"suspended"===e.state&&e.resume(),[0,.45].forEach(t=>{let n=e.createOscillator(),a=e.createGain();n.frequency.value=480,n.connect(a),a.connect(e.destination);let i=e.currentTime+t;a.gain.setValueAtTime(0,i),a.gain.linearRampToValueAtTime(.18,i+.02),a.gain.linearRampToValueAtTime(0,i+.35),n.start(i),n.stop(i+.36)})}catch{}};n();let a=setInterval(n,3e3);return()=>{t=!0,clearInterval(a)}},[e]),(0,u.useEffect)(()=>()=>{m.current?.close(),m.current=null},[]),!p)return null;let x=p.caller,v="video"===p.kind,b=p.participants.filter(e=>e.user_id!==x?.user_id).length;return(0,t.jsx)(n.AlertDialog,{open:g,children:(0,t.jsxs)(n.AlertDialogContent,{size:"sm",className:"gap-0 p-6 pt-10",children:[(0,t.jsxs)(n.AlertDialogHeader,{className:"gap-0",children:[(0,t.jsxs)("div",{className:"relative mb-4",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute inset-0 animate-ping rounded-full bg-primary/20 motion-reduce:hidden"}),(0,t.jsxs)(a.Avatar,{className:"relative size-20",children:[x?.profile_picture?.url&&(0,t.jsx)(a.AvatarImage,{src:x.profile_picture.url,alt:x.name,className:"object-cover"}),(0,t.jsx)(a.AvatarFallback,{className:"bg-primary/10 text-2xl font-medium text-primary",children:(h=x?.name)?h.split(" ").slice(0,2).map(e=>e[0]?.toUpperCase()??"").join(""):"?"})]}),(0,t.jsx)("span",{className:"absolute -right-1 bottom-0 flex size-8 items-center justify-center rounded-full bg-green-600 text-white ring-4 ring-background",children:v?(0,t.jsx)(c.VideoCameraIcon,{className:"size-4"}):(0,t.jsx)(o.PhoneIcon,{className:"size-4"})})]}),(0,t.jsx)(n.AlertDialogTitle,{className:"text-lg leading-tight",children:x?.name??"Panggilan masuk"}),(0,t.jsxs)(n.AlertDialogDescription,{className:"mt-1 text-sm",children:[v?"Panggilan video masuk":"Panggilan suara masuk",!p.is_one_to_one&&b>1&&(0,t.jsxs)(t.Fragment,{children:[" · ",b," peserta",(0,t.jsx)("span",{className:"mt-1 block text-xs",children:"Mengabaikan tidak mengakhiri panggilan untuk yang lain."})]})]})]}),(0,t.jsxs)("div",{className:"mt-6 flex items-start justify-center gap-12",children:[(0,t.jsx)(d,{label:"Abaikan",action:(0,t.jsx)(n.AlertDialogCancel,{size:"icon","aria-label":"Abaikan panggilan",className:(0,s.cn)("size-14 rounded-full border-0 bg-destructive text-white shadow-sm","hover:bg-destructive/90 hover:text-white"),onClick:()=>(0,i.rejectCall)("declined"),children:(0,t.jsx)(l.PhoneXMarkIcon,{className:"size-6"})})}),(0,t.jsx)(d,{label:"Terima",action:(0,t.jsx)(n.AlertDialogAction,{size:"icon","aria-label":"Terima panggilan",className:"size-14 rounded-full bg-green-600 shadow-sm hover:bg-green-700",onClick:()=>void(0,i.acceptCall)(),children:v?(0,t.jsx)(c.VideoCameraIcon,{className:"size-6"}):(0,t.jsx)(o.PhoneIcon,{className:"size-6"})})})]})]})})}])},284980,e=>{"use strict";var t=e.i(843476),n=e.i(746798),a=e.i(309148),i=e.i(996081),r=e.i(766972),s=e.i(618566),o=e.i(519455),l=e.i(561993),c=e.i(980376),u=e.i(677572),d=e.i(987968),h=e.i(614624),m=e.i(818622),f=e.i(925628),p=e.i(951932),g=e.i(756408),x=e.i(87989),v=e.i(223647),b=e.i(118361),j=e.i(959411),y=e.i(522016),w=e.i(271645),k=e.i(218250),C=e.i(968530),N=e.i(879115),S=e.i(369646);function E({chatRooms:e,setChatRooms:n,setSelectedChatRoom:a,selectedChatRoom:r,handymanId:s}){let l=(0,C.useChatPanelClose)();return r?(0,t.jsx)(N.default,{chatRoom:r,side:"customer",onBack:()=>a(void 0),onTitleClick:l}):(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(0,t.jsx)(S.default,{chatRooms:e,setChatRooms:n,setSelectedChatRoom:a,fetchRooms:f.customerGetChatRoomsOnClient,peer:"handyman",emptyHint:`Anda tidak memiliki pesan baru. Silakan mulai percakapan baru dengan ${null!==s?"pelanggan":"tukang"}.`})}),(0,t.jsxs)("div",{className:"flex shrink-0 gap-2 pt-3",children:[(0,t.jsx)(y.default,{href:"/support",className:"flex-1",onClick:l,children:(0,t.jsx)(o.Button,{variant:"outline",className:"w-full underline",children:"Bantuan"})}),(0,t.jsx)(y.default,{href:i.chatPageHref.customer,className:"flex-1",onClick:l,children:(0,t.jsx)(o.Button,{variant:"outline",className:"w-full",children:"Lihat semua pesan"})})]})]})}var P=e.i(82612),I=e.i(949808),A=e.i(792621);function M({chatRooms:e,setChatRooms:n,setSelectedChatRoom:a,selectedChatRoom:r,handymanId:s}){let l=(0,C.useChatPanelClose)();return null===s?(0,t.jsxs)(P.Empty,{className:"min-h-0 flex-1 p-6",children:[(0,t.jsxs)(P.EmptyHeader,{children:[(0,t.jsx)(P.EmptyMedia,{variant:"icon",className:"size-12 rounded-full bg-primary/10 text-primary",children:(0,t.jsx)(I.WrenchScrewdriverIcon,{"aria-hidden":"true"})}),(0,t.jsx)(P.EmptyTitle,{children:"Anda belum menjadi tukang"}),(0,t.jsx)(P.EmptyDescription,{children:"Daftar menjadi tukang untuk menerima pekerjaan dan mengobrol dengan pelanggan."})]}),(0,t.jsxs)(P.EmptyContent,{className:"gap-2",children:[(0,t.jsx)(y.default,{href:A.BECOME_A_HANDYMAN_PATH,className:"w-full",onClick:l,children:(0,t.jsx)(o.Button,{className:"w-full",children:"Daftar menjadi tukang"})}),(0,t.jsx)(y.default,{href:"/support",className:"w-full",onClick:l,children:(0,t.jsx)(o.Button,{variant:"outline",className:"w-full",children:"Bantuan"})})]})]}):r?(0,t.jsx)(N.default,{chatRoom:r,side:"handyman",onBack:()=>a(void 0),onTitleClick:l}):(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(0,t.jsx)(S.default,{chatRooms:e,setChatRooms:n,setSelectedChatRoom:a,fetchRooms:p.handymanGetChatRoomsOnClient,peer:"customer",emptyHint:"Anda tidak memiliki pesan baru. Silakan mulai percakapan baru dengan pelanggan ketika sudah memulai pekerjaan."})}),(0,t.jsx)("div",{className:"shrink-0 pt-3",children:(0,t.jsx)(y.default,{href:i.chatPageHref.handyman,className:"block",onClick:l,children:(0,t.jsx)(o.Button,{variant:"outline",className:"w-full",children:"Lihat semua pesan"})})})]})}let T=e=>{let t=e.detail.originalEvent.target;t instanceof Element&&t.closest(".PhotoView-Portal")&&e.preventDefault()};function R(){let[e,t]=(0,w.useState)(),[n,a]=(0,w.useState)();return{chatRooms:e,setChatRooms:t,selectedChatRoom:n,setSelectedChatRoom:a}}function O({onClose:e}){return(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center px-4",children:[(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground",children:"Silakan login untuk mengakses fitur ini"}),(0,t.jsxs)("div",{className:"mt-8 flex w-full flex-col space-y-4",children:[(0,t.jsx)(y.default,{className:"block w-full",href:"/auth/signin",onClick:e,children:(0,t.jsx)(o.Button,{className:"w-full",children:"Login"})}),(0,t.jsx)(y.default,{className:"block w-full",href:"/support",onClick:e,children:(0,t.jsx)(o.Button,{variant:"outline",className:"w-full",children:"Bantuan"})})]})]})}function D(){return(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,t.jsx)(d.Spinner,{className:"size-6 text-primary"})})}function _({authenticated:e,handymanId:n,customer:a,handyman:i,activeTab:r,onTabChange:s,onClose:o,customerLabel:l,handymanLabel:c,isResolvingTarget:d,isRo
1omOpen:h}){return e?(0,t.jsxs)(u.Tabs,{value:r,onValueChange:e=>s(e),className:"flex min-h-0 flex-1 flex-col gap-3 p-4",children:[!h&&(0,t.jsxs)(u.TabsList,{className:"w-full shrink-0",children:[(0,t.jsx)(u.TabsTrigger,{value:"customer",className:"w-1/2",children:l}),(0,t.jsx)(u.TabsTrigger,{value:"handyman",className:"w-1/2",children:c})]}),(0,t.jsx)(u.TabsContent,{value:"customer",className:"min-h-0 flex-1 data-[state=active]:flex data-[state=active]:flex-col",children:d?(0,t.jsx)(D,{}):(0,t.jsx)(E,{...a,handymanId:n})}),(0,t.jsx)(u.TabsContent,{value:"handyman",className:"min-h-0 flex-1 data-[state=active]:flex data-[state=active]:flex-col",children:d?(0,t.jsx)(D,{}):(0,t.jsx)(M,{...i,handymanId:n})})]}):(0,t.jsx)(O,{onClose:o})}function L({title:e,description:n,open:i,setOpen:r,authenticated:s,handymanId:o}){let u=(0,m.useMediaQuery)("(min-width: 768px)"),[d,y]=(0,w.useState)("customer"),N=R(),S=R(),E="customer"===d?N:S,P=E.selectedChatRoom;(0,h.useChatRoomFocus)({side:d,chatRooms:E.chatRooms,openRoom:P,active:i&&s});let I=()=>r(!1),A=(0,a.default)(e=>e.target),M=(0,a.default)(e=>e.clearTarget),O=N.setSelectedChatRoom,D=S.setSelectedChatRoom,H=(0,g.default)(e=>e.setAttachedContext);(0,w.useEffect)(()=>{if(!A||!s)return;let e=!1;return(async()=>{let t=Date.now(),n=await (void 0!==A.jobId?"customer"===A.role?(0,f.customerGetChatRoomW
1ithAJob)(A.jobId):(0,p.handymanGetChatRoomWithAJob)(A.jobId):"customer"===A.role?(0,f.customerGetChatRoomWithHandyman)(A.peerId,A.source):(0,p.handymanGetChatRoomWithCustomer)(A.peerId));e||(M(),(0,b.isOk)(n)&&(y(A.role),(0,x.seedRoomWatermarks)(n.data),(0,v.seedRoomJobStatus)(n.data,t),"customer"===A.role?O(n.data):D(n.data),A.attach&&H(n.data.id,A.attach)))})(),()=>{e=!0}},[A,s,M,O,D,H]);let z=(0,t.jsx)(_,{authenticated:s,handymanId:o,customer:N,handyman:S,activeTab:d,onTabChange:y,onClose:I,customerLabel:u?"Sebagai Pelanggan":"Pelanggan",handymanLabel:u?"Sebagai Tukang":"Tukang",isResolvingTarget:null!==A,isRoomOpen:void 0!==P});return u?(0,t.jsx)(C.ChatPanelCloseProvider,{value:I,children:(0,t.jsx)(c.Sheet,{open:i,onOpenChange:r,children:(0,t.jsxs)(c.SheetContent,{className:"flex flex-col gap-0 p-0 md:max-w-md",showCloseButton:!P,onPointerDownOutside:T,onInteractOutside:T,children:[P?(0,t.jsx)(j.VisuallyHidden,{asChild:!0,children:(0,t.jsxs)(c.SheetHeader,{children:[(0,t.jsx)(c.SheetTitle,{children:e}),(0,t.jsx)(c.SheetDescription,{children:n})]})}):(0,t.jsxs)(c.SheetHeader,{className:"shrink-0 border-b",children:[(0,t.jsx)(c.SheetTitle,{children:e}),(0,t.jsx)(c.SheetDescription,{children:n})]}),(0,t.jsx)(k.default,{variant:"panel"}),z]})})}):(0,t.jsx)(C.ChatPanelCloseProvider,{value:I,children:(0,t.jsx)(l.Drawer,{open:i,onOpenChange:(e,t)=>
1{if(!e&&"outsidePress"===t.reason){let e=t.event.target;if(e instanceof Element&&e.closest(".PhotoView-Portal"))return void t.cancel()}r(e)},children:(0,t.jsxs)(l.DrawerContent,{className:"h-[90vh] max-h-[90vh]",children:[P?(0,t.jsx)(j.VisuallyHidden,{asChild:!0,children:(0,t.jsxs)(l.DrawerHeader,{children:[(0,t.jsx)(l.DrawerTitle,{children:e}),(0,t.jsx)(l.DrawerDescription,{children:n})]})}):(0,t.jsxs)(l.DrawerHeader,{className:"shrink-0 border-b",children:[(0,t.jsx)(l.DrawerTitle,{children:e}),(0,t.jsx)(l.DrawerDescription,{children:n})]}),(0,t.jsx)(k.default,{variant:"panel"}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:z})]})})})}e.s(["default",0,function({authenticated:e,handymanId:o}){let l=(0,a.default)(e=>e.open),c=(0,a.default)(e=>e.setOpen),u=(0,a.default)(e=>e.toggle),d=(0,a.default)(e=>e.openConversation),h=(0,s.usePathname)(),m=(0,i.jobRoomFromPath)(h),f=e&&null!==m;if(!h.startsWith("/support"))return(0,t.jsxs)("div",{className:"fixed bottom-0 inset-x-0 z-10 pointer-events-none",children:[(0,t.jsx)("div",{className:"relative flex justify-end p-4",children:(0,t.jsxs)(n.Tooltip,{children:[(0,t.jsx)(n.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("div",{onClick:()=>{!l&&e&&m?d({role:m.side,jobId:m.jobId}):u()},className:"shadow-lg block bg-primary text-white p-4 rounded-full cursor-pointer pointer-events-auto",children:(0,t.jsx)(r.EnvelopeIcon,{className:"w-5 h-5"})})}),(0,t.jsx)(n.TooltipContent,{children:(0,t.jsx)("p",{children:f?"Buka chat pekerjaan ini":"Buka chat"})})]})}),(0,t.jsx)("div",{children:(0,t.jsx)(L,{title:"Pesan",description:"Pesan antara pelanggan, tukang, dan pekerjaan",open:l,setOpen:c,authenticated:e,handymanId:o})})]})}],284980)},836756,e=>{"use strict";var t=e.i(271645),n=e.i(618566);e.s(["default",0,function(){let e=(0,n.usePathname)();return(0,t.useEffect)(()=>{let t=()=>{window.$chatwoot&&("/support"===e?window.$chatwoot.toggleBubbleVisibility("show"):window.$chatwoot.toggleBubbleVisibility("hide"))};return t(),window.addEventListener("chatwoot:ready",t),()=>{window.removeEventListener("chatwoot:ready",t)}},[e]),null}])},728491,e=>{"use strict";var t=e.i(271645),n=e.i(297474);let a=["mousemove","keydown","scroll","touchstart"];e.s(["default",0,function({authenticated:e}){return(0,t.useEffect)(()=>{if(!e)return;let t=null,i=null,r=0,s=()=>{null===t&&((0,n.sendHeartbeatOnClient)(),t=setInterval(()=>void(0,n.sendHeartbeatOnClient)(),n.HEARTBEAT_INTERVAL_MS))},o=()=>{null!==t&&(clearInterval(t),t=null)},l=()=>{null!==i&&clearTimeout(i),i=setTimeout(o,n.IDLE_TIMEOUT_MS)},c=()=>{let e=Date.now();e<r||(r=e+1e3,l(),"visible"===document.visibilityState&&s())},u=()=>{"visible"===document.visibilityState?(l(),s()):o()};return"visible"===document.visibilityState&&(l(),s()),a.forEach(e=>window.addEventListener(e,c,{passive:!0})),document.addEventListener("visibilitychange",u),()=>{o(),null!==i&&clearTimeout(i),a.forEach(e=>window.removeEventListener(e,c)),document.removeEventListener("visibilitychange",u)}},[e]),null}])},22987,e=>{"use strict";var t=e.i(754183);e.s(["default",0,function({authenticated:e,userId:n}){return(0,t.useChatCallChannel)(e,n),null}])},147822,e=>{"use strict";var t=e.i(747059),n=e.i(831699);e.s(["default",0,function({authenticated:e}){let a=(0,n.useIncomingChatMessage)();return(0,t.useCableSubscription)("ChatCustomerChannel",e=>a(e.data.chat_message),{enabled:e}),null}])},714553,e=>{"use strict";var t=e.i(747059),n=e.i(831699);e.s(["default",0,function({authenticated:e,handymanId:a}){let i=(0,n.useIncomingChatMessage)();return(0,t.useCableSubscription)("ChatHandymanChannel",e=>i(e.data.chat_message),{enabled:e&&null!==a}),null}])},718131,e=>{"use strict";var t=e.i(990019);e.s(["default",0,function({authenticated:e}){return(0,t.useChatLiveLocationChannel)(e),null}])},191977,e=>{"use strict";var t=e.i(622301);e.s(["default",0,function({authenticated:e}){return(0,t.useChatReadChannel)(e),null}])},312317,e=>{"use strict";var t=e.i(946209);e.s(["default",0,function({authenticated:e}){return(0,t.useChatTypingChannel)(e),null}])},469099,e=>{"use strict";var t=e.i(154261);e.s(["default",0,function({authenticated:e}){return(0,t.useJobStatusChannel)(e),null}])},910216,e=>{"use strict";var t=e.i(843476),n=e.i(561993);e.s(["default",0,function({children:e}){return(0,t.jsxs)(n.DrawerProvider,{children:[(0,t.jsx)(n.DrawerIndentBackgroun
1d,{}),(0,t.jsx)(n.DrawerIndent,{children:e})]})}])},225873,e=>{"use strict";var t=e.i(843476),n=e.i(618566);function a({className:e}){return(0,t.jsx)("svg",{className:e,width:"1000",height:"879",viewBox:"0 0 1000 879",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.8032 878.788H440.797L243.284 696.961L439.439 516.294L1000 0H607.721L0 559.682V878.788H45.8032ZM611.699 521.122L415.575 701.789L607.721 878.788H1000L611.699 521.122ZM42.4887 0H0V400.458L434.768 0H42.4887Z"})})}var i=e.i(657688),r=e.i(522016);function s(){let e=[{name:"Facebook",href:"https://www.facebook.com/tukang.profesional.kangpro",icon:e=>(0,t.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z",clipRule:"evenodd"})})},{name:"LinkedIn",href:"https://www.linkedin.com/company/kangpro",icon:e=>(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 100 100",fill:"currentColor",...e,children:(0,t.jsx)("path",{d:"M82 8H18C12.48 8 8 12.48 8 18V82C8 87.52 12.48 92 18 92H82C87.52 92 92 87.52 92 82V18C92 12.48 87.52 8 82 8ZM34 40V78H22V40H34ZM22 28.94C22 26.14 24.4 24 28 24C31.6 24 33.86 26.14 34 28.94C34 31.74 31.76 34 28 34C24.4 34 22 31.74 22 28.94ZM78 78H66C66 78 66 59.48 66 58C66 54 64 50 59 49.92H58.84C54 49.92 52 54.04 52 58C52 59.82 52 78 52 78H40V40H52V45.12C52 45.12 55.86 40 63.62 40C71.56 40 78 45.46 78 56.52V78Z"})})},{name:"TikTok",href:"https://tiktok.com/@kangpro.id",icon:e=>(0,t.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 100 100",fill:"currentColor",...e,children:(0,t.jsx)("path",{d:"M82 8H18C12.486 8 8 12.486 8 18V82C8 87.514 12.486 92 18 92H82C87.514 92 92 87.514 92 82V18C92 12.486 87.514 8 82 8ZM74.012 44.646C73.558 44.688 73.098 44.716 72.632 44.716C67.386 44.716 62.776 42.018 60.094 37.94C60.094 48.638 60.094 60.81 60.094 61.014C60.094 70.432 52.458 78.068 43.04 78.068C33.622 78.068 25.986 70.432 25.986 61.014C25.986 51.596 33.622 43.96 43.04 43.96C43.396 43.96 43.744 43.992 44.094 44.014V52.418C43.744 52.376 43.4 52.312 43.04 52.312C38.232 52.312 34.336 56.208 34.336 61.016C34.336 65.824 38.232 69.72 43.04 69.72C47.848 69.72 52.094 65.932 52.094 61.124C52.094 60.934 52.178 21.936 52.178 21.936H60.21C60.966 29.118 66.764 34.786 74.012 35.306V44.646Z"})})},{name:"Instagram",href:"https://instagram.com/kangpro.id",icon:e=>(0,t.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058
1-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z",clipRule:"evenodd"})})},{name:"GitHub",href:"https://github.com/kangproid",icon:e=>(0,t.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})})},{name:"YouTube",href:"https://www.youtube.com/@kangproid",icon:e=>(0,t.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M19.812 5.418c.861.23 1.538.907 1.768 1.768C21.998 8.746 22 12 22 12s0 3.255-.418 4.814a2.504 2.504 0 0 1-1.768 1.768c-1.56.419-7.814.419-7.814.419s-6.255 0-7.814-.419a2.505 2.505 0 0 1-1.768-1.768C2 15.255 2 12 2 12s0-3.255.417-4.814a2.507 2.507 0 0 1 1.768-1.768C5.744 5 11.998 5 11.998 5s6.255 0 7.814.418ZM15.194 12 10 15V9l5.194 3Z",clipRule:"evenodd"})})}];return(0,t.jsxs)("footer",{className:"bg-slate-50","aria-labelledby":"footer-heading",children:[(0,t.jsx)("h2",{id:"footer-heading",className:"sr-only",children:"Footer"}),(0,t.jsxs)("div",{className:"mx-auto max-w-7xl px-4 pb-8 pt-16 sm:pt-24 space-y-12",children:[(0,t.jsxs)("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsx)(a,{className:"text-primary h-6 w-6"}),(0,t.jsxs)("p",{className:"text-sm leading-6 text-gray-600",children:["Panggil tukang semudah panggil driver ojek online. Hati hati penipuan. Hubungi admin di halaman ",(0,t.jsx)(r.default,{href:"/support",className:"underline",children:"bantuan"}),"."]}),(0,t.jsx)("div",{className:"flex space-x-6",children:e.map(e=>(0,t.jsxs)("a",{href:e.href,className:"text-gray-400 hover:text-gray-500",children:[(0,t.jsx)("span",{className:"sr-only",children:e.name}),(0,t.jsx)(e.icon,{className:"h-6 w-6","aria-hidden":"true"})]},e.name))})]}),(0,t.jsxs)("div",{className:"mt-16 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0",children:[(0,t.jsxs)("div",{className:"md:grid md:grid-cols-2 md:gap-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Solusi"}),(0,t.jsx)("ul",{role:"list",className:"mt-6 space-y-4",children:[{name:"Cari Tukang",href:"/services"},{name:"Cari Pekerjaan",href:"/jobs"},{name:"Cari Tukang Berdasarkan Kota",href:"/cities"},{name:"Cari Tukang Berdasarkan Kategori",href:"/categories"}].map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:e.href,className:"text-sm leading-6 text-gray-600 hover:text-gray-900",children:e.name})},e.name))})]}),(0,t.jsxs)("div",{className:"mt-10 md:mt-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Support"}),(0,t.jsx)("ul",{role:"list",className:"mt-6 space-y-4",children:[{name:"Cara menjadi Tukang",href:"https://www.youtube.com/watch?v=_p6CN107GKY"},{name:"Hubungi Admin",href:"/support"},{name:"Status Server",href:"https://kangpro.openstatus.dev"}].map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:e.href,target:"_blank",className:"text-sm leading-6 text-gray-600 hover:text-gray-900",children:e.name})},e.name))})]})]}),(0,t.jsxs)("div",{className:"md:grid md:grid-cols-2 md:gap-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Perusahaan"}),(0,t.jsx)("ul",{role:"list",className:"mt-6 space-y-4",children:[{name:"Blog",href:"/blog"},{name:"Karir",href:"/careers"},{name:"FAQ",href:"/faq"}].map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:e.href,className:"text-sm leading-6 text-gray-600 hover:text-gray-900",children:e.name})},e.name))})]}),(0,t.jsxs)("div",{className:"mt-10 md:mt-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Legal"}),(0,t.jsx)("ul",{role:"list",className:"mt-6 space-y-4",children:[{name:"Privacy",href:"/privacy"},{name:"Terms",href:"/terms"}].map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:e.href,className:"text-sm leading-6 text-gray-600 hover:text-gray-900",children:e.name})},e.name))})]})]})]})]}),(0,t.jsxs)("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Mendukung Metode Pembayaran"}),(0,t.jsxs)("div",{className:"mt-6 flex flex-wrap gap-4",children:[(0,t.jsx)(i.default,{alt:"QRIS",src:"/images/banks/qris.png",width:300,height:100,className:"max-h-6 w-auto object-contain object-left"}),(0,t.jsx)(i.default,{alt:"BRI",src:"/images/banks/bri.png",width:300,height:100,className:"max-h-6 w-auto object-contain object-left"}),(0,t.jsx)(i.default,{alt:"BCA",src:"/images/banks/bca.png",width:300,height:100,className:"max-h-6 w-auto object-contain object-left"}),(0,t.jsx)(i.default,{alt:"BNI",src:"/images/banks/bni.png",width:300,height:100,className:"max-h-6 w-auto object-contain object-left"}),(0,t.jsx)(i.default,{alt:"mandiri",src:"/images/banks/mandiri.png",width:300,height:100,className:"max-h-6 w-auto object-contain object-left"}),(0,t.jsx)(i.default,{alt:"dana",src:"/images/banks/dana.png",width:300,height:100,className:"max-h-6 w-auto object-contain object-left"})]})]}),(0,t.jsxs)("div",{className:"mt-16 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0",children:[(0,t.jsxs)("div",{className:"md:grid md:grid-cols-2 md:gap-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold leading-6 text-gray-900",children:"KangPro vs Kompetitor"}),(0,t.jsx)("ul",{role:"list",className:"mt-6 space-y-4",children:[{name:"KangPro vs Santo Suruh",href:"/blog/santo-suruh-vs-kangpro-tarif-tukang-d
1an-layanan/"},{name:"KangPro vs Gravel",href:"/blog/gravel-vs-kangpro-perbandingan-harga-tukang/"},{name:"KangPro vs OLX",href:"/blog/bandingkan-tarif-tukang-kangpro-vs-olx/"},{name:"KangPro vs Jasa Lengkap",href:"/blog/tarif-tukang-jasalengkap-vs-kangpro-terbaik/"},{name:"KangPro vs Kanggo",href:"/blog/tarif-tukang-kanggo-vs-kangpro-kualitas-layanan/"},{name:"KangPro vs Sejasa",href:"/blog/kangpro-vs-sejasa-perbandingan-tarif-tukang/"},{name:"KangPro vs GoLife",href:"/blog/perbandingan-kangpro-vs-golife-harga-layanan/"}].map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:e.href,className:"text-sm leading-6 text-gray-600 hover:text-gray-900",children:e.name})},e.name))})]}),(0,t.jsxs)("div",{className:"mt-10 md:mt-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Harga"}),(0,t.jsx)("ul",{role:"list",className:"mt-6 space-y-4",children:[{name:"Harga untuk Pelanggan",href:"/pricing/customer"},{name:"Harga untuk Tukang",href:"/pricing/handyman"}].map(e=>(0,t.jsx)("li",{children:(0,t.jsx)("a",{href:e.href,className:"text-sm leading-6 text-gray-600 hover:text-gray-900",children:e.name})},e.name))})]})]}),(0,t.jsx)("div",{className:"md:grid md:grid-cols-2 md:gap-8",children:(0,t.jsxs)("div",{className:"mt-10 md:mt-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Download Aplikasi"}),(0,t.jsx)("ul",{role:"list",className:"mt-6 space-y-4",children:[{name:"Aplikasi untuk Pelanggan",href:"/landing/customer-mobile-app"},{name:"Apliaksi untuk Tukang",href:"/landing/handyman-mobile-app"}].map(e=>(0,t.jsx)("li",{children:(0,t.jsx)("a",{href:e.href,className:"text-sm leading-6 text-gray-600 hover:text-gray-900",children:e.name})},e.name))})]})})]})]}),(0,t.jsx)("div",{className:"mt-16 border-t border-gray-900/10 pt-8 sm:mt-20 lg:mt-24",children:(0,t.jsxs)("p",{className:"text-xs leading-5 text-gray-500",children:[(0,t.jsxs)("span",{children:["© ",new Date().getFullYear()," "]}),(0,t.jsx)("span",{children:"KangPro. "}),(0,t.jsxs)("span",{children:["Build ","production"," versi ","1.2.0"]})]})})]})]})}var o=e.i(271645),l=e.i(519455),c=e.i(561993),u=e.i(975157);let d=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"}))});var h=e.i(858690),m=e.i(334152),f=e.i(99662),p=e.i(675272),g=e.i(673130),x=e.i(427217),v=e.i(503636),b=e.i(30030),j=e.i(75830),y=e.i(820783),w=e.i(981140),k=e.i(369340),C=e.i(248425),N=e.i(687607),S=e.i(610772),E=e.i(586318),P=Object.defineProperty,I=(e,t)=>P(e,"name",{value:t,configurable:!0}),A="Accordion",M=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[T,R,O]=(0,j.createCollection)(A),[D,_]=(0,b.createContextScope)(A,[O,N.createCollapsibleScope]),L=(0,N.createCollapsibleScope)(),H=o.forwardRef(I(function(e,n){let{type:a,...i}=e;return(0,t.jsx)(T.Provider,{scope:e.__scopeAccordion,children:"multiple"===a?(0,t.jsx)(V,{...i,ref:n}):(0,t.jsx)(K,{...i,ref:n})})},"Accordion")),[z,F]=D(A),[B,q]=D(A,{collapsible:!1}),K=o.forwardRef(I(function(e,n){let{value:a,defaultValue:i,onValueChange:r=I(()=>{},"onValueChange"),collapsible:s=!1,...l}=e,[c,u]=(0,k.useControllableState)({prop:a,defaultProp:i??"",onChange:r,caller:A});return(0,t.jsx)(z,{scope:e.__scopeAccordion,value:o.useMemo(()=>c?[c]:[],[c]),onItemOpen:u,onItemClose:o.useCallback(()=>s&&u(""),[s,u]),children:(0,t.jsx)(B,{scope:e.__scopeAccordion,collapsible:s,children:(0,t.jsx)(Q,{...l,ref:n})})})},"AccordionImplSingle")),V=o.forwardRef(I(function(e,n){let{value:a,defaultValue:i,onValueChange:r=I(()=>{},"onValueChange"),...s}=e,[l,c]=(0,k.useControllableState)({prop:a,defaultProp:i??[],onChange:r,caller:A}),u=o.useCallback(e=>c((t=[])=>[...t,e]),[c]),d=o.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,t.jsx)(z,{scope:e.__scopeAccordion,value:l,onItemOpen:u,onItemClose:d,children:(0,t.jsx)(B,{scope:e.__scopeAccordion,collapsible:!0,children:(0,t.jsx)(Q,{...s,ref:n})})})}
1,"AccordionImplMultiple")),[U,G]=D(A),Q=o.forwardRef(I(function(e,n){let{__scopeAccordion:a,disabled:i,dir:r,orientation:s="vertical",...l}=e,c=o.useRef(null),u=(0,y.useComposedRefs)(c,n),d=R(a),h="ltr"===(0,E.useDirection)(r),m=(0,w.composeEventHandlers)(e.onKeyDown,e=>{if(!M.includes(e.key))return;let t=e.target,n=d().filter(e=>!e.ref.current?.disabled),a=n.findIndex(e=>e.ref.current===t),i=n.length;if(-1===a)return;e.preventDefault();let r=a,o=i-1,l=I(()=>{(r=a+1)>o&&(r=0)},"moveNext"),c=I(()=>{(r=a-1)<0&&(r=o)},"movePrev");switch(e.key){case"Home":r=0;break;case"End":r=o;break;case"ArrowRight":"horizontal"===s&&(h?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(h?c():l());break;case"ArrowUp":"vertical"===s&&c()}let u=r%i;n[u].ref.current?.focus()});return(0,t.jsx)(U,{scope:a,disabled:i,direction:r,orientation:s,children:(0,t.jsx)(T.Slot,{scope:a,children:(0,t.jsx)(C.Primitive.div,{...l,"data-orientation":s,ref:u,onKeyDown:i?void 0:m})})})},"AccordionImpl")),$="AccordionItem",[W,Z]=D($),J=o.forwardRef(I(function(e,n){let{__scopeAccordion:a,value:i,...r}=e,s=G($,a),o=F($,a),l=L(a),c=(0,S.useId)(),u=i&&o.value.includes(i)||!1,d=s.disabled||e.disabled;return(0,t.jsx)(W,{scope:a,open:u,disabled:d,triggerId:c,children:(0,t.jsx)(N.Root,{"data-orientation":s.orientation,"data-state":en(u),...l,...r,ref:n,disabled:d,open:u,onOpenChange:e=>{e?o.onItemOpen(i):o.onItemClose(i)}})})},"AccordionItem")),Y=o.forwardRef(I(function(e,n){let{__scopeAccordion:a,...i}=e,r=G(A,a),s=Z("AccordionHeader",a);return(0,t.jsx)(C.Primitive.h3,{"data-orientation":r.orientation,"data-state":en(s.open),"data-disabled":s.disabled?"":void 0,...i,ref:n})},"AccordionHeader")),X="AccordionTrigger",ee=o.forwardRef(I(function(e,n){let{__scopeAccordion:a,...i}=e,r=G(A,a),s=Z(X,a),o=q(X,a),l=L(a);return(0,t.jsx)(T.ItemSlot,{scope:a,children:(0,t.jsx)(N.Trigger,{"aria-disabled":s.open&&!o.collapsible||void 0,"data-orientation":r.orientation,id:s.triggerId,...l,...i,ref:n})})},"AccordionTrigger")),et=o.forwardRef(I(function(e,n){let{__scopeAccordion:a,...i}=e,r=G(A,a),s=Z("AccordionContent",a),o=L(a);return(0,t.jsx)(N.Content,{role:"region","aria-labelledby":s.triggerId,"data-orientation":r.orientation,...o,...i,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})},"AccordionContent"));function en(e){return e?"open":"closed"}I(en,"getState"),e.s(["Accordion",0,H,"AccordionContent",0,et,"AccordionHeader",0,Y,"AccordionItem",0,J,"AccordionTrigger",0,ee,"Content",0,et,"Header",0,Y,"Item",0,J,"Root",0,H,"Trigger",0,ee,"createAccordionScope",0,_],767660);var ea=e.i(767660),ea=ea;function ei({...e}){return(0,t.jsx)(ea.Root,{"data-slot":"accordion",...e})}function er({className:e,...n}){return(0,t.jsx)(ea.Item,{"data-slot":"accordion-item",className:(0,u.cn)("border-b last:border-b-0",e),...n})}function es({className:e,children:n,...a}){return(0,t.jsx)(ea.Header,{className:"flex",children:(0,t.jsxs)(ea.Trigger,{"data-slot":"accordion-trigger",className:(0,u.cn)("flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),...a,children:[n,(0,t.jsx)(v.ChevronDownIcon,{className:"pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200"})]})})}function eo({className:e,children:n,...a}){return(0,t.jsx)(ea.Content,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...a,children:(0,t.jsx)("div",{className:(0,u.cn)("pt-0 pb-4",e),children:n})})}var el=e.i(906197);let ec=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"}))}),eu=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 1 1 0-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 0 1-1.44-4.282m3.102.069a18.03 18.03 0 0 1-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 0 1 8.835 2.535M10.34 6.66a23.847 23.847 0 0 0 8.835-2.535m0 0A23.74 23.74 0 0 0 18.795 3m.38 1.125a23.91 23.91 0 0 1 1.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 0 0 1.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 0 1 0 3.46"}))});var ed=e.i(949808);let eh=[{title:"Pengenalan",href:"/blog/selamat-datang-di-kangpro",description:"Apa itu KangPro dan untuk siapa."},{title:"Cara kerja",href:"/blog/pelajari-cara-kerja-sistem-kangpro",description:"Dari mencari tukang, membuat kontrak, sampai pembayaran."},{title:"Keunggulan",href:"/blog/keunggulan-kangpro",description:"Panggil tukang semudah panggil driver ojek online."},{title:"Aturan main",href:"/blog/aturan-main-kangpro",description:"Hak dan kew
1ajiban pelanggan maupun tukang."},{title:"Harga untuk pelanggan",href:"/pricing/customer",description:"Biaya saat memesan jasa, isi saldo, dan tarik saldo."},{title:"Harga untuk tukang",href:"/pricing/handyman",description:"Biaya pasang iklan dan potongan tiap pekerjaan."},{title:"FAQ",href:"/faq",description:"Pertanyaan umum seputar KangPro."}];function em({title:e,children:n}){return(0,t.jsxs)("section",{className:"py-1",children:[(0,t.jsx)("h3",{className:"px-4 pt-3 pb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase",children:e}),(0,t.jsx)(el.ItemGroup,{children:n})]})}var ef=e.i(302747);function ep({href:e,icon:n,title:a,trailing:i,isLoading:s=!1,className:o}){return(0,t.jsxs)(c.DrawerClose,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:e}),className:(0,u.cn)("group/item flex w-full items-center gap-3 rounded-md border border-transparent px-4 py-3 text-left text-sm transition-colors outline-none","hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",o),children:[n&&(0,t.jsx)(el.ItemMedia,{children:(0,t.jsx)(n,{className:"size-5 text-muted-foreground","aria-hidden":"true"})}),(0,t.jsx)(el.ItemContent,{children:(0,t.jsx)(el.ItemTitle,{className:"font-normal",children:a})}),(s||void 0!==i)&&(0,t.jsx)(el.ItemActions,{children:s?(0,t.jsx)(ef.Skeleton,{className:"h-4 w-10 rounded-full"}):i})]})}let eg=[{title:"Aplikasi untuk pelanggan",href:"/landing/customer-mobile-app",icon:ec},{title:"Aplikasi untuk tukang",href:"/landing/handyman-mobile-app",icon:ed.WrenchScrewdriverIcon},{title:"Pasang iklan jasa gratis",href:"/pricing/services-pricing-for-handyman",icon:eu}];function ex(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(em,{title:"Layanan",children:eg.map(e=>(0,t.jsx)(ep,{href:e.href,icon:e.icon,title:e.title},e.href))}),(0,t.jsx)("section",{className:"px-2 py-1",children:(0,t.jsx)(ei,{type:"single",collapsible:!0,className:"w-full",children:(0,t.jsxs)(er,{value:"tentang",className:"border-none",children:[(0,t.jsx)(es,{className:"px-2 py-3 text-sm font-medium hover:no-underline",children:"Tentang KangPro"}),(0,t.jsx)(eo,{className:"pb-1",children:(0,t.jsx)(el.ItemGroup,{children:eh.map(e=>(0,t.jsx)(ep,{href:e.href,title:e.title},e.href))})})]})})})]})}let ev=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z"}),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6Z"}))});var eb=e.i(633576),ej=e.i(114106);let ey={services:"Jasa tukang yang siap dipesan disekitarmu.",jobs:"Kontrak pekerjaan terbaru yang bisa kamu ambil.",handymans:"Tukang terverifikasi disekitarmu.",categories:"Telusuri berdasarkan jenis pekerjaan."},ew=ej.SEARCH_RESOURCES.map(e=>({title:e.label,href:e.path,description:ey[e.resource]})),ek={"/services":ed.WrenchScrewdriverIcon,"/jobs":m.BriefcaseIcon,"/handymans":eb.UserGroupIcon,"/categories":ev};function eC(){return(0,t.jsx)(em,{title:"Telusuri",children:ew.map(e=>(0,t.jsx)(ep,{href:e.href,icon:ek[e.href],title:e.title},e.href))})}var eN=e.i(412403),eS=e.i(799676),eE=e.i(670862),eP=e.i(118361),eI=e.i(597660);function eA({authenticated:e}){let[n,a]=(0,o.useState)(),[i,s]=(0,o.useState)(e);return((0,o.useEffect)(()=>{if(!e)return;let t=!0;return(0,eE.getMyProfileOnClient)().then(e=>{t&&((0,eP.isOk)(e)&&a(e.data),s(!1))}),()=>{t=!1}},[e]),e)?i?(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ef.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,t.jsx)(ef.Skeleton,{className:"h-4 w-28"}
1),(0,t.jsx)(ef.Skeleton,{className:"h-3 w-40"})]})]}):(0,t.jsxs)(c.DrawerClose,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:"/dashboard/profile"}),className:"flex items-center gap-3 text-left",children:[(0,t.jsxs)(eS.Avatar,{className:"size-10 shrink-0",children:[(0,t.jsx)(eS.AvatarImage,{src:n?.user_detail.profile_picture?.url||"",alt:"",className:"h-full w-full rounded-full object-cover"}),(0,t.jsx)(eS.AvatarFallback,{children:(0,eI.getInitials)(n?.name??"?")})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:n?.name}),(0,t.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:n?.email})]})]}):(0,t.jsx)(c.DrawerClose,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:"/"}),className:"inline-flex w-fit items-center",children:(0,t.jsx)(eN.default,{className:"h-9 w-28 text-primary"})})}var eM=e.i(346294),eT=e.i(518139),eT=eT,eR=e.i(38476);function eO(e,t){let[n,a]=(0,o.useState)(0),[i,r]=(0,o.useState)(!0);return(0,o.useEffect)(()=>{let n=!0;return eR.backendOnClient.get(e).then(e=>{n&&(0,eP.isOk)(e)&&a(t(e.data))}).finally(()=>{n&&r(!1)}),()=>{n=!1}},[e]),{value:n,isLoading:i}}function eD(){let{value:e,isLoading:n}=eO("/api/v1/wallets/get-my-balance",e=>e.balance);return(0,t.jsx)(ep,{href:"/dashboard/wallet",icon:eT.default,title:"Saldo",isLoading:n,trailing:(0,t.jsx)("span",{className:"text-sm font-medium tabular-nums",children:(0,eM.formatNumberToRupiah)(e)})})}var e_=e.i(487486);let eL=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7.875 14.25 1.214 1.942a2.25 2.25 0 0 0 1.908 1.058h2.006c.776 0 1.497-.4 1.908-1.058l1.214-1.942M2.41 9h4.636a2.25 2.25 0 0 1 1.872 1.002l.164.246a2.25 2.25 0 0 0 1.872 1.002h2.092a2.25 2.25 0 0 0 1.872-1.002l.164-.246A2.25 2.25 0 0 1 16.954 9h4.636M2.41 9a2.25 2.25 0 0 0-.16.832V12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 12V9.832c0-.287-.055-.57-.16-.832M2.41 9a2.25 2.25 0 0 1 .382-.632l3.285-3.832a2.25 2.25 0 0 1 1.708-.786h8.43c.657 0 1.281.287 1.709.786l3.284 3.832c.163.19.291.404.382.632M4.5 20.25h15A2.25 2.25 0 0 0 21.75 18v-2.625c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125V18a2.25 2.25 0 0 0 2.25 2.25Z"}))});function eH(){let{value:e,isLoading:n}=eO("/api/v1/customer/jobs/get-active-jobs-counter",e=>e.active_jobs_counter);return(0,t.jsx)(ep,{href:"/dashboard/customer/jobs",icon:eL,title:"Kontrak kerja",isLoading:n,trailing:e>0?(0,t.jsx)(e_.Badge,{variant:"secondary",children:e}):void 0})}var ez=e.i(766972);function eF(){let{value:e,isLoading:n}=eO("/api/v1/handyman/jobs/get-job-invitations-counter",e=>e.job_invitations_counter);return(0,t.jsx)(ep,{href:"/dashboard/handyman/invitations",icon:ez.EnvelopeIcon,title:"Undangan pekerjaan",isLoading:n,trailing:e>0?(0,t.jsx)(e_.Badge,{variant:"secondary",children:e}):void 0})}let eB=o.forwardRef(function({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}))});function eq(){let{value:e,isLoading:n}=eO("/api/v1/handyman/jobs/get-active-job-proposals-counter",e=>e.active_job_proposals_counter);return(0,t.jsx)(ep,{href:"/dashboard/handyman/proposals",icon:eB,title:"Proposal saya",isLoading:n,trailing:e>0?(0,t.jsx)(e_.Badge,{variant:"secondary",children:e}):void 0})}function eK(){let{value:e,isLoading:n}=eO("/api/v1/handyman/jobs/get-active-jobs-counter",e=>e.active_jobs_counter);return(0,t.jsx)(ep,{href:"/dashboard/handyman/jobs",icon:ed.WrenchScrewdriverIcon,title:"Kontrak kerja saya",isLoading:n,trailing:e>0?(0,t.jsx)(e_.Badge,{variant:"secondary",children:e}):void 0})}var eV=e.i(572226);function eU(){return(0,t.jsx)(c.DrawerTrigger,{render:(0,t.jsx)(l.Button,{className:"md:hidden",variant:"outline",size:"icon"}),children:(0,t.jsx)(eV.HamburgerMenuIcon,{className:"h-4 w-4"})})}var eG=e.i(792621);function eQ({authenticated:e,handymanId:n}){return(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsxs)(c.Drawer,{children:[(0,t.jsx)(eU,{}
1),(0,t.jsxs)(c.DrawerContent,{floating:!0,className:"mx-auto sm:max-w-md",children:[(0,t.jsxs)(c.DrawerHeader,{className:"relative border-b pr-12",children:[(0,t.jsx)(c.DrawerTitle,{className:"sr-only",children:"Menu"}),(0,t.jsx)(c.DrawerDescription,{className:"sr-only",children:"Navigasi untuk mengakses fitur-fitur di KangPro"}),(0,t.jsx)(eA,{authenticated:e}),(0,t.jsx)(c.DrawerClose,{"aria-label":"Tutup menu",className:(0,u.cn)((0,l.buttonVariants)({variant:"ghost",size:"icon"}),"absolute top-3 right-3"),children:(0,t.jsx)(x.XMarkIcon,{className:"size-5"})})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-2",children:[(0,t.jsx)(eC,{}),e&&(0,t.jsxs)(em,{title:"Aktivitas saya",children:[(0,t.jsx)(eH,{}),null!=n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ep,{href:"/dashboard/handyman/services",icon:m.BriefcaseIcon,title:"Jasa saya"}),(0,t.jsx)(eK,{}),(0,t.jsx)(eq,{}),(0,t.jsx)(eF,{})]}):(0,t.jsx)(ep,{href:eG.BECOME_A_HANDYMAN_PATH,icon:f.DocumentPlusIcon,title:"Daftar menjadi tukang"})]}),e&&(0,t.jsxs)(em,{title:"Akun",children:[(0,t.jsx)(ep,{href:"/dashboard/bookmarks",icon:h.BookmarkIcon,title:"Bookmark"}),(0,t.jsx)(eD,{}),(0,t.jsx)(ep,{href:"/dashboard/profile",icon:g.UserCircleIcon,title:"Profil"})]}),(0,t.jsx)(ex,{})]}),(0,t.jsxs)(c.DrawerFooter,{className:"border-t",children:[(0,t.jsxs)(c.DrawerClose,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:"https://wa.me/6285179646077"}),className:(0,u.cn)((0,l.buttonVariants)({variant:"outline",size:"sm"}),"w-full"),children:[(0,t.jsx)(p.PhoneIcon,{className:"mr-2 size-4"}),"Hubungi admin"]}),e?(0,t.jsxs)(c.DrawerClose,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:"/dashboard/profile/signout"}),className:(0,u.cn)((0,l.buttonVariants)({variant:"ghost",size:"sm"}),"w-full text-destructive hover:text-destructive"),children:[(0,t.jsx)(d,{className:"mr-2 size-4"}),"Keluar"]}):(0,t.jsx)(c.DrawerClose,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:"/auth/signin"}),className:(0,u.cn)((0,l.buttonVariants)({size:"sm"}),"w-full"),children:"Login"})]})]})]})})}var e$=e.i(950594);function eW({className:e,...n}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,u.cn)("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e),...n})}var eZ=e.i(987968),eJ=e.i(351289),eY=e.i(667362),eY=eY,eX=e.i(42593),e0=e.i(456420);let e1={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};e1.node;let e2=(0,e0.default)(e1);var e5=e.i(80200);let e4=async e=>{let t=e.trim();if(t.length<2)return[];let n=await eR.backendOnClient.get("/api/v1/guest/search/suggestions",{params:{q:t},suppressErrorToast:!0});return n.data?.data??[]},e6={category:eY.default,city:eX.MapPinIcon,term:e2},e8=()=>()=>{},e3=()=>/Mac|iPhone|iPad/.test(navigator.userAgent),e7=()=>!1;function e9({initialSearchTerm:e,onSearch:n,onCategory:a}){let[i,r]=(0,o.useState)(e),[s,l]=(0,o.useState)([]),[c,d]=(0,o.useState)(null),[h,m]=(0,o.useState)(!1),[f,p]=(0,o.useState)(-1),g=(0,o.useRef)(null),x=(0,o.useRef)(null),v=(0,o.useSyncExternalStore)(e8,e3,e7),[b,j]=(0,o.useTransition)(),y=(0,e5.useDebouncedValue)(i,250);(0,o.useEffect)(()=>{let e=!1;return e4(y).then(t=>{e||(l(t),p(-1),d(y))}).catch(()=>{e||(l([]),d(y))}),()=>{e=!0}},[y]),(0,o.useEffect)(()=>{let e=e=>{g.current?.contains(e.target)||m(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,o.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),x.current?.focus(),x.current?.select())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let w=e=>{if(m(!1),"category"===e.kind&&e.slug){let t=e.slug;j(()=>a(t));return}r(e.term),j(()=>n(e.term))},k=h&&s.length>0,C=h&&i.trim().length>=2&&c!==i,N=b||C;return(0,t.jsx)("div",{className:"flex flex-col w-full items-center max-w-sm",ref:g,children:(0,t.jsxs)("div",{className:"w-full relative",children:[(0,t.jsx)("form",{onSubmit:e=>{(e.preventDefault(),m(!1),f>=0&&s[f])?w(s[f]):j(()=>n(i))},children:(0,t.jsxs)(e$.InputGroup,{children:[(0,t.jsx)(e$.InputGroupInput,{ref:x,onChange:e=>{r(e.target.value),m(!0)},onFocus:()=>m(!0),onKeyDown:e=>{h&&0!==s.length&&("ArrowDown"===e.key?(e.preventDefault(),p(e=>(e+1)%s.length)):"ArrowUp"===e.key?(e.preventDefault(),p(e=>e<=0?s.length-1:e-1)):"Escape"===e.key&&m(!1))},value:i,name:"searchQuery",className:"text-sm",placeholder:"Cari jasa, pekerjaan, atau tukang ...",autoComplete:"off",role:"combobox","aria-expanded":k,"aria-autocomplete":"list","aria-busy":N}),(0,t.jsx)(e$.InputGroupAddon,{children:N?(0,t.jsx)(eZ.Spinner,{}):(0,t.jsx)(eJ.SearchIcon,{})}),(0,t.jsx)(e$.InputGroupAddon,{align:"inline-end",className:"hidden sm:flex",children:(0,t.jsx)(eW,{children:v?"⌘K":"Ctrl K"})})]})}),k&&(0,t.jsx)("ul",{role:"listbox",className:"absolute z-30 mt-1 w-full overflow-hidden rounded-md border border-slate-200 bg-white py-1 shadow-lg",children:s.map((e,n)=>{let a=e6[e.kind];return(0,t.jsx)("li",{role:"option","aria-selected":n===f,children:(0,t.jsxs)("button",{type:"button",onMouseEnter:()=>p(n),onClick:()=>w(e),className:(0,u.cn)("flex w-full items-center gap-2 px-3 py-2 text-left text-sm",n===f?"bg-slate-100":"bg-white"),children:[(0,t.jsx)(a,{className:"h-4 w-4 shrink-0 text-gray-400","aria-hidden":"true"}),(0,t.jsx)("span",{className:"truncate",children:e.term}),"category"===e.kind&&(0,t.jsx)("span",{className:"ml-auto shrink-0 text-xs text-gray-400",children:"Kategori"}),"city"===e.kind&&(0,t.jsx)("span",{className:"ml-auto shrink-0 text-xs text-gray-400",children:"Kota"})]})},`${e.kind}-${e.term}`)})})]})})}var te=e.i(34558);function tt({handymanId:e}
1){let a=(0,n.useRouter)(),i=(0,n.usePathname)(),r=(0,n.useSearchParams)();return(0,o.useEffect)(()=>{let e=!1;return(0,te.locateDeviceIfPermitted)().then(({changed:t})=>{t&&!e&&a.refresh()}),()=>{e=!0}},[a]),(0,t.jsx)(e9,{initialSearchTerm:r.get(ej.SEARCH_QUERY_PARAM)??"",onSearch:t=>{let n;a.push((0,ej.searchUrlFor)((n=ej.SEARCH_RESOURCES.find(e=>i===e.path),n?.resource??(0,ej.defaultSearchResource)(e)),t,new URLSearchParams(r.toString())))},onCategory:e=>a.push(`/categories/${e}`)})}var tn=e.i(513079),ta=e.i(225913),ti=e.i(174080),tr=e.i(296626),ts=e.i(726330),to=e.i(999682),tl=e.i(934620),tc=e.i(30207),tu=e.i(959411),td=Object.defineProperty,th=(e,t)=>td(e,"name",{value:t,configurable:!0}),tm="NavigationMenu",[tf,tp,tg]=(0,j.createCollection)(tm),[tx,tv,tb]=(0,j.createCollection)(tm),[tj,ty]=(0,b.createContextScope)(tm,[tg,tb]),[tw,tk]=tj(tm),[tC,tN]=tj(tm),tS=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,value:i,onValueChange:r,defaultValue:s,delayDuration:l=200,skipDelayDuration:c=300,orientation:u="horizontal",dir:d,...h}=e,[m,f]=o.useState(null),p=(0,y.useComposedRefs)(n,f),g=(0,E.useDirection)(d),x=o.useRef(0),v=o.useRef(0),b=o.useRef(0),[j,w]=o.useState(!0),[N,S]=(0,k.useControllableState)({prop:i,onChange:th(e=>{let t=c>0;""!==e?(window.clearTimeout(b.current),t&&w(!1)):(window.clearTimeout(b.current),b.current=window.setTimeout(()=>w(!0),c)),r?.(e)},"onChange"),defaultProp:s??"",caller:tm}),P=o.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>S(""),150)},[S]),I=o.useCallback(e=>{window.clearTimeout(v.current),S(e)},[S]),A=o.useCallback(e=>{N===e?window.clearTimeout(v.current):x.current=window.setTimeout(()=>{window.clearTimeout(v.current),S(e)},l)},[N,S,l]);return o.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(v.current),window.clearTimeout(b.current)},[]),(0,t.jsx)(tI,{scope:a,isRootMenu:!0,value:N,dir:g,orientation:u,rootNavigationMenu:m,onTriggerEnter:e=>{window.clearTimeout(x.current),j?A(e):I(e)},onTriggerLeave:()=>{window.clearTimeout(x.current),P()},onContentEnter:()=>window.clearTimeout(v.current),onContentLeave:P,onItemSelect:e=>{S(t=>t===e?"":e)},onItemDismiss:()=>S(""),children:(0,t.jsx)(C.Primitive.nav,{"aria-label":"Main","data-orientation":u,dir:g,...h,ref:p})})},"NavigationMenu")),tE="NavigationMenuSub",tP=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,value:i,onValueChange:r,defaultValue:s,orientation:o="horizontal",...l}=e,c=tk(tE,a),[u,d]=(0,k.useControllableState)({prop:i,onChange:r,defaultProp:s??"",caller:tE});return(0,t.jsx)(tI,{scope:a,isRootMenu:!1,value:u,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>d(e),onItemSelect:e=>d(e),onItemDismiss:()=>d(""),children:(0,t.jsx)(C.Primitive.div,{"data-orientation":o,...l,ref:n})})},"NavigationMenuSub")),tI=th(e=>{let{scope:n,isRootMenu:a,rootNavigationMenu:i,dir:r,orientation:s,children:l,value:c,onItemSelect:u,onItemDismiss:d,onTriggerEnter:h,onTriggerLeave:m,onContentEnter:f,onContentLeave:p}=e,[g,x]=o.useState(null),[v,b]=o.useState(new Map),[j,y]=o.useState(null);return(0,t.jsx)(tw,{scope:n,isRootMenu:a,rootNavigationMenu:i,value:c,previousValue:(0,to.usePrevious)(c),baseId:(0,S.useId)(),dir:r,orientation:s,viewport:g,onViewportChange:x,indicatorTrack:j,onIndicatorTrackChange:y,onTriggerEnter:(0,tc.useCallbackRef)(h),onTriggerLeave:(0,tc.useCallbackRef)(m),onContentEnter:(0,tc.useCallbackRef)(f),onContentLeave:(0,tc.useCallbackRef)(p),onItemSelect:(0,tc.useCallbackRef)(u),onItemDismiss:(0,tc.useCallbackRef)(d),onViewportContentChange:o.useCallback((e,t)=>{b(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:o.useCallback(e=>{b(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,t.jsx)(tf.Provider,{scope:n,children:(0,t.jsx)(tC,{scope:n,items:v,children:l})})})},"NavigationMenuProvider"),tA=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,...i}=e,r=tk("NavigationMenuList",a),s=(0,t.jsx)(C.Primitive.ul,{"data-orientation":r.orientation,...i,ref:n});return(0,t.jsx)(C.Primitive.div,{style:{position:"relative"},ref:r.onIndicatorTrackChange,children:(0,t.jsx)(tf.Slot,{scope:a,children:r.isRootMenu?(0,t.jsx)(tZ,{asChild:!0,children:s}):s})})},"NavigationMenuList")),[tM,tT]=tj("NavigationMenuItem"),tR=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,value:i,...r}=e,s=(0,S.useId)(),l=o.useRef(null),c=o.useRef(null),u=o.useRef(null),d=o.useRef(()=>{}),h=o.useRef(!1),m=o.useCallback((e="start")=>{if(l.current){d.current();let t=tX(l.current);t.length&&t0("start"===e?t:t.reverse())}},[]),f=o.useCallback(()=>
1{if(l.current){let e=tX(l.current);e.length&&(d.current=t1(e))}},[]);return(0,t.jsx)(tM,{scope:a,value:i||s||"LEGACY_REACT_AUTO_VALUE",triggerRef:c,contentRef:l,focusProxyRef:u,wasEscapeCloseRef:h,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:f,onContentFocusOutside:f,children:(0,t.jsx)(C.Primitive.li,{...r,ref:n})})},"NavigationMenuItem")),tO="NavigationMenuTrigger",tD=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,disabled:i,...r}=e,s=tk(tO,e.__scopeNavigationMenu),l=tT(tO,e.__scopeNavigationMenu),c=o.useRef(null),u=(0,y.useComposedRefs)(c,l.triggerRef,n),d=t4(s.baseId,l.value),h=t6(s.baseId,l.value),m=o.useRef(!1),f=o.useRef(!1),p=l.value===s.value;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tf.ItemSlot,{scope:a,value:l.value,children:(0,t.jsx)(tY,{asChild:!0,children:(0,t.jsx)(C.Primitive.button,{id:d,disabled:i,"data-disabled":i?"":void 0,"data-state":t5(p),"aria-expanded":p,"aria-controls":p?h:void 0,...r,ref:u,onPointerEnter:(0,w.composeEventHandlers)(e.onPointerEnter,()=>{f.current=!1,l.wasEscapeCloseRef.current=!1}),onPointerMove:(0,w.composeEventHandlers)(e.onPointerMove,t8(()=>{i||f.current||l.wasEscapeCloseRef.current||m.current||(s.onTriggerEnter(l.value),m.current=!0)})),onPointerLeave:(0,w.composeEventHandlers)(e.onPointerLeave,t8(()=>{i||(s.onTriggerLeave(),m.current=!1)})),onClick:(0,w.composeEventHandlers)(e.onClick,()=>{s.onItemSelect(l.value),f.current=p}),onKeyDown:(0,w.composeEventHandlers)(e.onKeyDown,e=>{let t={horizontal:"ArrowDown",vertical:"rtl"===s.dir?"ArrowLeft":"ArrowRight"}[s.orientation];p&&e.key===t&&(l.onEntryKeyDown(),e.preventDefault())})})})}),p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tu.Root,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:e=>{let t=l.contentRef.current,n=e.relatedTarget,a=n===c.current,i=t?.contains(n);(a||!i)&&l.onFocusProxyEnter(a?"start":"end")}}),s.viewport&&(0,t.jsx)("span",{"aria-owns":h})]})]})},"NavigationMenuTrigger")),t_="navigationMenu.linkSelect",tL=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,active:i,onSelect:r,...s}=e;return(0,t.jsx)(tY,{asChild:!0,children:(0,t.jsx)(C.Primitive.a,{"data-active":i?"":void 0,"aria-current":i?"page":void 0,...s,ref:n,onClick:(0,w.composeEventHandlers)(e.onClick,e=>{let t=e.target,n=new CustomEvent(t_,{bubbles:!0,cancelable:!0});if(t.addEventListener(t_,e=>r?.(e),{once:!0}),(0,C.dispatchDiscreteCustomEvent)(t,n),!n.defaultPrevented&&!e.metaKey){let e=new CustomEvent(tV,{bubbles:!0,cancelable:!0});(0,C.dispatchDiscreteCustomEvent)(t,e)}},{checkForDefaultPrevented:!1})})})},"NavigationMenuLink")),tH="NavigationMenuIndicator",tz=o.forwardRef(th(function(e,n){let{forceMount:a,...i}=e,r=tk(tH,e.__scopeNavigationMenu),s=!!r.value;return r.indicatorTrack?ti.createPortal((0,t.jsx)(tr.Presence,{present:a||s,children:(0,t.jsx)(tF,{...i,ref:n})}),r.indicatorTrack):null},"NavigationMenuIndicator")),tF=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,...i}=e,r=tk(tH,a),s=tp(a),[l,c]=o.useState(null),[u,d]=o.useState(null),h="horizontal"===r.orientation,m=!!r.value;o.useEffect(()=>{let e=s(),t=e.find(e=>e.value===r.value)?.ref.current;t&&c(t)},[s,r.value]);let f=th(()=>{l&&d({size:h?l.offsetWidth:l.offsetHeight,offset:h?l.offsetLeft:l.offsetTop})},"handlePositionChange");return t2(l,f),t2(r.indicatorTrack,f),u?(0,t.jsx)(C.Primitive.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":r.orientation,...i,ref:n,style:{position:"absolute",...h?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`,"--radix-navigation-menu-indicator-translate-x":`${u.offset}px`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`,"--radix-navigation-menu-indicator-translate-y":`${u.offset}px`},...i.style}}):null},"NavigationMenuIndicatorImpl")),tB="NavigationMenuContent",tq=o.forwardRef(th(function(e,n){let{forceMount:a,...i}=e,r=tk(tB,e.__scopeNavigationMenu),s=tT(tB,e.__scopeNavigationMenu),o=(0,y.useComposedRefs)(s.contentRef,n),l=s.value===r.value,c={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...i};return r.viewport?(0,t.jsx)(tK,{forceMount:a,...c,ref:o}):(0,t.jsx)(tr.Presence,{present:a||l,children:(0,t.jsx)(tU,{"data-state":t5(l),...c,ref:o,onPointerEnter:(0,w.composeEventHandlers)(e.onPointerEnter,r.onContentEnter),onPointerLeave:(0,w.composeEventHandlers)(e.onPointerLeave,t8(r.onContentLeave)),style:{pointerEvents:!l&&r.isRootMenu?"none":void 0,...c.style}})})},"NavigationMenuContent")),tK=o.forwardRef(th(function(e,t){let{onViewportContentChange:n,onViewportContentRemove:a}=tk(tB,e.__scopeNavigationMenu);return(0,tl.useLayoutEffect)(()=>{n(e.value,{ref:t,...e})},[e,t,n]),(0,tl.useLayoutEffect)(()=>()=>a(e.value),[e.value,a]),null}
1,"ViewportContentMounter")),tV="navigationMenu.rootContentDismiss",tU=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,value:i,triggerRef:r,focusProxyRef:s,wasEscapeCloseRef:l,onRootContentClose:c,onContentFocusOutside:u,...d}=e,h=tk(tB,a),m=o.useRef(null),f=(0,y.useComposedRefs)(m,n),p=t4(h.baseId,i),g=t6(h.baseId,i),x=tp(a),v=o.useRef(null),{onItemDismiss:b}=h;o.useEffect(()=>{let e=m.current;if(h.isRootMenu&&e){let t=th(()=>{b(),c(),e.contains(document.activeElement)&&r.current?.focus()},"handleClose");return e.addEventListener(tV,t),()=>e.removeEventListener(tV,t)}},[h.isRootMenu,e.value,r,b,c]);let j=o.useMemo(()=>{let e=x().map(e=>e.value);"rtl"===h.dir&&e.reverse();let t=e.indexOf(h.value),n=e.indexOf(h.previousValue),a=i===h.value,r=n===e.indexOf(i);if(!a&&!r)return v.current;let s=(()=>{if(t!==n){if(a&&-1!==n)return t>n?"from-end":"from-start";if(r&&-1!==t)return t>n?"to-start":"to-end"}return null})();return v.current=s,s},[h.previousValue,h.value,h.dir,x,i]);return(0,t.jsx)(tZ,{asChild:!0,children:(0,t.jsx)(ts.DismissableLayer,{id:g,"aria-labelledby":p,"data-motion":j,"data-orientation":h.orientation,...d,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(tV,{bubbles:!0,cancelable:!0});m.current?.dispatchEvent(e)},onFocusOutside:(0,w.composeEventHandlers)(e.onFocusOutside,e=>{u();let t=e.target;h.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:(0,w.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.target,n=x().some(e=>e.ref.current?.contains(t)),a=h.isRootMenu&&h.viewport?.contains(t);(n||a||!h.isRootMenu)&&e.preventDefault()}),onKeyDown:(0,w.composeEventHandlers)(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){let t=tX(e.currentTarget),n=document.activeElement,a=t.findIndex(e=>e===n);t0(e.shiftKey?t.slice(0,a).reverse():t.slice(a+1,t.length))?e.preventDefault():s.current?.focus()}}),onEscapeKeyDown:(0,w.composeEventHandlers)(e.onEscapeKeyDown,e=>{l.current=!0})})})},"NavigationMenuContentImpl")),tG="NavigationMenuViewport",tQ=o.forwardRef(th(function(e,n){let{forceMount:a,...i}=e,r=!!tk(tG,e.__scopeNavigationMenu).value;return(0,t.jsx)(tr.Presence,{present:a||r,children:(0,t.jsx)(t$,{...i,ref:n})})},"NavigationMenuViewport")),t$=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,children:i,...r}=e,s=tk(tG,a),l=(0,y.useComposedRefs)(n,s.onViewportChange),c=tN(tB,e.__scopeNavigationMenu),[u,d]=o.useState(null),[h,m]=o.useState(null),f=u?u?.width+"px":void 0,p=u?u?.height+"px":void 0,g=!!s.value,x=g?s.value:s.previousValue,v=th(()=>{h&&d({width:h.offsetWidth,height:h.offsetHeight})},"handleSizeChange");return t2(h,v),(0,t.jsx)(C.Primitive.div,{"data-state":t5(g),"data-orientation":s.orientation,...r,ref:l,style:{pointerEvents:!g&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":p,...r.style},onPointerEnter:(0,w.composeEventHandlers)(e.onPointerEnter,s.onContentEnter),onPointerLeave:(0,w.composeEventHandlers)(e.onPointerLeave,t8(s.onContentLeave)),children:Array.from(c.items).map(([e,{ref:n,forceMount:a,...i}])=>{let r=x===e;return(0,t.jsx)(tr.Presence,{present:a||r,children:(0,t.jsx)(tW,{...i,contentRef:n,isActive:r,onActiveContentChange:m})},e)})})},"NavigationMenuViewportImpl")),tW=th(({contentRef:e,isActive:n,onActiveContentChange:a,...i})=>{let r=o.useCallback(e=>{n&&e&&a(e)},[n,a]),s=(0,y.useComposedRefs)(e,r);return(0,t.jsx)(tU,{...i,ref:s})},"NavigationMenuViewportItem"),tZ=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,...i}=e,r=tk("FocusGroup",a);return(0,t.jsx)(tx.Provider,{scope:a,children:(0,t.jsx)(tx.Slot,{scope:a,children:(0,t.jsx)(C.Primitive.div,{dir:r.dir,...i,ref:n})})})},"FocusGroup")),tJ=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],tY=o.forwardRef(th(function(e,n){let{__scopeNavigationMenu:a,...i}=e,r=tv(a),s=tk("FocusGroupItem",a);return(0,t.jsx)(tx.ItemSlot,{scope:a,children:(0,t.jsx)(C.Primitive.button,{...i,ref:n,onKeyDown:(0,w.composeEventHandlers)(e.onKeyDown,e=>{if(["Home","End",...tJ].includes(e.key)){let t=r().map(e=>e.ref.current);if(["rtl"===s.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.ke
1y)&&t.reverse(),tJ.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>t0(t)),e.preventDefault()}})})})},"FocusGroupItem"));function tX(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:th(e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}function t0(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function t1(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute("tabindex",t)})}}function t2(e,t){let n=(0,tc.useCallbackRef)(t);(0,tl.useLayoutEffect)(()=>{let t=0;if(e){let a=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(t),a.unobserve(e)}}},[e,n])}function t5(e){return e?"open":"closed"}function t4(e,t){return`${e}-trigger-${t}`}function t6(e,t){return`${e}-content-${t}`}function t8(e){return t=>"mouse"===t.pointerType?e(t):void 0}th(tX,"getTabbableCandidates"),th(t0,"focusFirst"),th(t1,"removeFromTabOrder"),th(t2,"useResizeObserver"),th(t5,"getOpenState"),th(t4,"makeTriggerId"),th(t6,"makeContentId"),th(t8,"whenMouse"),e.s(["Content",0,tq,"Indicator",0,tz,"Item",0,tR,"Link",0,tL,"List",0,tA,"NavigationMenu",0,tS,"NavigationMenuContent",0,tq,"NavigationMenuIndicator",0,tz,"NavigationMenuItem",0,tR,"NavigationMenuLink",0,tL,"NavigationMenuList",0,tA,"NavigationMenuSub",0,tP,"NavigationMenuTrigger",0,tD,"NavigationMenuViewport",0,tQ,"Root",0,tS,"Sub",0,tP,"Trigger",0,tD,"Viewport",0,tQ,"createNavigationMenuScope",0,ty],576958);var t3=e.i(576958),t3=t3;function t7({className:e,children:n,viewport:a=!0,...i}){return(0,t.jsxs)(t3.Root,{"data-slot":"navigation-menu","data-viewport":a,className:(0,u.cn)("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...i,children:[n,a&&(0,t.jsx)(ni,{})]})}function t9({className:e,...n}){return(0,t.jsx)(t3.List,{"data-slot":"navigation-menu-list",className:(0,u.cn)("group flex flex-1 list-none items-center justify-center gap-1",e),...n})}function ne({className:e,...n}){return(0,t.jsx)(t3.Item,{"data-slot":"navigation-menu-item",className:(0,u.cn)("relative",e),...n})}let nt=(0,ta.cva)("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent");function nn({className:e,children:n,...a}){return(0,t.jsxs)(t3.Trigger,{"data-slot":"navigation-menu-trigger",className:(0,u.cn)(nt(),"group",e),...a,children:[n," ",(0,t.jsx)(v.ChevronDownIcon,{className:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function na({className:e,...n}){return(0,t.jsx)(t3.Content,{"data-slot":"navigation-menu-content",className:(0,u.cn)("top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95",e),...n})}function ni({className:e,...n}){return(0,t.jsx)("div",{className:(0,u.cn)("absolute top-full left-0 isolate z-50 flex justify-center"),children:(0,t.jsx)(t3.Viewport,{"data-slot":"navigation-menu-viewport",className:(0,u.cn)("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),...n})})}function nr({className:e,...n}){return(0,t.jsx)(t3.Link,{"data-slot":"navigation-menu-link",className:(0,u.cn)("flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...n})}var ns=e.i(772436),no=e.i(586268);function nl(){return(0,t.jsx)(t7,{className:"hidden md:block",children:(0,t.jsxs)(t9,{children:[(0,t.jsxs)(ne,{children:[(0,t.jsx)(nn,{children:"Telusuri"}),(0,t.jsxs)(na,{children:[(0,t.jsx)("ul",{className:"grid w-[340px] gap-1",children:ew.map(e=>
1(0,t.jsx)(nc,{href:e.href,title:e.title,description:e.description},e.href))}),(0,t.jsx)(ns.Separator,{className:"my-2"}),(0,t.jsx)(nr,{asChild:!0,children:(0,t.jsxs)(r.default,{href:"/dashboard/customer/jobs/new",className:"flex w-[340px] flex-row items-center gap-3 rounded-md p-3 hover:bg-accent",children:[(0,t.jsx)(no.PlusCircleIcon,{className:"size-5 shrink-0 text-primary","aria-hidden":"true"}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"text-sm font-medium leading-none",children:"Buat kontrak kerja"}),(0,t.jsx)("p",{className:"text-sm leading-snug text-muted-foreground",children:"Garansi uang kembali 100% sesuai kontrak yang kamu buat."})]})]})})]})]}),(0,t.jsxs)(ne,{children:[(0,t.jsx)(nn,{children:"Tentang KangPro"}),(0,t.jsx)(na,{children:(0,t.jsx)("ul",{className:"grid gap-1 sm:w-[400px] md:w-[500px] md:grid-cols-2 lg:w-[600px]",children:eh.map(e=>(0,t.jsx)(nc,{href:e.href,title:e.title,description:e.description},e.href))})})]})]})})}function nc({href:e,title:n,description:a,className:i}){return(0,t.jsx)("li",{children:(0,t.jsx)(nr,{asChild:!0,children:(0,t.jsxs)(r.default,{href:e,className:(0,u.cn)("block space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",i),children:[(0,t.jsx)("div",{className:"text-sm font-medium leading-none",children:n}),(0,t.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:a})]})})})}var nu=e.i(755146),nd=e.i(263150),nh=e.i(779529),eT=eT;function nm(){let[e,n]=(0,o.useState)(0),[a,i]=(0,o.useState)(!1);(0,o.useEffect)(()=>{s()},[]);let s=()=>{i(!0),eR.backendOnClient.get("/api/v1/wallets/get-my-balance").then(e=>{(0,eP.isOk)(e)&&n(e.data.balance)}).finally(()=>{i(!1)})};return(0,t.jsx)(r.default,{href:"/dashboard/wallet",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(eT.default,{className:"mr-2 h-4 w-4"}),(0,t.jsx)("span",{children:"Saldo"}),a?(0,t.jsx)(nh.ArrowPathIcon,{className:"ml-1 h-4 w-4 animate-spin"}):(0,t.jsxs)("span",{className:"ml-1",children:["(",(0,eM.formatNumberToRupiah)(e),")"]})]})})}function nf(){let[e,n]=(0,o.useState)(0),[a,i]=(0,o.useState)(!1);(0,o.useEffect)(()=>{s()},[]);let s=()=>{i(!0),eR.backendOnClient.get("/api/v1/customer/jobs/get-active-jobs-counter").then(e=>{(0,eP.isOk)(e)&&n(e.data.active_jobs_counter)}).finally(()=>{i(!1)})};return(0,t.jsx)(r.default,{href:"/dashboard/customer/jobs",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(eL,{className:"mr-2 h-4 w-4"}),(0,t.jsx)("span",{children:"Kontrak kerja"}),a?(0,t.jsx)(nh.ArrowPathIcon,{className:"ml-1 h-4 w-4 animate-spin"}):(0,t.jsxs)("span",{className:"ml-1",children:["(",e,")"]})]})})}function np(){let[e,n]=(0,o.useState)(0),[a,i]=(0,o.useState)(!1);(0,o.useEffect)(()=>{s()},[]);let s=()=>{i(!0),eR.backendOnClient.get("/api/v1/handyman/jobs/get-job-invitations-counter").then(e=>{(0,eP.isOk)(e)&&n(e.data.job_invitations_counter)}).finally(()=>{i(!1)})};return(0,t.jsx)(r.default,{href:"/dashboard/handyman/invitations",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(ez.EnvelopeIcon,{className:"mr-2 h-4 w-4"}),"Undangan pekerjaan",a?(0,t.jsx)(nh.ArrowPathIcon,{className:"ml-1 h-4 w-4 animate-spin"}):(0,t.jsxs)("span",{className:"ml-1",children:["(",e,")"]})]})})}function ng(){let[e,n]=(0,o.useState)(0),[a,i]=(0,o.useState)(!1);(0,o.useEffect)(()=>{s()},[]);let s=()=>{i(!0),eR.backendOnClient.get("/api/v1/handyman/jobs/get-active-job-proposals-counter").then(e=>{(0,eP.isOk)(e)&&n(e.data.active_job_proposals_counter)}).finally(()=>{i(!1)})};return(0,t.jsx)(r.default,{href:"/dashboard/handyman/proposals",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(eB,{className:"mr-2 h-4 w-4"}),"Proposal saya",a?(0,t.jsx)(nh.ArrowPathIcon,{className:"ml-1 h-4 w-4 animate-spin"}):(0,t.jsxs)("span",{className:"ml-1",children:["(",e,")"]})]})})}function nx(){let[e,n]=(0,o.useState)(0),[a,i]=(0,o.useState)(!1);(0,o.useEffect)(()=>{s()},[]);let s=()=>{i(!0),eR.backendOnClient.get("/api/v1/handyman/jobs/get-active-jobs-counter").then(e=>{(0,eP.isOk)(e)&&n(e.data.active_jobs_counter)}).finally(()=>{i(!1)})};return(0,t.jsx)(r.default,{href:"/dashboard/handyman/jobs",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(ed.WrenchScrewdriverIcon,{className:"mr-2 h-4 w-4"}),"Kontrak kerja saya",a?(0,t.jsx)(nh.ArrowPathIcon,{className:"ml-1 h-4 w-4 animate-spin"}):(0,t.jsxs)("span",{className:"ml-1",children:["(",e,")"]})]})})}var nv=e.i(370221);function nb(){let[e,n]=(0,o.useState)(),[a,i]=(0,o.useState)(!0);(0,o.useEffect)(()=>{r()},[]);let r=async()=>{i(!0);let e=await (0,eE.getMyProfileOnClient)();(0,eP.isOk)(e)&&n(e.data),i(!1)};if(a||!e)return(0,t.jsx)(eS.Avatar,{children:(0,t.jsx)(eS.AvatarFallback,{children:(0,t.jsx)(nv.ClockIcon,{className:"w-4 h-4"})})});
1let s=(0,eI.getInitials)(e.name??"?");return(0,t.jsxs)(eS.Avatar,{children:[(0,t.jsx)(eS.AvatarImage,{src:e.user_detail.profile_picture?.url||"",alt:"Profile Picture",className:"h-full w-full rounded-full object-cover",width:96,height:96}),(0,t.jsx)(eS.AvatarFallback,{children:s})]})}function nj({authenticated:e,handymanId:n}){let[a,i]=(0,o.useState)(""),[s,c]=(0,o.useState)("");if((0,o.useEffect)(()=>{(0,eE.getMyProfileOnClient)().then(e=>{(0,eP.isOk)(e)&&(i(e.data.name),c(e.data.email))})},[]),!e)return(0,t.jsx)(r.default,{href:"/auth/signin",children:(0,t.jsxs)(l.Button,{children:[(0,t.jsx)(g.UserCircleIcon,{className:"mr-2 h-4 w-4"}),"Login"]})});let u=null!=n;return(0,t.jsx)("div",{className:"flex",suppressHydrationWarning:!0,children:(0,t.jsxs)(nu.DropdownMenu,{children:[(0,t.jsx)(nu.DropdownMenuTrigger,{id:"profile-avatar-button",children:(0,t.jsx)(nb,{})}),(0,t.jsxs)(nu.DropdownMenuContent,{align:"end",children:[(0,t.jsx)(nu.DropdownMenuLabel,{className:"font-normal",children:(0,t.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium leading-none",children:a}),(0,t.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:s})]})}),(0,t.jsx)(nu.DropdownMenuSeparator,{}),(0,t.jsx)(nu.DropdownMenuLabel,{children:"Pelanggan"}),(0,t.jsx)(nu.DropdownMenuGroup,{children:(0,t.jsx)(nf,{})}),(0,t.jsx)(nu.DropdownMenuSeparator,{}),(0,t.jsx)(nu.DropdownMenuLabel,{children:"Tukang"}),(0,t.jsxs)(nu.DropdownMenuGroup,{children:[!u&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(r.default,{href:eG.BECOME_A_HANDYMAN_PATH,children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(f.DocumentPlusIcon,{className:"mr-2 h-4 w-4"}),"Daftar menjadi tukang"]})})}),u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{href:"/dashboard/handyman/services",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(m.BriefcaseIcon,{className:"mr-2 h-4 w-4"}),"Jasa saya"]})}),(0,t.jsx)(np,{}),(0,t.jsx)(ng,{}),(0,t.jsx)(nx,{})]})]}),(0,t.jsx)(nu.DropdownMenuSeparator,{}),(0,t.jsx)(nu.DropdownMenuLabel,{children:"Akun"}),(0,t.jsxs)(nu.DropdownMenuGroup,{children:[(0,t.jsx)(r.default,{href:"/dashboard/bookmarks",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(h.BookmarkIcon,{className:"mr-2 h-4 w-4"}),"Bookmark"]})}),(0,t.jsx)(nm,{}),(0,t.jsx)(r.default,{href:"/dashboard/profile",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(g.UserCircleIcon,{className:"mr-2 h-4 w-4"}),"Profil"]})}),(0,t.jsx)(r.default,{href:"/dashboard/profile/signout",className:"text-red-500",children:(0,t.jsxs)(nu.DropdownMenuItem,{children:[(0,t.jsx)(nd.ExclamationTriangleIcon,{className:"mr-2 h-4 w-4 text-red-500"}),"Keluar"]})})]})]})]})})}function ny({className:e,authenticated:n,handymanId:a}){var i,s,o;return(0,t.jsx)(t7,{className:e,children:(0,t.jsxs)(t9,{children:[(i=!n,s=(0,t.jsx)(ne,{children:(0,t.jsx)(r.default,{href:"/auth/signin",children:(0,t.jsx)(l.Button,{children:"Login"})})}),i?s:null),(o=(0,t.jsx)(ne,{children:(0,t.jsx)(nj,{authenticated:n,handymanId:a})}),n?o:null)]})})}var nw=e.i(747059),nk=e.i(795276),nC=e.i(337822),nN=e.i(873194),nS=e.i(780126),nS=nS;let nE={name:"bell-off",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]};nE.node;let nP=(0,e0.default)(nE);var nI=e.i(846696);let nA="/dashboard/notifications";function nM({authenticated:e,handymanId:n}){let[a,i]=(0,o.useState)(!1),[s,d]=(0,o.useState)(!1),[h,m]=(0,o.useState)(),[f,p]=(0,o.useState)(!1),[g,v]=(0,o.useState)(!1),b=(0,nN.useIsMobile)(),j=(0,o.useRef)(!1),y=(0,o.useCallback)(async()=>{p(!0);let e=await eR.backendOnClient.get("/api/v1/notifications/get-my-notifications",{suppressErrorToast:!0});(p(!1),(0,eP.isOk)(e))?(v(!1),m(e.data.data.slice(0,5))):v(!0)},[]),w=e=>{d(e),j.current=e,e&&(i(!1),y())},k=()=>w(!1),C=e=>{nI.toast.info(e.title,{description:e.body,duration:1e4}),j.current?y():i(!0),setTimeout(()=>{"Pembayaran telah diterima"==e.title&&location.reload()},3e3)};(0,nw.useCableSubscription)("NotificationCustomerChannel",C,{enabled:e}),(0,nw.useCableSubscription)("NotificationHandymanChannel",C,{enabled:e&&null!==n});let N=(0,t.jsx)(nR,{notifications:h,isLoading:f,failed:g,isHandyman:null!==n,onRetry:y,onNavigate:k});return b?(0,t.jsxs)(c.Drawer,{open:s,onOpenChange:w,children:[(0,t.jsx)(c.DrawerTrigger,{render:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"relative"}),children:(0,t.jsx)(nT,{hasUnread:a})}
1),(0,t.jsxs)(c.DrawerContent,{floating:!0,className:"mx-auto sm:max-w-md",children:[(0,t.jsxs)(c.DrawerHeader,{className:"relative border-b pr-12",children:[(0,t.jsx)(c.DrawerTitle,{className:"text-base",children:"Notifikasi"}),(0,t.jsx)(c.DrawerDescription,{className:"sr-only",children:"Lima notifikasi terbaru untuk akun Anda"}),(0,t.jsx)(c.DrawerClose,{"aria-label":"Tutup notifikasi",className:(0,u.cn)((0,l.buttonVariants)({variant:"ghost",size:"icon"}),"absolute top-3 right-3"),children:(0,t.jsx)(x.XMarkIcon,{className:"size-5"})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:N}),(0,t.jsx)(c.DrawerFooter,{className:"border-t",children:(0,t.jsx)(c.DrawerClose,{nativeButton:!1,render:(0,t.jsx)(r.default,{href:nA}),className:(0,u.cn)((0,l.buttonVariants)({variant:"outline",size:"sm"}),"w-full"),children:"Lihat semua notifikasi"})})]})]}):(0,t.jsxs)(nC.Popover,{open:s,onOpenChange:w,children:[(0,t.jsx)(nC.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"relative",children:(0,t.jsx)(nT,{hasUnread:a})})}),(0,t.jsxs)(nC.PopoverContent,{align:"end",className:"w-88 p-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:"Notifikasi"}),f&&void 0!==h&&(0,t.jsx)(eZ.Spinner,{className:"size-4"})]}),(0,t.jsx)(el.ItemSeparator,{}),N,(0,t.jsx)(el.ItemSeparator,{}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(l.Button,{asChild:!0,variant:"ghost",size:"sm",className:"w-full",children:(0,t.jsx)(r.default,{href:nA,onClick:k,children:"Lihat semua notifikasi"})})})]})]})}function nT({hasUnread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(nS.default,{className:"h-4 w-4"}),e&&(0,t.jsxs)("div",{className:"absolute flex h-2 w-2 right-1.5 top-1.5",children:[(0,t.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),(0,t.jsx)("span",{className:"inline-flex rounded-full h-2 w-2 bg-primary"})]})]})}function nR({notifications:e,isLoading:n,failed:a,isHandyman:i,onRetry:r,onNavigate:s}){return void 0===e?n?(0,t.jsx)("div",{className:"flex items-center justify-center py-10",children:(0,t.jsx)(eZ.Spinner,{className:"size-5"})}):a?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Notifikasi gagal dimuat."}),(0,t.jsx)(l.Button,{variant:"outline",size:"sm",onClick:r,children:"Coba lagi"})]}):null:0===e.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[(0,t.jsx)(nP,{className:"text-muted-foreground size-5"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Belum ada notifikasi."})]}):(0,t.jsx)("div",{role:"list",children:e.map((e,n)=>(0,t.jsxs)(o.Fragment,{children:[n>0&&(0,t.jsx)(el.ItemSeparator,{}),(0,t.jsx)(nk.default,{notification:e,isHandyman:i,compact:!0,onNavigate:s})]},e.id))})}function nO({banners:e}){let[n,a]=(0,o.useState)(0);(0,o.useEffect)(()=>{if(0===e.length)return;let t=[...e].sort((e,t)=>e.sequence-t.sequence),i=setInterval(()=>{a(e=>(e+1)%t.length)},1e3*e[n].duration_in_seconds);return()=>clearInterval(i)},[e]);let i=e[n];return i?(0,t.jsxs)("div",{className:"relative isolate flex items-center gap-x-6 overflow-hidden bg-gray-50 px-6 py-2.5 sm:px-3.5 sm:before:flex-1",children:[(0,t.jsx)("div",{className:"absolute top-1/2 left-[max(-7rem,calc(50%-52rem))] -z-10 -translate-y-1/2 transform-gpu blur-2xl","aria-hidden":"true",children:(0,t.jsx)("div",{className:"aspect-577/310 w-144.25 bg-linear-to-r from-[#ff80b5] to-[#9089fc] opacity-30",style:{clipPath:"polygon(74.8% 41.9%, 97.2% 73.2%, 100% 34.9%, 92.5% 0.4%, 87.5% 0%, 75% 28.6%, 58.5% 54.6%, 50.1% 56.8%, 46.9% 44%, 48.3% 17.4%, 24.7% 53.9%, 0% 27.9%, 11.9% 74.2%, 24.9% 54.1%, 68.6% 100%, 74.8% 41.9%)"}})}),(0,t.jsx)("div",{className:"absolute top-1/2 left-[max(45rem,calc(50%+8rem))] -z-10 -translate-y-1/2 transform-gpu blur-2xl","aria-hidden":"true",children:(0,t.jsx)("div",{className:"aspect-577/310 w-144.25 bg-linear-to-r from-[#ff80b5] to-[#9089fc] opacity-30",style:{clipPath:"pol
1ygon(74.8% 41.9%, 97.2% 73.2%, 100% 34.9%, 92.5% 0.4%, 87.5% 0%, 75% 28.6%, 58.5% 54.6%, 50.1% 56.8%, 46.9% 44%, 48.3% 17.4%, 24.7% 53.9%, 0% 27.9%, 11.9% 74.2%, 24.9% 54.1%, 68.6% 100%, 74.8% 41.9%)"}})}),(0,t.jsx)("div",{className:"text-sm w-full sm:text-center text-gray-900",children:(0,t.jsx)(nD,{banner:i})})]}):null}function nD({banner:e}){return"hyperlink"==e.action?(0,t.jsxs)(r.default,{target:"open_link_in_new_tab"===e.interaction?"_blank":"_self",href:e?.call_to_action_url,children:[(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:e?.call_to_action_text||""}})," ",(0,t.jsx)("span",{"aria-hidden":"true",children:"→"})]}):"plaintext"==e.action?(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:e?.call_to_action_text||""}}):(0,t.jsx)("span",{children:"Invalid top banner"})}let n_=async()=>await eR.backendOnClient.get("/api/v1/guest/banners/get-website-top-banners");var nL=e.i(218250),nH=e.i(437244);function nz({authenticated:e,userId:n,handymanId:a}){let[i,r]=(0,o.useState)(!1),[s,l]=(0,o.useState)([]),[c,u]=(0,o.useState)(0),[d,h]=(0,o.useState)(!0),m=(0,o.useRef)(0),f=(0,o.useRef)(!1),p=(0,nH.default)(e=>(0,nH.holdsCall)(e.phase)||null!==e.elsewhere),g=(0,o.useRef)(null),[x,v]=(0,o.useState)(0),b=(0,o.useRef)(null),[j,y]=(0,o.useState)(72);(0,o.useEffect)(()=>{let e=b.current;if(!e)return;let t=new ResizeObserver(()=>y(e.offsetHeight));return t.observe(e),()=>t.disconnect()},[]),(0,o.useEffect)(()=>{let e=g.current;if(!e)return void v(0);let t=new ResizeObserver(()=>v(e.offsetHeight));return t.observe(e),v(e.offsetHeight),()=>t.disconnect()},[p]);let w=()=>{let e=document.getElementById("header-top-banner");e&&u(e.offsetHeight||0)};return(0,o.useEffect)(()=>{r(!1),n_().then(e=>{if(!(0,eP.isOk)(e)||!e.data?.data)return;let t=e.data.data.sort((e,t)=>e.sequence-t.sequence);l(t),r(t.length>0)})},[]),(0,o.useEffect)(()=>{let e;w();let t=()=>{w()};if(i){let t=document.getElementById("header-top-banner");t&&(e=new MutationObserver(()=>{f.current||w()})).observe(t,{childList:!0,subtree:!0,characterData:!0})}return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),e&&e.disconnect()}},[i]),(0,o.useEffect)(()=>{let e=x+(i&&d?c:0)+j;document.documentElement.style.setProperty("--site-header-height",`${e}px`)},[x,c,i,d,j]),(0,o.useEffect)(()=>{let e=()=>{let e=window.scrollY;f.current&&(h(e<m.current||e<=0),m.current=e)},t=()=>{f.current=!0,setTimeout(()=>{f.current=!1},100)};return window.addEventListener("scroll",e),window.addEventListener("scroll",t),()=>{window.removeEventListener("scroll",e),window.removeEventListener("scroll",t)}},[]),(0,t.jsxs)("div",{children:[p&&(0,t.jsx)("div",{ref:g,className:"fixed top-0 w-full z-40",children:(0,t.jsx)(nL.default,{})}),i&&(0,t.jsx)("div",{id:"header-top-banner",className:"fixed top-0 w-full z-30 border-b bg-white transition-transform duration-300",style:{transform:d?`translateY(${x}px)`:"translateY(-100%)"},children:(0,t.jsx)(nO,{banners:s})}),(0,t.jsx)("div",{ref:b,className:"bg-white border-b border-slate-200 z-20 fixed w-full transition-transform duration-300",style:{transform:`translateY(${x+(d?c:0)}px)`},children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto container",children:(0,t.jsxs)("div",{className:"flex justify-between align-center p-4 space-x-2 md:space-x-6",children:[(0,t.jsxs)("div",{className:"hidden sm:flex justify-start items-center space-x-4",children:[(0,t.jsx)(tn.default,{}),(0,t.jsx)(nl,{})]}),(0,t.jsxs)("div",{className:"flex justify-end items-center space-x-2 w-full",children:[(0,t.jsx)(tt,{handymanId:a}),(0,t.jsx)(nM,{authenticated:e,handymanId:a}),(0,t.jsx)(ny,{authenticated:e,handymanId:a,className:"hidden md:block"}),(0,t.jsx)(eQ,{authenticated:e,handymanId:a})]})]})})}),(0,t.jsx)("div",{style:{height:`${x+c+72}px`}})]})}let nF=["/system/"];e.s(["default",0,function({children:e,authenticated:a,userId:i,handymanId:r}){let o=(0,n.usePathname)();return nF.some(e=>o.startsWith(e))?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(nz,{authenticated:a,userId:i,handymanId:r}),(0,t.jsx)("div",{className:"container max-w-7xl mx-auto px-4 pt-6 pb-12",children:e}),(0,t.jsx)(s,{})]})}],225873)},831699,e=>{"use strict";var t=e.i(622301),n=e.i(756408),a=e.i(872239),i=e.i(983337);let r=null,s=0,o=()=>{let e=window.AudioContext??window.webkitAudioContext;return e?r??=new e:null},l=e=>{let t=e.currentTime,n=e.createGain();for(let[a,i]of(n.connect(e.destination),n.gain.setValueAtTime(1e-4,t),n.gain.exponentialRampToValueAtTime(.18,t+.008),n.gain.exponentialRampToValueAtTime(1e-4,t+.55),[[988,1],[1976,.3]])){let r=e.createOscillator(),s=e.createGain();r.type="sine",r.frequency.setValueAtTime(a,t),s.gain.setValueAtTime(i,t),r.connect(s).connect(n),r.start(t),r.stop(t+.55)}};var c=e.i(271645),u=e.i(846696);e.s(["useIncomingChatMessage",0,function(){let e=(0,n.default)(e=>e.receive),r=(0,a.default)(e=>e.stopTyping);return(0,c.useEffect)(()=>{let e;return e=()=>{o()?.resume().catch(()=>{})},window.addEventListener("pointerdown",e,{once:!0}),window.addEventListener("keydown",e,{once:!0}),()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",e)}},[]),(0,c.useCallback)(a=>{let{byRoom:c,visibleRoomId:d}=n.default.getState(),h=c[a.chat_room.id]?.some(e=>e.id===a.id)??!1,m=d===a.chat_room.id&&"u">typeof document&&"visible"===document.visibilityState;if(e(a),r(a.chat_room.id,a.sender.id),m&&!a.is_mine&&(0,t.notifyRead)(a.chat_room.id),!h&&!a.is_mine&&!m){let e;(()=>{let e=o();if(!e)return;let t=Date.now();if(!(t-s<800)){if(s=t,"suspended"===e.state)return e.resume().then(()=>l(e)).catch(()=>{});l(e)}})(),u.toast.info(a.sender.display_name,{description:(e=(0,i.chatMessagePreview)(a)).length>140?`${e.slice(0,140).trimEnd()}…`:e,position:"bottom-left"})}},[e,r])}],831699)}]);

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.