1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4756],{1080:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/en/q",function(){return n(33574)}])},90638:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},a=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){r(e,t,n[t])}))}return e}t.default=function(e,t){var n=o.default,r={loading:function(e){e.error,e.isLoading;return e.pastDelay,null}};i=e,l=Promise,(null!=l&&"undefined"!==typeof Symbol&&l[Symbol.hasInstance]?l[Symbol.hasInstance](i):i instanceof l)?r.loader=function(){return e}:"function"===typeof e?r.loader=e:"object"===typeof e&&(r=a({},r,e));var i,l;var s=r=a({},r,t);if(s.suspense)throw new Error("Invalid suspense option usage in next/dynamic. Read more: https://nextjs.org/docs/messages/invalid-dynamic-suspense");if(s.suspense)return n(s);r.loadableGenerated&&delete(r=a({},r,r.loadableGenerated)).loadableGenerated;if("boolean"===typeof r.ssr){if(!r.ssr)return delete r.ssr,u(n,r);delete r.ssr}return n(r)};i(n(67294));var o=i(n(14302));function i(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return delete t.webpack,delete t.modules,e(t)}},16319:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LoadableContext=void 0;var a=((r=n(67294))&&r.__esModule?r:{default:r}).default.createContext(null);t.LoadableContext=a},14302:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,u=(i=n(67294))&&i.__esModule?i:{default:i},l=n(67161),s=n(16319);var c=[],d=[],f=!1;function m(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}var p=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._loadFn=t,this._opts=n,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}var t,n,a;return t=e,(n=[{key:"promise",value:function(){return this._res.promise}},{key:"retry",value:function(){var e=this,t=this;this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};var n=this._res,r=this._opts;if(n.loading){if("number"===typeof r.delay)if(0===r.delay)this._state.pastDelay=!0;else{var a=this;this._delay=setTimeout((function(){a._update({pastDelay:!0})}),r.delay)}if("number"===typeof r.timeout){var o=this;this._timeout=setTimeout((function(){o._update({timedOut:!0})}),r.timeout)}}this._res.promise.then((function(){e._update({}),e._clearTimeouts()})).catch((function(e){t._update({}),t._clearTimeouts()})),this._update({})}},{key:"_update",value:function(e){this._state=o({},this._state,{error:this._res.error,loaded:this._res.loaded,loading:this._res.loading},e),this._callbacks.forEach((function(e){return e()}))}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"getCurrentValue",value:function(){return this._state}},{key:"subscribe",value:function(e){var t=this;return this._callbacks.add(e),function(){t._callbacks.delete(e)}}}])&&r(t.prototype,n),a&&r(t,a),e}();function h(e){return function(e,t){var n=function(){if(!a){var t=new p(e,r);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()},r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null,suspense:!1},t);r.suspense&&(r.lazy=u.default.lazy(r.loader));var a=null;if(!f&&"function"===typeof r.webpack&&!r.suspense){var i=r.webpack();d.push((function(e){var t=!0,r=!1,a=void 0;try{for(var o,u=i[Symbol.iterator]();!(t=(o=u.next()).done);t=!0){var l=o.value;if(-1!==e.indexOf(l))return n()}}catch(s){r=!0,a=s}finally{try{t||null==u.return||u.return()}finally{if(r)throw a}}}))}var c=r.suspense?function(e,t){return u.default.createElement(r.lazy,o({},e,{ref:t}))}:function(e,t){n();var o=u.default.useContext(s.LoadableContext),i=l.useSubscription(a);return u.default.useImperativeHandle(t,(function(){return{retry:a.retry}}
1),[]),o&&Array.isArray(r.modules)&&r.modules.forEach((function(e){o(e)})),u.default.useMemo((function(){return i.loading||i.error?u.default.createElement(r.loading,{isLoading:i.loading,pastDelay:i.pastDelay,timedOut:i.timedOut,error:i.error,retry:a.retry}):i.loaded?u.default.createElement(function(e){return e&&e.__esModule?e.default:e}(i.loaded),e):null}),[e,i])};return c.preload=function(){return!r.suspense&&n()},c.displayName="LoadableComponent",u.default.forwardRef(c)}(m,e)}function v(e,t){for(var n=[];e.length;){var r=e.pop();n.push(r(t))}return Promise.all(n).then((function(){if(e.length)return v(e,t)}))}h.preloadAll=function(){return new Promise((function(e,t){v(c).then(e,t)}))},h.preloadReady=function(e){var t=void 0===e?[]:e;return new Promise((function(e){var n=function(){return f=!0,e()};v(d,t).then(n,n)}))},window.__NEXT_PRELOADREADY=h.preloadReady;var _=h;t.default=_},33574:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var r=n(85893),a=n(67294),o=n(48922);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){a=!0,o=l}finally{try{r||null==u.return||u.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function u(){var e=(0,a.useState)([]),t=e[0],n=e[1],u=(0,a.useRef)([]);(0,a.useEffect)((function(){var e=new EventSource("".concat("https://malecity.gov.mv/api/v1","/q/sse"));return e.onmessage=function(e){var t=JSON.parse(e.data);n(t)},function(){return e.close()}}),[]);var l=function(e){var t=u.current.find((function(t){return t.token===e.token})),n=!t,r=t&&(t.counter_name!==e.counter_name||t.queue_name!==e.queue_name||t.counter_name_dv!==e.counter_name_dv||t.queue_name_dv!==e.queue_name_dv);return n||r?"animate-highlight":""};return(0,a.useEffect)((function(){u.current=t}),[t]),(0,r.jsx)(o.Z,{title:"Services",description:"Queues",children:(0,r.jsx)("div",{children:(0,r.jsxs)("section",{className:"flex flex-col items-center w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-32",children:[(0,r.jsx)("h1",{className:"font-bold text-3xl md:text-5xl text-gray-800 text-center mb-12",children:"Queues"}),(0,r.jsx)("div",{className:"w-full grid gap-8 md:gap-12",children:Object.entries(t.reduce((function(e,t){e[t.location_name]||(e[t.location_name]={location_name_dv:t.location_name_dv,location_name:t.location_name,categories:{}});var n=e[t.location_name].categories;return n[t.category_name]||(n[t.category_name]={category_name_dv:t.category_name_dv,category_name:t.category_name,tokens:[]}),n[t.category_name].tokens.push(t),e}),{})).map((function(e){var t=i(e,2),n=t[0],a=t[1];return(0,r.jsxs)("div",{className:"bg-white rounded-2xl shadow-lg overflow-hidden",children:[(0,r.jsx)("div",{className:"bg-gradient-to-r from-grd-pink via-grd-blue to-grd-green px-6 py-4",children:(0,r.jsx)("h3",{className:"text-2xl font-semibold text-white",children:a.location_name})}),(0,r.jsx)("div",{className:"p-6 space-y-8",children:Object.entries(a.categories).map((function(e){var t=i(e,2),n=t[0],a=t[1];return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center mb-4",children:[(0,r.jsx)("h4",{className:"text-lg font-medium text-gray-700",children:a.category_name}),(0,r.jsx)("div",{className:"h-px flex-1 bg-gray-200 mx-4"})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4",children:a.tokens.map((function(e){return(0,r.jsxs)("div",{className:"bg-blue-50 rounded-xl p-4 text-center hover:scale-105 transition-transform duration-300 hover:shadow-md ".concat(l(e)),children:[(0,r.jsx)("div",{className:"text-3xl font-bold text-blue-600 mb-2",children:(e.token+"").padStart(4,"0")}),(0,r.jsx)("div",{className:"text-sm font-medium text-gray-700",children:e.queue_name}),(0,r.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:e.counter_name})]},"".concat(e.token,"-").concat(e.counter_name))}))})]},n)}))})]},n)}))})]})})})}},5152:function(e,t,n){e.exports=n(90638)},9008:function(e,t,n){e.exports=n(5443)},4298:function(e,t,n){e.exports=n(20699)}},function(e){e.O(0,[9774,1228,5445,1680,764,5808,5789,8922,2888,179],(function(){return t=1080,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.