From d6bf1683e8fda1f4a1354dc6f71c3a67ce2f1a3f Mon Sep 17 00:00:00 2001 From: Z4nR Date: Sat, 12 Oct 2024 19:58:15 +0000 Subject: [PATCH] Updates --- assets/index-10979f2f.js | 1 + assets/index-23a0280b.js | 1 - index.html | 2 +- sw.js | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 assets/index-10979f2f.js delete mode 100644 assets/index-23a0280b.js diff --git a/assets/index-10979f2f.js b/assets/index-10979f2f.js new file mode 100644 index 0000000..a8e5ee8 --- /dev/null +++ b/assets/index-10979f2f.js @@ -0,0 +1 @@ +import{j as e,r as j}from"./react-b9a76881.js";import{c as Pa}from"./react-dom-2d279051.js";import{u as Z,M as Na,a as La,H as Ra,I as de,b as Oa,c as ke,d as oa,Q as la,e as y,L as Y,B as l,C as X,F as p,f as ca,S as Ea,T as r,g,V as z,h as J,i as qa,j as k,k as D,P as ua,l as K,m as A,n as I,o as M,p as Ha,q as da,r as Ae,s as te,t as he,v as ee,w as ie,x as ae,y as W,z as G,N as qe,A as He,D as Ke,E as Ge,G as $e,R as ma,J as De,K as ha,O as se,U as N,W as Re,X as T,Y as O,Z as We,_ as Ve,$ as xa,a0 as ba,a1 as Ka,a2 as xe,a3 as be,a4 as Ga,a5 as ga,a6 as $a,a7 as Va,a8 as Ja,a9 as ge,aa as pe,ab as f,ac as _a,ad as Ie,ae as Ua,af as Me,ag as Be,ah as Fe,ai as U,aj as F,ak as Pe,al as P,am as sa,an as Qa,ao as Ya,ap as ve,aq as ye,ar as we,as as Se,at as v,au as ze,av as pa,aw as ja,ax as fa,ay as ne,az as ka,aA as re,aB as Je,aC as _e,aD as Ue,aE as Za,aF as Xa,aG as es,aH as as}from"./@chakra-ui-07a237fe.js";import{F as va,a as ya,b as E,c as ss,d as ns,e as rs,f as ts,g as is,G as os,h as ls,i as cs,I as us,j as ds,k as ms}from"./react-icons-7d08912d.js";import{L as B,B as hs}from"./react-router-dom-5e639d43.js";import{b as wa,a as Q,d as xs,e as V}from"./react-router-32579614.js";import{a as q}from"./axios-9b9683dd.js";import{u as oe,C as Sa}from"./react-hook-form-5df7240b.js";import{u as _,Q as Ca,a as me,b as bs}from"./@tanstack-7cce00f9.js";import{d as Ee}from"./react-sortablejs-b5d8f939.js";import{m as je,i as fe}from"./framer-motion-4b9df51f.js";import{C as gs}from"./react-csv-a9333d5d.js";import{C as Ta}from"./chart.js-29015108.js";import"./classnames-6bc0a478.js";import"./scheduler-765c72db.js";import"./lodash.mergewith-cd59880b.js";import"./@emotion-0dace5e7.js";import"./hoist-non-react-statics-23d96a9a.js";import"./react-is-e8e5dbb3.js";import"./@babel-d7b299da.js";import"./stylis-79144faa.js";import"./color2k-69f3754e.js";import"./@popperjs-f3391c26.js";import"./react-focus-lock-ad754ae7.js";import"./focus-lock-b0fcf19c.js";import"./use-sidecar-3680f465.js";import"./tslib-89fde298.js";import"./use-callback-ref-51cbf00e.js";import"./react-clientside-effect-3352e0a9.js";import"./react-remove-scroll-b4638411.js";import"./react-remove-scroll-bar-6162c280.js";import"./react-style-singleton-cc97d4ca.js";import"./get-nonce-1ea010b7.js";import"./aria-hidden-606e0ff2.js";import"./@zag-js-8d968404.js";import"./react-fast-compare-1cd47ecc.js";import"./@remix-run-d753ad9e.js";import"./use-sync-external-store-bc8ad6b0.js";import"./sortablejs-17a40271.js";import"./prop-types-387d7a00.js";import"./@kurkle-b1b89bbc.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))t(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&t(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function t(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function ps(){const{isOpen:a,onOpen:s,onClose:n}=Z(),i=wa().pathname;return e.jsxs(e.Fragment,{children:[e.jsxs(Na,{isLazy:!0,children:[e.jsx(La,{colorScheme:"teal",size:"md",icon:e.jsx(Ra,{}),display:{sm:"none"},onClick:a?n:s,as:de,"aria-label":"Options",variant:"solid"}),e.jsxs(Oa,{children:[e.jsx(ke,{as:B,to:"/","aria-current":i==="/"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},icon:e.jsx(va,{}),children:"Beranda"}),e.jsx(ke,{as:B,to:"/about","aria-current":i==="/about"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},icon:e.jsx(oa,{}),children:"Tentang"}),e.jsx(ke,{as:B,to:"/article","aria-current":i==="/article"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},icon:e.jsx(ya,{}),children:"Artikel"}),e.jsx(ke,{as:B,to:"/faq","aria-current":i==="/faq"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},icon:e.jsx(la,{}),children:"FAQ"})]})]}),e.jsxs(y,{direction:"row",display:{base:"none",sm:"flex"},spacing:{sm:8,lg:16},children:[e.jsx(Y,{as:B,to:"/","aria-current":i==="/"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},fontWeight:"semibold",transition:"all 0.2s",_hover:{color:"gray.500"},children:"Beranda"}),e.jsx(Y,{as:B,to:"/about","aria-current":i==="/about"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},fontWeight:"semibold",transition:"all 0.2s",_hover:{color:"gray.500"},children:"Tentang"}),e.jsx(Y,{as:B,to:"/article","aria-current":i==="/article"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},fontWeight:"semibold",transition:"all 0.2s",_hover:{color:"gray.500"},children:"Artikel"}),e.jsx(Y,{as:B,to:"/faq","aria-current":i==="/faq"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},fontWeight:"semibold",transition:"all 0.2s",_hover:{color:"gray.500"},children:"FAQ"})]})]})}const js="/WhatColors/assets/desktop-logo-b8708d8e.svg";function fs(){return e.jsx(l,{bg:"white",as:"header",boxShadow:"sm",zIndex:11,top:0,left:0,right:0,position:"sticky",width:"full",children:e.jsx(X,{maxW:"container.xl",p:{xs:3,sm:5},children:e.jsxs(p,{minWidth:"max-content",alignItems:"center",gap:"2",children:[e.jsx(ca,{src:js,alt:"WhatColors Website Logo",width:{base:"42px",xs:"150px",md:"auto"}}),e.jsx(Ea,{}),e.jsx(ps,{})]})})})}function ks(){const a=new Date().getFullYear();return e.jsx(l,{as:"footer",display:"block",width:"full",children:e.jsx(l,{width:"full",bg:"teal",color:"white",pt:6,pb:8,children:e.jsxs(r,{align:"center",fontSize:"smaller",children:["© ",a,e.jsx("br",{}),"Created by Ijan"]})})})}function vs(){const s=wa().pathname;return e.jsx(l,{bg:"white",bottom:0,left:0,right:0,as:"footer",position:"sticky",boxShadow:"0px 0px 2px 0px rgba(0, 0, 0, 0.2)",zIndex:11,width:"full",children:e.jsxs(y,{px:4,py:2,gap:"5",justifyContent:"center",children:[e.jsx(g,{as:B,to:"/",variant:"ghost","aria-label":"Home button","aria-current":s==="/"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},children:e.jsxs(z,{gap:1,children:[e.jsx(J,{fontSize:"lg",as:va}),e.jsx(r,{fontSize:"xs",children:"Beranda"})]})}),e.jsx(g,{as:B,to:"/about",variant:"ghost","aria-label":"About button","aria-current":s==="/about"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},children:e.jsxs(z,{gap:1,children:[e.jsx(J,{fontSize:"lg",as:oa}),e.jsx(r,{fontSize:"xs",children:"Tentang"})]})}),e.jsx(g,{as:B,to:"/article",variant:"ghost","aria-label":"Article button","aria-current":s==="/article"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},children:e.jsxs(z,{gap:1,children:[e.jsx(J,{fontSize:"lg",as:ya}),e.jsx(r,{fontSize:"xs",children:"Artikel"})]})}),e.jsx(g,{as:B,to:"/faq",variant:"ghost","aria-label":"FAQ button","aria-current":s==="/faq"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},children:e.jsxs(z,{gap:1,children:[e.jsx(J,{fontSize:"lg",as:la}),e.jsx(r,{fontSize:"xs",children:"FAQ"})]})})]})})}const ys="/WhatColors/assets/mobile-logo-e21809fd.svg";function ws(){return e.jsx(l,{bg:"white",as:"header",boxShadow:"sm",zIndex:11,top:0,left:0,right:0,position:"sticky",width:"full",children:e.jsx(X,{maxW:"container.xl",p:3,children:e.jsx(p,{alignItems:"center",justifyContent:"center",children:e.jsx(ca,{src:ys,alt:"WhatColors Website Logo",width:"52px"})})})})}const H="https://zulham.ahlitani.com/v1",Ss=async a=>q.post(`${H}/user/new`,a,{timeout:9e4,headers:{"Content-Type":"application/json"}}).then(s=>{const{id:n}=s.data;return n}).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Pengiriman Data Terlalu Lama",status:408}},n}else return s}),Cs=async a=>q.get(`${H}/user/${a}/detail`,{timeout:9e4}).then(s=>s.data).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},n}else return s.response}),Ts=async a=>q.post(`${H}/group/new`,a,{headers:{"Content-Type":"application/json"}}).then(s=>{const{id:n}=s.data;return n}),Da=async a=>q.post(`${H}/group/${a}/code`).then(s=>{const{message:n}=s.data;return n}),za=async a=>q.post(`${H}/group/${a}/verify`).then(s=>s.data),Aa=async a=>q.get(`${H}/group/${a}/data`,{timeout:9e4}).then(s=>s.data).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},n}else return s.response}),Ds=async a=>q.delete(`${H}/group/${a}/delete`).then(s=>s.data),zs=async a=>q.get(`${H}/group/${a}/clients`,{timeout:9e4}).then(s=>s.data).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},n}else return s.response}),As=async({id:a,clientData:s})=>q.post(`${H}/client/${a}/new`,s,{headers:{"Content-Type":"application/json"}}).then(n=>{const{id:t}=n.data;return t}),Ws=async a=>q.get(`${H}/client/${a}/data`,{timeout:9e4}).then(s=>s.data).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},n}else return s.response}),Is=async a=>q.post(`${H}/search?name=${a}`).then(s=>s.data),Ms=async()=>q.get(`${H}/article/data`,{timeout:9e4}).then(a=>a.data).catch(a=>{if(a.code==="ECONNABORTED"&&a.message.indexOf("timeout")!==-1){const s=new Error("Request Timeout");throw s.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},s}else return a.response}),Bs=[{row:"row1",value:[{number:1,status:"first",color:"#b37673"},{number:2,status:"removable",color:"#b2766f"},{number:3,status:"removable",color:"#b1746a"},{number:4,status:"removable",color:"#b17466"},{number:5,status:"removable",color:"#b07464"},{number:6,status:"removable",color:"#ae725f"},{number:7,status:"removable",color:"#aa725b"},{number:8,status:"removable",color:"#a8745a"},{number:9,status:"removable",color:"#a87456"},{number:10,status:"removable",color:"#a87452"},{number:11,status:"removable",color:"#a97650"},{number:12,status:"removable",color:"#a8794e"},{number:13,status:"removable",color:"#a77c4e"},{number:14,status:"removable",color:"#a97e4c"},{number:15,status:"removable",color:"#a57e46"},{number:16,status:"removable",color:"#a78244"},{number:17,status:"removable",color:"#a48546"},{number:18,status:"removable",color:"#a28946"},{number:19,status:"removable",color:"#9f8b46"},{number:20,status:"removable",color:"#9d8e48"},{number:21,status:"removable",color:"#9b8f49"},{number:22,status:"removable",color:"#97914b"},{number:23,status:"removable",color:"#91924d"},{number:24,status:"last",color:"#8d9352"}]},{row:"row2",value:[{number:24,status:"first",color:"#91924d"},{number:25,status:"removable",color:"#8d9352"},{number:26,status:"removable",color:"#899557"},{number:27,status:"removable",color:"#86955c"},{number:28,status:"removable",color:"#84975f"},{number:29,status:"removable",color:"#7e9760"},{number:30,status:"removable",color:"#7d9666"},{number:31,status:"removable",color:"#7c9567"},{number:32,status:"removable",color:"#7a986b"},{number:33,status:"removable",color:"#73966b"},{number:34,status:"removable",color:"#70996d"},{number:35,status:"removable",color:"#699a71"},{number:36,status:"removable",color:"#679a74"},{number:37,status:"removable",color:"#649a76"},{number:38,status:"removable",color:"#619778"},{number:39,status:"removable",color:"#5b947a"},{number:40,status:"removable",color:"#5a957f"},{number:41,status:"removable",color:"#589480"},{number:42,status:"removable",color:"#559584"},{number:43,status:"removable",color:"#529687"},{number:44,status:"removable",color:"#519688"},{number:45,status:"removable",color:"#4e9689"},{number:46,status:"last",color:"#4c968e"}]},{row:"row3",value:[{number:46,status:"first",color:"#4e9689"},{number:47,status:"removable",color:"#4c968e"},{number:48,status:"removable",color:"#4c9691"},{number:49,status:"removable",color:"#4a9794"},{number:50,status:"removable",color:"#4a9696"},{number:51,status:"removable",color:"#4b9596"},{number:52,status:"removable",color:"#4a9698"},{number:53,status:"removable",color:"#50969c"},{number:54,status:"removable",color:"#52949f"},{number:55,status:"removable",color:"#5393a1"},{number:56,status:"removable",color:"#5494a3"},{number:57,status:"removable",color:"#5a92a4"},{number:58,status:"removable",color:"#6090a5"},{number:59,status:"removable",color:"#6690a5"},{number:60,status:"removable",color:"#688fa7"},{number:61,status:"removable",color:"#6b8ca6"},{number:62,status:"removable",color:"#6c8aa6"},{number:63,status:"removable",color:"#6f89a6"},{number:64,status:"removable",color:"#7489a7"},{number:65,status:"removable",color:"#7686a6"},{number:66,status:"removable",color:"#7b84a3"},{number:67,status:"removable",color:"#8084a3"},{number:68,status:"last",color:"#8484a3"}]},{row:"row4",value:[{number:68,status:"first",color:"#8084a3"},{number:69,status:"removable",color:"#8484a3"},{number:70,status:"removable",color:"#8a86a6"},{number:71,status:"removable",color:"#8d85a3"},{number:72,status:"removable",color:"#9185a3"},{number:73,status:"removable",color:"#9483a0"},{number:74,status:"removable",color:"#97839f"},{number:75,status:"removable",color:"#99819d"},{number:76,status:"removable",color:"#9d809b"},{number:77,status:"removable",color:"#9f7f98"},{number:78,status:"removable",color:"#a37d94"},{number:79,status:"removable",color:"#a57c92"},{number:80,status:"removable",color:"#a67a8e"},{number:81,status:"removable",color:"#a9798b"},{number:82,status:"removable",color:"#ab7788"},{number:83,status:"removable",color:"#ae7787"},{number:84,status:"removable",color:"#b07683"},{number:85,status:"removable",color:"#b1757f"},{number:86,status:"removable",color:"#b3747c"},{number:87,status:"removable",color:"#b3757a"},{number:88,status:"removable",color:"#b37576"},{number:89,status:"removable",color:"#b37673"},{number:90,status:"last",color:"#b2766f"}]}],Fs=[{row:"row1",value:[{number:1,status:"first",color:"#b2766f"},{number:2,status:"removable",color:"#b1746a"},{number:3,status:"removable",color:"#b17466"},{number:4,status:"removable",color:"#b07464"},{number:5,status:"removable",color:"#ae725f"},{number:6,status:"removable",color:"#aa725b"},{number:7,status:"removable",color:"#a8745a"},{number:8,status:"removable",color:"#a87456"},{number:9,status:"removable",color:"#a87452"},{number:10,status:"removable",color:"#a97650"},{number:11,status:"removable",color:"#a8794e"},{number:12,status:"removable",color:"#a77c4e"},{number:13,status:"removable",color:"#a97e4c"},{number:14,status:"removable",color:"#a57e46"},{number:15,status:"removable",color:"#a78244"},{number:16,status:"removable",color:"#a48546"},{number:17,status:"removable",color:"#a28946"},{number:18,status:"removable",color:"#9f8b46"},{number:19,status:"removable",color:"#9d8e48"},{number:20,status:"removable",color:"#9b8f49"},{number:21,status:"removable",color:"#97914b"},{number:22,status:"last",color:"#91924d"}]},{row:"row2",value:[{number:22,status:"first",color:"#91924d"},{number:23,status:"removable",color:"#8d9352"},{number:24,status:"removable",color:"#899557"},{number:25,status:"removable",color:"#86955c"},{number:26,status:"removable",color:"#84975f"},{number:27,status:"removable",color:"#7e9760"},{number:28,status:"removable",color:"#7d9666"},{number:29,status:"removable",color:"#7c9567"},{number:30,status:"removable",color:"#7a986b"},{number:31,status:"removable",color:"#73966b"},{number:32,status:"removable",color:"#70996d"},{number:33,status:"removable",color:"#699a71"},{number:34,status:"removable",color:"#679a74"},{number:35,status:"removable",color:"#649a76"},{number:36,status:"removable",color:"#619778"},{number:37,status:"removable",color:"#5b947a"},{number:38,status:"removable",color:"#5a957f"},{number:39,status:"removable",color:"#589480"},{number:40,status:"removable",color:"#559584"},{number:41,status:"removable",color:"#529687"},{number:42,status:"removable",color:"#519688"},{number:43,status:"last",color:"#4e9689"}]},{row:"row3",value:[{number:43,status:"first",color:"#4e9689"},{number:44,status:"removable",color:"#4c968e"},{number:45,status:"removable",color:"#4c9691"},{number:46,status:"removable",color:"#4a9794"},{number:47,status:"removable",color:"#4a9696"},{number:48,status:"removable",color:"#4b9596"},{number:49,status:"removable",color:"#4a9698"},{number:50,status:"removable",color:"#50969c"},{number:51,status:"removable",color:"#52949f"},{number:52,status:"removable",color:"#5393a1"},{number:53,status:"removable",color:"#5494a3"},{number:54,status:"removable",color:"#5a92a4"},{number:55,status:"removable",color:"#6090a5"},{number:56,status:"removable",color:"#6690a5"},{number:57,status:"removable",color:"#688fa7"},{number:58,status:"removable",color:"#6b8ca6"},{number:59,status:"removable",color:"#6c8aa6"},{number:60,status:"removable",color:"#6f89a6"},{number:61,status:"removable",color:"#7489a7"},{number:62,status:"removable",color:"#7686a6"},{number:63,status:"removable",color:"#7b84a3"},{number:64,status:"last",color:"#8084a3"}]},{row:"row4",value:[{number:64,status:"first",color:"#8084a3"},{number:65,status:"removable",color:"#8484a3"},{number:66,status:"removable",color:"#8a86a6"},{number:67,status:"removable",color:"#8d85a3"},{number:68,status:"removable",color:"#9185a3"},{number:69,status:"removable",color:"#9483a0"},{number:70,status:"removable",color:"#97839f"},{number:71,status:"removable",color:"#99819d"},{number:72,status:"removable",color:"#9d809b"},{number:73,status:"removable",color:"#9f7f98"},{number:74,status:"removable",color:"#a37d94"},{number:75,status:"removable",color:"#a57c92"},{number:76,status:"removable",color:"#a67a8e"},{number:77,status:"removable",color:"#a9798b"},{number:78,status:"removable",color:"#ab7788"},{number:79,status:"removable",color:"#ae7787"},{number:80,status:"removable",color:"#b07683"},{number:81,status:"removable",color:"#b1757f"},{number:82,status:"removable",color:"#b3747c"},{number:83,status:"removable",color:"#b3757a"},{number:84,status:"removable",color:"#b37576"},{number:85,status:"last",color:"#b37673"}]}],Ps=[{row:"row1",value:[{number:1,status:"first",color:"#b2766f"},{number:2,status:"removable",color:"#b17466"},{number:3,status:"removable",color:"#ae725f"},{number:4,status:"removable",color:"#a8745a"},{number:5,status:"removable",color:"#a87452"},{number:6,status:"removable",color:"#a8794e"},{number:7,status:"removable",color:"#a97e4c"},{number:8,status:"removable",color:"#a78244"},{number:9,status:"removable",color:"#a28946"},{number:10,status:"last",color:"#9d8e48"}]},{row:"row2",value:[{number:11,status:"first",color:"#97914b"},{number:12,status:"removable",color:"#8d9352"},{number:13,status:"removable",color:"#86955c"},{number:14,status:"removable",color:"#7e9760"},{number:15,status:"removable",color:"#7c9567"},{number:16,status:"removable",color:"#699a71"},{number:17,status:"removable",color:"#649a76"},{number:18,status:"removable",color:"#5b947a"},{number:19,status:"removable",color:"#589480"},{number:20,status:"last",color:"#529687"}]},{row:"row3",value:[{number:21,status:"first",color:"#4e9689"},{number:22,status:"removable",color:"#4c9691"},{number:23,status:"removable",color:"#4a9696"},{number:24,status:"removable",color:"#4a9698"},{number:25,status:"removable",color:"#52949f"},{number:26,status:"removable",color:"#6090a5"},{number:27,status:"removable",color:"#688fa7"},{number:28,status:"removable",color:"#6c8aa6"},{number:29,status:"removable",color:"#7489a7"},{number:30,status:"last",color:"#7b84a3"}]},{row:"row4",value:[{number:31,status:"first",color:"#8484a3"},{number:32,status:"removable",color:"#8d85a3"},{number:33,status:"removable",color:"#9483a0"},{number:34,status:"removable",color:"#99819d"},{number:35,status:"removable",color:"#9f7f98"},{number:36,status:"removable",color:"#a9798b"},{number:37,status:"removable",color:"#ae7787"},{number:38,status:"removable",color:"#b1757f"},{number:39,status:"removable",color:"#b3757a"},{number:40,status:"last",color:"#b37673"}]}],Qe=[{type:"Mudah (32 Warna)",value:Ps},{type:"Menengah (80 Warna)",value:Fs},{type:"Sulit (85 Warna)",value:Bs}],Ns={type100:{blue:{min:46,max:52},green:{min:56,max:61},red:{min:62,max:70}},type85:{blue:{min:46,max:51},green:{min:56,max:60},red:{min:63,max:69}}},Ls={blue:"Tritan",green:"Deutan",red:"Protan"},Oe={Normal:"Memiliki kemampuan penglihatan normal terhadap warna merah, biru, hijau dan kombinasi ketiga warna tersebut",Protan:"Kemungkinan memiliki gangguan dalam melihat warna merah dan kombinasi yang mengandung warna tersebut",Deutan:"Kemungkinan memiliki gangguan dalam melihat warna hijau dan kombinasi yang mengandung warna tersebut",Tritan:"Kemungkinan memiliki gangguan dalam melihat warna biru dan kombinasi yang mengandung warna tersebut"},Wa=a=>Qe.find(t=>t.type===a).value,Rs=a=>{let s=a.length;for(;s!==0;){let n=Math.floor(Math.random()*s);s-=1;let t=a[s];a[s]=a[n],a[n]=t}return a},Os=a=>a==null?void 0:a.map(n=>({row:n.row,value:[n.first,...n.value,n.last]})),Es=a=>sessionStorage.getItem(a),qs=a=>JSON.parse(Es(a)),Hs=(a,s)=>sessionStorage.setItem(a,s),Ks=(a,s)=>Hs(a,JSON.stringify(s)),w={getJSON:qs,setJSON:Ks},Gs=()=>{const[a,s]=j.useState(null);return j.useEffect(()=>{const n=w.getJSON("user");s(n)},[]),[a]},$s=a=>{const[s,n]=j.useState(null);return j.useEffect(()=>{const t=a==null?void 0:a.value.map(i=>{const o=i.value,c=o.filter(b=>b.status==="removable"),d=o[0],u=Rs(c),m=o[o.length-1],h=[...u];return{row:i.row,value:h,first:d,last:m}});n(t)},[a]),[s]},Vs=()=>{const[a,s]=j.useState(null);return j.useEffect(()=>{const n=w.getJSON("discriminant");s(n)},[]),[a]},Js=()=>{const[a,s]=j.useState(null);return j.useEffect(()=>{const n=w.getJSON("comparison");s(n)},[]),[a]},le=()=>{const a=qa();return(s,n,t)=>a({title:s,description:n,status:t,isClosable:!0,containerStyle:{padding:"15px 20px"}})},_s=()=>{const[a,s]=j.useState(0);return j.useEffect(()=>{if(a<=0)return;const t=setTimeout(()=>{s(a-1)},1e3);return()=>clearTimeout(t)},[a]),{countDown:a,start:t=>{s(t)}}},Us=a=>{const[s,n]=j.useState(null);return j.useEffect(()=>{if(a&&a.length){const t=Array(a[0].comparisonResult.length).fill(null).map((u,m)=>`C${m+1}`),i=Array(a[0].discriminantResult.length).fill(null).map((u,m)=>`D${m+1}`),o=["Tanggal","Nama","Usia","Jumlah Nilai Kesalahan","Waktu Pengerjaan","Status","Perangkat",...t,...i],c=a==null?void 0:a.map(u=>{const m=u.date,h=u.name,b=u.age,x=u.totalErrorScore,S=u.time,L=u.status,R=u.device,$=u==null?void 0:u.comparisonResult.map(ue=>ue.comparison),ce=u==null?void 0:u.discriminantResult.map(ue=>ue.discriminant);return[m,h,b,x,S,L,R,...$,...ce]}),d=[o,...c];n(d)}},[a]),[s]};function Qs(){const a=Q(),s=le(),{countDown:n,start:t}=_s(),i=w.getJSON("id"),o=_({mutationFn:Da,onSuccess:x=>{s("Email Berhasil Dikirim",`${x}`,"info")},onError:x=>{s("Terjadi Kesalahan",`${x.response.data.message}`,"error")}}),c=_({mutationFn:za,onSuccess:x=>{x.admin?a("/admin"):s("Kode Verifikasi Salah","Silahkan Masukan Kode Yang Benar","warning")},onError:x=>{s("Terjadi Kesalahan",`${x.response.data.message}`,"error")}}),{handleSubmit:d,control:u,formState:{errors:m}}=oe({defaultValues:{code:""}}),h=()=>{t(60),o.mutateAsync(i)},b=x=>{c.mutateAsync(x.code)};return e.jsxs(p,{minHeight:"60vh",my:10,flexDirection:"column",justifyContent:"space-around",alignItems:"center",children:[e.jsx(k,{size:"md",children:"Verifikasikan Diri Anda"}),e.jsx("form",{onSubmit:d(b),children:e.jsxs(z,{py:10,px:6,children:[e.jsxs(D,{isRequired:!0,isInvalid:m.code,children:[e.jsx(y,{children:e.jsx(Sa,{control:u,name:"code",render:({field:{onChange:x}})=>e.jsxs(ua,{type:"alphanumeric",mask:!0,onChange:S=>x(S),children:[e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{})]})})}),e.jsx(A,{textAlign:"center",fontSize:"small",children:"Harap masukkan kode yang sesuai"}),e.jsx(I,{children:m.code})]}),e.jsx(g,{colorScheme:"teal",mt:4,loadingText:"Verifikasi Kode",isLoading:c.isLoading,type:"submit",children:"Verifikasi"})]})}),n>0?e.jsxs(r,{fontSize:"small",as:"span",color:"gray.400",fontWeight:"medium",children:["Kirim Ulang Kode Dalam ",n]}):e.jsx(g,{fontSize:"small",color:"facebook.300",variant:"outline",onClick:h,children:"Kirim Ulang Kode"})]})}const Ys="/WhatColors/assets/colourblind-fb07166b.webp";function Zs(){return e.jsxs(M,{as:"section",gap:4,direction:{base:"column",md:"row"},children:[e.jsx(p,{p:"0 1.5rem 1.5remm 1.5rem",flex:1,align:"center",justify:"center",children:e.jsxs(M,{spacing:6,w:"full",children:[e.jsxs(k,{as:"h1",fontSize:{base:"3xl",md:"4xl",lg:"5xl"},children:[e.jsx(r,{as:"span",position:"relative",_after:{content:"''",width:"full",height:Ha({base:"20%",md:"30%"}),position:"absolute",bottom:1,left:0,bg:"teal.400",zIndex:-1},children:"WhatColors"}),e.jsx("br",{})," ",e.jsx(r,{color:"teal.400",as:"span",children:"Tes Buta Warna"})," "]}),e.jsx(r,{fontSize:{base:"md",lg:"lg"},color:"gray.500",children:"Lakukan tes uji coba berbasis internet secara gratis dan dapat digunakan secara berkelompok. Apakah sudah siap untuk mencoba?"}),e.jsxs(M,{direction:"row",justifyContent:{base:"center",md:"flex-start"},spacing:4,children:[e.jsx(g,{sx:{"@media screen and (max-width: 48em)":{flex:1}},rounded:"full",bg:"teal.400",color:"white",_hover:{bg:"teal.500"},as:"a",href:"#tes",children:"Lakukan Tes"}),e.jsx(g,{sx:{"@media screen and (max-width: 48em)":{flex:1}},rounded:"full",_hover:{color:"white",bg:"gray.500"},as:B,to:"/search",children:"Cari Data Tes"})]})]})}),e.jsx(p,{flex:1,children:e.jsxs(p,{flexDirection:"column",alignItems:"center",children:[e.jsx(da,{alt:"Hero Image",objectFit:"cover",src:Ys,borderRadius:{base:"2xl",md:"none"}}),e.jsxs(r,{fontSize:"x-small",children:["Photo by"," ",e.jsx("a",{href:"https://www.plainpicture.com/en/search?credit=plainpicture%2FBjanka+Kadic",children:"Bjanka Kadic"})," ","on"," ",e.jsx("a",{href:"https://www.plainpicture.com/en/images/1356202",children:"plainpicture"})]})]})})]})}function Xs({isOpen:a,onClose:s}){const n=Q(),{handleSubmit:t,register:i,watch:o,setValue:c,reset:d,formState:{errors:u}}=oe({defaultValues:{fullName:"",gender:"",device:"",testType:"Mudah (32 Warna)",value:{},isClient:!1}}),m=o("testType");j.useEffect(()=>{c("value",Wa(m))},[c,m]);const h=S=>{w.setJSON("user",S),n("/test")},b=()=>{d()},x=()=>{d(),s()};return e.jsxs(Ae,{size:{base:"xs",sm:"md",md:"2xl"},closeOnOverlayClick:!1,isOpen:a,onClose:s,scrollBehavior:"inside",isCentered:!0,children:[e.jsx(te,{}),e.jsx("form",{onSubmit:t(h),children:e.jsxs(he,{children:[e.jsx(ee,{children:"Buat Tes Individu"}),e.jsx(ie,{}),e.jsxs(ae,{pb:6,children:[e.jsxs(D,{isRequired:!0,isInvalid:u.fullName,children:[e.jsx(W,{htmlFor:"fullname",children:"Nama Anda"}),e.jsx(G,{id:"fullname",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Nama Lengkap",...i("fullName",{required:"Wajib Diisi",minLength:{value:4,message:"Min. 4 Huruf"}})}),e.jsx(A,{fontSize:"small",children:"Tuliskan Nama Lengkap Anda"}),e.jsx(I,{children:u.fullName&&u.fullName.message})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:u.age,children:[e.jsx(W,{htmlFor:"age",children:"Umur Anda"}),e.jsxs(qe,{id:"age",focusBorderColor:"teal.400",max:50,min:10,children:[e.jsx(He,{autoComplete:"off",placeholder:"Masukkan Umur Anda",...i("age",{required:"Wajib Diisi"})}),e.jsxs(Ke,{children:[e.jsx(Ge,{}),e.jsx($e,{})]})]}),e.jsx(A,{fontSize:"small",children:"Rentang usia 10 sampai 50 tahun"}),e.jsx(I,{children:u.age})]}),e.jsxs(D,{isRequired:!0,isInvalid:u.gender,children:[e.jsx(W,{htmlFor:"gender",children:"Jenis Kelamin"}),e.jsx(ma,{id:"gender",children:e.jsxs(y,{height:10,justifyContent:"space-around",spacing:"24px",children:[e.jsx(De,{value:"Pria",...i("gender",{required:"Wajib Diisi"}),children:"Pria"}),e.jsx(De,{value:"Wanita",...i("gender",{required:"Wajib Diisi"}),children:"Wanita"})]})}),e.jsx(A,{textAlign:"center",fontSize:"small",children:"Hanya ada 2 jenis kelamin"}),e.jsx(I,{children:u.gender})]})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:u.device,children:[e.jsx(W,{htmlFor:"device",children:"Perangkat yang digunakan"}),e.jsx(G,{id:"device",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Tipe Monitor/Gawai",...i("device",{required:"Wajib Diisi"})}),e.jsx(A,{fontSize:"small",children:"Tuliskan merk atau tipe monitor atau gawai"}),e.jsx(I,{children:u.device})]}),e.jsxs(D,{isRequired:!0,isInvalid:u.testType,children:[e.jsx(W,{htmlFor:"type",children:"Tingkat Kesulitan"}),e.jsx(ha,{id:"type",...i("testType",{required:"Wajib Diisi"}),placeholder:"Pilih Tingkat Kesulitan",children:Qe.map(S=>e.jsx("option",{value:S.type,children:S.type},S.type))}),e.jsx(A,{fontSize:"small",children:"Pilih tingkat kesulitan sesuai kemampuan"}),e.jsx(I,{children:u.testType})]})]})]}),e.jsxs(se,{children:[e.jsx(g,{colorScheme:"teal",mr:3,type:"submit",children:"Buat Tes"}),e.jsx(g,{mr:3,onClick:b,children:"Hapus Data"}),e.jsx(g,{colorScheme:"red",onClick:x,children:"Batal"})]})]})})]})}const Ia=new Date().toLocaleDateString("id-ID",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),na=()=>w.getJSON("inisial"),en=()=>w.getJSON("score"),an=(a,s)=>{const n=s&&na()!==null?`${na()} ${a==null?void 0:a.fullName}`:a==null?void 0:a.fullName,t=a==null?void 0:a.age,i=a==null?void 0:a.gender,o=a==null?void 0:a.device,c=a==null?void 0:a.testType;return{date:Ia,name:n,age:t,gender:i,device:o,type:c}},sn=a=>{let s;return a<=16?s="Bagus":a>=16&&a<=100?s="Rerata":s="Lemah",s},nn=(a,s)=>{const n=a==null?void 0:a.map((o,c)=>{const d=[],u=s[c];for(let m=0;m{const n=a==null?void 0:a.map((c,d)=>{const u=[],m=s[d];for(let h=0;h=L?x-L:L-x;u.push(R)}return u}),t=n==null?void 0:n.flat(1),i=[];for(let c=0;c<(t==null?void 0:t.length);c++)i.push(c+1);const o=[];for(let c=0;c<(t==null?void 0:t.length);c++)o.push({_id:`D${i[c]}`,discriminant:t[c]});return t==null||t.reverse(),i.reverse(),{number:i,result:t,value:o}},tn=a=>{const s=a==null?void 0:a.map(i=>{const o=[];for(let d=0;dd+u,0)}}),n=s==null?void 0:s.map(i=>i.result);return n==null?void 0:n.reduce((i,o)=>i+o,0)},on=(a,s)=>{const n=Ns[a],t={};Object.keys(n).forEach(d=>{const u=n[d];let m=0;for(let h=u.min;h<=u.max;h++)s[h]||m++;t[d]=m});let i=0,o;for(let d in t)t[d]>i&&(i=t[d],o=d);return Ls[o]},ln=(a,s)=>{let n;if(a==="Menengah (80 Warna)")n="type85";else if(a==="Sulit (85 Warna)")n="type100";else return null;return on(n,s)},cn=(a,s,n,t)=>{const i=nn(a,s),o=rn(a,s),c=tn(a),d=ln(n.type,i.result),u=d||"Normal",m=sn(c),h=c<=en()?"Lolos":"Tidak Lolos",b=i.value,x=o.value;return w.setJSON("discriminant",o),w.setJSON("comparison",i.result),t?{...n,totalErrorScore:c,errorScoreStatus:m,blindCheck:u,comparisonResult:b,discriminantResult:x,status:h}:{...n,totalErrorScore:c,errorScoreStatus:m,blindCheck:u,comparisonResult:b,discriminantResult:x}};function un({isOpen:a,onClose:s}){const n=Q(),t=le(),i=_({mutationFn:Da,onSuccess:x=>{t("Email Berhasil Dikirim",`${x}`,"info")},onError:x=>{t("Terjadi Kesalahan",`${x.response.data.message}`,"error")}}),o=_({mutationFn:Ts,onSuccess:x=>{w.setJSON("id",x),i.mutateAsync(x),n("/verify-admin"),t("Grup Berhasil Dibuat","Masukan Kode Verifikasi","success")},onError:x=>{t("Terjadi Kesalahan",`${x.response.data.message}`,"error")}}),{handleSubmit:c,register:d,reset:u,formState:{errors:m}}=oe({defaultValues:{groupName:"",groupInitial:"",email:"",type:"Mudah (32 Warna)",device:""}}),h=x=>{const S=parseInt(x.maxScore),L={...x,maxScore:S,date:Ia};o.mutateAsync(L)},b=()=>{u()};return e.jsxs(Ae,{size:{base:"xs",sm:"md",md:"2xl"},closeOnOverlayClick:!1,isOpen:a,onClose:s,scrollBehavior:"inside",isCentered:!0,children:[e.jsx(te,{}),e.jsx("form",{onSubmit:c(h),children:e.jsxs(he,{children:[e.jsx(ee,{children:"Buat Grup Tes"}),e.jsx(ie,{}),e.jsxs(ae,{pb:6,children:[e.jsxs(p,{direction:{base:"column",sm:"row"},gap:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:m.groupName,children:[e.jsx(W,{htmlFor:"roomName",children:"Nama Grup"}),e.jsx(G,{id:"roomName",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Nama Grup",...d("groupName",{required:"Wajib Diisi",minLength:{value:4,message:"Masukkan Minimal 4 Suku Kata"},maxLength:{value:20,message:"Masukkan Maksimal 20 Suku Kata"}})}),e.jsx(A,{fontSize:"small",children:"Masukkan Nama Grup"}),e.jsx(I,{children:m.groupName&&m.groupName.message})]}),e.jsxs(D,{isRequired:!0,isInvalid:m.groupInitial,width:{base:"auto",sm:"12em"},children:[e.jsx(W,{htmlFor:"roomInitial",children:"Inisial Grup"}),e.jsx(G,{id:"roomInitial",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Inisial Grup",...d("groupInitial",{required:"Wajib Diisi",maxLength:{value:5,message:"Maks. 5 Huruf"}})}),e.jsx(A,{fontSize:"small",children:"Beri Inisial Grup"}),e.jsx(I,{children:m.groupInitial&&m.groupInitial.message})]})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:4,children:[e.jsxs(D,{isRequired:!0,isInvalid:m.email,children:[e.jsx(W,{htmlFor:"adminEmail",children:"Email Admin"}),e.jsx(G,{id:"adminEmail",type:"email",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Email Admin",...d("email",{required:"Wajib Diisi"})}),e.jsx(A,{fontSize:"small",children:"Masukkan Email Admin Grup"}),e.jsx(I,{children:m.email})]}),e.jsxs(D,{children:[e.jsx(W,{htmlFor:"device",children:"Perangkat Yang Digunakan"}),e.jsx(G,{id:"device",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Tipe Monitor/Gawai",...d("device")}),e.jsx(A,{fontSize:"small",children:"Tuliskan merk atau tipe monitor atau gawai"})]})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:4,children:[e.jsxs(D,{isRequired:!0,isInvalid:m.type,children:[e.jsx(W,{htmlFor:"type",children:"Tingkat Kesulitan"}),e.jsx(ha,{id:"type",...d("type",{required:"Wajib Diisi"}),placeholder:"Pilih Tingkat Kesulitan",children:Qe.map(x=>e.jsx("option",{value:x.type,children:x.type},x.type))}),e.jsx(A,{fontSize:"small",children:"Pilih tingkat kesulitan sesuai kemampuan"}),e.jsx(I,{children:m.type})]}),e.jsxs(D,{isRequired:!0,isInvalid:m.maxScore,children:[e.jsx(W,{htmlFor:"maxTest",children:"Skor Error Maksimal"}),e.jsxs(qe,{allowMouseWheel:!0,id:"maxTest",focusBorderColor:"teal.400",max:100,min:0,...d("maxScore",{required:"Wajib Diisi"}),children:[e.jsx(He,{autoComplete:"off",placeholder:"Masukkan Nilai Terendah"}),e.jsxs(Ke,{children:[e.jsx(Ge,{}),e.jsx($e,{})]})]}),e.jsx(A,{fontSize:"small",children:"Rentang nilai terendah 0 - 100"}),e.jsx(I,{children:m.maxScore})]})]})]}),e.jsxs(se,{children:[e.jsx(g,{colorScheme:"teal",mr:3,loadingText:"Proses",isLoading:o.isLoading,type:"submit",children:"Buat Grup"}),e.jsx(g,{mr:3,onClick:b,children:"Hapus Data"}),e.jsx(g,{colorScheme:"red",onClick:s,children:"Batal"})]})]})})]})}function dn({setPage:a,onClose:s}){const n=Q(),{handleSubmit:t,register:i,setValue:o,reset:c,formState:{errors:d}}=oe({defaultValues:{fullName:"",gender:"",device:"",testType:"",value:{},isClient:!0}});j.useEffect(()=>{const b=w.getJSON("id");Aa(b).then(x=>{w.setJSON("inisial",x.initial),w.setJSON("score",x.max),o("device",x.device),o("testType",x.type),o("value",Wa(x.type))})},[o]);const u=b=>{w.setJSON("user",b),n("/test")},m=()=>{c()},h=()=>{a(!1),c(),s()};return e.jsx("form",{onSubmit:t(u),children:e.jsxs(he,{children:[e.jsx(ee,{children:"Gabung Tes Grup"}),e.jsx(ie,{}),e.jsxs(ae,{pb:6,children:[e.jsxs(D,{isRequired:!0,isInvalid:d.fullName,children:[e.jsx(W,{htmlFor:"fullname",children:"Nama Anda"}),e.jsx(G,{id:"fullname",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Nama Lengkap",...i("fullName",{required:"Wajib Diisi",minLength:{value:4,message:"Min. 4 Huruf"}})}),e.jsx(A,{fontSize:"small",children:"Tuliskan Nama Lengkap Anda"}),e.jsx(I,{children:d.fullName&&d.fullName.message})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:d.age,children:[e.jsx(W,{htmlFor:"age",children:"Umur Anda"}),e.jsxs(qe,{id:"age",focusBorderColor:"teal.400",max:50,min:10,children:[e.jsx(He,{autoComplete:"off",placeholder:"Masukkan Umur Anda",...i("age",{required:"Wajib Diisi"})}),e.jsxs(Ke,{children:[e.jsx(Ge,{}),e.jsx($e,{})]})]}),e.jsx(A,{fontSize:"small",children:"Rentang usia 10 sampai 50 tahun"}),e.jsx(I,{children:d.age})]}),e.jsxs(D,{isRequired:!0,isInvalid:d.gender,children:[e.jsx(W,{htmlFor:"gender",children:"Jenis Kelamin"}),e.jsx(ma,{id:"gender",children:e.jsxs(y,{height:10,justifyContent:"space-around",spacing:"24px",children:[e.jsx(De,{value:"Pria",...i("gender",{required:"Wajib Diisi"}),children:"Pria"}),e.jsx(De,{value:"Wanita",...i("gender",{required:"Wajib Diisi"}),children:"Wanita"})]})}),e.jsx(A,{textAlign:"center",fontSize:"small",children:"Hanya ada 2 jenis kelamin"}),e.jsx(I,{children:d.gender})]})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:d.device,children:[e.jsx(W,{htmlFor:"device",children:"Perangkat"}),e.jsx(G,{id:"device",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Tipe Monitor/Gawai",...i("device",{required:"Wajib Diisi"})}),e.jsx(A,{fontSize:"small",children:"Tuliskan merk atau tipe monitor atau gawai"}),e.jsx(I,{children:d.device})]}),e.jsxs(D,{isReadOnly:!0,isRequired:!0,isInvalid:d.testType,children:[e.jsx(W,{htmlFor:"type",children:"Tingkat Kesulitan"}),e.jsx(G,{id:"type",autoComplete:"off",focusBorderColor:"teal.400",...i("testType",{required:"Wajib Diisi"})})]})]})]}),e.jsxs(se,{children:[e.jsx(g,{colorScheme:"teal",mr:3,type:"submit",children:"Buat Tes"}),e.jsx(g,{mr:3,onClick:m,children:"Hapus Data"}),e.jsx(g,{colorScheme:"red",onClick:h,children:"Batal"})]})]})})}function mn({setPage:a,onClose:s}){const n=Q(),t=le(),{mutateAsync:i,isLoading:o}=_({mutationFn:za,onSuccess:h=>{const b=h.admin;w.setJSON("id",h.id),b?n("/admin"):a(!0)},onError:h=>{t("Terjadi Kesalahan",`${h.response.data.message}`,"error")}}),{handleSubmit:c,control:d,formState:{errors:u}}=oe({defaultValues:{code:""}}),m=h=>{i(h.code)};return e.jsx("form",{onSubmit:c(m),children:e.jsxs(he,{children:[e.jsx(ee,{children:"Bergabung Grup"}),e.jsx(ie,{}),e.jsx(ae,{pb:6,margin:"0 auto",children:e.jsxs(D,{isRequired:!0,isInvalid:u.code,children:[e.jsx(W,{children:"Masukkan Kode"}),e.jsx(y,{children:e.jsx(Sa,{control:d,name:"code",render:({field:{onChange:h}})=>e.jsxs(ua,{type:"alphanumeric",mask:!0,onChange:b=>h(b),children:[e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{})]})})}),e.jsx(A,{fontSize:"small",children:"Harap masukkan kode yang sesuai"}),e.jsx(I,{children:u.code})]})}),e.jsxs(se,{children:[e.jsx(g,{colorScheme:"teal",mr:3,type:"submit",loadingText:"Memverifikasi",isLoading:o,children:"Verifikasi"}),e.jsx(g,{onClick:s,children:"Batal"})]})]})})}function hn({isOpen:a,onClose:s}){const[n,t]=j.useState(!1);return e.jsxs(Ae,{size:{base:"xs",sm:"md",md:"2xl"},closeOnOverlayClick:!1,isOpen:a,onClose:s,isCentered:!0,children:[e.jsx(te,{}),n?e.jsx(dn,{setPage:t,onClose:s}):e.jsx(mn,{setPage:t,onClose:s})]})}function xn(){const a=Z(),s=Z(),n=Z();return e.jsxs(l,{as:"section",pt:16,id:"tes",children:[e.jsxs(z,{spacing:2,textAlign:"center",children:[e.jsx(k,{as:"h1",fontSize:{base:"2xl",sm:"4xl"},children:"Pilih Menu Tes"}),e.jsx(r,{fontSize:{base:"md",lg:"lg"},color:"gray.500",children:"Mencoba Tes Sendiri. Buat Grup Tes. Bergabung ke Grup Tes. Semua dalam satu website."})]}),e.jsxs(M,{direction:{base:"column",md:"row"},textAlign:"center",justify:"center",spacing:{base:4,lg:10},py:10,children:[e.jsxs(l,{mb:4,shadow:"base",borderWidth:"1px",alignSelf:"center",borderColor:N("gray.200","gray.500"),borderRadius:"xl",maxWidth:"297px",children:[e.jsx(l,{py:4,px:12,children:e.jsx(r,{fontWeight:"500",fontSize:{base:"xl",sm:"2xl"},children:"Tes Individu"})}),e.jsxs(z,{bg:N("gray.50","gray.700"),py:4,borderBottomRadius:"xl",children:[e.jsxs(Re,{spacing:3,textAlign:"start",px:12,children:[e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Memilih Jenis Tes yang Diinginkan"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengetahui Hasil Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengunduh Hasil Tes"})]})})]}),e.jsx(l,{w:"80%",pt:7,children:e.jsx(g,{onClick:a.onOpen,w:"full",colorScheme:"orange",variant:"outline",children:"Buat Tes"})})]})]}),e.jsx(l,{mb:4,shadow:"base",borderWidth:"1px",alignSelf:"center",borderColor:N("gray.200","gray.500"),borderRadius:"xl",maxWidth:"297px",children:e.jsxs(l,{position:"relative",children:[e.jsx(l,{position:"absolute",top:"-16px",left:"50%",style:{transform:"translate(-50%)"},children:e.jsx(r,{textTransform:"uppercase",bg:N("orange.300","orange.700"),px:3,py:1,color:N("gray.900","gray.300"),fontSize:{base:"xs",lg:"sm"},fontWeight:"600",rounded:"xl",children:"Khusus Admin"})}),e.jsx(l,{py:4,px:12,children:e.jsx(r,{fontWeight:"500",fontSize:{base:"xl",sm:"2xl"},children:"Buat Grup Tes"})}),e.jsxs(z,{bg:N("gray.50","gray.700"),py:4,borderBottomRadius:"xl",children:[e.jsxs(Re,{spacing:3,textAlign:"start",px:12,children:[e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Manajemen Dasbor Grup Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Menentukan Jenis Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Menerima Email Kode"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Membagikan Kode Verifikasi Grup"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengunduh Data Dasbor"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Menghapus Grup Tes"})]})})]}),e.jsx(l,{w:"80%",pt:7,children:e.jsx(g,{onClick:s.onOpen,w:"full",colorScheme:"orange",children:"Buat Grup"})})]})]})}),e.jsxs(l,{mb:4,shadow:"base",borderWidth:"1px",alignSelf:"center",borderColor:N("gray.200","gray.500"),borderRadius:"xl",maxWidth:"297px",children:[e.jsx(l,{py:4,px:12,children:e.jsx(r,{fontWeight:"500",fontSize:{base:"xl",sm:"2xl"},children:"Gabung Tes"})}),e.jsxs(z,{bg:N("gray.50","gray.700"),py:4,borderBottomRadius:"xl",children:[e.jsxs(Re,{spacing:3,textAlign:"start",px:12,children:[e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Bergabung dengan Grup Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengerjakan Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengetahui Hasil Tes"})]})})]}),e.jsx(l,{w:"80%",pt:7,children:e.jsx(g,{onClick:n.onOpen,w:"full",colorScheme:"orange",variant:"outline",children:"Gabung Tes"})})]})]})]}),e.jsx(Xs,{isOpen:a.isOpen,onClose:a.onClose}),e.jsx(un,{isOpen:s.isOpen,onClose:s.onClose}),e.jsx(hn,{isOpen:n.isOpen,onClose:n.onClose})]})}function bn(){return e.jsxs(l,{as:"section",pb:12,children:[e.jsxs(M,{spacing:4,as:X,maxW:"3xl",textAlign:"center",children:[e.jsx(k,{fontSize:{base:"2xl",sm:"4xl"},fontWeight:"bold",children:"Apa itu WhatColors?"}),e.jsx(r,{color:"gray.600",fontSize:{base:"sm",sm:"lg"},children:"Simulasi Tes Buta Warna dengan Metode Farnsworth Munsell yang kompleks dengan sejumlah fitur yang membantu pengguna dalam menggunakan website"})]}),e.jsx(X,{px:0,maxW:"5xl",mt:12,children:e.jsx(p,{flexWrap:"wrap",gridGap:6,justify:"center",children:gn.map(a=>e.jsx(l,{maxW:{base:"full",md:"275px"},w:"full",borderWidth:"1px",borderRadius:"lg",overflow:"hidden",p:5,children:e.jsxs(M,{align:"start",spacing:2,children:[e.jsx(p,{w:16,h:16,align:"center",justify:"center",color:"white",rounded:"full",bg:"gray.100",children:e.jsx(J,{as:a.icon,w:10,h:10})}),e.jsxs(l,{mt:2,children:[e.jsx(k,{size:"md",children:a.title}),e.jsx(r,{mt:1,fontSize:"sm",children:a.desc})]}),e.jsx(g,{as:B,to:"/about",variant:"link",colorScheme:"orange",size:"sm",children:"Selengkapnya"})]})},a.num))})})]})}const gn=[{num:1,icon:ss,title:"Responsif",desc:"Dapat berjalan diberbagai jenis perangkat"},{num:2,icon:ns,title:"Informatif",desc:"Mengetahui semua informasi hasil tes."},{num:3,icon:rs,title:"Detail",desc:"Ketahui hasil melalui visual yang sesuai"},{num:4,icon:ts,title:"Aman",desc:"Meminimalisir terjadinya kecurangan dalam tes."},{num:5,icon:is,title:"Akurat",desc:"Menggunakan Metode Farnsworth-Munsell untuk menghitung hasil"}];function pn(){const[a]=We("(max-width: 401px)");return e.jsxs(l,{mt:{base:4,sm:2,md:0},children:[e.jsx(Zs,{}),e.jsx(xn,{}),e.jsx(bn,{}),a?e.jsxs(r,{pb:4,fontSize:12,textAlign:"center",color:"gray",children:["Created by Zulham 👋 ",e.jsx("br",{})," © 2023"]}):""]})}function jn({user:a}){return e.jsx(l,{as:"section",margin:4,fontSize:{base:"xs",xs:"sm",md:"md"},children:e.jsxs(p,{direction:{base:"column",md:"row"},children:[e.jsxs(p,{flex:1,children:[e.jsxs(z,{alignItems:"flex-start",children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Nama"}),e.jsx(r,{as:"span",fontWeight:"bold",children:"Umur"}),e.jsx(r,{as:"span",fontWeight:"bold",children:"Jenis Kelamin"})]}),e.jsxs(z,{ml:2,alignItems:"flex-start",children:[e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.name]})," "]}),e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.age]})," "]}),e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.gender]})," "]})]})]}),e.jsxs(p,{flex:1,mt:{base:2,md:"auto"},children:[e.jsxs(z,{alignItems:"flex-start",children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Perangkat Tes"}),e.jsx(r,{as:"span",fontWeight:"bold",children:"Jenis Tes"}),e.jsx(r,{as:"span",fontWeight:"bold",children:"Tanggal"})]}),e.jsxs(z,{ml:1.5,alignItems:"flex-start",children:[e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.device]})," "]}),e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.type]})," "]}),e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.date]})," "]})]})]})]})})}function fn({handle:a,data:s,testDone:n}){return n?e.jsx(Ee.ReactSortable,{className:"row-box",group:{name:"valueByRow",put:!1},disabled:!0,animation:200,ghostClass:"ghostbox",list:s.value,setList:t=>a(s.row,t),children:s.value.map(t=>e.jsx(l,{backgroundColor:t.color,margin:"4px 1px",border:"1px solid #252525",cursor:"pointer",width:10,height:10},t.color))}):e.jsx(Ee.ReactSortable,{className:"row-box",group:{name:"valueByRow",put:!1},animation:200,ghostClass:"ghostbox",list:s.value,setList:t=>a(s.row,t),children:s.value.map(t=>e.jsx(l,{backgroundColor:t.color,margin:"4px 1px",border:"1px solid #252525",cursor:"pointer",width:10,height:10},t.color))})}const kn=new Ca,vn=12,ra=a=>[a.getMinutes(),a.getSeconds()].map(s=>`0${s}`.slice(-2)).join(":");function yn({test:a,user:s,init:n,isClient:t}){const i=Q(),o=le(),c=w.getJSON("id"),[d,u]=j.useState(null),[m,h]=j.useState(new Date(0)),[b,x]=j.useState(!1),[S,L]=j.useState({}),R=j.useRef(null),$=`${ra(m)}`,ce=Os(d),Ye=(C,Ba)=>{const Fa=a.map(Le=>(Le.row===C&&(Le.value=Ba),Le));u(Fa)},ue=j.useCallback(()=>{clearTimeout(R.current),R.current=null},[]),Ze=j.useCallback(()=>{if(m.getMinutes()>=vn){aa();return}h(C=>new Date(C.getTime()+1e3))},[m,h]);j.useEffect(()=>(R.current=setTimeout(Ze,1e3),()=>clearTimeout(R.current)),[m,Ze]);const Xe=_({mutationFn:Ss,onSuccess:C=>{w.setJSON("id",C),i("/result"),o("Data Berhasil Ditambahkan","Berikut hasil perhitungan data yang telah ditambahkan","success")},onError:C=>{h(new Date(0)),x(!1),o("Terjadi Kesalahan",`${C.response.data.message}`,"error")}}),ea=_({mutationFn:As,onSuccess:C=>{kn.invalidateQueries({queryKey:["clients"],exact:!0}),w.setJSON("id",C),i("/result"),o("Data Berhasil Ditambahkan","Berikut hasil perhitungan data yang telah ditambahkan","success")},onError:C=>{h(new Date(0)),x(!1),o("Terjadi Kesalahan",`${C.response.data.message}`,"error")}}),aa=()=>{x(!0),ue();const C=cn(ce,n,s,t);L({...C,time:$})},Ma=()=>{t?ea.mutateAsync({id:c,clientData:S}):Xe.mutateAsync(S)};return e.jsxs(l,{pt:5,children:[e.jsx(r,{textAlign:"center",fontWeight:"medium",mb:6,fontSize:"xl",children:ra(m)}),a==null?void 0:a.map(C=>e.jsxs(p,{flexWrap:"wrap",flexDirection:"row",margin:"8px auto",width:{xl:"5xl"},children:[e.jsx(l,{flex:1,display:"flex",justifyContent:"flex-start",margin:"4px 8px 4px 1px",children:e.jsx(l,{backgroundColor:C.first.color,width:10,height:10,children:e.jsx(r,{textAlign:"center",fontSize:"small",fontWeight:"bold",color:"white",children:"Awal"})},C.first)}),e.jsx(fn,{handle:Ye,data:C,testDone:b}),e.jsx(l,{flex:1,display:"flex",justifyContent:"flex-end",margin:"4px 1px 4px 8px",children:e.jsx(l,{backgroundColor:C.last.color,width:10,height:10,children:e.jsx(r,{textAlign:"center",fontSize:"small",fontWeight:"bold",color:"white",children:"Akhir"})},C.last)})]},C.row)),e.jsx(Ve,{mt:8,children:b?e.jsx(g,{size:{base:"sm",sm:"md"},colorScheme:"teal",onClick:Ma,loadingText:"Mengirim Hasil",isLoading:Xe.isLoading||ea.isLoading,children:"Kirim Data"}):e.jsx(g,{size:{base:"sm",sm:"md"},colorScheme:"teal",onClick:aa,children:"Selesai"})})]})}function wn(){const a=Q(),{isOpen:s,onOpen:n,onClose:t}=Z(),i=j.useRef(),[o]=Gs(),[c]=$s(o),d=o==null?void 0:o.isClient,u=an(o,d),m=o==null?void 0:o.value,h=()=>{a("/")};return e.jsxs(l,{my:6,children:[e.jsxs(xa,{motionPreset:"slideInBottom",leastDestructiveRef:i,onClose:t,isOpen:s,isCentered:!0,children:[e.jsx(te,{}),e.jsxs(ba,{children:[e.jsx(ee,{children:"Batalkan Tes"}),e.jsx(ie,{}),e.jsx(ae,{children:"Apakah anda yakin ingin membatalkan tes ini?"}),e.jsxs(se,{children:[e.jsx(g,{ref:i,onClick:t,children:"Tidak"}),e.jsx(g,{colorScheme:"red",ml:3,onClick:h,children:"Keluar"})]})]})]}),e.jsxs(y,{mb:8,children:[e.jsxs(k,{as:"h6",fontSize:"lg",textAlign:"center",flex:1,children:["Pengerjaan Tes Buta Warna ",e.jsx("br",{})," Metode Farnsworth-Munsell"]}),e.jsx(de,{size:"sm",colorScheme:"red",icon:e.jsx(Ka,{}),onClick:n})]}),e.jsx(jn,{user:u}),e.jsx(yn,{test:c,user:u,init:m,isClient:d})]})}const ta=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)});function Sn(){return e.jsxs(M,{py:{base:5,sm:16,md:20},px:8,spacing:{base:8,md:10},align:"center",direction:"column",children:[e.jsx(ta,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:-50,opacity:0},onscreen:{y:0,opacity:1,transition:{ease:"easeInOut",duration:.5}}},children:e.jsx(r,{fontSize:{base:"lg",sm:"xl",md:"2xl"},textAlign:"center",maxW:"3xl",children:'"The score for a cap is the sum of the differences between the number of that cap and the numbers of the caps adjacent to it"'})}),e.jsx(l,{textAlign:"center",children:e.jsxs(ta,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:50,opacity:0},onscreen:{y:0,opacity:1,transition:{ease:"easeInOut",duration:.5}}},children:[e.jsx(Ga,{name:"Dean Farnsworth",mb:2}),e.jsx(r,{fontWeight:600,children:"Dean Farnsworth - 1957"}),e.jsx(r,{fontSize:"sm",color:N("gray.400","gray.400"),children:"Penemu Metode Farnsworth Munsell"})]})})]})}const Cn=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)});function Tn(){return e.jsx(M,{as:l,textAlign:"center",pb:10,children:e.jsxs(Cn,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:100,scale:0,opacity:0},onscreen:{y:0,scale:1,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:[e.jsx(r,{fontWeight:600,fontSize:"xl",pb:2,children:"Reach Me"}),e.jsxs(y,{spacing:8,justifyContent:"center",children:[e.jsx(Y,{href:"https://github.com/Z4nR",isExternal:!0,children:e.jsx(os,{size:20})}),e.jsx(Y,{href:"https://www.linkedin.com/in/zulham-ari-nur-ridhwan",isExternal:!0,children:e.jsx(ls,{size:20})}),e.jsx(Y,{href:"https://github.com/Z4nR",isExternal:!0,children:e.jsx(cs,{size:20})})]})]})})}const ia=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)});function Dn(){return e.jsx(l,{py:{base:5,xs:8,sm:16},children:e.jsxs(ga,{columns:{base:1,xl:2},spacing:10,children:[e.jsx(ia,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{type:"spring",bounce:.4,duration:1}}},children:e.jsxs(M,{spacing:4,children:[e.jsx(r,{textTransform:"uppercase",color:"blue.400",fontWeight:600,fontSize:"sm",bg:N("blue.50","blue.900"),p:2,alignSelf:"flex-start",rounded:"md",children:"Responsif"}),e.jsx(k,{fontSize:{base:"2xl",sm:"4xl"},children:"Gunakan semua perangkat"}),e.jsx(r,{textAlign:"justify",color:"gray.500",fontSize:{base:"sm",sm:"md",md:"lg"},children:"Website ini mendukung simulasi dengan menggunakan berbagai perangkat, baik menggunakan alat bantu maupun dengan tangan secara langsung. Anda dapat menggunakan berbagai jenis ukuran perangkat yang anda punya."}),e.jsxs(M,{spacing:4,divider:e.jsx($a,{borderColor:N("gray.100","gray.700")}),children:[e.jsxs(M,{direction:"row",align:"center",children:[e.jsx(p,{w:8,h:8,align:"center",justify:"center",rounded:"full",bg:N("yellow.100","yellow.900"),children:e.jsx(J,{as:us,color:"yellow.500",w:5,h:5})}),e.jsx(r,{fontSize:{base:"xs",xs:"md"},fontWeight:600,children:"Laptop / Notebook / Komputer"})]}),e.jsxs(M,{direction:"row",align:"center",children:[e.jsx(p,{w:8,h:8,align:"center",justify:"center",rounded:"full",bg:N("purple.100","purple.900"),children:e.jsx(J,{as:ds,color:"purple.500",w:5,h:5})}),e.jsx(r,{fontSize:{base:"xs",xs:"md"},fontWeight:600,children:"Tablet ( Landscape / Potrait )"})]}),e.jsxs(M,{direction:"row",align:"center",children:[e.jsx(p,{w:8,h:8,align:"center",justify:"center",rounded:"full",bg:N("green.100","green.900"),children:e.jsx(J,{as:ms,color:"green.500",w:5,h:5})}),e.jsx(r,{fontSize:{base:"xs",xs:"md"},fontWeight:600,children:"Smartphone ( Landscape / Potrait )"})]})]})]})}),e.jsx(ia,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0},variants:{offscreen:{y:100,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsxs(p,{flexDirection:"column",alignItems:"center",children:[e.jsx(da,{rounded:"md",alt:"Device Size",src:"https://images.unsplash.com/photo-1426024084828-5da21e13f5dc?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1774&q=80",objectFit:"cover"}),e.jsxs(r,{fontSize:"x-small",children:["Photo by"," ",e.jsx("a",{href:"https://unsplash.com/@firmbee?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText",children:"Firmbee.com"})," ","on"," ",e.jsx("a",{href:"https://unsplash.com/photos/2mc2B5iX6as?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText",children:"Unsplash"})]})]})})]})})}const Ce=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)});function zn(){return e.jsx(l,{py:{base:5,xs:16,sm:20},textAlign:"justify",children:e.jsx(l,{py:{base:5,xs:8,sm:16},bg:"teal",children:e.jsx(X,{maxW:"7xl",paddingInline:10,children:e.jsx(M,{direction:{base:"column",lg:"row"},children:e.jsxs(M,{flex:1,justify:{lg:"center"},py:4,children:[e.jsxs(l,{mb:{base:8,md:20},children:[e.jsxs(Ce,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{ease:"easeInOut",duration:.5}}},children:[e.jsx(r,{fontFamily:"heading",fontWeight:700,textTransform:"uppercase",mb:3,fontSize:{base:"md",md:"xl"},color:"orange.300",children:"Rincian Hasil"}),e.jsx(k,{color:"white",mb:5,fontSize:{base:"md",sm:"xl",md:"5xl"},children:"Tampilan Data Terperinci dan Mudah Dipahami"})]}),e.jsx(Ce,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{ease:"easeInOut",duration:1}}},children:e.jsx(r,{fontSize:{base:"md",md:"xl"},color:"gray.200",children:"WhatColors menampilkan data dengan rinci dan memiliki penyampaian yang mudah dipahami, membantu pengguna dalam memahami hasil dari tes yang telah dikerjakan serta daftar data peserta tes bagi para admin grup tes."})})]}),e.jsx(ga,{columns:{base:1,md:2},spacing:10,children:An.map(a=>e.jsxs(l,{children:[e.jsx(Ce,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{ease:"easeInOut",duration:.5}}},children:e.jsx(r,{fontFamily:"heading",fontSize:{base:"xl",md:"3xl"},color:"orange.300",mb:3,children:a.title})}),e.jsx(Ce,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{ease:"easeInOut",duration:1}}},children:e.jsx(r,{fontSize:{base:"md",md:"xl"},color:"gray.200",children:a.content})})]},a.title))})]})})})})})}const An=[{title:"Pernyataan",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Ringkasan Hasil"}),e.jsx("br",{}),"Pada bagian ini pengguna akan mendapatkan penjelasan singkat terkait ringkasan hasil akhir yang didapatkan setelah melalui perhitungan dan penerapan metode Farnsworth Munsell yang cukup kompleks."]})},{title:"Komparasi",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Nilai Perbandingan"}),e.jsx("br",{}),'Pada bagian ini pengguna akan mendapatkan tampilan nilai perbandingan terkait jawaban pengguna dengan nilai asli dari susunan warna pada Metode Farnsworth Munsell. Hasil nilai berbandingan yang ditampilkan akan berupa tabel ataupun diagram pada ukuran perangkat tertentu. Tampilan hasil akan berupa nomor urutan blok warna serta nilai jawaban berupa "Benar" atau "Salah".']})},{title:"Diskriminan",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Nilai Perpindahan"}),e.jsx("br",{}),"Pada bagian ini pengguna akan mendapatkan tampilan nilai terkait seberapa jauh perpindahan blok warna dari seharusnya. Untuk menentukan nilai ini perlu menggunakan Metode Farnsworth Munsell untuk mengetahui nilai suatu blok warna. Jawaban pengguna dapat diperkirakan benar apabila perbandingan nilai pada suatu blok terhadapat blok warna sebelum dan sesudahnya bernilai satu."]})},{title:"Data Grup",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Informasi Peserta"}),e.jsx("br",{}),"Data yang terdapat dalam grup dibuat sesederhana mungkin untuk dapat membantu admin dalam mengelompokkan data peserta, dalam tampilan data peserta pada sebuah grup hanya berisikan sedikit informasi. Untuk informasi yang lebih lengkap, admin dapat mengunduh data grup apabila diperlukan."]})},{title:"7 x 24",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Akses Data"}),e.jsx("br",{}),"Seluruh ringkasan data hasil tes dan data grup dapat kalian cari data hasil tes kalian melalui fitur pencarian selama data belum terhapus setiap minggunya dari penyimpanan kami."]})}],Te=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)}),Wn=({isOpen:a,onClose:s})=>{const[n,t]=j.useState([{color:"#b07464"},{color:"#a87456"},{color:"#a77c4e"},{color:"#a48546"}]);return e.jsxs(Ae,{size:{base:"xs",sm:"md",md:"2xl"},closeOnOverlayClick:!1,isOpen:a,scrollBehavior:"inside",isCentered:!0,children:[e.jsx(te,{}),e.jsxs(he,{children:[e.jsx(ee,{children:"Cara Kerja"}),e.jsxs(ae,{fontSize:{base:"sm",md:"md"},children:[e.jsx(r,{children:"Susun dan pindahkan blok warna yang berada ditengah"}),e.jsxs(p,{flexWrap:"wrap",flexDirection:"row",margin:"8px auto",justifyContent:"center",children:[e.jsx(l,{margin:"4px 8px 4px 1px",children:e.jsx(l,{backgroundColor:"#b2766f",width:10,height:10,children:e.jsx(r,{textAlign:"center",fontSize:"small",fontWeight:"bold",color:"white",children:"Awal"})},"#b2766f")}),e.jsx(Ee.ReactSortable,{className:"row-box",group:{name:"valueByRow",put:!1},animation:200,ghostClass:"ghostbox",list:n,setList:t,children:n.map(i=>e.jsx(l,{backgroundColor:i.color,margin:"4px 1px",border:"1px solid #252525",cursor:"pointer",width:10,height:10},i.color))}),e.jsx(l,{margin:"4px 1px 4px 8px",children:e.jsx(l,{backgroundColor:"#9b8f49",width:10,height:10,children:e.jsx(r,{textAlign:"center",fontSize:"small",fontWeight:"bold",color:"white",children:"Akhir"})},"#9b8f49")})]}),e.jsxs(Ja,{textAlign:"justify",mt:8,children:[e.jsx(r,{mb:2,children:"Untuk hasil yang maksimal silahkan ikuti saran berikut :"}),e.jsx(T,{children:"Maksimalkan kecerahan layar perangkat yang akan digunakan dalam pengetesan"}),e.jsx(T,{children:"Pastikan pengujian dilakukan dalam ruangan"}),e.jsx(T,{children:"Gunakan lampu bertipe D65 pada ruangan tes secara merata"}),e.jsx(T,{children:"Jangan gunakan mode baca atau mode anti sinar biru pada pengaturan layar perangkat pengetesan"}),e.jsx(T,{children:"Jangan gunakan kacamata atau soft-lens khusus buta warna."}),e.jsxs(T,{children:["Waktu pengetesan optimal : pukul 11:00 -13:00"," ",e.jsx("b",{children:"(Maks. Pengerjaan 12 Menit"})," )"]}),e.jsx(T,{children:"Gunakan layar dengan ukuran minimal 6,6 - 17 inci dengan resolusi Full HD"})]})]}),e.jsx(se,{children:e.jsx(g,{colorScheme:"red",onClick:s,children:"Keluar"})})]})]})};function In(){const{isOpen:a,onOpen:s,onClose:n}=Z();return e.jsxs(X,{maxW:"5xl",children:[e.jsx(Wn,{isOpen:a,onClose:n}),e.jsxs(M,{as:l,textAlign:"center",spacing:{base:8,md:10},py:{base:5,xs:16,sm:20},children:[e.jsx(Te,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:100,scale:0,opacity:0},onscreen:{y:0,scale:1,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsxs(k,{fontWeight:600,fontSize:{base:"2xl",sm:"4xl",md:"6xl"},lineHeight:"110%",children:["Tentang ",e.jsx("br",{}),e.jsx(r,{as:"span",color:"green.400",children:"WhatColors"})]})}),e.jsx(Te,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:100,scale:0,opacity:0},onscreen:{y:0,scale:1,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsx(r,{textAlign:{base:"justify",sm:"center"},fontSize:{base:"sm",sm:"md"},color:"gray.500",children:"Website ini ditunjukkan bagi masyarakat secara luas dapat melakukan simulasi tes buta warna secara virtual dan gratis. Pada website ini menggunakan Metode Farnsworth Munsell sebagai tolak ukur perhitungan untuk memperkiraan kondisi mata seseorang. Metode ini memiliki keunggulan yang lebih baik untuk mengurangi indikasi kecurangan dalam pelaksanaan tes buta warna secara bersama-sama. Untuk memulai simulasi tes atau mengetahui cara kerja metode ini kalian dapat mengeklik salah satu tombol dibawah ini"})}),e.jsxs(M,{direction:"column",spacing:3,align:"center",alignSelf:"center",position:"relative",children:[e.jsx(Te,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{x:-50,opacity:0},onscreen:{x:0,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsx(g,{size:{base:"sm",sm:"md"},colorScheme:"green",bg:"green.400",rounded:"full",px:6,_hover:{bg:"green.500"},as:B,to:"/",children:"Lakukan Tes"})}),e.jsx(Te,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{x:-50,opacity:0},onscreen:{x:0,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsx(g,{variant:"link",colorScheme:"blue",size:"sm",onClick:s,children:"Cara Kerja"})}),e.jsxs(l,{children:[e.jsx(J,{as:Mn,color:N("gray.800","gray.300"),w:{base:30,xs:71},position:"absolute",right:{base:-35,xs:-71},top:"10px"}),e.jsx(r,{fontSize:{base:"xs",xs:"lg"},fontFamily:"Caveat",position:"absolute",right:{base:"-80px",xs:"-125px"},top:"-15px",transform:"rotate(10deg)",children:"Yuk coba tesnya"})]})]})]})]})}const Mn=Va({displayName:"Arrow",viewBox:"0 0 72 24",path:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.600904 7.08166C0.764293 6.8879 1.01492 6.79004 1.26654 6.82177C2.83216 7.01918 5.20326 7.24581 7.54543 7.23964C9.92491 7.23338 12.1351 6.98464 13.4704 6.32142C13.84 6.13785 14.2885 6.28805 14.4722 6.65692C14.6559 7.02578 14.5052 7.47362 14.1356 7.6572C12.4625 8.48822 9.94063 8.72541 7.54852 8.7317C5.67514 8.73663 3.79547 8.5985 2.29921 8.44247C2.80955 9.59638 3.50943 10.6396 4.24665 11.7384C4.39435 11.9585 4.54354 12.1809 4.69301 12.4068C5.79543 14.0733 6.88128 15.8995 7.1179 18.2636C7.15893 18.6735 6.85928 19.0393 6.4486 19.0805C6.03792 19.1217 5.67174 18.8227 5.6307 18.4128C5.43271 16.4346 4.52957 14.868 3.4457 13.2296C3.3058 13.0181 3.16221 12.8046 3.01684 12.5885C2.05899 11.1646 1.02372 9.62564 0.457909 7.78069C0.383671 7.53862 0.437515 7.27541 0.600904 7.08166ZM5.52039 10.2248C5.77662 9.90161 6.24663 9.84687 6.57018 10.1025C16.4834 17.9344 29.9158 22.4064 42.0781 21.4773C54.1988 20.5514 65.0339 14.2748 69.9746 0.584299C70.1145 0.196597 70.5427 -0.0046455 70.931 0.134813C71.3193 0.274276 71.5206 0.70162 71.3807 1.08932C66.2105 15.4159 54.8056 22.0014 42.1913 22.965C29.6185 23.9254 15.8207 19.3142 5.64226 11.2727C5.31871 11.0171 5.26415 10.5479 5.52039 10.2248Z",fill:"currentColor"})});function Bn(){return e.jsxs(l,{children:[e.jsx(In,{}),e.jsx(Dn,{}),e.jsx(zn,{}),e.jsx(Sn,{}),e.jsx(Tn,{})]})}function Fn(){return e.jsx(ge,{my:4,templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:[...Array(6)].map((a,s)=>e.jsx(pe,{children:e.jsxs(l,{as:"article",p:"5",borderWidth:"1px",rounded:"md",children:[e.jsxs(f,{children:[e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:"odio euismod lacinia at quis risus sed"}),e.jsx(r,{fontSize:"sm",children:"lorem"})]}),e.jsx(f,{children:e.jsx(k,{noOfLines:2,size:{base:"xs",xs:"md"},my:"2",children:e.jsx(r,{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ultrices neque ornare aenean euismod elementum nisi quis eleifend."})})}),e.jsx(f,{children:e.jsx(r,{noOfLines:7,textAlign:"justify",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Id aliquet risus feugiat in. Tellus in hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Mauris rhoncus aenean vel elit scelerisque mauris pellentesque pulvinar. Suspendisse sed nisi lacus sed. Nullam ac tortor vitae purus faucibus ornare suspendisse. Mus mauris vitae ultricies leo integer malesuada nunc vel."})})]})},s))})}function Ne({error:a}){return e.jsx(p,{minHeight:"80vh",justifyContent:"center",alignItems:"center",children:e.jsxs(l,{textAlign:"center",py:10,px:6,children:[e.jsx(k,{display:"inline-block",as:"h2",size:"2xl",bgGradient:"linear(to-r, teal.400, teal.600)",backgroundClip:"text",children:a.response.data.status}),e.jsx(r,{fontSize:{base:"1rem",lg:"18px"},color:"gray.500",mt:3,mb:2,children:"Sepertinya ada yang tidak beres"}),e.jsx(r,{fontSize:{base:"2xl",lg:"3xl"},lineHeight:"short",mb:6,children:a.response.data.message}),e.jsx(g,{as:B,to:"/",colorScheme:"teal",bgGradient:"linear(to-r, teal.400, teal.500, teal.600)",color:"white",variant:"solid",size:{base:"xs",xs:"sm",md:"md"},children:"Kembali Ke Beranda"})]})})}function Pn(){const{data:a,error:s,isLoading:n,isError:t}=me({queryKey:["article"],queryFn:async()=>await Ms()});if(t)return e.jsx(Ne,{error:s});const i=()=>n?e.jsx(Fn,{}):e.jsx(ge,{my:4,templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:a.map(o=>e.jsx(pe,{children:e.jsxs(_a,{as:"article",p:"5",borderWidth:"1px",rounded:"md",children:[e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:o.author}),e.jsxs(Ie,{colorScheme:"teal",size:"sm",children:[o.category," / ",o.year]}),e.jsx(k,{noOfLines:2,size:{base:"xs",xs:"md"},my:"2",children:e.jsx(Ua,{isExternal:!0,href:o.url,children:o.title})}),e.jsx(r,{noOfLines:7,textAlign:"justify",children:o.description})]})},o._id))});return e.jsxs(l,{py:8,fontSize:{base:"xs",xs:"sm",md:"md"},children:[e.jsx(k,{textAlign:"center",size:"md",children:"Artikel Terkait"}),i()]})}function Nn(){return e.jsx(Me,{mt:6,mb:2,minHeight:{base:"68vh",xs:"75vh",md:"58vh"},children:e.jsxs(Be,{size:"sm",children:[e.jsx(Fe,{children:e.jsxs(U,{children:[e.jsx(F,{textAlign:{md:"center"},children:"#"}),e.jsx(F,{textAlign:{md:"center"},children:"Nama"}),e.jsx(F,{textAlign:{md:"center"},children:"Skor Tes"}),e.jsx(F,{textAlign:{md:"center"},children:"Waktu"}),e.jsx(F,{textAlign:{md:"center"},children:"Status"}),e.jsx(F,{textAlign:{md:"center"},children:"Perangkat"})]})}),e.jsx(Pe,{children:[...Array(10)].map((a,s)=>e.jsxs(U,{children:[e.jsx(P,{textAlign:{md:"center"},children:e.jsx(f,{children:e.jsx("p",{children:"Lorem"})})}),e.jsx(P,{textAlign:{md:"center"},children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})}),e.jsx(P,{textAlign:"center",children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})}),e.jsx(P,{textAlign:"center",children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})}),e.jsx(P,{textAlign:"center",children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})}),e.jsx(P,{textAlign:"center",children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})})]},s))})]})})}function Ln(){var S,L,R;const a=Q(),s=le(),n=w.getJSON("id"),{isOpen:t,onOpen:i,onClose:o}=Z(),c=j.useRef(),{mutateAsync:d,isLoading:u}=_({mutationFn:Ds,onSuccess:$=>{a("/"),s("Berhasil Dihapus",`${$.message}`,"info")},onError:$=>{s("Terjadi Kesalahan",`${$.response.data.message}`,"error")}}),m=()=>{d(n)},h=me({queryKey:["group",n],queryFn:async()=>await Aa(n),refetchOnWindowFocus:!1}),b=me({queryKey:["clients",n],queryFn:async()=>await zs(n),refetchIntervalInBackground:!0,refetchInterval:6e4}),[x]=Us(b.data);return h.isError||b.isError?e.jsx(Ne,{error:h.error||b.error}):e.jsxs(l,{py:{lg:4},children:[e.jsxs(xa,{motionPreset:"slideInBottom",leastDestructiveRef:c,onClose:o,isOpen:t,isCentered:!0,children:[e.jsx(te,{}),e.jsxs(ba,{children:[e.jsx(ee,{children:"Hapus Grup?"}),e.jsx(ie,{}),e.jsxs(ae,{children:["Apakah anda yakin ingin menghapus grup ini? ",e.jsx("br",{})," Pastikan anda telah mengunduh data yang telah diperlukan."]}),e.jsxs(se,{children:[e.jsx(g,{ref:c,onClick:o,children:"Tidak"}),e.jsx(g,{colorScheme:"red",ml:3,loadingText:"Menghapus",isLoading:u,onClick:m,children:"Hapus Grup"})]})]})]}),e.jsxs(l,{textAlign:"center",fontSize:{base:"xs",xs:"sm",md:"md"},children:[e.jsxs(f,{isLoaded:!h.isLoading,fadeDuration:1,children:[e.jsxs(k,{mt:{base:4,md:2},size:{base:"sm",md:"md"},children:[(S=h.data)==null?void 0:S.name," (",(L=h.data)==null?void 0:L.initial,")"]}),e.jsxs(r,{children:["Dibuat pada ",(R=h.data)==null?void 0:R.date]})]}),e.jsx(r,{mt:2,color:"gray.500",fontSize:"xs",children:"Data akan diperbarui otomatis setiap 60 detik"})]}),b.isLoading?e.jsx(Nn,{}):e.jsx(Rn,{client:b}),e.jsxs(z,{zIndex:10,position:"absolute",bottom:{base:24,xs:40},right:{base:5,xs:10},children:[x?e.jsx(gs,{data:x,separator:";",filename:`${h.data.name} ${h.data.initial}.csv`,children:e.jsx(de,{"aria-label":"Download table",size:{base:"md",md:"lg"},colorScheme:"teal",sx:{":hover":{color:"black",bg:"teal.300"}},icon:e.jsx(sa,{})})}):e.jsx(de,{isDisabled:!0,variant:"outline","aria-label":"Download table",size:{base:"md",md:"lg"},icon:e.jsx(sa,{})}),e.jsx(de,{"aria-label":"Delete group",size:{base:"md",md:"lg"},colorScheme:"red",sx:{":hover":{color:"black",bg:"red.300"}},icon:e.jsx(Qa,{}),onClick:i})]})]})}function Rn({client:a}){return e.jsx(Me,{mt:6,mb:2,minHeight:{base:"68vh",xs:"75vh",md:"58vh"},children:e.jsxs(Be,{size:"sm",children:[e.jsx(Fe,{children:e.jsxs(U,{children:[e.jsx(F,{textAlign:{md:"center"},children:"#"}),e.jsx(F,{textAlign:{md:"center"},children:"Nama"}),e.jsx(F,{textAlign:{md:"center"},children:"Skor Tes"}),e.jsx(F,{textAlign:{md:"center"},children:"Waktu"}),e.jsx(F,{textAlign:{md:"center"},children:"Status"}),e.jsx(F,{textAlign:{md:"center"},children:"Perangkat"})]})}),e.jsx(Pe,{children:a.data.map((s,n)=>e.jsxs(U,{children:[e.jsx(P,{textAlign:{md:"center"},children:n+1}),e.jsx(P,{textAlign:{md:"center"},children:s.name}),e.jsx(P,{textAlign:"center",children:s.totalErrorScore}),e.jsx(P,{textAlign:"center",children:s.time}),e.jsx(P,{textAlign:"center",children:s.status}),e.jsx(P,{textAlign:"center",children:s.device})]},s._id))})]})})}function On(){return e.jsxs(l,{pt:8,children:[e.jsx(k,{as:"h1",size:{base:"sm",sm:"md"},textAlign:"center",children:"Hal yang sering ditanyakan"}),e.jsxs(Ya,{allowToggle:!0,py:8,maxWidth:"3xl",margin:"0 auto",textAlign:"justify",fontSize:{base:"xs",xs:"sm",sm:"md"},children:[e.jsxs(ve,{children:[e.jsx("h2",{children:e.jsxs(ye,{_expanded:{bg:"teal",color:"white"},children:[e.jsx(l,{as:"span",flex:"1",textAlign:"left",fontWeight:"medium",fontSize:{base:"sm",sm:"md"},children:"Bagaimana cara mengerjakan tes di website ini?"}),e.jsx(we,{})]})}),e.jsx(Se,{pb:4,children:"Metode Farnsworth-Munsell merupakan metode tes buta warna, dimana cara pengerjaannya ialah dengan menyusun warna balok acak menjadi sebuah susunan warna yang urut dan teratur."})]}),e.jsxs(ve,{children:[e.jsx("h2",{children:e.jsxs(ye,{_expanded:{bg:"teal",color:"white"},children:[e.jsx(l,{as:"span",flex:"1",textAlign:"left",fontWeight:"medium",fontSize:{base:"sm",sm:"md"},children:"Berapa jenis metode yang digunakan?"}),e.jsx(we,{})]})}),e.jsxs(Se,{pb:4,children:[e.jsxs(r,{children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Semi-Standar Tes :"})," ","Metode Farnsworth-Munsell yang terdiri dari 88 warna dengan susunan 80 warna yang harus disusun sesuai urutan dari warna indikator di bagian awal dan akhir dari baris warna yang ada."]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Fun Tes :"})," ","Metode Farnsworth-Munsell yang terdiri dari 40 warna dengan susunan 32 warna yang harus disusun sesuai urutan dari warna indikator di bagian awal dan akhir dari baris warna yang ada."]})]})]}),e.jsxs(ve,{children:[e.jsx("h2",{children:e.jsxs(ye,{_expanded:{bg:"teal",color:"white"},children:[e.jsx(l,{as:"span",flex:"1",textAlign:"left",fontWeight:"medium",fontSize:{base:"sm",sm:"md"},children:"Peran apa saja yang dapat saya lakukan dalam website ini?"}),e.jsx(we,{})]})}),e.jsxs(Se,{pb:4,children:[e.jsxs(r,{children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Individu :"})," ","Pengguna dapat melakukan test secara pribadi melalui halaman tes dengan memilih Tes Individu. Pengguna cukup mengisikan data diri untuk mengerjakan tes, selain itu pengguna juga dapat melihat hasil tes pada halaman result."]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Admin Grup :"})," ","Pengguna dapat membuat sebuah grup khusus yang dapat digunakan dalam tes secara berkelompok. Dengan memilih Buat Grup, pengguna cukup memasukkan data untuk membuat grup tes. Setelah data terisi pengguna akan menerima email yang dapat digunakan untuk bergabung ke halaman dahshboard melalui menu Gabung Tes Pengguna akan bertugas sebagai admin dari grup yang dapat melihat data peserta tes, memberikan kode gabung grup kepada peserta tes, mengunduh data peserta tes, dan menghapus grup."]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Peserta Grup :"})," ","Pengguna sebagai peserta cukup memasukkan kode yang diberikan oleh admin grup pada menu Gabung Tes. Sebagai peserta tes langkah-langkah yang dilakukan sama dengan tes secara individu, yang membedakan ialah peserta grup tidak dapat melihat hasil dari tes dan harus menunggu hasil tes diumumkan oleh admin grup."]})]})]}),e.jsxs(ve,{children:[e.jsx("h2",{children:e.jsxs(ye,{_expanded:{bg:"teal",color:"white"},children:[e.jsx(l,{as:"span",flex:"1",textAlign:"left",fontWeight:"medium",fontSize:{base:"sm",sm:"md"},children:"Apa saja langkah-langkah yang dilakukan setiap peran dalam website ini?"}),e.jsx(we,{})]})}),e.jsxs(Se,{pb:4,children:[e.jsxs(r,{children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Individu :"})," ","Buka Website ",e.jsx(v,{})," Masuk Halaman Tes"," ",e.jsx(v,{})," Pilih Menu Tes Individu",e.jsx(v,{})," Masukan data diri ",e.jsx(v,{})," ","Kerjakan Tes ",e.jsx(v,{})," Kirim Hasil Tes"," ",e.jsx(v,{})," Lihat Hasil Tes."]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Admin Grup :"})," ",e.jsx("br",{}),e.jsxs(l,{mt:1,children:[e.jsx(r,{as:"span",fontStyle:"oblique",children:"Membuat Grup :"})," ","Buka Website ",e.jsx(v,{})," Masuk Halaman Tes"," ",e.jsx(v,{}),"Pilih Menu Tes Berjamaah ",e.jsx(v,{})," Masukan data grup"," ",e.jsx(v,{})," Cek kode yang dikirimkan ke email"," ",e.jsx(v,{})," Masukan kode ke kolom verifikasi"," ",e.jsx(v,{})," Masuk Dashboard Admin Grup"," ",e.jsx(v,{})," Bagikan Kode Client ke peserta tes grup anda."," "]}),e.jsxs(l,{mt:2,children:[e.jsx(r,{as:"span",fontStyle:"oblique",children:"Masuk Dashboard Admin :"})," ","Buka Website ",e.jsx(v,{})," Masuk Halaman Tes"," ",e.jsx(v,{})," Pilih Menu Gabung Tes",e.jsx(v,{})," Masukan kode admin ",e.jsx(v,{})," ","Masuk Dashboard Admin Grup."]})]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Peserta Grup :"})," ","Buka Website ",e.jsx(v,{})," Masuk Halaman Tes"," ",e.jsx(v,{})," Pilih Menu Gabung Tes ",e.jsx(v,{})," ","Masukan kode yang diberikan admin ",e.jsx(v,{})," Masukan data diri ",e.jsx(v,{})," Masukan data diri"," ",e.jsx(v,{}),"Kerjakan Tes ",e.jsx(v,{})," Kirim Hasil Tes."]})]})]})]})]})}function En(){const a=w.getJSON("id"),{data:s,error:n,isLoading:t,isError:i}=me({queryKey:["client",a],queryFn:async()=>await Ws(a),refetchOnWindowFocus:!1});if(i)return e.jsx(Ne,{error:n});const o={Bagus:{bgColor:"green.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna dalam melihat lebih baik dibandingkan rata-rata manusia pada umumnya"},Rerata:{bgColor:"yellow.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna termasuk normal seperti rata-rata manusia pada umumnya"},Low:{bgColor:"red.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna dalam melihat lebih buruk dibandingkan rata-rata manusia pada umumnya"}};let c=o.Rerata;return o[s==null?void 0:s.errorScoreStatus]&&(c=o[s==null?void 0:s.errorScoreStatus]),e.jsxs(l,{py:{base:8,xs:0,lg:4},fontSize:{base:"xs",xs:"sm",md:"md"},children:[e.jsx(k,{my:6,size:"lg",textAlign:"center",children:"Hasil Pengujian"}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{textAlign:"justify",children:["Berdasarkan proses pengujian buta warna pada laman"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:"WhatColors"})," ","yang telah dilakukan pada"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:s==null?void 0:s.date})," ","menggunakan Metode Farnsworth Munsell dengan jenis tes"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:s==null?void 0:s.type}),". Dengan rincian data sebagai berikut:"]})}),e.jsx(Ve,{my:{base:4,md:8},children:e.jsxs(z,{alignItems:"flex-start",children:[e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Nama : ",s==null?void 0:s.name]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Umur : ",s==null?void 0:s.age]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Perangkat : ",s==null?void 0:s.device]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Waktu Tes : ",s==null?void 0:s.time]})})]})}),e.jsxs(l,{position:"relative",my:6,children:[e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsx(ze,{borderBottomWidth:{base:"medium",md:"thick"},borderColor:`${c.bgColor}`})}),e.jsx(pa,{bg:"white",px:"6",fontWeight:"bold",fontSize:{base:"xs",xs:"md",md:"lg"},children:"Hasil"})]}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{textAlign:{base:"justify",sm:"center"},children:["Setelah melalui proses perhitungan yang cukup kompleks dan panjang, menghasilkan skor kesalahan sebesar ",e.jsx("b",{children:s==null?void 0:s.totalErrorScore}),". Sehingga dengan hasil skor tersebut menyatakan bahwa pengguna dianggap:"]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(k,{mt:4,textAlign:"center",size:{base:"md",md:"lg"},fontWeight:"bold",children:[s==null?void 0:s.status," Tes Buta Warna"]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsx(ze,{my:4,borderBottomWidth:{base:"medium",md:"thick"},borderColor:`${c.bgColor}`})})]})}function qn({data:a}){var i;const[s]=Vs(),[n]=We("(min-width: 550px)"),t=j.useMemo(()=>{s!==null&&Math.max(...s.result)},[s]);return j.useEffect(()=>{const o=s==null?void 0:s.number,c=s==null?void 0:s.result,u={type:"radar",data:{labels:o,datasets:[{label:"Nilai Diskriminasi",data:c,fill:!0,backgroundColor:"rgba(255, 99, 132, 0.2)",borderColor:"rgb(255, 99, 132)",pointBackgroundColor:"rgb(255, 99, 132)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgb(255, 99, 132)"}]},options:{elements:{line:{borderWidth:3}},scales:{r:{pointLabels:{color:"black"},suggestedMin:0,suggestedMax:t,ticks:{color:"blue",stepSize:2}}},spanGaps:!0,responsive:!0}};s&&n&&new Ta("radar-chart",u)},[s,t,n]),e.jsxs(l,{textAlign:"center",py:{lg:4},children:[e.jsx(k,{size:{base:"sm",sm:"md"},children:"Hasil Diskriminasi Warna:"}),e.jsx(r,{mt:2,fontSize:{base:"xs",xs:"sm",md:"md"},children:"*Hasil diskriminasi diambil dari seberapa jauh kesalahan peletakan warna hasil tes yang kamu lakukan dengan posisi aslinya."}),n?e.jsx(p,{mt:6,mb:2,mx:"auto",position:"relative",width:{sm:550,lg:750},justifyContent:"center",children:e.jsx("canvas",{id:"radar-chart"})}):e.jsx(Me,{my:4,children:e.jsxs(Be,{size:"sm",children:[e.jsx(Fe,{children:e.jsxs(U,{children:[e.jsx(F,{textAlign:"center",maxWidth:75,color:"teal",children:"Kode Warna"}),e.jsx(F,{textAlign:"center",color:"teal",children:"Nilai"})]})}),e.jsx(Pe,{children:(i=a==null?void 0:a.discriminantResult)==null?void 0:i.map(o=>e.jsxs(U,{children:[e.jsx(P,{textAlign:"center",maxWidth:75,children:o._id}),e.jsx(P,{textAlign:"center",children:o.discriminant})]},o._id))})]})})]})}function Hn({data:a}){var t;const[s]=Js(),[n]=We("(min-width: 550px)");return j.useEffect(()=>{let i=0,o=0;for(let h=0;h<(s==null?void 0:s.length);h++)s[h]==="Benar"?i++:o++;const m={type:"pie",data:{labels:["Benar","Salah"],datasets:[{label:"Jumlah Nilai",data:[i,o],backgroundColor:["rgb(54, 162, 235)","rgb(255, 99, 132)"],hoverOffset:4}]}};s&&n&&new Ta("pie-chart",m)},[s,n]),e.jsxs(l,{textAlign:"center",py:{lg:4},children:[e.jsx(k,{size:{base:"sm",sm:"md"},children:"Hasil Komparasi Warna:"}),e.jsx(r,{mt:2,fontSize:{base:"xs",xs:"sm",md:"md"},children:"*Hasil komparasi diambil dari hasil tes yang kamu lakukan kemudian dibandingkan dengan nilai asli."}),n?e.jsx(p,{mt:6,mb:2,mx:"auto",position:"relative",width:{sm:550,lg:750},justifyContent:"center",children:e.jsx("canvas",{id:"pie-chart"})}):e.jsx(Me,{my:4,children:e.jsxs(Be,{size:"sm",children:[e.jsx(Fe,{children:e.jsxs(U,{children:[e.jsx(F,{textAlign:"center",maxWidth:75,color:"teal",children:"Kode Warna"}),e.jsx(F,{textAlign:"center",color:"teal",children:"Nilai"})]})}),e.jsx(Pe,{children:(t=a==null?void 0:a.comparisonResult)==null?void 0:t.map(i=>e.jsxs(U,{children:[e.jsx(P,{textAlign:"center",maxWidth:75,children:i._id}),e.jsx(P,{textAlign:"center",children:i.comparison})]},i._id))})]})})]})}function Kn({data:a,isLoading:s}){const n={Bagus:{bgColor:"green.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna dalam melihat lebih baik dibandingkan rata-rata manusia pada umumnya"},Rerata:{bgColor:"yellow.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna termasuk normal seperti rata-rata manusia pada umumnya"},Low:{bgColor:"red.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna dalam melihat lebih buruk dibandingkan rata-rata manusia pada umumnya"}};let t=Oe.Normal;Oe[a==null?void 0:a.blindCheck]&&(t=Oe[a==null?void 0:a.blindCheck]);let i=n.Rerata;return n[a==null?void 0:a.errorScoreStatus]&&(i=n[a==null?void 0:a.errorScoreStatus]),e.jsxs(l,{py:{lg:4},fontSize:{base:"xs",xs:"sm",md:"md"},children:[e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{textAlign:"justify",children:["Berdasarkan proses pengujian buta warna pada laman"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:"WhatColors"})," ","yang telah dilakukan pada"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:a==null?void 0:a.date})," ","menggunakan Metode Farnsworth Munsell dengan jenis tes"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:a==null?void 0:a.type}),". Dengan rincian data sebagai berikut:"]})}),e.jsx(Ve,{my:{base:4,md:8},children:e.jsxs(z,{alignItems:"flex-start",children:[e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Nama : ",a==null?void 0:a.name]})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Umur : ",a==null?void 0:a.age]})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Perangkat : ",a==null?void 0:a.device]})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Waktu Tes : ",a==null?void 0:a.time]})})]})}),e.jsxs(l,{position:"relative",my:6,children:[e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsx(ze,{borderBottomWidth:{base:"medium",md:"thick"},borderColor:`${i.bgColor}`})}),e.jsx(pa,{bg:"white",px:"6",fontWeight:"bold",fontSize:{base:"xs",xs:"md",md:"lg"},children:"Hasil"})]}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{textAlign:{base:"justify",sm:"center"},children:["Setelah melalui proses perhitungan yang cukup kompleks dan panjang, menunjukkan bahwa pengguna:"," ",e.jsxs(r,{as:"span",fontWeight:"medium",children:[t," dengan jumlah skor diraih sebanyak"," ",a==null?void 0:a.totalErrorScore,"."]})]})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsx(r,{mt:4,textAlign:{base:"justify",sm:"center"},fontSize:{base:"xs",xs:"md",md:"lg"},fontWeight:"bold",children:i.footerText})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsx(ze,{mt:4,borderBottomWidth:{base:"medium",md:"thick"},borderColor:`${i.bgColor}`})})]})}function Gn(){const a=w.getJSON("id"),{data:s,error:n,isLoading:t,isError:i}=me({queryKey:["individual",a],queryFn:async()=>await Cs(a),refetchOnWindowFocus:!1});return i?e.jsx(Ne,{error:n}):e.jsxs(ja,{mt:{base:4,lg:8},isFitted:!0,variant:"enclosed",colorScheme:"orange",children:[e.jsxs(fa,{children:[e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Pernyataan"}),e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Komparasi"}),e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Diskriminan"})]}),e.jsxs(ka,{children:[e.jsx(re,{children:e.jsx(Kn,{data:s,isLoading:t})}),e.jsx(re,{children:e.jsx(Hn,{data:s})}),e.jsx(re,{children:e.jsx(qn,{data:s})})]})]})}function $n(){return w.getJSON("user").isClient?e.jsx(En,{}):e.jsx(Gn,{})}function Vn({data:a}){return a?e.jsx(ge,{templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:a.map(s=>e.jsx(pe,{children:e.jsxs(Je,{children:[e.jsxs(_e,{children:[e.jsxs(y,{justifyContent:"space-between",children:[e.jsx(k,{size:{base:"xs",xs:"sm"},children:s.name}),e.jsx(Ie,{colorScheme:"teal",size:"sm",children:s.blindCheck})]}),e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:s.date})]}),e.jsx(Ue,{pt:.5,children:e.jsxs(l,{children:[e.jsx(k,{size:"xs",textTransform:"uppercase",children:"Hasil"}),e.jsxs(z,{mt:2,alignItems:"flex-start",gap:0,children:[e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Skor Tes : ",e.jsx("b",{children:s.score})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Perkiraan Kesehatan Mata : ",e.jsx("b",{children:s.status})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Waktu Pengerjaan : ",e.jsx("b",{children:s.time})]})]})]})})]})},s.score))}):e.jsx(p,{minHeight:"50vh",justifyContent:"center",alignItems:"center",children:e.jsx(k,{color:"gray.300",size:"lg",textAlign:"center",children:"Masukan Data Yang Ingin Dicari"})})}function Jn({data:a}){return a?e.jsx(ge,{templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:a.map(s=>e.jsx(pe,{children:e.jsxs(Je,{children:[e.jsxs(_e,{children:[e.jsxs(y,{justifyContent:"space-between",children:[e.jsx(k,{size:{base:"xs",xs:"sm"},children:s.name}),e.jsx(Ie,{colorScheme:"teal",size:"sm",children:s.initial})]}),e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:s.date})]}),e.jsx(Ue,{pt:.5,children:e.jsxs(l,{children:[e.jsx(k,{size:"xs",textTransform:"uppercase",children:"Hasil"}),e.jsxs(z,{mt:2,alignItems:"flex-start",gap:0,children:[e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Skor Kesalahan Maksimal : ",e.jsx("b",{children:s.score})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Tipe Tes : ",e.jsx("b",{children:s.type})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Jumlah Peserta : ",e.jsx("b",{children:s.clients})]})]})]})})]})},s.score))}):e.jsx(p,{minHeight:"50vh",justifyContent:"center",alignItems:"center",children:e.jsx(k,{color:"gray.300",size:"lg",textAlign:"center",children:"Masukan Data Yang Ingin Dicari"})})}function _n({data:a}){return a?e.jsx(ge,{templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:a.map(s=>e.jsx(pe,{children:e.jsxs(Je,{children:[e.jsxs(_e,{children:[e.jsxs(y,{justifyContent:"space-between",children:[e.jsx(k,{size:{base:"xs",xs:"sm"},children:s.name}),e.jsx(Ie,{colorScheme:"teal",size:"sm",children:s.blindCheck})]}),e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:s.date})]}),e.jsx(Ue,{pt:.5,children:e.jsxs(l,{children:[e.jsx(k,{size:"xs",textTransform:"uppercase",children:"Hasil"}),e.jsxs(z,{mt:2,alignItems:"flex-start",gap:0,children:[e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Skor Tes : ",e.jsx("b",{children:s.score})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Perkiraan Kesehatan Mata : ",e.jsx("b",{children:s.status})]})]})]})})]})},s.score))}):e.jsx(p,{minHeight:"50vh",justifyContent:"center",alignItems:"center",children:e.jsx(k,{color:"gray.300",size:"lg",textAlign:"center",children:"Masukan Data Yang Ingin Dicari"})})}function Un(){const a=le(),{handleSubmit:s,register:n,formState:{errors:t}}=oe(),{mutateAsync:i,isLoading:o,data:c}=_({mutationFn:Is,onSuccess:()=>{a("Pencarian Berhasil","Data berhasil ditampilkan","success")},onError:u=>{a("Terjadi Kesalahan",`${u.response.data.message}`,"error")}}),d=u=>{i(u.name)};return e.jsxs(l,{mt:{base:4,lg:8},children:[e.jsx("form",{onSubmit:s(d),children:e.jsxs(y,{gap:15,justifyContent:"center",alignItems:"center",children:[e.jsx(D,{maxWidth:"400px",children:e.jsx(G,{id:"name",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukan Data Yang Ingin Dicari",...n("name")})}),e.jsx(I,{children:t.name&&t.name.message}),e.jsx(g,{type:"submit",isLoading:o,children:"Cari"})]})}),e.jsxs(ja,{mt:{base:4,lg:8},isFitted:!0,variant:"line",colorScheme:"orange",children:[e.jsxs(fa,{children:[e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Individu"}),e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Peserta"}),e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Grup Tes"})]}),e.jsxs(ka,{children:[e.jsx(re,{children:e.jsx(_n,{data:c==null?void 0:c.individual})}),e.jsx(re,{children:e.jsx(Vn,{data:c==null?void 0:c.client})}),e.jsx(re,{children:e.jsx(Jn,{data:c==null?void 0:c.room})})]})]})]})}const Qn=new Ca;function Yn(){const[a]=We("(max-width: 401px)");return e.jsxs(e.Fragment,{children:[e.jsx(Za,{zIndex:20,children:"Skip to content"}),a?e.jsx(ws,{}):e.jsx(fs,{}),e.jsxs(l,{as:"main",width:"full",minHeight:{base:"100dvh",xs:"76vh",sm:"74vh",md:"77vh","2xl":"80vh"},children:[e.jsx(Xa,{}),e.jsx(X,{maxW:"container.xl",px:5,children:e.jsx(bs,{client:Qn,children:e.jsxs(xs,{children:[e.jsx(V,{path:"/",element:e.jsx(pn,{})}),e.jsx(V,{path:"/faq",element:e.jsx(On,{})}),e.jsx(V,{path:"/about",element:e.jsx(Bn,{})}),e.jsx(V,{path:"/article",element:e.jsx(Pn,{})}),e.jsx(V,{path:"/test",element:e.jsx(wn,{})}),e.jsx(V,{path:"/result",element:e.jsx($n,{})}),e.jsx(V,{path:"/admin",element:e.jsx(Ln,{})}),e.jsx(V,{path:"/search",element:e.jsx(Un,{})}),e.jsx(V,{path:"/verify-admin",element:e.jsx(Qs,{})})]})})})]}),a?e.jsx(vs,{}):e.jsx(ks,{})]})}const Zn={base:"0em",xs:"25em",sm:"37em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xn=es({breakpoints:Zn});Pa.createRoot(document.getElementById("root")).render(e.jsx(hs,{basename:"/WhatColors",children:e.jsx(as,{theme:Xn,children:e.jsx(Yn,{})})})); diff --git a/assets/index-23a0280b.js b/assets/index-23a0280b.js deleted file mode 100644 index 24e67ea..0000000 --- a/assets/index-23a0280b.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,r as j}from"./react-b9a76881.js";import{c as Pa}from"./react-dom-2d279051.js";import{u as Z,M as Na,a as La,H as Ra,I as de,b as Oa,c as ke,d as oa,Q as la,e as y,L as Y,B as l,C as X,F as p,f as ca,S as Ea,T as r,g,V as z,h as J,i as qa,j as k,k as D,P as ua,l as K,m as A,n as I,o as M,p as Ha,q as da,r as Ae,s as te,t as he,v as ee,w as ie,x as ae,y as W,z as G,N as qe,A as He,D as Ke,E as Ge,G as $e,R as ma,J as De,K as ha,O as se,U as N,W as Re,X as T,Y as O,Z as We,_ as Ve,$ as xa,a0 as ba,a1 as Ka,a2 as xe,a3 as be,a4 as Ga,a5 as ga,a6 as $a,a7 as Va,a8 as Ja,a9 as ge,aa as pe,ab as f,ac as _a,ad as Ie,ae as Ua,af as Me,ag as Be,ah as Fe,ai as U,aj as F,ak as Pe,al as P,am as sa,an as Qa,ao as Ya,ap as ve,aq as ye,ar as we,as as Se,at as v,au as ze,av as pa,aw as ja,ax as fa,ay as ne,az as ka,aA as re,aB as Je,aC as _e,aD as Ue,aE as Za,aF as Xa,aG as es,aH as as}from"./@chakra-ui-07a237fe.js";import{F as va,a as ya,b as E,c as ss,d as ns,e as rs,f as ts,g as is,G as os,h as ls,i as cs,I as us,j as ds,k as ms}from"./react-icons-7d08912d.js";import{L as B,B as hs}from"./react-router-dom-5e639d43.js";import{b as wa,a as Q,d as xs,e as V}from"./react-router-32579614.js";import{a as q}from"./axios-9b9683dd.js";import{u as oe,C as Sa}from"./react-hook-form-5df7240b.js";import{u as _,Q as Ca,a as me,b as bs}from"./@tanstack-7cce00f9.js";import{d as Ee}from"./react-sortablejs-b5d8f939.js";import{m as je,i as fe}from"./framer-motion-4b9df51f.js";import{C as gs}from"./react-csv-a9333d5d.js";import{C as Ta}from"./chart.js-29015108.js";import"./classnames-6bc0a478.js";import"./scheduler-765c72db.js";import"./lodash.mergewith-cd59880b.js";import"./@emotion-0dace5e7.js";import"./hoist-non-react-statics-23d96a9a.js";import"./react-is-e8e5dbb3.js";import"./@babel-d7b299da.js";import"./stylis-79144faa.js";import"./color2k-69f3754e.js";import"./@popperjs-f3391c26.js";import"./react-focus-lock-ad754ae7.js";import"./focus-lock-b0fcf19c.js";import"./use-sidecar-3680f465.js";import"./tslib-89fde298.js";import"./use-callback-ref-51cbf00e.js";import"./react-clientside-effect-3352e0a9.js";import"./react-remove-scroll-b4638411.js";import"./react-remove-scroll-bar-6162c280.js";import"./react-style-singleton-cc97d4ca.js";import"./get-nonce-1ea010b7.js";import"./aria-hidden-606e0ff2.js";import"./@zag-js-8d968404.js";import"./react-fast-compare-1cd47ecc.js";import"./@remix-run-d753ad9e.js";import"./use-sync-external-store-bc8ad6b0.js";import"./sortablejs-17a40271.js";import"./prop-types-387d7a00.js";import"./@kurkle-b1b89bbc.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))t(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&t(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function t(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function ps(){const{isOpen:a,onOpen:s,onClose:n}=Z(),i=wa().pathname;return e.jsxs(e.Fragment,{children:[e.jsxs(Na,{isLazy:!0,children:[e.jsx(La,{colorScheme:"teal",size:"md",icon:e.jsx(Ra,{}),display:{sm:"none"},onClick:a?n:s,as:de,"aria-label":"Options",variant:"solid"}),e.jsxs(Oa,{children:[e.jsx(ke,{as:B,to:"/","aria-current":i==="/"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},icon:e.jsx(va,{}),children:"Beranda"}),e.jsx(ke,{as:B,to:"/about","aria-current":i==="/about"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},icon:e.jsx(oa,{}),children:"Tentang"}),e.jsx(ke,{as:B,to:"/article","aria-current":i==="/article"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},icon:e.jsx(ya,{}),children:"Artikel"}),e.jsx(ke,{as:B,to:"/faq","aria-current":i==="/faq"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},icon:e.jsx(la,{}),children:"FAQ"})]})]}),e.jsxs(y,{direction:"row",display:{base:"none",sm:"flex"},spacing:{sm:8,lg:16},children:[e.jsx(Y,{as:B,to:"/","aria-current":i==="/"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},fontWeight:"semibold",transition:"all 0.2s",_hover:{color:"gray.500"},children:"Beranda"}),e.jsx(Y,{as:B,to:"/about","aria-current":i==="/about"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},fontWeight:"semibold",transition:"all 0.2s",_hover:{color:"gray.500"},children:"Tentang"}),e.jsx(Y,{as:B,to:"/article","aria-current":i==="/article"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},fontWeight:"semibold",transition:"all 0.2s",_hover:{color:"gray.500"},children:"Artikel"}),e.jsx(Y,{as:B,to:"/faq","aria-current":i==="/faq"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},fontWeight:"semibold",transition:"all 0.2s",_hover:{color:"gray.500"},children:"FAQ"})]})]})}const js="/WhatColors/assets/desktop-logo-b8708d8e.svg";function fs(){return e.jsx(l,{bg:"white",as:"header",boxShadow:"sm",zIndex:11,top:0,left:0,right:0,position:"sticky",width:"full",children:e.jsx(X,{maxW:"container.xl",p:{xs:3,sm:5},children:e.jsxs(p,{minWidth:"max-content",alignItems:"center",gap:"2",children:[e.jsx(ca,{src:js,alt:"WhatColors Website Logo",width:{base:"42px",xs:"150px",md:"auto"}}),e.jsx(Ea,{}),e.jsx(ps,{})]})})})}function ks(){const a=new Date().getFullYear();return e.jsx(l,{as:"footer",display:"block",width:"full",children:e.jsx(l,{width:"full",bg:"teal",color:"white",pt:6,pb:8,children:e.jsxs(r,{align:"center",fontSize:"smaller",children:["© ",a,e.jsx("br",{}),"Created by Ijan"]})})})}function vs(){const s=wa().pathname;return e.jsx(l,{bg:"white",bottom:0,left:0,right:0,as:"footer",position:"sticky",boxShadow:"0px 0px 2px 0px rgba(0, 0, 0, 0.2)",zIndex:11,width:"full",children:e.jsxs(y,{px:4,py:2,gap:"5",justifyContent:"center",children:[e.jsx(g,{as:B,to:"/",variant:"ghost","aria-label":"Home button","aria-current":s==="/"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},children:e.jsxs(z,{gap:1,children:[e.jsx(J,{fontSize:"lg",as:va}),e.jsx(r,{fontSize:"xs",children:"Beranda"})]})}),e.jsx(g,{as:B,to:"/about",variant:"ghost","aria-label":"About button","aria-current":s==="/about"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},children:e.jsxs(z,{gap:1,children:[e.jsx(J,{fontSize:"lg",as:oa}),e.jsx(r,{fontSize:"xs",children:"Tentang"})]})}),e.jsx(g,{as:B,to:"/article",variant:"ghost","aria-label":"Article button","aria-current":s==="/article"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},children:e.jsxs(z,{gap:1,children:[e.jsx(J,{fontSize:"lg",as:ya}),e.jsx(r,{fontSize:"xs",children:"Artikel"})]})}),e.jsx(g,{as:B,to:"/faq",variant:"ghost","aria-label":"FAQ button","aria-current":s==="/faq"?"page":void 0,sx:{"&[aria-current=page]":{color:"teal"}},children:e.jsxs(z,{gap:1,children:[e.jsx(J,{fontSize:"lg",as:la}),e.jsx(r,{fontSize:"xs",children:"FAQ"})]})})]})})}const ys="/WhatColors/assets/mobile-logo-e21809fd.svg";function ws(){return e.jsx(l,{bg:"white",as:"header",boxShadow:"sm",zIndex:11,top:0,left:0,right:0,position:"sticky",width:"full",children:e.jsx(X,{maxW:"container.xl",p:3,children:e.jsx(p,{alignItems:"center",justifyContent:"center",children:e.jsx(ca,{src:ys,alt:"WhatColors Website Logo",width:"52px"})})})})}const H="https://zulham.ahlitani.com/v1",Ss=async a=>q.post(`${H}/user/new`,a,{timeout:9e4,headers:{"Content-Type":"application/json"}}).then(s=>{const{id:n}=s.data;return n}).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Pengiriman Data Terlalu Lama",status:408}},n}else return s}),Cs=async a=>q.get(`${H}/user/${a}/detail`,{timeout:9e4}).then(s=>s.data).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},n}else return s.response}),Ts=async a=>q.post(`${H}/group/new`,a,{headers:{"Content-Type":"application/json"}}).then(s=>{const{id:n}=s.data;return n}),Da=async a=>q.post(`${H}/group/${a}/code`).then(s=>{const{message:n}=s.data;return n}),za=async a=>q.post(`${H}/group/${a}/verify`).then(s=>s.data),Aa=async a=>q.get(`${H}/group/${a}/data`,{timeout:9e4}).then(s=>s.data).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},n}else return s.response}),Ds=async a=>q.delete(`${H}/group/${a}/delete`).then(s=>s.data),zs=async a=>q.get(`${H}/group/${a}/clients`,{timeout:9e4}).then(s=>s.data).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},n}else return s.response}),As=async({id:a,clientData:s})=>q.post(`${H}/client/${a}/new`,s,{headers:{"Content-Type":"application/json"}}).then(n=>{const{id:t}=n.data;return t}),Ws=async a=>q.get(`${H}/client/${a}/data`,{timeout:9e4}).then(s=>s.data).catch(s=>{if(s.code==="ECONNABORTED"&&s.message.indexOf("timeout")!==-1){const n=new Error("Request Timeout");throw n.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},n}else return s.response}),Is=async a=>q.post(`${H}/search?name=${a}`).then(s=>s.data),Ms=async()=>q.get(`${H}/article/data`,{timeout:9e4}).then(a=>a.data).catch(a=>{if(a.code==="ECONNABORTED"&&a.message.indexOf("timeout")!==-1){const s=new Error("Request Timeout");throw s.response={data:{message:"Proses Penarikan Data Terlalu Lama",status:408}},s}else return a.response}),Bs=[{row:"row1",value:[{number:1,status:"first",color:"#b37673"},{number:2,status:"removable",color:"#b2766f"},{number:3,status:"removable",color:"#b1746a"},{number:4,status:"removable",color:"#b17466"},{number:5,status:"removable",color:"#b07464"},{number:6,status:"removable",color:"#ae725f"},{number:7,status:"removable",color:"#aa725b"},{number:8,status:"removable",color:"#a8745a"},{number:9,status:"removable",color:"#a87456"},{number:10,status:"removable",color:"#a87452"},{number:11,status:"removable",color:"#a97650"},{number:12,status:"removable",color:"#a8794e"},{number:13,status:"removable",color:"#a77c4e"},{number:14,status:"removable",color:"#a97e4c"},{number:15,status:"removable",color:"#a57e46"},{number:16,status:"removable",color:"#a78244"},{number:17,status:"removable",color:"#a48546"},{number:18,status:"removable",color:"#a28946"},{number:19,status:"removable",color:"#9f8b46"},{number:20,status:"removable",color:"#9d8e48"},{number:21,status:"removable",color:"#9b8f49"},{number:22,status:"removable",color:"#97914b"},{number:23,status:"removable",color:"#91924d"},{number:24,status:"last",color:"#8d9352"}]},{row:"row2",value:[{number:24,status:"first",color:"#91924d"},{number:25,status:"removable",color:"#8d9352"},{number:26,status:"removable",color:"#899557"},{number:27,status:"removable",color:"#86955c"},{number:28,status:"removable",color:"#84975f"},{number:29,status:"removable",color:"#7e9760"},{number:30,status:"removable",color:"#7d9666"},{number:31,status:"removable",color:"#7c9567"},{number:32,status:"removable",color:"#7a986b"},{number:33,status:"removable",color:"#73966b"},{number:34,status:"removable",color:"#70996d"},{number:35,status:"removable",color:"#699a71"},{number:36,status:"removable",color:"#679a74"},{number:37,status:"removable",color:"#649a76"},{number:38,status:"removable",color:"#619778"},{number:39,status:"removable",color:"#5b947a"},{number:40,status:"removable",color:"#5a957f"},{number:41,status:"removable",color:"#589480"},{number:42,status:"removable",color:"#559584"},{number:43,status:"removable",color:"#529687"},{number:44,status:"removable",color:"#519688"},{number:45,status:"removable",color:"#4e9689"},{number:46,status:"last",color:"#4c968e"}]},{row:"row3",value:[{number:46,status:"first",color:"#4e9689"},{number:47,status:"removable",color:"#4c968e"},{number:48,status:"removable",color:"#4c9691"},{number:49,status:"removable",color:"#4a9794"},{number:50,status:"removable",color:"#4a9696"},{number:51,status:"removable",color:"#4b9596"},{number:52,status:"removable",color:"#4a9698"},{number:53,status:"removable",color:"#50969c"},{number:54,status:"removable",color:"#52949f"},{number:55,status:"removable",color:"#5393a1"},{number:56,status:"removable",color:"#5494a3"},{number:57,status:"removable",color:"#5a92a4"},{number:58,status:"removable",color:"#6090a5"},{number:59,status:"removable",color:"#6690a5"},{number:60,status:"removable",color:"#688fa7"},{number:61,status:"removable",color:"#6b8ca6"},{number:62,status:"removable",color:"#6c8aa6"},{number:63,status:"removable",color:"#6f89a6"},{number:64,status:"removable",color:"#7489a7"},{number:65,status:"removable",color:"#7686a6"},{number:66,status:"removable",color:"#7b84a3"},{number:67,status:"removable",color:"#8084a3"},{number:68,status:"last",color:"#8484a3"}]},{row:"row4",value:[{number:68,status:"first",color:"#8084a3"},{number:69,status:"removable",color:"#8484a3"},{number:70,status:"removable",color:"#8a86a6"},{number:71,status:"removable",color:"#8d85a3"},{number:72,status:"removable",color:"#9185a3"},{number:73,status:"removable",color:"#9483a0"},{number:74,status:"removable",color:"#97839f"},{number:75,status:"removable",color:"#99819d"},{number:76,status:"removable",color:"#9d809b"},{number:77,status:"removable",color:"#9f7f98"},{number:78,status:"removable",color:"#a37d94"},{number:79,status:"removable",color:"#a57c92"},{number:80,status:"removable",color:"#a67a8e"},{number:81,status:"removable",color:"#a9798b"},{number:82,status:"removable",color:"#ab7788"},{number:83,status:"removable",color:"#ae7787"},{number:84,status:"removable",color:"#b07683"},{number:85,status:"removable",color:"#b1757f"},{number:86,status:"removable",color:"#b3747c"},{number:87,status:"removable",color:"#b3757a"},{number:88,status:"removable",color:"#b37576"},{number:89,status:"removable",color:"#b37673"},{number:90,status:"last",color:"#b2766f"}]}],Fs=[{row:"row1",value:[{number:1,status:"first",color:"#b2766f"},{number:2,status:"removable",color:"#b1746a"},{number:3,status:"removable",color:"#b17466"},{number:4,status:"removable",color:"#b07464"},{number:5,status:"removable",color:"#ae725f"},{number:6,status:"removable",color:"#aa725b"},{number:7,status:"removable",color:"#a8745a"},{number:8,status:"removable",color:"#a87456"},{number:9,status:"removable",color:"#a87452"},{number:10,status:"removable",color:"#a97650"},{number:11,status:"removable",color:"#a8794e"},{number:12,status:"removable",color:"#a77c4e"},{number:13,status:"removable",color:"#a97e4c"},{number:14,status:"removable",color:"#a57e46"},{number:15,status:"removable",color:"#a78244"},{number:16,status:"removable",color:"#a48546"},{number:17,status:"removable",color:"#a28946"},{number:18,status:"removable",color:"#9f8b46"},{number:19,status:"removable",color:"#9d8e48"},{number:20,status:"removable",color:"#9b8f49"},{number:21,status:"removable",color:"#97914b"},{number:22,status:"last",color:"#91924d"}]},{row:"row2",value:[{number:22,status:"first",color:"#91924d"},{number:23,status:"removable",color:"#8d9352"},{number:24,status:"removable",color:"#899557"},{number:25,status:"removable",color:"#86955c"},{number:26,status:"removable",color:"#84975f"},{number:27,status:"removable",color:"#7e9760"},{number:28,status:"removable",color:"#7d9666"},{number:29,status:"removable",color:"#7c9567"},{number:30,status:"removable",color:"#7a986b"},{number:31,status:"removable",color:"#73966b"},{number:32,status:"removable",color:"#70996d"},{number:33,status:"removable",color:"#699a71"},{number:34,status:"removable",color:"#679a74"},{number:35,status:"removable",color:"#649a76"},{number:36,status:"removable",color:"#619778"},{number:37,status:"removable",color:"#5b947a"},{number:38,status:"removable",color:"#5a957f"},{number:39,status:"removable",color:"#589480"},{number:40,status:"removable",color:"#559584"},{number:41,status:"removable",color:"#529687"},{number:42,status:"removable",color:"#519688"},{number:43,status:"last",color:"#4e9689"}]},{row:"row3",value:[{number:43,status:"first",color:"#4e9689"},{number:44,status:"removable",color:"#4c968e"},{number:45,status:"removable",color:"#4c9691"},{number:46,status:"removable",color:"#4a9794"},{number:47,status:"removable",color:"#4a9696"},{number:48,status:"removable",color:"#4b9596"},{number:49,status:"removable",color:"#4a9698"},{number:50,status:"removable",color:"#50969c"},{number:51,status:"removable",color:"#52949f"},{number:52,status:"removable",color:"#5393a1"},{number:53,status:"removable",color:"#5494a3"},{number:54,status:"removable",color:"#5a92a4"},{number:55,status:"removable",color:"#6090a5"},{number:56,status:"removable",color:"#6690a5"},{number:57,status:"removable",color:"#688fa7"},{number:58,status:"removable",color:"#6b8ca6"},{number:59,status:"removable",color:"#6c8aa6"},{number:60,status:"removable",color:"#6f89a6"},{number:61,status:"removable",color:"#7489a7"},{number:62,status:"removable",color:"#7686a6"},{number:63,status:"removable",color:"#7b84a3"},{number:64,status:"last",color:"#8084a3"}]},{row:"row4",value:[{number:64,status:"first",color:"#8084a3"},{number:65,status:"removable",color:"#8484a3"},{number:66,status:"removable",color:"#8a86a6"},{number:67,status:"removable",color:"#8d85a3"},{number:68,status:"removable",color:"#9185a3"},{number:69,status:"removable",color:"#9483a0"},{number:70,status:"removable",color:"#97839f"},{number:71,status:"removable",color:"#99819d"},{number:72,status:"removable",color:"#9d809b"},{number:73,status:"removable",color:"#9f7f98"},{number:74,status:"removable",color:"#a37d94"},{number:75,status:"removable",color:"#a57c92"},{number:76,status:"removable",color:"#a67a8e"},{number:77,status:"removable",color:"#a9798b"},{number:78,status:"removable",color:"#ab7788"},{number:79,status:"removable",color:"#ae7787"},{number:80,status:"removable",color:"#b07683"},{number:81,status:"removable",color:"#b1757f"},{number:82,status:"removable",color:"#b3747c"},{number:83,status:"removable",color:"#b3757a"},{number:84,status:"removable",color:"#b37576"},{number:85,status:"last",color:"#b37673"}]}],Ps=[{row:"row1",value:[{number:1,status:"first",color:"#b2766f"},{number:2,status:"removable",color:"#b17466"},{number:3,status:"removable",color:"#ae725f"},{number:4,status:"removable",color:"#a8745a"},{number:5,status:"removable",color:"#a87452"},{number:6,status:"removable",color:"#a8794e"},{number:7,status:"removable",color:"#a97e4c"},{number:8,status:"removable",color:"#a78244"},{number:9,status:"removable",color:"#a28946"},{number:10,status:"last",color:"#9d8e48"}]},{row:"row2",value:[{number:11,status:"first",color:"#97914b"},{number:12,status:"removable",color:"#8d9352"},{number:13,status:"removable",color:"#86955c"},{number:14,status:"removable",color:"#7e9760"},{number:15,status:"removable",color:"#7c9567"},{number:16,status:"removable",color:"#699a71"},{number:17,status:"removable",color:"#649a76"},{number:18,status:"removable",color:"#5b947a"},{number:19,status:"removable",color:"#589480"},{number:20,status:"last",color:"#529687"}]},{row:"row3",value:[{number:21,status:"first",color:"#4e9689"},{number:22,status:"removable",color:"#4c9691"},{number:23,status:"removable",color:"#4a9696"},{number:24,status:"removable",color:"#4a9698"},{number:25,status:"removable",color:"#52949f"},{number:26,status:"removable",color:"#6090a5"},{number:27,status:"removable",color:"#688fa7"},{number:28,status:"removable",color:"#6c8aa6"},{number:29,status:"removable",color:"#7489a7"},{number:30,status:"last",color:"#7b84a3"}]},{row:"row4",value:[{number:31,status:"first",color:"#8484a3"},{number:32,status:"removable",color:"#8d85a3"},{number:33,status:"removable",color:"#9483a0"},{number:34,status:"removable",color:"#99819d"},{number:35,status:"removable",color:"#9f7f98"},{number:36,status:"removable",color:"#a9798b"},{number:37,status:"removable",color:"#ae7787"},{number:38,status:"removable",color:"#b1757f"},{number:39,status:"removable",color:"#b3757a"},{number:40,status:"last",color:"#b37673"}]}],Qe=[{type:"Mudah (32 Warna)",value:Ps},{type:"Menengah (80 Warna)",value:Fs},{type:"Sulit (85 Warna)",value:Bs}],Ns={type100:{blue:{min:46,max:52},green:{min:56,max:61},red:{min:62,max:70}},type85:{blue:{min:46,max:51},green:{min:56,max:60},red:{min:63,max:69}}},Ls={blue:"Tritan",green:"Deutan",red:"Protan"},Oe={Normal:"Memiliki kemampuan penglihatan normal terhadap warna merah, biru, hijau dan kombinasi ketiga warna tersebut",Protan:"Kemungkinan memiliki gangguan dalam melihat warna merah dan kombinasi yang mengandung warna tersebut",Deutan:"Kemungkinan memiliki gangguan dalam melihat warna hijau dan kombinasi yang mengandung warna tersebut",Tritan:"Kemungkinan memiliki gangguan dalam melihat warna biru dan kombinasi yang mengandung warna tersebut"},Wa=a=>Qe.find(t=>t.type===a).value,Rs=a=>{let s=a.length;for(;s!==0;){let n=Math.floor(Math.random()*s);s-=1;let t=a[s];a[s]=a[n],a[n]=t}return a},Os=a=>a==null?void 0:a.map(n=>({row:n.row,value:[n.first,...n.value,n.last]})),Es=a=>sessionStorage.getItem(a),qs=a=>JSON.parse(Es(a)),Hs=(a,s)=>sessionStorage.setItem(a,s),Ks=(a,s)=>Hs(a,JSON.stringify(s)),w={getJSON:qs,setJSON:Ks},Gs=()=>{const[a,s]=j.useState(null);return j.useEffect(()=>{const n=w.getJSON("user");s(n)},[]),[a]},$s=a=>{const[s,n]=j.useState(null);return j.useEffect(()=>{const t=a==null?void 0:a.value.map(i=>{const o=i.value,c=o.filter(b=>b.status==="removable"),d=o[0],u=Rs(c),m=o[o.length-1],h=[...u];return{row:i.row,value:h,first:d,last:m}});n(t)},[a]),[s]},Vs=()=>{const[a,s]=j.useState(null);return j.useEffect(()=>{const n=w.getJSON("discriminant");s(n)},[]),[a]},Js=()=>{const[a,s]=j.useState(null);return j.useEffect(()=>{const n=w.getJSON("comparison");s(n)},[]),[a]},le=()=>{const a=qa();return(s,n,t)=>a({title:s,description:n,status:t,isClosable:!0,containerStyle:{padding:"15px 20px"}})},_s=()=>{const[a,s]=j.useState(0);return j.useEffect(()=>{if(a<=0)return;const t=setTimeout(()=>{s(a-1)},1e3);return()=>clearTimeout(t)},[a]),{countDown:a,start:t=>{s(t)}}},Us=a=>{const[s,n]=j.useState(null);return j.useEffect(()=>{if(a&&a.length){const t=Array(a[0].comparisonResult.length).fill(null).map((u,m)=>`C${m+1}`),i=Array(a[0].discriminantResult.length).fill(null).map((u,m)=>`D${m+1}`),o=["Tanggal","Nama","Usia","Jumlah Nilai Kesalahan","Waktu Pengerjaan","Status","Perangkat",...t,...i],c=a==null?void 0:a.map(u=>{const m=u.date,h=u.name,b=u.age,x=u.totalErrorScore,S=u.time,L=u.status,R=u.device,$=u==null?void 0:u.comparisonResult.map(ue=>ue.comparison),ce=u==null?void 0:u.discriminantResult.map(ue=>ue.discriminant);return[m,h,b,x,S,L,R,...$,...ce]}),d=[o,...c];n(d)}},[a]),[s]};function Qs(){const a=Q(),s=le(),{countDown:n,start:t}=_s(),i=w.getJSON("id"),o=_({mutationFn:Da,onSuccess:x=>{s("Email Berhasil Dikirim",`${x}`,"info")},onError:x=>{s("Terjadi Kesalahan",`${x.response.data.message}`,"error")}}),c=_({mutationFn:za,onSuccess:x=>{x.admin?a("/admin"):s("Kode Verifikasi Salah","Silahkan Masukan Kode Yang Benar","warning")},onError:x=>{s("Terjadi Kesalahan",`${x.response.data.message}`,"error")}}),{handleSubmit:d,control:u,formState:{errors:m}}=oe({defaultValues:{code:""}}),h=()=>{t(60),o.mutateAsync(i)},b=x=>{c.mutateAsync(x.code)};return e.jsxs(p,{minHeight:"60vh",my:10,flexDirection:"column",justifyContent:"space-around",alignItems:"center",children:[e.jsx(k,{size:"md",children:"Verifikasikan Diri Anda"}),e.jsx("form",{onSubmit:d(b),children:e.jsxs(z,{py:10,px:6,children:[e.jsxs(D,{isRequired:!0,isInvalid:m.code,children:[e.jsx(y,{children:e.jsx(Sa,{control:u,name:"code",render:({field:{onChange:x}})=>e.jsxs(ua,{type:"alphanumeric",mask:!0,onChange:S=>x(S),children:[e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{})]})})}),e.jsx(A,{textAlign:"center",fontSize:"small",children:"Harap masukkan kode yang sesuai"}),e.jsx(I,{children:m.code})]}),e.jsx(g,{colorScheme:"teal",mt:4,loadingText:"Verifikasi Kode",isLoading:c.isLoading,type:"submit",children:"Verifikasi"})]})}),n>0?e.jsxs(r,{fontSize:"small",as:"span",color:"gray.400",fontWeight:"medium",children:["Kirim Ulang Kode Dalam ",n]}):e.jsx(g,{fontSize:"small",color:"facebook.300",variant:"outline",onClick:h,children:"Kirim Ulang Kode"})]})}const Ys="/WhatColors/assets/colourblind-fb07166b.webp";function Zs(){return e.jsxs(M,{as:"section",gap:4,direction:{base:"column",md:"row"},children:[e.jsx(p,{p:"0 1.5rem 1.5remm 1.5rem",flex:1,align:"center",justify:"center",children:e.jsxs(M,{spacing:6,w:"full",children:[e.jsxs(k,{as:"h1",fontSize:{base:"3xl",md:"4xl",lg:"5xl"},children:[e.jsx(r,{as:"span",position:"relative",_after:{content:"''",width:"full",height:Ha({base:"20%",md:"30%"}),position:"absolute",bottom:1,left:0,bg:"teal.400",zIndex:-1},children:"WhatColors"}),e.jsx("br",{})," ",e.jsx(r,{color:"teal.400",as:"span",children:"Tes Buta Warna"})," "]}),e.jsx(r,{fontSize:{base:"md",lg:"lg"},color:"gray.500",children:"Lakukan tes uji coba berbasis internet secara gratis dan dapat digunakan secara berkelompok. Apakah sudah siap untuk mencoba?"}),e.jsxs(M,{direction:"row",justifyContent:{base:"center",md:"flex-start"},spacing:4,children:[e.jsx(g,{sx:{"@media screen and (max-width: 48em)":{flex:1}},rounded:"full",bg:"teal.400",color:"white",_hover:{bg:"teal.500"},as:"a",href:"#tes",children:"Lakukan Tes"}),e.jsx(g,{sx:{"@media screen and (max-width: 48em)":{flex:1}},rounded:"full",_hover:{color:"white",bg:"gray.500"},as:B,to:"/search",children:"Cari Data Tes"})]})]})}),e.jsx(p,{flex:1,children:e.jsxs(p,{flexDirection:"column",alignItems:"center",children:[e.jsx(da,{alt:"Hero Image",objectFit:"cover",src:Ys,borderRadius:{base:"2xl",md:"none"}}),e.jsxs(r,{fontSize:"x-small",children:["Photo by"," ",e.jsx("a",{href:"https://www.plainpicture.com/en/search?credit=plainpicture%2FBjanka+Kadic",children:"Bjanka Kadic"})," ","on"," ",e.jsx("a",{href:"https://www.plainpicture.com/en/images/1356202",children:"plainpicture"})]})]})})]})}function Xs({isOpen:a,onClose:s}){const n=Q(),{handleSubmit:t,register:i,watch:o,setValue:c,reset:d,formState:{errors:u}}=oe({defaultValues:{fullName:"",gender:"",device:"",testType:"Mudah (32 Warna)",value:{},isClient:!1}}),m=o("testType");j.useEffect(()=>{c("value",Wa(m))},[c,m]);const h=S=>{w.setJSON("user",S),n("/test")},b=()=>{d()},x=()=>{d(),s()};return e.jsxs(Ae,{size:{base:"xs",sm:"md",md:"2xl"},closeOnOverlayClick:!1,isOpen:a,onClose:s,scrollBehavior:"inside",isCentered:!0,children:[e.jsx(te,{}),e.jsx("form",{onSubmit:t(h),children:e.jsxs(he,{children:[e.jsx(ee,{children:"Buat Tes Individu"}),e.jsx(ie,{}),e.jsxs(ae,{pb:6,children:[e.jsxs(D,{isRequired:!0,isInvalid:u.fullName,children:[e.jsx(W,{htmlFor:"fullname",children:"Nama Anda"}),e.jsx(G,{id:"fullname",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Nama Lengkap",...i("fullName",{required:"Wajib Diisi",minLength:{value:4,message:"Min. 4 Huruf"}})}),e.jsx(A,{fontSize:"small",children:"Tuliskan Nama Lengkap Anda"}),e.jsx(I,{children:u.fullName&&u.fullName.message})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:u.age,children:[e.jsx(W,{htmlFor:"age",children:"Umur Anda"}),e.jsxs(qe,{id:"age",focusBorderColor:"teal.400",max:50,min:10,children:[e.jsx(He,{autoComplete:"off",placeholder:"Masukkan Umur Anda",...i("age",{required:"Wajib Diisi"})}),e.jsxs(Ke,{children:[e.jsx(Ge,{}),e.jsx($e,{})]})]}),e.jsx(A,{fontSize:"small",children:"Rentang usia 10 sampai 50 tahun"}),e.jsx(I,{children:u.age})]}),e.jsxs(D,{isRequired:!0,isInvalid:u.gender,children:[e.jsx(W,{htmlFor:"gender",children:"Jenis Kelamin"}),e.jsx(ma,{id:"gender",children:e.jsxs(y,{height:10,justifyContent:"space-around",spacing:"24px",children:[e.jsx(De,{value:"Pria",...i("gender",{required:"Wajib Diisi"}),children:"Pria"}),e.jsx(De,{value:"Wanita",...i("gender",{required:"Wajib Diisi"}),children:"Wanita"})]})}),e.jsx(A,{textAlign:"center",fontSize:"small",children:"Hanya ada 2 jenis kelamin"}),e.jsx(I,{children:u.gender})]})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:u.device,children:[e.jsx(W,{htmlFor:"device",children:"Perangkat yang digunakan"}),e.jsx(G,{id:"device",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Tipe Monitor/Gawai",...i("device",{required:"Wajib Diisi"})}),e.jsx(A,{fontSize:"small",children:"Tuliskan merk atau tipe monitor atau gawai"}),e.jsx(I,{children:u.device})]}),e.jsxs(D,{isRequired:!0,isInvalid:u.testType,children:[e.jsx(W,{htmlFor:"type",children:"Tingkat Kesulitan"}),e.jsx(ha,{id:"type",...i("testType",{required:"Wajib Diisi"}),placeholder:"Pilih Tingkat Kesulitan",children:Qe.map(S=>e.jsx("option",{value:S.type,children:S.type},S.type))}),e.jsx(A,{fontSize:"small",children:"Pilih tingkat kesulitan sesuai kemampuan"}),e.jsx(I,{children:u.testType})]})]})]}),e.jsxs(se,{children:[e.jsx(g,{colorScheme:"teal",mr:3,type:"submit",children:"Buat Tes"}),e.jsx(g,{mr:3,onClick:b,children:"Hapus Data"}),e.jsx(g,{colorScheme:"red",onClick:x,children:"Batal"})]})]})})]})}const Ia=new Date().toLocaleDateString("id-ID",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),na=()=>w.getJSON("inisial"),en=()=>w.getJSON("score"),an=(a,s)=>{const n=s&&na()!==null?`${na()} ${a==null?void 0:a.fullName}`:a==null?void 0:a.fullName,t=a==null?void 0:a.age,i=a==null?void 0:a.gender,o=a==null?void 0:a.device,c=a==null?void 0:a.testType;return{date:Ia,name:n,age:t,gender:i,device:o,type:c}},sn=a=>{let s;return a<=16?s="Bagus":a>=16&&a<=100?s="Rerata":s="Lemah",s},nn=(a,s)=>{const n=a==null?void 0:a.map((o,c)=>{const d=[],u=s[c];for(let m=0;m{const n=a==null?void 0:a.map((c,d)=>{const u=[],m=s[d];for(let h=0;h=L?x-L:L-x;u.push(R)}return u}),t=n==null?void 0:n.flat(1),i=[];for(let c=0;c<(t==null?void 0:t.length);c++)i.push(c+1);const o=[];for(let c=0;c<(t==null?void 0:t.length);c++)o.push({_id:`D${i[c]}`,discriminant:t[c]});return t==null||t.reverse(),i.reverse(),{number:i,result:t,value:o}},tn=a=>{const s=a==null?void 0:a.map(i=>{const o=[];for(let d=0;dd+u,0)}}),n=s==null?void 0:s.map(i=>i.result);return n==null?void 0:n.reduce((i,o)=>i+o,0)},on=(a,s)=>{const n=Ns[a],t={};Object.keys(n).forEach(d=>{const u=n[d];let m=0;for(let h=u.min;h<=u.max;h++)s[h]||m++;t[d]=m});let i=0,o;for(let d in t)t[d]>i&&(i=t[d],o=d);return Ls[o]},ln=(a,s)=>{let n;if(a==="Menengah (80 Warna)")n="type85";else if(a==="Sulit (85 Warna)")n="type100";else return null;return on(n,s)},cn=(a,s,n,t)=>{const i=nn(a,s),o=rn(a,s),c=tn(a),d=ln(n.type,i.result),u=d||"Normal",m=sn(c),h=c<=en()?"Lolos":"Tidak Lolos",b=i.value,x=o.value;return w.setJSON("discriminant",o),w.setJSON("comparison",i.result),t?{...n,totalErrorScore:c,errorScoreStatus:m,blindCheck:u,comparisonResult:b,discriminantResult:x,status:h}:{...n,totalErrorScore:c,errorScoreStatus:m,blindCheck:u,comparisonResult:b,discriminantResult:x}};function un({isOpen:a,onClose:s}){const n=Q(),t=le(),i=_({mutationFn:Da,onSuccess:x=>{t("Email Berhasil Dikirim",`${x}`,"info")},onError:x=>{t("Terjadi Kesalahan",`${x.response.data.message}`,"error")}}),o=_({mutationFn:Ts,onSuccess:x=>{w.setJSON("id",x),i.mutateAsync(x),n("/verify-admin"),t("Grup Berhasil Dibuat","Masukan Kode Verifikasi","success")},onError:x=>{t("Terjadi Kesalahan",`${x.response.data.message}`,"error")}}),{handleSubmit:c,register:d,reset:u,formState:{errors:m}}=oe({defaultValues:{groupName:"",groupInitial:"",email:"",type:"Mudah (32 Warna)",device:""}}),h=x=>{const S=parseInt(x.maxScore),L={...x,maxScore:S,date:Ia};o.mutateAsync(L)},b=()=>{u()};return e.jsxs(Ae,{size:{base:"xs",sm:"md",md:"2xl"},closeOnOverlayClick:!1,isOpen:a,onClose:s,scrollBehavior:"inside",isCentered:!0,children:[e.jsx(te,{}),e.jsx("form",{onSubmit:c(h),children:e.jsxs(he,{children:[e.jsx(ee,{children:"Buat Grup Tes"}),e.jsx(ie,{}),e.jsxs(ae,{pb:6,children:[e.jsxs(p,{direction:{base:"column",sm:"row"},gap:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:m.groupName,children:[e.jsx(W,{htmlFor:"roomName",children:"Nama Grup"}),e.jsx(G,{id:"roomName",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Nama Grup",...d("groupName",{required:"Wajib Diisi",minLength:{value:4,message:"Masukkan Minimal 4 Suku Kata"},maxLength:{value:20,message:"Masukkan Maksimal 20 Suku Kata"}})}),e.jsx(A,{fontSize:"small",children:"Masukkan Nama Grup"}),e.jsx(I,{children:m.groupName&&m.groupName.message})]}),e.jsxs(D,{isRequired:!0,isInvalid:m.groupInitial,width:{base:"auto",sm:"12em"},children:[e.jsx(W,{htmlFor:"roomInitial",children:"Inisial Grup"}),e.jsx(G,{id:"roomInitial",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Inisial Grup",...d("groupInitial",{required:"Wajib Diisi",maxLength:{value:5,message:"Maks. 5 Huruf"}})}),e.jsx(A,{fontSize:"small",children:"Beri Inisial Grup"}),e.jsx(I,{children:m.groupInitial&&m.groupInitial.message})]})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:4,children:[e.jsxs(D,{isRequired:!0,isInvalid:m.email,children:[e.jsx(W,{htmlFor:"adminEmail",children:"Email Admin"}),e.jsx(G,{id:"adminEmail",type:"email",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Email Admin",...d("email",{required:"Wajib Diisi"})}),e.jsx(A,{fontSize:"small",children:"Masukkan Email Admin Grup"}),e.jsx(I,{children:m.email})]}),e.jsxs(D,{children:[e.jsx(W,{htmlFor:"device",children:"Perangkat Yang Digunakan"}),e.jsx(G,{id:"device",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Tipe Monitor/Gawai",...d("device")}),e.jsx(A,{fontSize:"small",children:"Tuliskan merk atau tipe monitor atau gawai"})]})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:4,children:[e.jsxs(D,{isRequired:!0,isInvalid:m.type,children:[e.jsx(W,{htmlFor:"type",children:"Tingkat Kesulitan"}),e.jsx(ha,{id:"type",...d("type",{required:"Wajib Diisi"}),placeholder:"Pilih Tingkat Kesulitan",children:Qe.map(x=>e.jsx("option",{value:x.type,children:x.type},x.type))}),e.jsx(A,{fontSize:"small",children:"Pilih tingkat kesulitan sesuai kemampuan"}),e.jsx(I,{children:m.type})]}),e.jsxs(D,{isRequired:!0,isInvalid:m.maxScore,children:[e.jsx(W,{htmlFor:"maxTest",children:"Skor Error Maksimal"}),e.jsxs(qe,{allowMouseWheel:!0,id:"maxTest",focusBorderColor:"teal.400",max:100,min:0,...d("maxScore",{required:"Wajib Diisi"}),children:[e.jsx(He,{autoComplete:"off",placeholder:"Masukkan Nilai Terendah"}),e.jsxs(Ke,{children:[e.jsx(Ge,{}),e.jsx($e,{})]})]}),e.jsx(A,{fontSize:"small",children:"Rentang nilai terendah 0 - 100"}),e.jsx(I,{children:m.maxScore})]})]})]}),e.jsxs(se,{children:[e.jsx(g,{colorScheme:"teal",mr:3,loadingText:"Proses",isLoading:o.isLoading,type:"submit",children:"Buat Grup"}),e.jsx(g,{mr:3,onClick:b,children:"Hapus Data"}),e.jsx(g,{colorScheme:"red",onClick:s,children:"Batal"})]})]})})]})}function dn({setPage:a,onClose:s}){const n=Q(),{handleSubmit:t,register:i,setValue:o,reset:c,formState:{errors:d}}=oe({defaultValues:{fullName:"",gender:"",device:"",testType:"",value:{},isClient:!0}});j.useEffect(()=>{const b=w.getJSON("id");Aa(b).then(x=>{w.setJSON("inisial",x.initial),w.setJSON("score",x.max),o("device",x.device),o("testType",x.type),o("value",Wa(x.type))})},[o]);const u=b=>{w.setJSON("user",b),n("/test")},m=()=>{c()},h=()=>{a(!1),c(),s()};return e.jsx("form",{onSubmit:t(u),children:e.jsxs(he,{children:[e.jsx(ee,{children:"Gabung Tes Grup"}),e.jsx(ie,{}),e.jsxs(ae,{pb:6,children:[e.jsxs(D,{isRequired:!0,isInvalid:d.fullName,children:[e.jsx(W,{htmlFor:"fullname",children:"Nama Anda"}),e.jsx(G,{id:"fullname",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Nama Lengkap",...i("fullName",{required:"Wajib Diisi",minLength:{value:4,message:"Min. 4 Huruf"}})}),e.jsx(A,{fontSize:"small",children:"Tuliskan Nama Lengkap Anda"}),e.jsx(I,{children:d.fullName&&d.fullName.message})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:d.age,children:[e.jsx(W,{htmlFor:"age",children:"Umur Anda"}),e.jsxs(qe,{id:"age",focusBorderColor:"teal.400",max:50,min:10,children:[e.jsx(He,{autoComplete:"off",placeholder:"Masukkan Umur Anda",...i("age",{required:"Wajib Diisi"})}),e.jsxs(Ke,{children:[e.jsx(Ge,{}),e.jsx($e,{})]})]}),e.jsx(A,{fontSize:"small",children:"Rentang usia 10 sampai 50 tahun"}),e.jsx(I,{children:d.age})]}),e.jsxs(D,{isRequired:!0,isInvalid:d.gender,children:[e.jsx(W,{htmlFor:"gender",children:"Jenis Kelamin"}),e.jsx(ma,{id:"gender",children:e.jsxs(y,{height:10,justifyContent:"space-around",spacing:"24px",children:[e.jsx(De,{value:"Pria",...i("gender",{required:"Wajib Diisi"}),children:"Pria"}),e.jsx(De,{value:"Wanita",...i("gender",{required:"Wajib Diisi"}),children:"Wanita"})]})}),e.jsx(A,{textAlign:"center",fontSize:"small",children:"Hanya ada 2 jenis kelamin"}),e.jsx(I,{children:d.gender})]})]}),e.jsxs(p,{direction:{base:"column",md:"row"},gap:5,mt:5,children:[e.jsxs(D,{isRequired:!0,isInvalid:d.device,children:[e.jsx(W,{htmlFor:"device",children:"Perangkat"}),e.jsx(G,{id:"device",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukkan Tipe Monitor/Gawai",...i("device",{required:"Wajib Diisi"})}),e.jsx(A,{fontSize:"small",children:"Tuliskan merk atau tipe monitor atau gawai"}),e.jsx(I,{children:d.device})]}),e.jsxs(D,{isReadOnly:!0,isRequired:!0,isInvalid:d.testType,children:[e.jsx(W,{htmlFor:"type",children:"Tingkat Kesulitan"}),e.jsx(G,{id:"type",autoComplete:"off",focusBorderColor:"teal.400",...i("testType",{required:"Wajib Diisi"})})]})]})]}),e.jsxs(se,{children:[e.jsx(g,{colorScheme:"teal",mr:3,type:"submit",children:"Buat Tes"}),e.jsx(g,{mr:3,onClick:m,children:"Hapus Data"}),e.jsx(g,{colorScheme:"red",onClick:h,children:"Batal"})]})]})})}function mn({setPage:a,onClose:s}){const n=Q(),t=le(),{mutateAsync:i,isLoading:o}=_({mutationFn:za,onSuccess:h=>{const b=h.admin;w.setJSON("id",h.id),b?n("/admin"):a(!0)},onError:h=>{t("Terjadi Kesalahan",`${h.response.data.message}`,"error")}}),{handleSubmit:c,control:d,formState:{errors:u}}=oe({defaultValues:{code:""}}),m=h=>{i(h.code)};return e.jsx("form",{onSubmit:c(m),children:e.jsxs(he,{children:[e.jsx(ee,{children:"Bergabung Grup"}),e.jsx(ie,{}),e.jsx(ae,{pb:6,margin:"0 auto",children:e.jsxs(D,{isRequired:!0,isInvalid:u.code,children:[e.jsx(W,{children:"Masukkan Kode"}),e.jsx(y,{children:e.jsx(Sa,{control:d,name:"code",render:({field:{onChange:h}})=>e.jsxs(ua,{type:"alphanumeric",mask:!0,onChange:b=>h(b),children:[e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{}),e.jsx(K,{})]})})}),e.jsx(A,{fontSize:"small",children:"Harap masukkan kode yang sesuai"}),e.jsx(I,{children:u.code})]})}),e.jsxs(se,{children:[e.jsx(g,{colorScheme:"teal",mr:3,type:"submit",loadingText:"Memverifikasi",isLoading:o,children:"Verifikasi"}),e.jsx(g,{onClick:s,children:"Batal"})]})]})})}function hn({isOpen:a,onClose:s}){const[n,t]=j.useState(!1);return e.jsxs(Ae,{size:{base:"xs",sm:"md",md:"2xl"},closeOnOverlayClick:!1,isOpen:a,onClose:s,isCentered:!0,children:[e.jsx(te,{}),n?e.jsx(dn,{setPage:t,onClose:s}):e.jsx(mn,{setPage:t,onClose:s})]})}function xn(){const a=Z(),s=Z(),n=Z();return e.jsxs(l,{as:"section",pt:16,id:"tes",children:[e.jsxs(z,{spacing:2,textAlign:"center",children:[e.jsx(k,{as:"h1",fontSize:{base:"2xl",sm:"4xl"},children:"Pilih Menu Tes"}),e.jsx(r,{fontSize:{base:"md",lg:"lg"},color:"gray.500",children:"Mencoba Tes Sendiri. Buat Grup Tes. Bergabung ke Grup Tes. Semua dalam satu website."})]}),e.jsxs(M,{direction:{base:"column",md:"row"},textAlign:"center",justify:"center",spacing:{base:4,lg:10},py:10,children:[e.jsxs(l,{mb:4,shadow:"base",borderWidth:"1px",alignSelf:"center",borderColor:N("gray.200","gray.500"),borderRadius:"xl",maxWidth:"297px",children:[e.jsx(l,{py:4,px:12,children:e.jsx(r,{fontWeight:"500",fontSize:{base:"xl",sm:"2xl"},children:"Tes Individu"})}),e.jsxs(z,{bg:N("gray.50","gray.700"),py:4,borderBottomRadius:"xl",children:[e.jsxs(Re,{spacing:3,textAlign:"start",px:12,children:[e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Memilih Jenis Tes yang Diinginkan"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengetahui Hasil Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengunduh Hasil Tes"})]})})]}),e.jsx(l,{w:"80%",pt:7,children:e.jsx(g,{onClick:a.onOpen,w:"full",colorScheme:"orange",variant:"outline",children:"Buat Tes"})})]})]}),e.jsx(l,{mb:4,shadow:"base",borderWidth:"1px",alignSelf:"center",borderColor:N("gray.200","gray.500"),borderRadius:"xl",maxWidth:"297px",children:e.jsxs(l,{position:"relative",children:[e.jsx(l,{position:"absolute",top:"-16px",left:"50%",style:{transform:"translate(-50%)"},children:e.jsx(r,{textTransform:"uppercase",bg:N("orange.300","orange.700"),px:3,py:1,color:N("gray.900","gray.300"),fontSize:{base:"xs",lg:"sm"},fontWeight:"600",rounded:"xl",children:"Khusus Admin"})}),e.jsx(l,{py:4,px:12,children:e.jsx(r,{fontWeight:"500",fontSize:{base:"xl",sm:"2xl"},children:"Buat Grup Tes"})}),e.jsxs(z,{bg:N("gray.50","gray.700"),py:4,borderBottomRadius:"xl",children:[e.jsxs(Re,{spacing:3,textAlign:"start",px:12,children:[e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Manajemen Dasbor Grup Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Menentukan Jenis Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Menerima Email Kode"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Membagikan Kode Verifikasi Grup"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengunduh Data Dasbor"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Menghapus Grup Tes"})]})})]}),e.jsx(l,{w:"80%",pt:7,children:e.jsx(g,{onClick:s.onOpen,w:"full",colorScheme:"orange",children:"Buat Grup"})})]})]})}),e.jsxs(l,{mb:4,shadow:"base",borderWidth:"1px",alignSelf:"center",borderColor:N("gray.200","gray.500"),borderRadius:"xl",maxWidth:"297px",children:[e.jsx(l,{py:4,px:12,children:e.jsx(r,{fontWeight:"500",fontSize:{base:"xl",sm:"2xl"},children:"Gabung Tes"})}),e.jsxs(z,{bg:N("gray.50","gray.700"),py:4,borderBottomRadius:"xl",children:[e.jsxs(Re,{spacing:3,textAlign:"start",px:12,children:[e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Bergabung dengan Grup Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengerjakan Tes"})]})}),e.jsx(T,{children:e.jsxs(y,{alignItems:"flex-start",children:[e.jsx(O,{as:E,color:"gray.600",mt:1.5}),e.jsx(r,{fontSize:{base:"sm",sm:"md"},children:"Mengetahui Hasil Tes"})]})})]}),e.jsx(l,{w:"80%",pt:7,children:e.jsx(g,{onClick:n.onOpen,w:"full",colorScheme:"orange",variant:"outline",children:"Gabung Tes"})})]})]})]}),e.jsx(Xs,{isOpen:a.isOpen,onClose:a.onClose}),e.jsx(un,{isOpen:s.isOpen,onClose:s.onClose}),e.jsx(hn,{isOpen:n.isOpen,onClose:n.onClose})]})}function bn(){return e.jsxs(l,{as:"section",pb:12,children:[e.jsxs(M,{spacing:4,as:X,maxW:"3xl",textAlign:"center",children:[e.jsx(k,{fontSize:{base:"2xl",sm:"4xl"},fontWeight:"bold",children:"Apa itu WhatColors?"}),e.jsx(r,{color:"gray.600",fontSize:{base:"sm",sm:"lg"},children:"Simulasi Tes Buta Warna dengan Metode Farnsworth Munsell yang kompleks dengan sejumlah fitur yang membantu pengguna dalam menggunakan website"})]}),e.jsx(X,{px:0,maxW:"5xl",mt:12,children:e.jsx(p,{flexWrap:"wrap",gridGap:6,justify:"center",children:gn.map(a=>e.jsx(l,{maxW:{base:"full",md:"275px"},w:"full",borderWidth:"1px",borderRadius:"lg",overflow:"hidden",p:5,children:e.jsxs(M,{align:"start",spacing:2,children:[e.jsx(p,{w:16,h:16,align:"center",justify:"center",color:"white",rounded:"full",bg:"gray.100",children:e.jsx(J,{as:a.icon,w:10,h:10})}),e.jsxs(l,{mt:2,children:[e.jsx(k,{size:"md",children:"Responsif"}),e.jsx(r,{mt:1,fontSize:"sm",children:a.desc})]}),e.jsx(g,{as:B,to:"/about",variant:"link",colorScheme:"orange",size:"sm",children:"Selengkapnya"})]})},a.num))})})]})}const gn=[{num:1,icon:ss,desc:"Dapat berjalan diberbagai jenis perangkat"},{num:2,icon:ns,desc:"Mengetahui semua informasi hasil tes."},{num:3,icon:rs,desc:"Ketahui hasil melalui visual yang sesuai"},{num:4,icon:ts,desc:"Meminimalisir terjadinya kecurangan dalam tes."},{num:5,icon:is,desc:"Menggunakan Metode Farnsworth-Munsell untuk menghitung hasil"}];function pn(){const[a]=We("(max-width: 401px)");return e.jsxs(l,{mt:{base:4,sm:2,md:0},children:[e.jsx(Zs,{}),e.jsx(xn,{}),e.jsx(bn,{}),a?e.jsxs(r,{pb:4,fontSize:12,textAlign:"center",color:"gray",children:["Created by Zulham 👋 ",e.jsx("br",{})," © 2023"]}):""]})}function jn({user:a}){return e.jsx(l,{as:"section",margin:4,fontSize:{base:"xs",xs:"sm",md:"md"},children:e.jsxs(p,{direction:{base:"column",md:"row"},children:[e.jsxs(p,{flex:1,children:[e.jsxs(z,{alignItems:"flex-start",children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Nama"}),e.jsx(r,{as:"span",fontWeight:"bold",children:"Umur"}),e.jsx(r,{as:"span",fontWeight:"bold",children:"Jenis Kelamin"})]}),e.jsxs(z,{ml:2,alignItems:"flex-start",children:[e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.name]})," "]}),e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.age]})," "]}),e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.gender]})," "]})]})]}),e.jsxs(p,{flex:1,mt:{base:2,md:"auto"},children:[e.jsxs(z,{alignItems:"flex-start",children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Perangkat Tes"}),e.jsx(r,{as:"span",fontWeight:"bold",children:"Jenis Tes"}),e.jsx(r,{as:"span",fontWeight:"bold",children:"Tanggal"})]}),e.jsxs(z,{ml:1.5,alignItems:"flex-start",children:[e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.device]})," "]}),e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.type]})," "]}),e.jsxs(l,{children:[e.jsxs(r,{children:[": ",a.date]})," "]})]})]})]})})}function fn({handle:a,data:s,testDone:n}){return n?e.jsx(Ee.ReactSortable,{className:"row-box",group:{name:"valueByRow",put:!1},disabled:!0,animation:200,ghostClass:"ghostbox",list:s.value,setList:t=>a(s.row,t),children:s.value.map(t=>e.jsx(l,{backgroundColor:t.color,margin:"4px 1px",border:"1px solid #252525",cursor:"pointer",width:10,height:10},t.color))}):e.jsx(Ee.ReactSortable,{className:"row-box",group:{name:"valueByRow",put:!1},animation:200,ghostClass:"ghostbox",list:s.value,setList:t=>a(s.row,t),children:s.value.map(t=>e.jsx(l,{backgroundColor:t.color,margin:"4px 1px",border:"1px solid #252525",cursor:"pointer",width:10,height:10},t.color))})}const kn=new Ca,vn=12,ra=a=>[a.getMinutes(),a.getSeconds()].map(s=>`0${s}`.slice(-2)).join(":");function yn({test:a,user:s,init:n,isClient:t}){const i=Q(),o=le(),c=w.getJSON("id"),[d,u]=j.useState(null),[m,h]=j.useState(new Date(0)),[b,x]=j.useState(!1),[S,L]=j.useState({}),R=j.useRef(null),$=`${ra(m)}`,ce=Os(d),Ye=(C,Ba)=>{const Fa=a.map(Le=>(Le.row===C&&(Le.value=Ba),Le));u(Fa)},ue=j.useCallback(()=>{clearTimeout(R.current),R.current=null},[]),Ze=j.useCallback(()=>{if(m.getMinutes()>=vn){aa();return}h(C=>new Date(C.getTime()+1e3))},[m,h]);j.useEffect(()=>(R.current=setTimeout(Ze,1e3),()=>clearTimeout(R.current)),[m,Ze]);const Xe=_({mutationFn:Ss,onSuccess:C=>{w.setJSON("id",C),i("/result"),o("Data Berhasil Ditambahkan","Berikut hasil perhitungan data yang telah ditambahkan","success")},onError:C=>{h(new Date(0)),x(!1),o("Terjadi Kesalahan",`${C.response.data.message}`,"error")}}),ea=_({mutationFn:As,onSuccess:C=>{kn.invalidateQueries({queryKey:["clients"],exact:!0}),w.setJSON("id",C),i("/result"),o("Data Berhasil Ditambahkan","Berikut hasil perhitungan data yang telah ditambahkan","success")},onError:C=>{h(new Date(0)),x(!1),o("Terjadi Kesalahan",`${C.response.data.message}`,"error")}}),aa=()=>{x(!0),ue();const C=cn(ce,n,s,t);L({...C,time:$})},Ma=()=>{t?ea.mutateAsync({id:c,clientData:S}):Xe.mutateAsync(S)};return e.jsxs(l,{pt:5,children:[e.jsx(r,{textAlign:"center",fontWeight:"medium",mb:6,fontSize:"xl",children:ra(m)}),a==null?void 0:a.map(C=>e.jsxs(p,{flexWrap:"wrap",flexDirection:"row",margin:"8px auto",width:{xl:"5xl"},children:[e.jsx(l,{flex:1,display:"flex",justifyContent:"flex-start",margin:"4px 8px 4px 1px",children:e.jsx(l,{backgroundColor:C.first.color,width:10,height:10,children:e.jsx(r,{textAlign:"center",fontSize:"small",fontWeight:"bold",color:"white",children:"Awal"})},C.first)}),e.jsx(fn,{handle:Ye,data:C,testDone:b}),e.jsx(l,{flex:1,display:"flex",justifyContent:"flex-end",margin:"4px 1px 4px 8px",children:e.jsx(l,{backgroundColor:C.last.color,width:10,height:10,children:e.jsx(r,{textAlign:"center",fontSize:"small",fontWeight:"bold",color:"white",children:"Akhir"})},C.last)})]},C.row)),e.jsx(Ve,{mt:8,children:b?e.jsx(g,{size:{base:"sm",sm:"md"},colorScheme:"teal",onClick:Ma,loadingText:"Mengirim Hasil",isLoading:Xe.isLoading||ea.isLoading,children:"Kirim Data"}):e.jsx(g,{size:{base:"sm",sm:"md"},colorScheme:"teal",onClick:aa,children:"Selesai"})})]})}function wn(){const a=Q(),{isOpen:s,onOpen:n,onClose:t}=Z(),i=j.useRef(),[o]=Gs(),[c]=$s(o),d=o==null?void 0:o.isClient,u=an(o,d),m=o==null?void 0:o.value,h=()=>{a("/")};return e.jsxs(l,{my:6,children:[e.jsxs(xa,{motionPreset:"slideInBottom",leastDestructiveRef:i,onClose:t,isOpen:s,isCentered:!0,children:[e.jsx(te,{}),e.jsxs(ba,{children:[e.jsx(ee,{children:"Batalkan Tes"}),e.jsx(ie,{}),e.jsx(ae,{children:"Apakah anda yakin ingin membatalkan tes ini?"}),e.jsxs(se,{children:[e.jsx(g,{ref:i,onClick:t,children:"Tidak"}),e.jsx(g,{colorScheme:"red",ml:3,onClick:h,children:"Keluar"})]})]})]}),e.jsxs(y,{mb:8,children:[e.jsxs(k,{as:"h6",fontSize:"lg",textAlign:"center",flex:1,children:["Pengerjaan Tes Buta Warna ",e.jsx("br",{})," Metode Farnsworth-Munsell"]}),e.jsx(de,{size:"sm",colorScheme:"red",icon:e.jsx(Ka,{}),onClick:n})]}),e.jsx(jn,{user:u}),e.jsx(yn,{test:c,user:u,init:m,isClient:d})]})}const ta=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)});function Sn(){return e.jsxs(M,{py:{base:5,sm:16,md:20},px:8,spacing:{base:8,md:10},align:"center",direction:"column",children:[e.jsx(ta,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:-50,opacity:0},onscreen:{y:0,opacity:1,transition:{ease:"easeInOut",duration:.5}}},children:e.jsx(r,{fontSize:{base:"lg",sm:"xl",md:"2xl"},textAlign:"center",maxW:"3xl",children:'"The score for a cap is the sum of the differences between the number of that cap and the numbers of the caps adjacent to it"'})}),e.jsx(l,{textAlign:"center",children:e.jsxs(ta,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:50,opacity:0},onscreen:{y:0,opacity:1,transition:{ease:"easeInOut",duration:.5}}},children:[e.jsx(Ga,{name:"Dean Farnsworth",mb:2}),e.jsx(r,{fontWeight:600,children:"Dean Farnsworth - 1957"}),e.jsx(r,{fontSize:"sm",color:N("gray.400","gray.400"),children:"Penemu Metode Farnsworth Munsell"})]})})]})}const Cn=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)});function Tn(){return e.jsx(M,{as:l,textAlign:"center",pb:10,children:e.jsxs(Cn,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:100,scale:0,opacity:0},onscreen:{y:0,scale:1,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:[e.jsx(r,{fontWeight:600,fontSize:"xl",pb:2,children:"Reach Me"}),e.jsxs(y,{spacing:8,justifyContent:"center",children:[e.jsx(Y,{href:"https://github.com/Z4nR",isExternal:!0,children:e.jsx(os,{size:20})}),e.jsx(Y,{href:"https://www.linkedin.com/in/zulham-ari-nur-ridhwan",isExternal:!0,children:e.jsx(ls,{size:20})}),e.jsx(Y,{href:"https://github.com/Z4nR",isExternal:!0,children:e.jsx(cs,{size:20})})]})]})})}const ia=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)});function Dn(){return e.jsx(l,{py:{base:5,xs:8,sm:16},children:e.jsxs(ga,{columns:{base:1,xl:2},spacing:10,children:[e.jsx(ia,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{type:"spring",bounce:.4,duration:1}}},children:e.jsxs(M,{spacing:4,children:[e.jsx(r,{textTransform:"uppercase",color:"blue.400",fontWeight:600,fontSize:"sm",bg:N("blue.50","blue.900"),p:2,alignSelf:"flex-start",rounded:"md",children:"Responsif"}),e.jsx(k,{fontSize:{base:"2xl",sm:"4xl"},children:"Gunakan semua perangkat"}),e.jsx(r,{textAlign:"justify",color:"gray.500",fontSize:{base:"sm",sm:"md",md:"lg"},children:"Website ini mendukung simulasi dengan menggunakan berbagai perangkat, baik menggunakan alat bantu maupun dengan tangan secara langsung. Anda dapat menggunakan berbagai jenis ukuran perangkat yang anda punya."}),e.jsxs(M,{spacing:4,divider:e.jsx($a,{borderColor:N("gray.100","gray.700")}),children:[e.jsxs(M,{direction:"row",align:"center",children:[e.jsx(p,{w:8,h:8,align:"center",justify:"center",rounded:"full",bg:N("yellow.100","yellow.900"),children:e.jsx(J,{as:us,color:"yellow.500",w:5,h:5})}),e.jsx(r,{fontSize:{base:"xs",xs:"md"},fontWeight:600,children:"Laptop / Notebook / Komputer"})]}),e.jsxs(M,{direction:"row",align:"center",children:[e.jsx(p,{w:8,h:8,align:"center",justify:"center",rounded:"full",bg:N("purple.100","purple.900"),children:e.jsx(J,{as:ds,color:"purple.500",w:5,h:5})}),e.jsx(r,{fontSize:{base:"xs",xs:"md"},fontWeight:600,children:"Tablet ( Landscape / Potrait )"})]}),e.jsxs(M,{direction:"row",align:"center",children:[e.jsx(p,{w:8,h:8,align:"center",justify:"center",rounded:"full",bg:N("green.100","green.900"),children:e.jsx(J,{as:ms,color:"green.500",w:5,h:5})}),e.jsx(r,{fontSize:{base:"xs",xs:"md"},fontWeight:600,children:"Smartphone ( Landscape / Potrait )"})]})]})]})}),e.jsx(ia,{initial:"offscreen",whileInView:"onscreen",viewport:{once:!0},variants:{offscreen:{y:100,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsxs(p,{flexDirection:"column",alignItems:"center",children:[e.jsx(da,{rounded:"md",alt:"Device Size",src:"https://images.unsplash.com/photo-1426024084828-5da21e13f5dc?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1774&q=80",objectFit:"cover"}),e.jsxs(r,{fontSize:"x-small",children:["Photo by"," ",e.jsx("a",{href:"https://unsplash.com/@firmbee?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText",children:"Firmbee.com"})," ","on"," ",e.jsx("a",{href:"https://unsplash.com/photos/2mc2B5iX6as?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText",children:"Unsplash"})]})]})})]})})}const Ce=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)});function zn(){return e.jsx(l,{py:{base:5,xs:16,sm:20},textAlign:"justify",children:e.jsx(l,{py:{base:5,xs:8,sm:16},bg:"teal",children:e.jsx(X,{maxW:"7xl",paddingInline:10,children:e.jsx(M,{direction:{base:"column",lg:"row"},children:e.jsxs(M,{flex:1,justify:{lg:"center"},py:4,children:[e.jsxs(l,{mb:{base:8,md:20},children:[e.jsxs(Ce,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{ease:"easeInOut",duration:.5}}},children:[e.jsx(r,{fontFamily:"heading",fontWeight:700,textTransform:"uppercase",mb:3,fontSize:{base:"md",md:"xl"},color:"orange.300",children:"Rincian Hasil"}),e.jsx(k,{color:"white",mb:5,fontSize:{base:"md",sm:"xl",md:"5xl"},children:"Tampilan Data Terperinci dan Mudah Dipahami"})]}),e.jsx(Ce,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{ease:"easeInOut",duration:1}}},children:e.jsx(r,{fontSize:{base:"md",md:"xl"},color:"gray.200",children:"WhatColors menampilkan data dengan rinci dan memiliki penyampaian yang mudah dipahami, membantu pengguna dalam memahami hasil dari tes yang telah dikerjakan serta daftar data peserta tes bagi para admin grup tes."})})]}),e.jsx(ga,{columns:{base:1,md:2},spacing:10,children:An.map(a=>e.jsxs(l,{children:[e.jsx(Ce,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{ease:"easeInOut",duration:.5}}},children:e.jsx(r,{fontFamily:"heading",fontSize:{base:"xl",md:"3xl"},color:"orange.300",mb:3,children:a.title})}),e.jsx(Ce,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{scale:0,opacity:0},onscreen:{scale:1,opacity:1,transition:{ease:"easeInOut",duration:1}}},children:e.jsx(r,{fontSize:{base:"md",md:"xl"},color:"gray.200",children:a.content})})]},a.title))})]})})})})})}const An=[{title:"Pernyataan",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Ringkasan Hasil"}),e.jsx("br",{}),"Pada bagian ini pengguna akan mendapatkan penjelasan singkat terkait ringkasan hasil akhir yang didapatkan setelah melalui perhitungan dan penerapan metode Farnsworth Munsell yang cukup kompleks."]})},{title:"Komparasi",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Nilai Perbandingan"}),e.jsx("br",{}),'Pada bagian ini pengguna akan mendapatkan tampilan nilai perbandingan terkait jawaban pengguna dengan nilai asli dari susunan warna pada Metode Farnsworth Munsell. Hasil nilai berbandingan yang ditampilkan akan berupa tabel ataupun diagram pada ukuran perangkat tertentu. Tampilan hasil akan berupa nomor urutan blok warna serta nilai jawaban berupa "Benar" atau "Salah".']})},{title:"Diskriminan",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Nilai Perpindahan"}),e.jsx("br",{}),"Pada bagian ini pengguna akan mendapatkan tampilan nilai terkait seberapa jauh perpindahan blok warna dari seharusnya. Untuk menentukan nilai ini perlu menggunakan Metode Farnsworth Munsell untuk mengetahui nilai suatu blok warna. Jawaban pengguna dapat diperkirakan benar apabila perbandingan nilai pada suatu blok terhadapat blok warna sebelum dan sesudahnya bernilai satu."]})},{title:"Data Grup",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Informasi Peserta"}),e.jsx("br",{}),"Data yang terdapat dalam grup dibuat sesederhana mungkin untuk dapat membantu admin dalam mengelompokkan data peserta, dalam tampilan data peserta pada sebuah grup hanya berisikan sedikit informasi. Untuk informasi yang lebih lengkap, admin dapat mengunduh data grup apabila diperlukan."]})},{title:"7 x 24",content:e.jsxs(e.Fragment,{children:[e.jsx(r,{as:"span",fontWeight:700,color:"white",children:"Akses Data"}),e.jsx("br",{}),"Seluruh ringkasan data hasil tes dan data grup dapat kalian cari data hasil tes kalian melalui fitur pencarian selama data belum terhapus setiap minggunya dari penyimpanan kami."]})}],Te=xe(je.div,{shouldForwardProp:a=>fe(a)||be(a)}),Wn=({isOpen:a,onClose:s})=>{const[n,t]=j.useState([{color:"#b07464"},{color:"#a87456"},{color:"#a77c4e"},{color:"#a48546"}]);return e.jsxs(Ae,{size:{base:"xs",sm:"md",md:"2xl"},closeOnOverlayClick:!1,isOpen:a,scrollBehavior:"inside",isCentered:!0,children:[e.jsx(te,{}),e.jsxs(he,{children:[e.jsx(ee,{children:"Cara Kerja"}),e.jsxs(ae,{fontSize:{base:"sm",md:"md"},children:[e.jsx(r,{children:"Susun dan pindahkan blok warna yang berada ditengah"}),e.jsxs(p,{flexWrap:"wrap",flexDirection:"row",margin:"8px auto",justifyContent:"center",children:[e.jsx(l,{margin:"4px 8px 4px 1px",children:e.jsx(l,{backgroundColor:"#b2766f",width:10,height:10,children:e.jsx(r,{textAlign:"center",fontSize:"small",fontWeight:"bold",color:"white",children:"Awal"})},"#b2766f")}),e.jsx(Ee.ReactSortable,{className:"row-box",group:{name:"valueByRow",put:!1},animation:200,ghostClass:"ghostbox",list:n,setList:t,children:n.map(i=>e.jsx(l,{backgroundColor:i.color,margin:"4px 1px",border:"1px solid #252525",cursor:"pointer",width:10,height:10},i.color))}),e.jsx(l,{margin:"4px 1px 4px 8px",children:e.jsx(l,{backgroundColor:"#9b8f49",width:10,height:10,children:e.jsx(r,{textAlign:"center",fontSize:"small",fontWeight:"bold",color:"white",children:"Akhir"})},"#9b8f49")})]}),e.jsxs(Ja,{textAlign:"justify",mt:8,children:[e.jsx(r,{mb:2,children:"Untuk hasil yang maksimal silahkan ikuti saran berikut :"}),e.jsx(T,{children:"Maksimalkan kecerahan layar perangkat yang akan digunakan dalam pengetesan"}),e.jsx(T,{children:"Pastikan pengujian dilakukan dalam ruangan"}),e.jsx(T,{children:"Gunakan lampu bertipe D65 pada ruangan tes secara merata"}),e.jsx(T,{children:"Jangan gunakan mode baca atau mode anti sinar biru pada pengaturan layar perangkat pengetesan"}),e.jsx(T,{children:"Jangan gunakan kacamata atau soft-lens khusus buta warna."}),e.jsxs(T,{children:["Waktu pengetesan optimal : pukul 11:00 -13:00"," ",e.jsx("b",{children:"(Maks. Pengerjaan 12 Menit"})," )"]}),e.jsx(T,{children:"Gunakan layar dengan ukuran minimal 6,6 - 17 inci dengan resolusi Full HD"})]})]}),e.jsx(se,{children:e.jsx(g,{colorScheme:"red",onClick:s,children:"Keluar"})})]})]})};function In(){const{isOpen:a,onOpen:s,onClose:n}=Z();return e.jsxs(X,{maxW:"5xl",children:[e.jsx(Wn,{isOpen:a,onClose:n}),e.jsxs(M,{as:l,textAlign:"center",spacing:{base:8,md:10},py:{base:5,xs:16,sm:20},children:[e.jsx(Te,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:100,scale:0,opacity:0},onscreen:{y:0,scale:1,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsxs(k,{fontWeight:600,fontSize:{base:"2xl",sm:"4xl",md:"6xl"},lineHeight:"110%",children:["Tentang ",e.jsx("br",{}),e.jsx(r,{as:"span",color:"green.400",children:"WhatColors"})]})}),e.jsx(Te,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{y:100,scale:0,opacity:0},onscreen:{y:0,scale:1,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsx(r,{textAlign:{base:"justify",sm:"center"},fontSize:{base:"sm",sm:"md"},color:"gray.500",children:"Website ini ditunjukkan bagi masyarakat secara luas dapat melakukan simulasi tes buta warna secara virtual dan gratis. Pada website ini menggunakan Metode Farnsworth Munsell sebagai tolak ukur perhitungan untuk memperkiraan kondisi mata seseorang. Metode ini memiliki keunggulan yang lebih baik untuk mengurangi indikasi kecurangan dalam pelaksanaan tes buta warna secara bersama-sama. Untuk memulai simulasi tes atau mengetahui cara kerja metode ini kalian dapat mengeklik salah satu tombol dibawah ini"})}),e.jsxs(M,{direction:"column",spacing:3,align:"center",alignSelf:"center",position:"relative",children:[e.jsx(Te,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{x:-50,opacity:0},onscreen:{x:0,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsx(g,{size:{base:"sm",sm:"md"},colorScheme:"green",bg:"green.400",rounded:"full",px:6,_hover:{bg:"green.500"},as:B,to:"/",children:"Lakukan Tes"})}),e.jsx(Te,{initial:"offscreen",whileInView:"onscreen",variants:{offscreen:{x:-50,opacity:0},onscreen:{x:0,opacity:1,transition:{type:"spring",bounce:.4,duration:.8}}},children:e.jsx(g,{variant:"link",colorScheme:"blue",size:"sm",onClick:s,children:"Cara Kerja"})}),e.jsxs(l,{children:[e.jsx(J,{as:Mn,color:N("gray.800","gray.300"),w:{base:30,xs:71},position:"absolute",right:{base:-35,xs:-71},top:"10px"}),e.jsx(r,{fontSize:{base:"xs",xs:"lg"},fontFamily:"Caveat",position:"absolute",right:{base:"-80px",xs:"-125px"},top:"-15px",transform:"rotate(10deg)",children:"Yuk coba tesnya"})]})]})]})]})}const Mn=Va({displayName:"Arrow",viewBox:"0 0 72 24",path:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.600904 7.08166C0.764293 6.8879 1.01492 6.79004 1.26654 6.82177C2.83216 7.01918 5.20326 7.24581 7.54543 7.23964C9.92491 7.23338 12.1351 6.98464 13.4704 6.32142C13.84 6.13785 14.2885 6.28805 14.4722 6.65692C14.6559 7.02578 14.5052 7.47362 14.1356 7.6572C12.4625 8.48822 9.94063 8.72541 7.54852 8.7317C5.67514 8.73663 3.79547 8.5985 2.29921 8.44247C2.80955 9.59638 3.50943 10.6396 4.24665 11.7384C4.39435 11.9585 4.54354 12.1809 4.69301 12.4068C5.79543 14.0733 6.88128 15.8995 7.1179 18.2636C7.15893 18.6735 6.85928 19.0393 6.4486 19.0805C6.03792 19.1217 5.67174 18.8227 5.6307 18.4128C5.43271 16.4346 4.52957 14.868 3.4457 13.2296C3.3058 13.0181 3.16221 12.8046 3.01684 12.5885C2.05899 11.1646 1.02372 9.62564 0.457909 7.78069C0.383671 7.53862 0.437515 7.27541 0.600904 7.08166ZM5.52039 10.2248C5.77662 9.90161 6.24663 9.84687 6.57018 10.1025C16.4834 17.9344 29.9158 22.4064 42.0781 21.4773C54.1988 20.5514 65.0339 14.2748 69.9746 0.584299C70.1145 0.196597 70.5427 -0.0046455 70.931 0.134813C71.3193 0.274276 71.5206 0.70162 71.3807 1.08932C66.2105 15.4159 54.8056 22.0014 42.1913 22.965C29.6185 23.9254 15.8207 19.3142 5.64226 11.2727C5.31871 11.0171 5.26415 10.5479 5.52039 10.2248Z",fill:"currentColor"})});function Bn(){return e.jsxs(l,{children:[e.jsx(In,{}),e.jsx(Dn,{}),e.jsx(zn,{}),e.jsx(Sn,{}),e.jsx(Tn,{})]})}function Fn(){return e.jsx(ge,{my:4,templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:[...Array(6)].map((a,s)=>e.jsx(pe,{children:e.jsxs(l,{as:"article",p:"5",borderWidth:"1px",rounded:"md",children:[e.jsxs(f,{children:[e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:"odio euismod lacinia at quis risus sed"}),e.jsx(r,{fontSize:"sm",children:"lorem"})]}),e.jsx(f,{children:e.jsx(k,{noOfLines:2,size:{base:"xs",xs:"md"},my:"2",children:e.jsx(r,{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ultrices neque ornare aenean euismod elementum nisi quis eleifend."})})}),e.jsx(f,{children:e.jsx(r,{noOfLines:7,textAlign:"justify",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Id aliquet risus feugiat in. Tellus in hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Mauris rhoncus aenean vel elit scelerisque mauris pellentesque pulvinar. Suspendisse sed nisi lacus sed. Nullam ac tortor vitae purus faucibus ornare suspendisse. Mus mauris vitae ultricies leo integer malesuada nunc vel."})})]})},s))})}function Ne({error:a}){return e.jsx(p,{minHeight:"80vh",justifyContent:"center",alignItems:"center",children:e.jsxs(l,{textAlign:"center",py:10,px:6,children:[e.jsx(k,{display:"inline-block",as:"h2",size:"2xl",bgGradient:"linear(to-r, teal.400, teal.600)",backgroundClip:"text",children:a.response.data.status}),e.jsx(r,{fontSize:{base:"1rem",lg:"18px"},color:"gray.500",mt:3,mb:2,children:"Sepertinya ada yang tidak beres"}),e.jsx(r,{fontSize:{base:"2xl",lg:"3xl"},lineHeight:"short",mb:6,children:a.response.data.message}),e.jsx(g,{as:B,to:"/",colorScheme:"teal",bgGradient:"linear(to-r, teal.400, teal.500, teal.600)",color:"white",variant:"solid",size:{base:"xs",xs:"sm",md:"md"},children:"Kembali Ke Beranda"})]})})}function Pn(){const{data:a,error:s,isLoading:n,isError:t}=me({queryKey:["article"],queryFn:async()=>await Ms()});if(t)return e.jsx(Ne,{error:s});const i=()=>n?e.jsx(Fn,{}):e.jsx(ge,{my:4,templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:a.map(o=>e.jsx(pe,{children:e.jsxs(_a,{as:"article",p:"5",borderWidth:"1px",rounded:"md",children:[e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:o.author}),e.jsxs(Ie,{colorScheme:"teal",size:"sm",children:[o.category," / ",o.year]}),e.jsx(k,{noOfLines:2,size:{base:"xs",xs:"md"},my:"2",children:e.jsx(Ua,{isExternal:!0,href:o.url,children:o.title})}),e.jsx(r,{noOfLines:7,textAlign:"justify",children:o.description})]})},o._id))});return e.jsxs(l,{py:8,fontSize:{base:"xs",xs:"sm",md:"md"},children:[e.jsx(k,{textAlign:"center",size:"md",children:"Artikel Terkait"}),i()]})}function Nn(){return e.jsx(Me,{mt:6,mb:2,minHeight:{base:"68vh",xs:"75vh",md:"58vh"},children:e.jsxs(Be,{size:"sm",children:[e.jsx(Fe,{children:e.jsxs(U,{children:[e.jsx(F,{textAlign:{md:"center"},children:"#"}),e.jsx(F,{textAlign:{md:"center"},children:"Nama"}),e.jsx(F,{textAlign:{md:"center"},children:"Skor Tes"}),e.jsx(F,{textAlign:{md:"center"},children:"Waktu"}),e.jsx(F,{textAlign:{md:"center"},children:"Status"}),e.jsx(F,{textAlign:{md:"center"},children:"Perangkat"})]})}),e.jsx(Pe,{children:[...Array(10)].map((a,s)=>e.jsxs(U,{children:[e.jsx(P,{textAlign:{md:"center"},children:e.jsx(f,{children:e.jsx("p",{children:"Lorem"})})}),e.jsx(P,{textAlign:{md:"center"},children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})}),e.jsx(P,{textAlign:"center",children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})}),e.jsx(P,{textAlign:"center",children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})}),e.jsx(P,{textAlign:"center",children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})}),e.jsx(P,{textAlign:"center",children:e.jsx(f,{children:e.jsx("p",{children:"Lorem Ipsum"})})})]},s))})]})})}function Ln(){var S,L,R;const a=Q(),s=le(),n=w.getJSON("id"),{isOpen:t,onOpen:i,onClose:o}=Z(),c=j.useRef(),{mutateAsync:d,isLoading:u}=_({mutationFn:Ds,onSuccess:$=>{a("/"),s("Berhasil Dihapus",`${$.message}`,"info")},onError:$=>{s("Terjadi Kesalahan",`${$.response.data.message}`,"error")}}),m=()=>{d(n)},h=me({queryKey:["group",n],queryFn:async()=>await Aa(n),refetchOnWindowFocus:!1}),b=me({queryKey:["clients",n],queryFn:async()=>await zs(n),refetchIntervalInBackground:!0,refetchInterval:6e4}),[x]=Us(b.data);return h.isError||b.isError?e.jsx(Ne,{error:h.error||b.error}):e.jsxs(l,{py:{lg:4},children:[e.jsxs(xa,{motionPreset:"slideInBottom",leastDestructiveRef:c,onClose:o,isOpen:t,isCentered:!0,children:[e.jsx(te,{}),e.jsxs(ba,{children:[e.jsx(ee,{children:"Hapus Grup?"}),e.jsx(ie,{}),e.jsxs(ae,{children:["Apakah anda yakin ingin menghapus grup ini? ",e.jsx("br",{})," Pastikan anda telah mengunduh data yang telah diperlukan."]}),e.jsxs(se,{children:[e.jsx(g,{ref:c,onClick:o,children:"Tidak"}),e.jsx(g,{colorScheme:"red",ml:3,loadingText:"Menghapus",isLoading:u,onClick:m,children:"Hapus Grup"})]})]})]}),e.jsxs(l,{textAlign:"center",fontSize:{base:"xs",xs:"sm",md:"md"},children:[e.jsxs(f,{isLoaded:!h.isLoading,fadeDuration:1,children:[e.jsxs(k,{mt:{base:4,md:2},size:{base:"sm",md:"md"},children:[(S=h.data)==null?void 0:S.name," (",(L=h.data)==null?void 0:L.initial,")"]}),e.jsxs(r,{children:["Dibuat pada ",(R=h.data)==null?void 0:R.date]})]}),e.jsx(r,{mt:2,color:"gray.500",fontSize:"xs",children:"Data akan diperbarui otomatis setiap 60 detik"})]}),b.isLoading?e.jsx(Nn,{}):e.jsx(Rn,{client:b}),e.jsxs(z,{zIndex:10,position:"absolute",bottom:{base:24,xs:40},right:{base:5,xs:10},children:[x?e.jsx(gs,{data:x,separator:";",filename:`${h.data.name} ${h.data.initial}.csv`,children:e.jsx(de,{"aria-label":"Download table",size:{base:"md",md:"lg"},colorScheme:"teal",sx:{":hover":{color:"black",bg:"teal.300"}},icon:e.jsx(sa,{})})}):e.jsx(de,{isDisabled:!0,variant:"outline","aria-label":"Download table",size:{base:"md",md:"lg"},icon:e.jsx(sa,{})}),e.jsx(de,{"aria-label":"Delete group",size:{base:"md",md:"lg"},colorScheme:"red",sx:{":hover":{color:"black",bg:"red.300"}},icon:e.jsx(Qa,{}),onClick:i})]})]})}function Rn({client:a}){return e.jsx(Me,{mt:6,mb:2,minHeight:{base:"68vh",xs:"75vh",md:"58vh"},children:e.jsxs(Be,{size:"sm",children:[e.jsx(Fe,{children:e.jsxs(U,{children:[e.jsx(F,{textAlign:{md:"center"},children:"#"}),e.jsx(F,{textAlign:{md:"center"},children:"Nama"}),e.jsx(F,{textAlign:{md:"center"},children:"Skor Tes"}),e.jsx(F,{textAlign:{md:"center"},children:"Waktu"}),e.jsx(F,{textAlign:{md:"center"},children:"Status"}),e.jsx(F,{textAlign:{md:"center"},children:"Perangkat"})]})}),e.jsx(Pe,{children:a.data.map((s,n)=>e.jsxs(U,{children:[e.jsx(P,{textAlign:{md:"center"},children:n+1}),e.jsx(P,{textAlign:{md:"center"},children:s.name}),e.jsx(P,{textAlign:"center",children:s.totalErrorScore}),e.jsx(P,{textAlign:"center",children:s.time}),e.jsx(P,{textAlign:"center",children:s.status}),e.jsx(P,{textAlign:"center",children:s.device})]},s._id))})]})})}function On(){return e.jsxs(l,{pt:8,children:[e.jsx(k,{as:"h1",size:{base:"sm",sm:"md"},textAlign:"center",children:"Hal yang sering ditanyakan"}),e.jsxs(Ya,{allowToggle:!0,py:8,maxWidth:"3xl",margin:"0 auto",textAlign:"justify",fontSize:{base:"xs",xs:"sm",sm:"md"},children:[e.jsxs(ve,{children:[e.jsx("h2",{children:e.jsxs(ye,{_expanded:{bg:"teal",color:"white"},children:[e.jsx(l,{as:"span",flex:"1",textAlign:"left",fontWeight:"medium",fontSize:{base:"sm",sm:"md"},children:"Bagaimana cara mengerjakan tes di website ini?"}),e.jsx(we,{})]})}),e.jsx(Se,{pb:4,children:"Metode Farnsworth-Munsell merupakan metode tes buta warna, dimana cara pengerjaannya ialah dengan menyusun warna balok acak menjadi sebuah susunan warna yang urut dan teratur."})]}),e.jsxs(ve,{children:[e.jsx("h2",{children:e.jsxs(ye,{_expanded:{bg:"teal",color:"white"},children:[e.jsx(l,{as:"span",flex:"1",textAlign:"left",fontWeight:"medium",fontSize:{base:"sm",sm:"md"},children:"Berapa jenis metode yang digunakan?"}),e.jsx(we,{})]})}),e.jsxs(Se,{pb:4,children:[e.jsxs(r,{children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Semi-Standar Tes :"})," ","Metode Farnsworth-Munsell yang terdiri dari 88 warna dengan susunan 80 warna yang harus disusun sesuai urutan dari warna indikator di bagian awal dan akhir dari baris warna yang ada."]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Fun Tes :"})," ","Metode Farnsworth-Munsell yang terdiri dari 40 warna dengan susunan 32 warna yang harus disusun sesuai urutan dari warna indikator di bagian awal dan akhir dari baris warna yang ada."]})]})]}),e.jsxs(ve,{children:[e.jsx("h2",{children:e.jsxs(ye,{_expanded:{bg:"teal",color:"white"},children:[e.jsx(l,{as:"span",flex:"1",textAlign:"left",fontWeight:"medium",fontSize:{base:"sm",sm:"md"},children:"Peran apa saja yang dapat saya lakukan dalam website ini?"}),e.jsx(we,{})]})}),e.jsxs(Se,{pb:4,children:[e.jsxs(r,{children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Individu :"})," ","Pengguna dapat melakukan test secara pribadi melalui halaman tes dengan memilih Tes Individu. Pengguna cukup mengisikan data diri untuk mengerjakan tes, selain itu pengguna juga dapat melihat hasil tes pada halaman result."]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Admin Grup :"})," ","Pengguna dapat membuat sebuah grup khusus yang dapat digunakan dalam tes secara berkelompok. Dengan memilih Buat Grup, pengguna cukup memasukkan data untuk membuat grup tes. Setelah data terisi pengguna akan menerima email yang dapat digunakan untuk bergabung ke halaman dahshboard melalui menu Gabung Tes Pengguna akan bertugas sebagai admin dari grup yang dapat melihat data peserta tes, memberikan kode gabung grup kepada peserta tes, mengunduh data peserta tes, dan menghapus grup."]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Peserta Grup :"})," ","Pengguna sebagai peserta cukup memasukkan kode yang diberikan oleh admin grup pada menu Gabung Tes. Sebagai peserta tes langkah-langkah yang dilakukan sama dengan tes secara individu, yang membedakan ialah peserta grup tidak dapat melihat hasil dari tes dan harus menunggu hasil tes diumumkan oleh admin grup."]})]})]}),e.jsxs(ve,{children:[e.jsx("h2",{children:e.jsxs(ye,{_expanded:{bg:"teal",color:"white"},children:[e.jsx(l,{as:"span",flex:"1",textAlign:"left",fontWeight:"medium",fontSize:{base:"sm",sm:"md"},children:"Apa saja langkah-langkah yang dilakukan setiap peran dalam website ini?"}),e.jsx(we,{})]})}),e.jsxs(Se,{pb:4,children:[e.jsxs(r,{children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Individu :"})," ","Buka Website ",e.jsx(v,{})," Masuk Halaman Tes"," ",e.jsx(v,{})," Pilih Menu Tes Individu",e.jsx(v,{})," Masukan data diri ",e.jsx(v,{})," ","Kerjakan Tes ",e.jsx(v,{})," Kirim Hasil Tes"," ",e.jsx(v,{})," Lihat Hasil Tes."]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Admin Grup :"})," ",e.jsx("br",{}),e.jsxs(l,{mt:1,children:[e.jsx(r,{as:"span",fontStyle:"oblique",children:"Membuat Grup :"})," ","Buka Website ",e.jsx(v,{})," Masuk Halaman Tes"," ",e.jsx(v,{}),"Pilih Menu Tes Berjamaah ",e.jsx(v,{})," Masukan data grup"," ",e.jsx(v,{})," Cek kode yang dikirimkan ke email"," ",e.jsx(v,{})," Masukan kode ke kolom verifikasi"," ",e.jsx(v,{})," Masuk Dashboard Admin Grup"," ",e.jsx(v,{})," Bagikan Kode Client ke peserta tes grup anda."," "]}),e.jsxs(l,{mt:2,children:[e.jsx(r,{as:"span",fontStyle:"oblique",children:"Masuk Dashboard Admin :"})," ","Buka Website ",e.jsx(v,{})," Masuk Halaman Tes"," ",e.jsx(v,{})," Pilih Menu Gabung Tes",e.jsx(v,{})," Masukan kode admin ",e.jsx(v,{})," ","Masuk Dashboard Admin Grup."]})]}),e.jsxs(r,{mt:4,children:[e.jsx(r,{as:"span",fontWeight:"bold",children:"Peserta Grup :"})," ","Buka Website ",e.jsx(v,{})," Masuk Halaman Tes"," ",e.jsx(v,{})," Pilih Menu Gabung Tes ",e.jsx(v,{})," ","Masukan kode yang diberikan admin ",e.jsx(v,{})," Masukan data diri ",e.jsx(v,{})," Masukan data diri"," ",e.jsx(v,{}),"Kerjakan Tes ",e.jsx(v,{})," Kirim Hasil Tes."]})]})]})]})]})}function En(){const a=w.getJSON("id"),{data:s,error:n,isLoading:t,isError:i}=me({queryKey:["client",a],queryFn:async()=>await Ws(a),refetchOnWindowFocus:!1});if(i)return e.jsx(Ne,{error:n});const o={Bagus:{bgColor:"green.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna dalam melihat lebih baik dibandingkan rata-rata manusia pada umumnya"},Rerata:{bgColor:"yellow.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna termasuk normal seperti rata-rata manusia pada umumnya"},Low:{bgColor:"red.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna dalam melihat lebih buruk dibandingkan rata-rata manusia pada umumnya"}};let c=o.Rerata;return o[s==null?void 0:s.errorScoreStatus]&&(c=o[s==null?void 0:s.errorScoreStatus]),e.jsxs(l,{py:{base:8,xs:0,lg:4},fontSize:{base:"xs",xs:"sm",md:"md"},children:[e.jsx(k,{my:6,size:"lg",textAlign:"center",children:"Hasil Pengujian"}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{textAlign:"justify",children:["Berdasarkan proses pengujian buta warna pada laman"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:"WhatColors"})," ","yang telah dilakukan pada"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:s==null?void 0:s.date})," ","menggunakan Metode Farnsworth Munsell dengan jenis tes"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:s==null?void 0:s.type}),". Dengan rincian data sebagai berikut:"]})}),e.jsx(Ve,{my:{base:4,md:8},children:e.jsxs(z,{alignItems:"flex-start",children:[e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Nama : ",s==null?void 0:s.name]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Umur : ",s==null?void 0:s.age]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Perangkat : ",s==null?void 0:s.device]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Waktu Tes : ",s==null?void 0:s.time]})})]})}),e.jsxs(l,{position:"relative",my:6,children:[e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsx(ze,{borderBottomWidth:{base:"medium",md:"thick"},borderColor:`${c.bgColor}`})}),e.jsx(pa,{bg:"white",px:"6",fontWeight:"bold",fontSize:{base:"xs",xs:"md",md:"lg"},children:"Hasil"})]}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(r,{textAlign:{base:"justify",sm:"center"},children:["Setelah melalui proses perhitungan yang cukup kompleks dan panjang, menghasilkan skor kesalahan sebesar ",e.jsx("b",{children:s==null?void 0:s.totalErrorScore}),". Sehingga dengan hasil skor tersebut menyatakan bahwa pengguna dianggap:"]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsxs(k,{mt:4,textAlign:"center",size:{base:"md",md:"lg"},fontWeight:"bold",children:[s==null?void 0:s.status," Tes Buta Warna"]})}),e.jsx(f,{isLoaded:!t,fadeDuration:1,children:e.jsx(ze,{my:4,borderBottomWidth:{base:"medium",md:"thick"},borderColor:`${c.bgColor}`})})]})}function qn({data:a}){var i;const[s]=Vs(),[n]=We("(min-width: 550px)"),t=j.useMemo(()=>{s!==null&&Math.max(...s.result)},[s]);return j.useEffect(()=>{const o=s==null?void 0:s.number,c=s==null?void 0:s.result,u={type:"radar",data:{labels:o,datasets:[{label:"Nilai Diskriminasi",data:c,fill:!0,backgroundColor:"rgba(255, 99, 132, 0.2)",borderColor:"rgb(255, 99, 132)",pointBackgroundColor:"rgb(255, 99, 132)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgb(255, 99, 132)"}]},options:{elements:{line:{borderWidth:3}},scales:{r:{pointLabels:{color:"black"},suggestedMin:0,suggestedMax:t,ticks:{color:"blue",stepSize:2}}},spanGaps:!0,responsive:!0}};s&&n&&new Ta("radar-chart",u)},[s,t,n]),e.jsxs(l,{textAlign:"center",py:{lg:4},children:[e.jsx(k,{size:{base:"sm",sm:"md"},children:"Hasil Diskriminasi Warna:"}),e.jsx(r,{mt:2,fontSize:{base:"xs",xs:"sm",md:"md"},children:"*Hasil diskriminasi diambil dari seberapa jauh kesalahan peletakan warna hasil tes yang kamu lakukan dengan posisi aslinya."}),n?e.jsx(p,{mt:6,mb:2,mx:"auto",position:"relative",width:{sm:550,lg:750},justifyContent:"center",children:e.jsx("canvas",{id:"radar-chart"})}):e.jsx(Me,{my:4,children:e.jsxs(Be,{size:"sm",children:[e.jsx(Fe,{children:e.jsxs(U,{children:[e.jsx(F,{textAlign:"center",maxWidth:75,color:"teal",children:"Kode Warna"}),e.jsx(F,{textAlign:"center",color:"teal",children:"Nilai"})]})}),e.jsx(Pe,{children:(i=a==null?void 0:a.discriminantResult)==null?void 0:i.map(o=>e.jsxs(U,{children:[e.jsx(P,{textAlign:"center",maxWidth:75,children:o._id}),e.jsx(P,{textAlign:"center",children:o.discriminant})]},o._id))})]})})]})}function Hn({data:a}){var t;const[s]=Js(),[n]=We("(min-width: 550px)");return j.useEffect(()=>{let i=0,o=0;for(let h=0;h<(s==null?void 0:s.length);h++)s[h]==="Benar"?i++:o++;const m={type:"pie",data:{labels:["Benar","Salah"],datasets:[{label:"Jumlah Nilai",data:[i,o],backgroundColor:["rgb(54, 162, 235)","rgb(255, 99, 132)"],hoverOffset:4}]}};s&&n&&new Ta("pie-chart",m)},[s,n]),e.jsxs(l,{textAlign:"center",py:{lg:4},children:[e.jsx(k,{size:{base:"sm",sm:"md"},children:"Hasil Komparasi Warna:"}),e.jsx(r,{mt:2,fontSize:{base:"xs",xs:"sm",md:"md"},children:"*Hasil komparasi diambil dari hasil tes yang kamu lakukan kemudian dibandingkan dengan nilai asli."}),n?e.jsx(p,{mt:6,mb:2,mx:"auto",position:"relative",width:{sm:550,lg:750},justifyContent:"center",children:e.jsx("canvas",{id:"pie-chart"})}):e.jsx(Me,{my:4,children:e.jsxs(Be,{size:"sm",children:[e.jsx(Fe,{children:e.jsxs(U,{children:[e.jsx(F,{textAlign:"center",maxWidth:75,color:"teal",children:"Kode Warna"}),e.jsx(F,{textAlign:"center",color:"teal",children:"Nilai"})]})}),e.jsx(Pe,{children:(t=a==null?void 0:a.comparisonResult)==null?void 0:t.map(i=>e.jsxs(U,{children:[e.jsx(P,{textAlign:"center",maxWidth:75,children:i._id}),e.jsx(P,{textAlign:"center",children:i.comparison})]},i._id))})]})})]})}function Kn({data:a,isLoading:s}){const n={Bagus:{bgColor:"green.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna dalam melihat lebih baik dibandingkan rata-rata manusia pada umumnya"},Rerata:{bgColor:"yellow.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna termasuk normal seperti rata-rata manusia pada umumnya"},Low:{bgColor:"red.300",footerText:"Dari jumlah skor yang dicapai pengguna, diketahui bahwa kemampuan mata pengguna dalam melihat lebih buruk dibandingkan rata-rata manusia pada umumnya"}};let t=Oe.Normal;Oe[a==null?void 0:a.blindCheck]&&(t=Oe[a==null?void 0:a.blindCheck]);let i=n.Rerata;return n[a==null?void 0:a.errorScoreStatus]&&(i=n[a==null?void 0:a.errorScoreStatus]),e.jsxs(l,{py:{lg:4},fontSize:{base:"xs",xs:"sm",md:"md"},children:[e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{textAlign:"justify",children:["Berdasarkan proses pengujian buta warna pada laman"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:"WhatColors"})," ","yang telah dilakukan pada"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:a==null?void 0:a.date})," ","menggunakan Metode Farnsworth Munsell dengan jenis tes"," ",e.jsx(r,{as:"span",fontWeight:"medium",children:a==null?void 0:a.type}),". Dengan rincian data sebagai berikut:"]})}),e.jsx(Ve,{my:{base:4,md:8},children:e.jsxs(z,{alignItems:"flex-start",children:[e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Nama : ",a==null?void 0:a.name]})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Umur : ",a==null?void 0:a.age]})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Perangkat : ",a==null?void 0:a.device]})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{fontWeight:"medium",children:["Waktu Tes : ",a==null?void 0:a.time]})})]})}),e.jsxs(l,{position:"relative",my:6,children:[e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsx(ze,{borderBottomWidth:{base:"medium",md:"thick"},borderColor:`${i.bgColor}`})}),e.jsx(pa,{bg:"white",px:"6",fontWeight:"bold",fontSize:{base:"xs",xs:"md",md:"lg"},children:"Hasil"})]}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsxs(r,{textAlign:{base:"justify",sm:"center"},children:["Setelah melalui proses perhitungan yang cukup kompleks dan panjang, menunjukkan bahwa pengguna:"," ",e.jsxs(r,{as:"span",fontWeight:"medium",children:[t," dengan jumlah skor diraih sebanyak"," ",a==null?void 0:a.totalErrorScore,"."]})]})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsx(r,{mt:4,textAlign:{base:"justify",sm:"center"},fontSize:{base:"xs",xs:"md",md:"lg"},fontWeight:"bold",children:i.footerText})}),e.jsx(f,{isLoaded:!s,fadeDuration:1,children:e.jsx(ze,{mt:4,borderBottomWidth:{base:"medium",md:"thick"},borderColor:`${i.bgColor}`})})]})}function Gn(){const a=w.getJSON("id"),{data:s,error:n,isLoading:t,isError:i}=me({queryKey:["individual",a],queryFn:async()=>await Cs(a),refetchOnWindowFocus:!1});return i?e.jsx(Ne,{error:n}):e.jsxs(ja,{mt:{base:4,lg:8},isFitted:!0,variant:"enclosed",colorScheme:"orange",children:[e.jsxs(fa,{children:[e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Pernyataan"}),e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Komparasi"}),e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Diskriminan"})]}),e.jsxs(ka,{children:[e.jsx(re,{children:e.jsx(Kn,{data:s,isLoading:t})}),e.jsx(re,{children:e.jsx(Hn,{data:s})}),e.jsx(re,{children:e.jsx(qn,{data:s})})]})]})}function $n(){return w.getJSON("user").isClient?e.jsx(En,{}):e.jsx(Gn,{})}function Vn({data:a}){return a?e.jsx(ge,{templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:a.map(s=>e.jsx(pe,{children:e.jsxs(Je,{children:[e.jsxs(_e,{children:[e.jsxs(y,{justifyContent:"space-between",children:[e.jsx(k,{size:{base:"xs",xs:"sm"},children:s.name}),e.jsx(Ie,{colorScheme:"teal",size:"sm",children:s.blindCheck})]}),e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:s.date})]}),e.jsx(Ue,{pt:.5,children:e.jsxs(l,{children:[e.jsx(k,{size:"xs",textTransform:"uppercase",children:"Hasil"}),e.jsxs(z,{mt:2,alignItems:"flex-start",gap:0,children:[e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Skor Tes : ",e.jsx("b",{children:s.score})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Perkiraan Kesehatan Mata : ",e.jsx("b",{children:s.status})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Waktu Pengerjaan : ",e.jsx("b",{children:s.time})]})]})]})})]})},s.score))}):e.jsx(p,{minHeight:"50vh",justifyContent:"center",alignItems:"center",children:e.jsx(k,{color:"gray.300",size:"lg",textAlign:"center",children:"Masukan Data Yang Ingin Dicari"})})}function Jn({data:a}){return a?e.jsx(ge,{templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:a.map(s=>e.jsx(pe,{children:e.jsxs(Je,{children:[e.jsxs(_e,{children:[e.jsxs(y,{justifyContent:"space-between",children:[e.jsx(k,{size:{base:"xs",xs:"sm"},children:s.name}),e.jsx(Ie,{colorScheme:"teal",size:"sm",children:s.initial})]}),e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:s.date})]}),e.jsx(Ue,{pt:.5,children:e.jsxs(l,{children:[e.jsx(k,{size:"xs",textTransform:"uppercase",children:"Hasil"}),e.jsxs(z,{mt:2,alignItems:"flex-start",gap:0,children:[e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Skor Kesalahan Maksimal : ",e.jsx("b",{children:s.score})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Tipe Tes : ",e.jsx("b",{children:s.type})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Jumlah Peserta : ",e.jsx("b",{children:s.clients})]})]})]})})]})},s.score))}):e.jsx(p,{minHeight:"50vh",justifyContent:"center",alignItems:"center",children:e.jsx(k,{color:"gray.300",size:"lg",textAlign:"center",children:"Masukan Data Yang Ingin Dicari"})})}function _n({data:a}){return a?e.jsx(ge,{templateColumns:{sm:"repeat(2, 1fr)",lg:"repeat(3, 1fr)"},gap:4,children:a.map(s=>e.jsx(pe,{children:e.jsxs(Je,{children:[e.jsxs(_e,{children:[e.jsxs(y,{justifyContent:"space-between",children:[e.jsx(k,{size:{base:"xs",xs:"sm"},children:s.name}),e.jsx(Ie,{colorScheme:"teal",size:"sm",children:s.blindCheck})]}),e.jsx(r,{fontSize:{base:"xs",xs:"sm"},children:s.date})]}),e.jsx(Ue,{pt:.5,children:e.jsxs(l,{children:[e.jsx(k,{size:"xs",textTransform:"uppercase",children:"Hasil"}),e.jsxs(z,{mt:2,alignItems:"flex-start",gap:0,children:[e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Skor Tes : ",e.jsx("b",{children:s.score})]}),e.jsxs(r,{fontSize:{base:"xs",sm:"md"},children:["Perkiraan Kesehatan Mata : ",e.jsx("b",{children:s.status})]})]})]})})]})},s.score))}):e.jsx(p,{minHeight:"50vh",justifyContent:"center",alignItems:"center",children:e.jsx(k,{color:"gray.300",size:"lg",textAlign:"center",children:"Masukan Data Yang Ingin Dicari"})})}function Un(){const a=le(),{handleSubmit:s,register:n,formState:{errors:t}}=oe(),{mutateAsync:i,isLoading:o,data:c}=_({mutationFn:Is,onSuccess:()=>{a("Pencarian Berhasil","Data berhasil ditampilkan","success")},onError:u=>{a("Terjadi Kesalahan",`${u.response.data.message}`,"error")}}),d=u=>{i(u.name)};return e.jsxs(l,{mt:{base:4,lg:8},children:[e.jsx("form",{onSubmit:s(d),children:e.jsxs(y,{gap:15,justifyContent:"center",alignItems:"center",children:[e.jsx(D,{maxWidth:"400px",children:e.jsx(G,{id:"name",autoComplete:"off",focusBorderColor:"teal.400",placeholder:"Masukan Data Yang Ingin Dicari",...n("name")})}),e.jsx(I,{children:t.name&&t.name.message}),e.jsx(g,{type:"submit",isLoading:o,children:"Cari"})]})}),e.jsxs(ja,{mt:{base:4,lg:8},isFitted:!0,variant:"line",colorScheme:"orange",children:[e.jsxs(fa,{children:[e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Individu"}),e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Peserta"}),e.jsx(ne,{fontSize:{base:"sm",lg:"md"},children:"Grup Tes"})]}),e.jsxs(ka,{children:[e.jsx(re,{children:e.jsx(_n,{data:c==null?void 0:c.individual})}),e.jsx(re,{children:e.jsx(Vn,{data:c==null?void 0:c.client})}),e.jsx(re,{children:e.jsx(Jn,{data:c==null?void 0:c.room})})]})]})]})}const Qn=new Ca;function Yn(){const[a]=We("(max-width: 401px)");return e.jsxs(e.Fragment,{children:[e.jsx(Za,{zIndex:20,children:"Skip to content"}),a?e.jsx(ws,{}):e.jsx(fs,{}),e.jsxs(l,{as:"main",width:"full",minHeight:{base:"100dvh",xs:"76vh",sm:"74vh",md:"77vh","2xl":"80vh"},children:[e.jsx(Xa,{}),e.jsx(X,{maxW:"container.xl",px:5,children:e.jsx(bs,{client:Qn,children:e.jsxs(xs,{children:[e.jsx(V,{path:"/",element:e.jsx(pn,{})}),e.jsx(V,{path:"/faq",element:e.jsx(On,{})}),e.jsx(V,{path:"/about",element:e.jsx(Bn,{})}),e.jsx(V,{path:"/article",element:e.jsx(Pn,{})}),e.jsx(V,{path:"/test",element:e.jsx(wn,{})}),e.jsx(V,{path:"/result",element:e.jsx($n,{})}),e.jsx(V,{path:"/admin",element:e.jsx(Ln,{})}),e.jsx(V,{path:"/search",element:e.jsx(Un,{})}),e.jsx(V,{path:"/verify-admin",element:e.jsx(Qs,{})})]})})})]}),a?e.jsx(vs,{}):e.jsx(ks,{})]})}const Zn={base:"0em",xs:"25em",sm:"37em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Xn=es({breakpoints:Zn});Pa.createRoot(document.getElementById("root")).render(e.jsx(hs,{basename:"/WhatColors",children:e.jsx(as,{theme:Xn,children:e.jsx(Yn,{})})})); diff --git a/index.html b/index.html index a382d1b..e51d3ec 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ } })(window.location); - + diff --git a/sw.js b/sw.js index 76c963d..ce1d07b 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let a={};const o=s=>l(s,n),u={module:{uri:n},exports:a,require:o};e[n]=Promise.all(r.map((s=>u[s]||o(s)))).then((s=>(i(...s),a)))}}define(["./workbox-fa446783"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"404.html",revision:"210555a758b6323b04133007152c4ff7"},{url:"apple-touch-icon-180x180.png",revision:"05935fd12f6cfa7aae48d2d0c01e243f"},{url:"assets/@babel-d7b299da.js",revision:null},{url:"assets/@chakra-ui-07a237fe.js",revision:null},{url:"assets/@emotion-0dace5e7.js",revision:null},{url:"assets/@kurkle-b1b89bbc.js",revision:null},{url:"assets/@popperjs-f3391c26.js",revision:null},{url:"assets/@remix-run-d753ad9e.js",revision:null},{url:"assets/@tanstack-7cce00f9.js",revision:null},{url:"assets/@zag-js-8d968404.js",revision:null},{url:"assets/aria-hidden-606e0ff2.js",revision:null},{url:"assets/axios-9b9683dd.js",revision:null},{url:"assets/chart.js-29015108.js",revision:null},{url:"assets/classnames-6bc0a478.js",revision:null},{url:"assets/color2k-69f3754e.js",revision:null},{url:"assets/copy-to-clipboard-4ed993c7.js",revision:null},{url:"assets/css-box-model-4ed993c7.js",revision:null},{url:"assets/desktop-logo-b8708d8e.svg",revision:null},{url:"assets/detect-node-es-4ed993c7.js",revision:null},{url:"assets/focus-lock-b0fcf19c.js",revision:null},{url:"assets/framer-motion-4b9df51f.js",revision:null},{url:"assets/framesync-4ed993c7.js",revision:null},{url:"assets/get-nonce-1ea010b7.js",revision:null},{url:"assets/hoist-non-react-statics-23d96a9a.js",revision:null},{url:"assets/index-23a0280b.js",revision:null},{url:"assets/index-86510308.css",revision:null},{url:"assets/lodash.mergewith-cd59880b.js",revision:null},{url:"assets/mobile-logo-e21809fd.svg",revision:null},{url:"assets/prop-types-387d7a00.js",revision:null},{url:"assets/react-b9a76881.js",revision:null},{url:"assets/react-clientside-effect-3352e0a9.js",revision:null},{url:"assets/react-csv-a9333d5d.js",revision:null},{url:"assets/react-dom-2d279051.js",revision:null},{url:"assets/react-fast-compare-1cd47ecc.js",revision:null},{url:"assets/react-focus-lock-ad754ae7.js",revision:null},{url:"assets/react-hook-form-5df7240b.js",revision:null},{url:"assets/react-icons-7d08912d.js",revision:null},{url:"assets/react-is-e8e5dbb3.js",revision:null},{url:"assets/react-remove-scroll-b4638411.js",revision:null},{url:"assets/react-remove-scroll-bar-6162c280.js",revision:null},{url:"assets/react-router-32579614.js",revision:null},{url:"assets/react-router-dom-5e639d43.js",revision:null},{url:"assets/react-sortablejs-b5d8f939.js",revision:null},{url:"assets/react-style-singleton-cc97d4ca.js",revision:null},{url:"assets/scheduler-765c72db.js",revision:null},{url:"assets/sortablejs-17a40271.js",revision:null},{url:"assets/stylis-79144faa.js",revision:null},{url:"assets/tiny-invariant-4ed993c7.js",revision:null},{url:"assets/toggle-selection-4ed993c7.js",revision:null},{url:"assets/tslib-89fde298.js",revision:null},{url:"assets/use-callback-ref-51cbf00e.js",revision:null},{url:"assets/use-sidecar-3680f465.js",revision:null},{url:"assets/use-sync-external-store-bc8ad6b0.js",revision:null},{url:"favicon.ico",revision:"9648201b03291644bd4f480324a0d741"},{url:"index.html",revision:"6105042a0683a5e38990bebd9f2d16c4"},{url:"maskable-icon-512x512.png",revision:"2d01572d7be6138ba010e0104388d017"},{url:"pwa-192x192.png",revision:"8052e07e8db3e5fbe2f856f44d97fbdd"},{url:"pwa-512x512.png",revision:"309f7439be7251fff4af3a519759ef1c"},{url:"pwa-64x64.png",revision:"b2a0dadeb01ec313f7faada4bb7aae8b"},{url:"registerSW.js",revision:"a28863ae02b490c6905b5c64b9f42434"},{url:"favicon.ico",revision:"9648201b03291644bd4f480324a0d741"},{url:"manifest.webmanifest",revision:"e1119fbca3ebd0a36ffbf6cb16ac2a74"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))})); +if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise((e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()})).then((()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s})));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let a={};const o=s=>l(s,n),u={module:{uri:n},exports:a,require:o};e[n]=Promise.all(r.map((s=>u[s]||o(s)))).then((s=>(i(...s),a)))}}define(["./workbox-fa446783"],(function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"404.html",revision:"210555a758b6323b04133007152c4ff7"},{url:"apple-touch-icon-180x180.png",revision:"05935fd12f6cfa7aae48d2d0c01e243f"},{url:"assets/@babel-d7b299da.js",revision:null},{url:"assets/@chakra-ui-07a237fe.js",revision:null},{url:"assets/@emotion-0dace5e7.js",revision:null},{url:"assets/@kurkle-b1b89bbc.js",revision:null},{url:"assets/@popperjs-f3391c26.js",revision:null},{url:"assets/@remix-run-d753ad9e.js",revision:null},{url:"assets/@tanstack-7cce00f9.js",revision:null},{url:"assets/@zag-js-8d968404.js",revision:null},{url:"assets/aria-hidden-606e0ff2.js",revision:null},{url:"assets/axios-9b9683dd.js",revision:null},{url:"assets/chart.js-29015108.js",revision:null},{url:"assets/classnames-6bc0a478.js",revision:null},{url:"assets/color2k-69f3754e.js",revision:null},{url:"assets/copy-to-clipboard-4ed993c7.js",revision:null},{url:"assets/css-box-model-4ed993c7.js",revision:null},{url:"assets/desktop-logo-b8708d8e.svg",revision:null},{url:"assets/detect-node-es-4ed993c7.js",revision:null},{url:"assets/focus-lock-b0fcf19c.js",revision:null},{url:"assets/framer-motion-4b9df51f.js",revision:null},{url:"assets/framesync-4ed993c7.js",revision:null},{url:"assets/get-nonce-1ea010b7.js",revision:null},{url:"assets/hoist-non-react-statics-23d96a9a.js",revision:null},{url:"assets/index-10979f2f.js",revision:null},{url:"assets/index-86510308.css",revision:null},{url:"assets/lodash.mergewith-cd59880b.js",revision:null},{url:"assets/mobile-logo-e21809fd.svg",revision:null},{url:"assets/prop-types-387d7a00.js",revision:null},{url:"assets/react-b9a76881.js",revision:null},{url:"assets/react-clientside-effect-3352e0a9.js",revision:null},{url:"assets/react-csv-a9333d5d.js",revision:null},{url:"assets/react-dom-2d279051.js",revision:null},{url:"assets/react-fast-compare-1cd47ecc.js",revision:null},{url:"assets/react-focus-lock-ad754ae7.js",revision:null},{url:"assets/react-hook-form-5df7240b.js",revision:null},{url:"assets/react-icons-7d08912d.js",revision:null},{url:"assets/react-is-e8e5dbb3.js",revision:null},{url:"assets/react-remove-scroll-b4638411.js",revision:null},{url:"assets/react-remove-scroll-bar-6162c280.js",revision:null},{url:"assets/react-router-32579614.js",revision:null},{url:"assets/react-router-dom-5e639d43.js",revision:null},{url:"assets/react-sortablejs-b5d8f939.js",revision:null},{url:"assets/react-style-singleton-cc97d4ca.js",revision:null},{url:"assets/scheduler-765c72db.js",revision:null},{url:"assets/sortablejs-17a40271.js",revision:null},{url:"assets/stylis-79144faa.js",revision:null},{url:"assets/tiny-invariant-4ed993c7.js",revision:null},{url:"assets/toggle-selection-4ed993c7.js",revision:null},{url:"assets/tslib-89fde298.js",revision:null},{url:"assets/use-callback-ref-51cbf00e.js",revision:null},{url:"assets/use-sidecar-3680f465.js",revision:null},{url:"assets/use-sync-external-store-bc8ad6b0.js",revision:null},{url:"favicon.ico",revision:"9648201b03291644bd4f480324a0d741"},{url:"index.html",revision:"c2641009b34909b7bf3a6930b6c3cb7d"},{url:"maskable-icon-512x512.png",revision:"2d01572d7be6138ba010e0104388d017"},{url:"pwa-192x192.png",revision:"8052e07e8db3e5fbe2f856f44d97fbdd"},{url:"pwa-512x512.png",revision:"309f7439be7251fff4af3a519759ef1c"},{url:"pwa-64x64.png",revision:"b2a0dadeb01ec313f7faada4bb7aae8b"},{url:"registerSW.js",revision:"a28863ae02b490c6905b5c64b9f42434"},{url:"favicon.ico",revision:"9648201b03291644bd4f480324a0d741"},{url:"manifest.webmanifest",revision:"e1119fbca3ebd0a36ffbf6cb16ac2a74"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}));