new-site/site/public/_astro/hoisted.C5xItti8.js
justin f8cd37ac8c Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 06:54:22 -05:00

25 lines
6.4 KiB
JavaScript

import"./hoisted.yFz1BYXO.js";const d=[{id:1,text:"Do you control when the worker works?",detail:"You set the worker's schedule, hours, or specific times they must be available."},{id:2,text:"Do you control how the work is done?",detail:"You dictate the methods, processes, or procedures the worker must follow — not just the end result."},{id:3,text:"Do you provide tools or equipment?",detail:"You supply the worker with computers, software, vehicles, or other tools needed to perform the work."},{id:4,text:"Does the worker work exclusively for you?",detail:"The worker performs services only for your company and does not have other clients."},{id:5,text:"Do you provide training to the worker?",detail:"You train the worker on how to do the job, rather than hiring someone who already has the expertise."},{id:6,text:"Is the worker integrated into your business operations?",detail:"The worker uses a company email, attends staff meetings, or is presented to clients as an employee."},{id:7,text:"Do you set the pay rate?",detail:"You determine compensation rather than the worker quoting a rate for the project or service."},{id:8,text:"Can you terminate the worker without cause?",detail:"You can end the relationship at any time without a breach of contract, similar to at-will employment."},{id:9,text:"Does the worker perform key business functions?",detail:"The worker's tasks are central to your core business rather than auxiliary or specialized services."},{id:10,text:"Do you restrict the worker from working for others?",detail:"You have a non-compete or exclusivity clause, or otherwise discourage the worker from taking other clients."}];function u(){const o=document.getElementById("questions-container");o&&(o.innerHTML=d.map((e,t)=>`
<div class="bg-white border border-gray-200 rounded-xl p-6 shadow-sm">
<div class="flex items-start gap-4">
<span class="flex-shrink-0 w-8 h-8 rounded-full bg-pw-100 text-pw-700 text-sm font-bold flex items-center justify-center">${e.id}</span>
<div class="flex-1">
<p class="font-medium text-gray-900 mb-1">${e.text}</p>
<p class="text-xs text-gray-500 mb-4">${e.detail}</p>
<div class="flex gap-3">
<label class="flex-1 cursor-pointer">
<input type="radio" name="q${e.id}" value="yes" class="peer sr-only" required />
<div class="peer-checked:bg-red-50 peer-checked:border-red-300 peer-checked:text-red-700 border border-gray-200 rounded-lg py-2 px-4 text-center text-sm font-medium text-gray-600 hover:bg-gray-50 transition-colors">
Yes
</div>
</label>
<label class="flex-1 cursor-pointer">
<input type="radio" name="q${e.id}" value="no" class="peer sr-only" required />
<div class="peer-checked:bg-green-50 peer-checked:border-green-300 peer-checked:text-green-700 border border-gray-200 rounded-lg py-2 px-4 text-center text-sm font-medium text-gray-600 hover:bg-gray-50 transition-colors">
No
</div>
</label>
</div>
</div>
</div>
</div>
`).join(""))}function h(){let o=0;const e=[];return d.forEach(t=>{const r=document.querySelector(`input[name="q${t.id}"]:checked`);r&&r.value==="yes"&&(o++,e.push(t.text))}),{yesCount:o,flagged:e}}function p(o,e){const t=document.getElementById("results"),r=document.getElementById("result-card"),n=document.getElementById("result-icon"),s=document.getElementById("result-title"),a=document.getElementById("result-score"),i=document.getElementById("result-description"),l=document.getElementById("result-details"),c=document.getElementById("quiz-form");!t||!r||!n||!s||!a||!i||!l||!c||(c.classList.add("hidden"),t.classList.remove("hidden"),o<=2?(r.className="rounded-xl p-8 border-2 text-center bg-green-50 border-green-300",n.textContent="✅",s.textContent="Low Risk",s.className="text-2xl font-bold mb-3 text-green-800",a.textContent=`You answered "Yes" to ${o} of 10 questions.`,a.className="text-sm font-medium mb-4 text-green-700",i.textContent="Based on your answers, your contractor relationships appear to have a low risk of misclassification. You seem to be treating your workers as independent contractors rather than employees. However, classification rules vary by state and can change. Periodic reviews are still recommended."):o<=5?(r.className="rounded-xl p-8 border-2 text-center bg-amber-50 border-amber-300",n.textContent="⚠️",s.textContent="Medium Risk",s.className="text-2xl font-bold mb-3 text-amber-800",a.textContent=`You answered "Yes" to ${o} of 10 questions.`,a.className="text-sm font-medium mb-4 text-amber-700",i.textContent="Your answers suggest some characteristics of an employer-employee relationship. This puts you in a gray area where the IRS, DOL, or state agencies could challenge your classification. You should review these relationships with a compliance professional before an audit occurs."):(r.className="rounded-xl p-8 border-2 text-center bg-red-50 border-red-300",n.textContent="🚨",s.textContent="High Risk",s.className="text-2xl font-bold mb-3 text-red-800",a.textContent=`You answered "Yes" to ${o} of 10 questions.`,a.className="text-sm font-medium mb-4 text-red-700",i.textContent="Your answers indicate a high likelihood that one or more of your contractors may be legally classified as employees. This exposes your business to back taxes, penalties, and potential lawsuits. Immediate professional review is strongly recommended."),e.length>0&&(l.innerHTML='<p class="font-medium text-gray-700 mb-2">Areas of concern:</p>'+e.map(m=>`<div class="flex items-start gap-2 text-gray-600"><span class="text-red-400 flex-shrink-0 mt-0.5">•</span>${m}</div>`).join("")),t.scrollIntoView({behavior:"smooth",block:"start"}))}document.addEventListener("DOMContentLoaded",()=>{u(),document.getElementById("quiz-form")?.addEventListener("submit",e=>{e.preventDefault();let t=!0;if(d.forEach(s=>{document.querySelector(`input[name="q${s.id}"]:checked`)||(t=!1)}),!t){alert("Please answer all 10 questions before submitting.");return}const{yesCount:r,flagged:n}=h();p(r,n)}),document.getElementById("retake-btn")?.addEventListener("click",()=>{const e=document.getElementById("quiz-form"),t=document.getElementById("results");e&&t&&(e.classList.remove("hidden"),t.classList.add("hidden"),e.querySelectorAll('input[type="radio"]').forEach(n=>n.checked=!1),u(),window.scrollTo({top:0,behavior:"smooth"}))})});