pdap-design-system 2.4.1 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +3 -3
- package/dist/index.js +27 -27
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("vue-router"),pe=e.defineComponent({__name:"PdapButton",props:{intent:{default:"primary"},isLoading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.reactive({"pdap-button":!0,[`pdap-button-${r.intent}`]:!!r.intent,"pdap-button-loading":r.isLoading});return(a,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(n)},[e.renderSlot(a.$slots,"default")],2))}});const z=e.defineComponent({__name:"FlexContainer",props:{alignment:{default:"start"},component:{default:"div"}},setup(t){const r=t,n=e.reactive({"pdap-flex-container":!0,[`pdap-flex-container-${r.alignment}`]:!0});return(a,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{class:e.normalizeClass(n)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["class"]))}});const Se={class:"pdap-footer"},je={class:"pdap-footer-social-links"},Ne=["href"],Te={class:"pdap-footer-copyright"},Ae=e.createElementVNode("br",null,null,-1),Ie=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" PDAP is a non-profit. EIN: 85-4207132. "),e.createElementVNode("a",{href:"https://docs.pdap.io/meta/policy/pdap-privacy-policy",alt:"Privacy Policy",target:"_blank"},[e.createElementVNode("br"),e.createTextVNode(" Privacy Policy "),e.createElementVNode("i",{class:"fa fa-external-link"})]),e.createElementVNode("br"),e.createElementVNode("a",{href:"mailto:contact@pdap.io"},"contact@pdap.io")],-1),Le={class:"pdap-footer-widget-links"},ze=e.createElementVNode("a",{href:"https://www.guidestar.org/profile/85-4207132",target:"_blank"},[e.createElementVNode("img",{src:"https://widgets.guidestar.org/gximage2?o=9973356&l=v4"})],-1),De=["href"],Me=["src"],Fe=["src"],qe=e.defineComponent({__name:"PdapFooter",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/acronym.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.inject("footerLinks",[{href:"https://github.com/orgs/Police-Data-Accessibility-Project",text:"Github"},{href:"https://discord.gg/wMqex8nKZJ",text:"Discord"},{href:"https://www.linkedin.com/company/pdap",text:"LinkedIn"},{path:"/jobs",text:"Jobs"}]),a=r.logoImageAnchorPath.startsWith("/");return(o,s)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("footer",Se,[e.createVNode(z,{alignment:"center"},{default:e.withCtx(()=>[e.createElementVNode("ul",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),u=>(e.openBlock(),e.createElementBlock("li",{key:u.text,class:"pdap-footer-link-container"},[u.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-footer-social-link",href:u.href,target:"_blank",referrerpolicy:"no-referrer"},e.toDisplayString(u.text),9,Ne)):e.createCommentVNode("",!0),u.path?(e.openBlock(),e.createBlock(c,{key:1,"active-class":"pdap-footer-social-link-current","exact-active-class":"pdap-footer-social-link-current-exact",class:"pdap-footer-social-link",to:u.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("p",Te,[e.createTextVNode(" © "+e.toDisplayString(new Date().getFullYear())+" Police Data Accessibility Project",1),Ae]),Ie,e.createElementVNode("div",Le,[ze,e.unref(a)?(e.openBlock(),e.createBlock(c,{key:1,to:o.logoImageAnchorPath,class:"pdap-footer-logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Fe)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:o.logoImageAnchorPath,class:"pdap-footer-logo"},[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Me)],8,De))])]),_:1})])}}});function ee(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function k(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ee(Object(n),!0).forEach(function(a){He(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function He(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function te(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(t).reduce((n,a)=>(r.includes(a)||(n[a]=e.unref(t[a])),n),{})}function D(t){return typeof t=="function"}function Ge(t){return e.isReactive(t)||e.isReadonly(t)}function fe(t,r,n){let a=t;const o=r.split(".");for(let s=0;s<o.length;s++){if(!a[o[s]])return n;a=a[o[s]]}return a}function W(t,r,n){return e.computed(()=>t.some(a=>fe(r,a,{[n]:!1})[n]))}function re(t,r,n){return e.computed(()=>t.reduce((a,o)=>{const s=fe(r,o,{[n]:!1})[n]||[];return a.concat(s)},[]))}function ge(t,r,n,a){return t.call(a,e.unref(r),e.unref(n),a)}function he(t){return t.$valid!==void 0?!t.$valid:!t}function We(t,r,n,a,o,s,c){let{$lazy:u,$rewardEarly:l}=o,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],p=arguments.length>8?arguments[8]:void 0,$=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0;const f=e.ref(!!a.value),i=e.ref(0);n.value=!1;const m=e.watch([r,a].concat(d,h),()=>{if(u&&!a.value||l&&!$.value&&!n.value)return;let g;try{g=ge(t,r,p,c)}catch(v){g=Promise.reject(v)}i.value++,n.value=!!i.value,f.value=!1,Promise.resolve(g).then(v=>{i.value--,n.value=!!i.value,s.value=v,f.value=he(v)}).catch(v=>{i.value--,n.value=!!i.value,s.value=v,f.value=!0})},{immediate:!0,deep:typeof r=="object"});return{$invalid:f,$unwatch:m}}function Ue(t,r,n,a,o,s,c,u){let{$lazy:l,$rewardEarly:d}=a;const p=()=>({}),$=e.computed(()=>{if(l&&!n.value||d&&!u.value)return!1;let h=!0;try{const f=ge(t,r,c,s);o.value=f,h=he(f)}catch(f){o.value=f}return h});return{$unwatch:p,$invalid:$}}function Xe(t,r,n,a,o,s,c,u,l,d,p){const $=e.ref(!1),h=t.$params||{},f=e.ref(null);let i,m;t.$async?{$invalid:i,$unwatch:m}=We(t.$validator,r,$,n,a,f,o,t.$watchTargets,l,d,p):{$invalid:i,$unwatch:m}=Ue(t.$validator,r,n,a,f,o,l,d);const g=t.$message;return{$message:D(g)?e.computed(()=>g(te({$pending:$,$invalid:i,$params:te(h),$model:r,$response:f,$validator:s,$propertyPath:u,$property:c}))):g||"",$params:h,$pending:$,$invalid:i,$response:f,$unwatch:m}}function Ke(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=e.unref(t),n=Object.keys(r),a={},o={},s={};let c=null;return n.forEach(u=>{const l=r[u];switch(!0){case D(l.$validator):a[u]=l;break;case D(l):a[u]={$validator:l};break;case u==="$validationGroups":c=l;break;case u.startsWith("$"):s[u]=l;break;default:o[u]=l}}),{rules:a,nestedValidators:o,config:s,validationGroups:c}}const Ze="__root";function Qe(t,r,n,a,o,s,c,u,l){const d=Object.keys(t),p=a.get(o,t),$=e.ref(!1),h=e.ref(!1),f=e.ref(0);if(p){if(!p.$partial)return p;p.$unwatch(),$.value=p.$dirty.value}const i={$dirty:$,$path:o,$touch:()=>{$.value||($.value=!0)},$reset:()=>{$.value&&($.value=!1)},$commit:()=>{}};return d.length?(d.forEach(m=>{i[m]=Xe(t[m],r,i.$dirty,s,c,m,n,o,l,h,f)}),i.$externalResults=e.computed(()=>u.value?[].concat(u.value).map((m,g)=>({$propertyPath:o,$property:n,$validator:"$externalResults",$uid:`${o}-externalResult-${g}`,$message:m,$params:{},$response:null,$pending:!1})):[]),i.$invalid=e.computed(()=>{const m=d.some(g=>e.unref(i[g].$invalid));return h.value=m,!!i.$externalResults.value.length||m}),i.$pending=e.computed(()=>d.some(m=>e.unref(i[m].$pending))),i.$error=e.computed(()=>i.$dirty.value?i.$pending.value||i.$invalid.value:!1),i.$silentErrors=e.computed(()=>d.filter(m=>e.unref(i[m].$invalid)).map(m=>{const g=i[m];return e.reactive({$propertyPath:o,$property:n,$validator:m,$uid:`${o}-${m}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(i.$externalResults.value)),i.$errors=e.computed(()=>i.$dirty.value?i.$silentErrors.value:[]),i.$unwatch=()=>d.forEach(m=>{i[m].$unwatch()}),i.$commit=()=>{h.value=!0,f.value=Date.now()},a.set(o,t,i),i):(p&&a.set(o,t,i),i)}function Je(t,r,n,a,o,s,c){const u=Object.keys(t);return u.length?u.reduce((l,d)=>(l[d]=U({validations:t[d],state:r,key:d,parentKey:n,resultsCache:a,globalConfig:o,instance:s,externalResults:c}),l),{}):{}}function Ye(t,r,n){const a=e.computed(()=>[r,n].filter(i=>i).reduce((i,m)=>i.concat(Object.values(e.unref(m))),[])),o=e.computed({get(){return t.$dirty.value||(a.value.length?a.value.every(i=>i.$dirty):!1)},set(i){t.$dirty.value=i}}),s=e.computed(()=>{const i=e.unref(t.$silentErrors)||[],m=a.value.filter(g=>(e.unref(g).$silentErrors||[]).length).reduce((g,v)=>g.concat(...v.$silentErrors),[]);return i.concat(m)}),c=e.computed(()=>{const i=e.unref(t.$errors)||[],m=a.value.filter(g=>(e.unref(g).$errors||[]).length).reduce((g,v)=>g.concat(...v.$errors),[]);return i.concat(m)}),u=e.computed(()=>a.value.some(i=>i.$invalid)||e.unref(t.$invalid)||!1),l=e.computed(()=>a.value.some(i=>e.unref(i.$pending))||e.unref(t.$pending)||!1),d=e.computed(()=>a.value.some(i=>i.$dirty)||a.value.some(i=>i.$anyDirty)||o.value),p=e.computed(()=>o.value?l.value||u.value:!1),$=()=>{t.$touch(),a.value.forEach(i=>{i.$touch()})},h=()=>{t.$commit(),a.value.forEach(i=>{i.$commit()})},f=()=>{t.$reset(),a.value.forEach(i=>{i.$reset()})};return a.value.length&&a.value.every(i=>i.$dirty)&&$(),{$dirty:o,$errors:c,$invalid:u,$anyDirty:d,$error:p,$pending:l,$touch:$,$reset:f,$silentErrors:s,$commit:h}}function U(t){let{validations:r,state:n,key:a,parentKey:o,childResults:s,resultsCache:c,globalConfig:u={},instance:l,externalResults:d}=t;const p=o?`${o}.${a}`:a,{rules:$,nestedValidators:h,config:f,validationGroups:i}=Ke(r),m=k(k({},u),f),g=a?e.computed(()=>{const y=e.unref(n);return y?e.unref(y[a]):void 0}):n,v=k({},e.unref(d)||{}),x=e.computed(()=>{const y=e.unref(d);return a?y?e.unref(y[a]):void 0:y}),V=Qe($,g,a,c,p,m,l,x,n),_=Je(h,g,p,c,m,l,x),O={};i&&Object.entries(i).forEach(y=>{let[B,C]=y;O[B]={$invalid:W(C,_,"$invalid"),$error:W(C,_,"$error"),$pending:W(C,_,"$pending"),$errors:re(C,_,"$errors"),$silentErrors:re(C,_,"$silentErrors")}});const{$dirty:E,$errors:I,$invalid:q,$anyDirty:Ee,$error:Ce,$pending:H,$touch:G,$reset:ke,$silentErrors:Pe,$commit:Y}=Ye(V,_,s),Re=a?e.computed({get:()=>e.unref(g),set:y=>{E.value=!0;const B=e.unref(n),C=e.unref(d);C&&(C[a]=v[a]),e.isRef(B[a])?B[a].value=y:B[a]=y}}):null;a&&m.$autoDirty&&e.watch(g,()=>{E.value||G();const y=e.unref(d);y&&(y[a]=v[a])},{flush:"sync"});async function Ve(){return G(),m.$rewardEarly&&(Y(),await e.nextTick()),await e.nextTick(),new Promise(y=>{if(!H.value)return y(!q.value);const B=e.watch(H,()=>{y(!q.value),B()})})}function Oe(y){return(s.value||{})[y]}function Be(){e.isRef(d)?d.value=v:Object.keys(v).length===0?Object.keys(d).forEach(y=>{delete d[y]}):Object.assign(d,v)}return e.reactive(k(k(k({},V),{},{$model:Re,$dirty:E,$error:Ce,$errors:I,$invalid:q,$anyDirty:Ee,$pending:H,$touch:G,$reset:ke,$path:p||Ze,$silentErrors:Pe,$validate:Ve,$commit:Y},s&&{$getResultsForChild:Oe,$clearExternalResults:Be,$validationGroups:O}),_))}class et{constructor(){this.storage=new Map}set(r,n,a){this.storage.set(r,{rules:n,result:a})}checkRulesValidity(r,n,a){const o=Object.keys(a),s=Object.keys(n);return s.length!==o.length||!s.every(u=>o.includes(u))?!1:s.every(u=>n[u].$params?Object.keys(n[u].$params).every(l=>e.unref(a[u].$params[l])===e.unref(n[u].$params[l])):!0)}get(r,n){const a=this.storage.get(r);if(!a)return;const{rules:o,result:s}=a,c=this.checkRulesValidity(r,n,o),u=s.$unwatch?s.$unwatch:()=>({});return c?s:{$dirty:s.$dirty,$partial:!0,$unwatch:u}}}const L={COLLECT_ALL:!0,COLLECT_NONE:!1},ne=Symbol("vuelidate#injectChildResults"),ae=Symbol("vuelidate#removeChildResults");function tt(t){let{$scope:r,instance:n}=t;const a={},o=e.ref([]),s=e.computed(()=>o.value.reduce((p,$)=>(p[$]=e.unref(a[$]),p),{}));function c(p,$){let{$registerAs:h,$scope:f,$stopPropagation:i}=$;i||r===L.COLLECT_NONE||f===L.COLLECT_NONE||r!==L.COLLECT_ALL&&r!==f||(a[h]=p,o.value.push(h))}n.__vuelidateInjectInstances=[].concat(n.__vuelidateInjectInstances||[],c);function u(p){o.value=o.value.filter($=>$!==p),delete a[p]}n.__vuelidateRemoveInstances=[].concat(n.__vuelidateRemoveInstances||[],u);const l=e.inject(ne,[]);e.provide(ne,n.__vuelidateInjectInstances);const d=e.inject(ae,[]);return e.provide(ae,n.__vuelidateRemoveInstances),{childResults:s,sendValidationResultsToParent:l,removeValidationResultsFromParent:d}}function $e(t){return new Proxy(t,{get(r,n){return typeof r[n]=="object"?$e(r[n]):e.computed(()=>r[n])}})}let oe=0;function rt(t,r){var n;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(a=t,t=void 0,r=void 0);let{$registerAs:o,$scope:s=L.COLLECT_ALL,$stopPropagation:c,$externalResults:u,currentVueInstance:l}=a;const d=l||((n=e.getCurrentInstance())===null||n===void 0?void 0:n.proxy),p=d?d.$options:{};o||(oe+=1,o=`_vuelidate_${oe}`);const $=e.ref({}),h=new et,{childResults:f,sendValidationResultsToParent:i,removeValidationResultsFromParent:m}=d?tt({$scope:s,instance:d}):{childResults:e.ref({})};if(!t&&p.validations){const g=p.validations;r=e.ref({}),e.onBeforeMount(()=>{r.value=d,e.watch(()=>D(g)?g.call(r.value,new $e(r.value)):g,v=>{$.value=U({validations:v,state:r,childResults:f,resultsCache:h,globalConfig:a,instance:d,externalResults:u||d.vuelidateExternalResults})},{immediate:!0})}),a=p.validationsConfig||a}else{const g=e.isRef(t)||Ge(t)?t:e.reactive(t||{});e.watch(g,v=>{$.value=U({validations:v,state:r,childResults:f,resultsCache:h,globalConfig:a,instance:d??{},externalResults:u})},{immediate:!0})}return d&&(i.forEach(g=>g($,{$registerAs:o,$scope:s,$stopPropagation:c})),e.onBeforeUnmount(()=>m.forEach(g=>g(o)))),e.computed(()=>k(k({},e.unref($.value)),f.value))}var b=(t=>(t.CHECKBOX="checkbox",t.TEXT="text",t.PASSWORD="password",t))(b||{});const nt=["id","name","placeholder","value"],at=["id","name","placeholder","value"],ot=["id","name","checked","value"],st=["id"],lt=["for"],ve=e.defineComponent({__name:"PdapInput",props:{error:{},id:{},label:{},name:{},placeholder:{},type:{},value:{},defaultChecked:{type:Boolean}},emits:["change","input"],setup(t,{emit:r}){const n=t,a=r,o=()=>{c.value=!c.value,a("change",c.value.toString())},s=l=>{a("input",l.target.value)},c=e.ref(n.defaultChecked),u=e.computed(()=>`pdap-${n.name}-input-error`);return(l,d)=>{var p;return e.openBlock(),e.createBlock(e.unref(be),{class:e.normalizeClass({"pdap-input":!0,"pdap-input-error":Number((p=l.error)==null?void 0:p.length)>=1})},{default:e.withCtx(()=>[l.type===e.unref(b).TEXT?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0,id:l.id,type:"text",name:l.name,placeholder:l.placeholder,value:l.value},l.$attrs,{onInput:s}),null,16,nt)):e.createCommentVNode("",!0),l.type===e.unref(b).PASSWORD?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1,id:l.id,type:"password",name:l.name,placeholder:l.placeholder,value:l.value},l.$attrs,{onInput:s}),null,16,at)):l.type===e.unref(b).CHECKBOX?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:2,id:l.id,class:"pdap-input-checkbox",name:l.name,checked:c.value,type:"checkbox",value:l.value},l.$attrs,{onChange:o}),null,16,ot)):e.createCommentVNode("",!0),l.error?(e.openBlock(),e.createElementBlock("div",{key:3,id:u.value,class:"pdap-input-error-message"},e.toDisplayString(l.error),9,st)):e.createCommentVNode("",!0),e.createElementVNode("label",{class:"pdap-input-label",for:l.id},e.toDisplayString(l.label),9,lt)]),_:1},8,["class"])}}});function se(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function j(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?se(Object(n),!0).forEach(function(a){it(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function it(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function T(t){return typeof t=="function"}function M(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function F(t){return T(t.$validator)?j({},t):{$validator:t}}function ut(t){return M(t)&&T(t.then)}function P(t){return typeof t=="object"?t.$valid:t}function S(t){return t.$validator||t}function K(t,r){if(!M(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!M(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=F(r);return n.$params=j(j({},n.$params||{}),t),n}function A(t,r){if(!T(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!M(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=F(r);return n.$message=t,n}function ct(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=F(t);return j(j({},n),{},{$async:!0,$watchTargets:r})}function dt(t){return{$validator(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return e.unref(r).reduce((s,c,u)=>{const l=Object.entries(c).reduce((d,p)=>{let[$,h]=p;const f=t[$]||{},i=Object.entries(f).reduce((m,g)=>{let[v,x]=g;const _=S(x).call(this,h,c,u,...a),O=P(_);if(m.$data[v]=_,m.$data.$invalid=!O||!!m.$data.$invalid,m.$data.$error=m.$data.$invalid,!O){let E=x.$message||"";const I=x.$params||{};typeof E=="function"&&(E=E({$pending:!1,$invalid:!O,$params:I,$model:h,$response:_})),m.$errors.push({$property:$,$message:E,$params:I,$response:_,$model:h,$pending:!1,$validator:v})}return{$valid:m.$valid&&O,$data:m.$data,$errors:m.$errors}},{$valid:!0,$data:{},$errors:[]});return d.$data[$]=i.$data,d.$errors[$]=i.$errors,{$valid:d.$valid&&i.$valid,$data:d.$data,$errors:d.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:s.$valid&&l.$valid,$data:s.$data.concat(l.$data),$errors:s.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:r=>{let{$response:n}=r;return n?n.$errors.map(a=>Object.values(a).map(o=>o.map(s=>s.$message)).reduce((o,s)=>o.concat(s),[])):[]}}}const w=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let r in t)return!0;return!1}return!!String(t).length},Z=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function R(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a=>(a=e.unref(a),!w(a)||r.every(o=>(o.lastIndex=0,o.test(a))))}var N=Object.freeze({__proto__:null,forEach:dt,len:Z,normalizeValidatorObject:F,regex:R,req:w,unwrap:e.unref,unwrapNormalizedValidator:S,unwrapValidatorResponse:P,withAsync:ct,withMessage:A,withParams:K}),mt=R(/^[a-zA-Z]*$/),pt={$validator:mt,$message:"The value is not alphabetical",$params:{type:"alpha"}},ft=R(/^[a-zA-Z0-9]*$/),gt={$validator:ft,$message:"The value must be alpha-numeric",$params:{type:"alphaNum"}},ht=R(/^\d*(\.\d+)?$/),$t={$validator:ht,$message:"Value must be numeric",$params:{type:"numeric"}};function vt(t,r){return n=>!w(n)||(!/\s/.test(n)||n instanceof Date)&&+e.unref(t)<=+n&&+e.unref(r)>=+n}function yt(t,r){return{$validator:vt(t,r),$message:n=>{let{$params:a}=n;return`The value must be between ${a.min} and ${a.max}`},$params:{min:t,max:r,type:"between"}}}const wt=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;var _t=R(wt),Q={$validator:_t,$message:"Value is not a valid email address",$params:{type:"email"}};function bt(t){if(!w(t))return!0;if(typeof t!="string")return!1;const r=t.split(".");return r.length===4&&r.every(xt)}const xt=t=>{if(t.length>3||t.length===0||t[0]==="0"&&t!=="0"||!t.match(/^\d+$/))return!1;const r=+t|0;return r>=0&&r<=255};var Et={$validator:bt,$message:"The value is not a valid IP address",$params:{type:"ipAddress"}};function Ct(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:":";return r=>{if(t=e.unref(t),!w(r))return!0;if(typeof r!="string")return!1;const n=typeof t=="string"&&t!==""?r.split(t):r.length===12||r.length===16?r.match(/.{2}/g):null;return n!==null&&(n.length===6||n.length===8)&&n.every(kt)}}const kt=t=>t.toLowerCase().match(/^[0-9a-f]{2}$/);function Pt(t){return{$validator:Ct(t),$message:"The value is not a valid MAC Address",$params:{type:"macAddress"}}}function Rt(t){return r=>!w(r)||Z(r)<=e.unref(t)}function Vt(t){return{$validator:Rt(t),$message:r=>{let{$params:n}=r;return`The maximum length allowed is ${n.max}`},$params:{max:t,type:"maxLength"}}}function Ot(t){return r=>!w(r)||Z(r)>=e.unref(t)}function Bt(t){return{$validator:Ot(t),$message:r=>{let{$params:n}=r;return`This field should be at least ${n.min} characters long`},$params:{min:t,type:"minLength"}}}function St(t){return typeof t=="string"&&(t=t.trim()),w(t)}var J={$validator:St,$message:"Value is required",$params:{type:"required"}};const le=(t,r)=>t?w(typeof r=="string"?r.trim():r):!0;function jt(t){return function(r,n){if(typeof t!="function")return le(e.unref(t),r);const a=t.call(this,r,n);return le(a,r)}}function Nt(t){return{$validator:jt(t),$message:"The value is required",$params:{type:"requiredIf",prop:t}}}const ie=(t,r)=>t?!0:w(typeof r=="string"?r.trim():r);function Tt(t){return function(r,n){if(typeof t!="function")return ie(e.unref(t),r);const a=t.call(this,r,n);return ie(a,r)}}function At(t){return{$validator:Tt(t),$message:"The value is required",$params:{type:"requiredUnless",prop:t}}}function It(t){return r=>e.unref(r)===e.unref(t)}function Lt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:It(t),$message:n=>`The value must be equal to the ${r} value`,$params:{equalTo:t,otherName:r,type:"sameAs"}}}const zt=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;var Dt=R(zt),Mt={$validator:Dt,$message:"The value is not a valid URL address",$params:{type:"url"}};function Ft(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>P(o)?o:S(s).apply(this,n),!1)}}function qt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const c=await o;return P(c)?c:S(s).apply(this,n)},Promise.resolve(!1))}}function Ht(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(c=>c.$async),o=r.reduce((c,u)=>u.$watchTargets?c.concat(u.$watchTargets):c,[]);let s=()=>!1;return r.length&&(s=a?qt(r):Ft(r)),{$async:a,$validator:s,$watchTargets:o}}function Gt(){return K({type:"or"},A("The value does not match any of the provided validators",Ht(...arguments)))}function Wt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>P(o)?S(s).apply(this,n):o,!0)}}function Ut(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const c=await o;return P(c)?S(s).apply(this,n):c},Promise.resolve(!0))}}function Xt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(c=>c.$async),o=r.reduce((c,u)=>u.$watchTargets?c.concat(u.$watchTargets):c,[]);let s=()=>!1;return r.length&&(s=a?Ut(r):Wt(r)),{$async:a,$validator:s,$watchTargets:o}}function Kt(){return K({type:"and"},A("The value does not match all of the provided validators",Xt(...arguments)))}function Zt(t){return function(r,n){if(!w(r))return!0;const a=S(t).call(this,r,n);return ut(a)?a.then(o=>!P(o)):!P(a)}}function Qt(t){return{$validator:Zt(t),$message:"The value does not match the provided validator",$params:{type:"not"}}}function Jt(t){return r=>!w(r)||(!/\s/.test(r)||r instanceof Date)&&+r>=+e.unref(t)}function Yt(t){return{$validator:Jt(t),$message:r=>{let{$params:n}=r;return`The minimum value allowed is ${n.min}`},$params:{min:t,type:"minValue"}}}function er(t){return r=>!w(r)||(!/\s/.test(r)||r instanceof Date)&&+r<=+e.unref(t)}var tr=t=>({$validator:er(t),$message:r=>{let{$params:n}=r;return`The maximum value allowed is ${n.max}`},$params:{max:t,type:"maxValue"}}),rr=R(/(^[0-9]*$)|(^-[0-9]+$)/),nr={$validator:rr,$message:"Value is not an integer",$params:{type:"integer"}},ar=R(/^[-]?\d*(\.\d+)?$/),or={$validator:ar,$message:"Value must be decimal",$params:{type:"decimal"}};function sr(t){let{t:r,messagePath:n=o=>{let{$validator:s}=o;return`validations.${s}`},messageParams:a=o=>o}=t;return function(s){let{withArguments:c=!1,messagePath:u=n,messageParams:l=a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function d(p){return r(u(p),l(j({model:p.$model,property:p.$property,pending:p.$pending,invalid:p.$invalid,response:p.$response,validator:p.$validator,propertyPath:p.$propertyPath},p.$params)))}return c&&typeof s=="function"?function(){return A(d,s(...arguments))}:A(d,s)}}const ye=Object.freeze(Object.defineProperty({__proto__:null,alpha:pt,alphaNum:gt,and:Kt,between:yt,createI18nMessage:sr,decimal:or,email:Q,helpers:N,integer:nr,ipAddress:Et,macAddress:Pt,maxLength:Vt,maxValue:tr,minLength:Bt,minValue:Yt,not:Qt,numeric:$t,or:Gt,required:J,requiredIf:Nt,requiredUnless:At,sameAs:Lt,url:Mt},Symbol.toStringTag,{value:"Module"})),we=N.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/);function ue(t){return["maxLength","minLength"].includes(t)}function ce(t){return t==="required"}function de(t){return t==="email"}function me(t){return t==="password"}function lr(t,r){return{[t]:ye[t](r)}}function ir(t,r,n){return{[t]:N.withMessage(n,ye[t](r))}}function ur(){return{required:J}}function cr(t){return{required:N.withMessage(t,J)}}function dr(){return{email:Q}}function mr(t){return{email:N.withMessage(t,Q)}}function pr(){return{password:we}}function fr(t){return{password:N.withMessage(t,we)}}function gr(t,r){if(ue(t)&&typeof r.message=="string"&&typeof r.value=="number")return ir(t,r.value,r.message);if(ue(t)&&typeof r.message>"u"&&typeof r.value=="number")return lr(t,r.value);if(de(t)&&typeof r.message=="string")return mr(r.message);if(de(t)&&typeof r.message>"u")return dr();if(me(t)&&typeof r.message=="string")return fr(r.message);if(me(t)&&typeof r.message>"u")return pr();if(ce(t)&&typeof r.message=="string")return cr(r.message);if(ce(t)&&typeof r.message>"u")return ur();throw new Error("No valid rule detected")}const hr=["id","name"],$r={key:0,class:"pdap-form-error-message"},_e=e.defineComponent({__name:"PdapForm",props:{error:{default:null},id:{},name:{},schema:{}},emits:["submit","change"],setup(t,{emit:r}){const n=t,a=r,o=e.computed(()=>n.schema.map(h=>{const f={...h};return delete f.validators,f}));let s=e.reactive(o.value.reduce((h,f)=>{switch(f.type){case b.CHECKBOX:return{...h,[f.name]:String(f.defaultChecked)};case b.TEXT:case b.PASSWORD:default:return{...h,[f.name]:f.value}}},{}));const c=n.schema.reduce((h,f)=>{const i=Object.entries(f.validators??{}).reduce((m,[g,v])=>({...m,...gr(g,v)}),{});return{...h,[f.name]:{...i}}},{}),u=rt(c,s,{$autoDirty:!1,$lazy:!0}),l=e.ref(n.error);function d(h,f){s[h]=f,p()}e.watchEffect(()=>{n.error?l.value=n.error:l.value&&u.value.$errors.length===0?l.value=null:!l.value&&u.value.$errors.length>0&&(l.value="Please update this form to correct the errors")}),e.watchEffect(()=>{console.debug(`PdapForm ${n.name}
|
2
|
-
`,{errorMessage:l.value,props:n,schema:n.schema,data:o,values:s,vuelidate:{rules:c,v$:u}})});function p(){a("change",{...s})}async function $(h){if(await u.value.$validate()){a("submit",{...s}),u.value.$reset(),h.target.reset(),s=Object.entries(s).reduce((m,[g,v])=>({...m,[g]:["true","false"].includes(v)?v:""}),{});return}}return(h,f)=>(e.openBlock(),e.createElementBlock("form",{id:h.id,name:h.name,class:"pdap-form",onChange:p,onSubmit:f[0]||(f[0]=e.withModifiers(i=>$(i),["prevent"]))},[typeof l.value=="string"?(e.openBlock(),e.createElementBlock("div",$r,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>{var m,g,v,x;return e.openBlock(),e.createBlock(ve,e.mergeProps(i,{key:i.name,error:(m=e.unref(u)[i.name])!=null&&m.$error?(x=(v=(g=e.unref(u)[i.name])==null?void 0:g.$errors)==null?void 0:v[0])==null?void 0:x.$message:"",value:e.unref(s)[i.name],onChange:V=>d(i.name,V),onInput:V=>d(i.name,V)}),null,16,["error","value","onChange","onInput"])}),128)),e.renderSlot(h.$slots,"default")],40,hr))}});const be=e.defineComponent({__name:"GridContainer",props:{columns:{default:"auto"},component:{default:"div"},rows:{default:"auto"},templateColumns:{},templateRows:{}},setup(t){const r=t,n=e.reactive({"pdap-grid-container":!0,[`pdap-grid-container-column-${r.columns}`]:r.columns!=="auto"}),a=r.templateRows||typeof r.rows=="number",o=r.templateRows??`repeat(${r.rows}, minmax(0, 1fr))`,s=e.reactive({...a&&{gridTemplateRows:o},...r.templateColumns&&{gridTemplateColumns:r.templateColumns}});return(c,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component),{class:e.normalizeClass(n),style:e.normalizeStyle(s)},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}});const vr=e.defineComponent({__name:"GridItem",props:{component:{default:"div"},spanColumn:{default:1},spanRow:{default:1}},setup(t){const r=t,n=e.reactive({"pdap-grid-item":!0,[`pdap-grid-item-span-column-${r.spanColumn}`]:r.spanColumn>1}),a=e.reactive({...r.spanRow>1&&{gridRow:`span ${r.spanRow} / span ${r.spanRow}`}});return(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.component),{class:e.normalizeClass(n),style:e.normalizeStyle(a)},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});const yr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[e.createElementVNode("path",{d:"M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"})],-1),
|
3
|
-
`,"Did you forget to inject some linkData for the Nav component?"));const n=e.reactive({isExpanded:!1,isMobile:!0}),a=e.reactive({"pdap-nav":!0});e.onBeforeMount(()=>{o(),window.addEventListener("resize",o)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",o)});async function o(){window.innerWidth<=1024?n.isMobile=!0:n.isMobile=!1,await e.nextTick()}async function s(){var u,l;const c=document.querySelector("body");!n.isExpanded&&n.isMobile?(n.isExpanded=!0,c!=null&&c.classList.contains("lock-scroll")||(u=document.querySelector("body"))==null||u.classList.add("lock-scroll")):n.isExpanded&&n.isMobile&&(n.isExpanded=!1,(l=document.querySelector("body"))==null||l.classList.remove("lock-scroll")),await e.nextTick()}return(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{"aria-controls":"nav",class:"pdap-nav-open-button",role:"button",onClick:s},
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("vue-router"),pe=e.defineComponent({__name:"PdapButton",props:{intent:{default:"primary"},isLoading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.reactive({"pdap-button":!0,[`pdap-button-${r.intent}`]:!!r.intent,"pdap-button-loading":r.isLoading});return(a,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(n)},[e.renderSlot(a.$slots,"default")],2))}});const z=e.defineComponent({__name:"FlexContainer",props:{alignment:{default:"start"},component:{default:"div"}},setup(t){const r=t,n=e.reactive({"pdap-flex-container":!0,[`pdap-flex-container-${r.alignment}`]:!0});return(a,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{class:e.normalizeClass(n)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["class"]))}});const Se={class:"pdap-footer"},je={class:"pdap-footer-social-links"},Ne=["href"],Te={class:"pdap-footer-copyright"},Ae=e.createElementVNode("br",null,null,-1),Ie=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" PDAP is a non-profit. EIN: 85-4207132. "),e.createElementVNode("a",{href:"https://docs.pdap.io/meta/policy/pdap-privacy-policy",alt:"Privacy Policy",target:"_blank"},[e.createElementVNode("br"),e.createTextVNode(" Privacy Policy "),e.createElementVNode("i",{class:"fa fa-external-link"})]),e.createElementVNode("br"),e.createElementVNode("a",{href:"mailto:contact@pdap.io"},"contact@pdap.io")],-1),Le={class:"pdap-footer-widget-links"},ze=e.createElementVNode("a",{href:"https://www.guidestar.org/profile/85-4207132",target:"_blank"},[e.createElementVNode("img",{src:"https://widgets.guidestar.org/gximage2?o=9973356&l=v4"})],-1),De=["href"],Me=["src"],Fe=["src"],qe=e.defineComponent({__name:"PdapFooter",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/acronym.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.inject("footerLinks",[{href:"https://github.com/orgs/Police-Data-Accessibility-Project",text:"Github"},{href:"https://discord.gg/wMqex8nKZJ",text:"Discord"},{href:"https://www.linkedin.com/company/pdap",text:"LinkedIn"},{path:"/jobs",text:"Jobs"}]),a=r.logoImageAnchorPath.startsWith("/");return(o,s)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("footer",Se,[e.createVNode(z,{alignment:"center"},{default:e.withCtx(()=>[e.createElementVNode("ul",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),u=>(e.openBlock(),e.createElementBlock("li",{key:u.text,class:"pdap-footer-link-container"},[u.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-footer-social-link",href:u.href,target:"_blank",referrerpolicy:"no-referrer"},e.toDisplayString(u.text),9,Ne)):e.createCommentVNode("",!0),u.path?(e.openBlock(),e.createBlock(c,{key:1,"active-class":"pdap-footer-social-link-current","exact-active-class":"pdap-footer-social-link-current-exact",class:"pdap-footer-social-link",to:u.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("p",Te,[e.createTextVNode(" © "+e.toDisplayString(new Date().getFullYear())+" Police Data Accessibility Project",1),Ae]),Ie,e.createElementVNode("div",Le,[ze,e.unref(a)?(e.openBlock(),e.createBlock(c,{key:1,to:o.logoImageAnchorPath,class:"pdap-footer-logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Fe)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:o.logoImageAnchorPath,class:"pdap-footer-logo"},[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Me)],8,De))])]),_:1})])}}});function ee(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function k(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ee(Object(n),!0).forEach(function(a){He(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function He(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function te(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(t).reduce((n,a)=>(r.includes(a)||(n[a]=e.unref(t[a])),n),{})}function D(t){return typeof t=="function"}function Ge(t){return e.isReactive(t)||e.isReadonly(t)}function fe(t,r,n){let a=t;const o=r.split(".");for(let s=0;s<o.length;s++){if(!a[o[s]])return n;a=a[o[s]]}return a}function W(t,r,n){return e.computed(()=>t.some(a=>fe(r,a,{[n]:!1})[n]))}function re(t,r,n){return e.computed(()=>t.reduce((a,o)=>{const s=fe(r,o,{[n]:!1})[n]||[];return a.concat(s)},[]))}function ge(t,r,n,a){return t.call(a,e.unref(r),e.unref(n),a)}function he(t){return t.$valid!==void 0?!t.$valid:!t}function We(t,r,n,a,o,s,c){let{$lazy:u,$rewardEarly:l}=o,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],p=arguments.length>8?arguments[8]:void 0,$=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0;const f=e.ref(!!a.value),i=e.ref(0);n.value=!1;const m=e.watch([r,a].concat(d,h),()=>{if(u&&!a.value||l&&!$.value&&!n.value)return;let g;try{g=ge(t,r,p,c)}catch(v){g=Promise.reject(v)}i.value++,n.value=!!i.value,f.value=!1,Promise.resolve(g).then(v=>{i.value--,n.value=!!i.value,s.value=v,f.value=he(v)}).catch(v=>{i.value--,n.value=!!i.value,s.value=v,f.value=!0})},{immediate:!0,deep:typeof r=="object"});return{$invalid:f,$unwatch:m}}function Ue(t,r,n,a,o,s,c,u){let{$lazy:l,$rewardEarly:d}=a;const p=()=>({}),$=e.computed(()=>{if(l&&!n.value||d&&!u.value)return!1;let h=!0;try{const f=ge(t,r,c,s);o.value=f,h=he(f)}catch(f){o.value=f}return h});return{$unwatch:p,$invalid:$}}function Xe(t,r,n,a,o,s,c,u,l,d,p){const $=e.ref(!1),h=t.$params||{},f=e.ref(null);let i,m;t.$async?{$invalid:i,$unwatch:m}=We(t.$validator,r,$,n,a,f,o,t.$watchTargets,l,d,p):{$invalid:i,$unwatch:m}=Ue(t.$validator,r,n,a,f,o,l,d);const g=t.$message;return{$message:D(g)?e.computed(()=>g(te({$pending:$,$invalid:i,$params:te(h),$model:r,$response:f,$validator:s,$propertyPath:u,$property:c}))):g||"",$params:h,$pending:$,$invalid:i,$response:f,$unwatch:m}}function Ke(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=e.unref(t),n=Object.keys(r),a={},o={},s={};let c=null;return n.forEach(u=>{const l=r[u];switch(!0){case D(l.$validator):a[u]=l;break;case D(l):a[u]={$validator:l};break;case u==="$validationGroups":c=l;break;case u.startsWith("$"):s[u]=l;break;default:o[u]=l}}),{rules:a,nestedValidators:o,config:s,validationGroups:c}}const Ze="__root";function Qe(t,r,n,a,o,s,c,u,l){const d=Object.keys(t),p=a.get(o,t),$=e.ref(!1),h=e.ref(!1),f=e.ref(0);if(p){if(!p.$partial)return p;p.$unwatch(),$.value=p.$dirty.value}const i={$dirty:$,$path:o,$touch:()=>{$.value||($.value=!0)},$reset:()=>{$.value&&($.value=!1)},$commit:()=>{}};return d.length?(d.forEach(m=>{i[m]=Xe(t[m],r,i.$dirty,s,c,m,n,o,l,h,f)}),i.$externalResults=e.computed(()=>u.value?[].concat(u.value).map((m,g)=>({$propertyPath:o,$property:n,$validator:"$externalResults",$uid:`${o}-externalResult-${g}`,$message:m,$params:{},$response:null,$pending:!1})):[]),i.$invalid=e.computed(()=>{const m=d.some(g=>e.unref(i[g].$invalid));return h.value=m,!!i.$externalResults.value.length||m}),i.$pending=e.computed(()=>d.some(m=>e.unref(i[m].$pending))),i.$error=e.computed(()=>i.$dirty.value?i.$pending.value||i.$invalid.value:!1),i.$silentErrors=e.computed(()=>d.filter(m=>e.unref(i[m].$invalid)).map(m=>{const g=i[m];return e.reactive({$propertyPath:o,$property:n,$validator:m,$uid:`${o}-${m}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(i.$externalResults.value)),i.$errors=e.computed(()=>i.$dirty.value?i.$silentErrors.value:[]),i.$unwatch=()=>d.forEach(m=>{i[m].$unwatch()}),i.$commit=()=>{h.value=!0,f.value=Date.now()},a.set(o,t,i),i):(p&&a.set(o,t,i),i)}function Je(t,r,n,a,o,s,c){const u=Object.keys(t);return u.length?u.reduce((l,d)=>(l[d]=U({validations:t[d],state:r,key:d,parentKey:n,resultsCache:a,globalConfig:o,instance:s,externalResults:c}),l),{}):{}}function Ye(t,r,n){const a=e.computed(()=>[r,n].filter(i=>i).reduce((i,m)=>i.concat(Object.values(e.unref(m))),[])),o=e.computed({get(){return t.$dirty.value||(a.value.length?a.value.every(i=>i.$dirty):!1)},set(i){t.$dirty.value=i}}),s=e.computed(()=>{const i=e.unref(t.$silentErrors)||[],m=a.value.filter(g=>(e.unref(g).$silentErrors||[]).length).reduce((g,v)=>g.concat(...v.$silentErrors),[]);return i.concat(m)}),c=e.computed(()=>{const i=e.unref(t.$errors)||[],m=a.value.filter(g=>(e.unref(g).$errors||[]).length).reduce((g,v)=>g.concat(...v.$errors),[]);return i.concat(m)}),u=e.computed(()=>a.value.some(i=>i.$invalid)||e.unref(t.$invalid)||!1),l=e.computed(()=>a.value.some(i=>e.unref(i.$pending))||e.unref(t.$pending)||!1),d=e.computed(()=>a.value.some(i=>i.$dirty)||a.value.some(i=>i.$anyDirty)||o.value),p=e.computed(()=>o.value?l.value||u.value:!1),$=()=>{t.$touch(),a.value.forEach(i=>{i.$touch()})},h=()=>{t.$commit(),a.value.forEach(i=>{i.$commit()})},f=()=>{t.$reset(),a.value.forEach(i=>{i.$reset()})};return a.value.length&&a.value.every(i=>i.$dirty)&&$(),{$dirty:o,$errors:c,$invalid:u,$anyDirty:d,$error:p,$pending:l,$touch:$,$reset:f,$silentErrors:s,$commit:h}}function U(t){let{validations:r,state:n,key:a,parentKey:o,childResults:s,resultsCache:c,globalConfig:u={},instance:l,externalResults:d}=t;const p=o?`${o}.${a}`:a,{rules:$,nestedValidators:h,config:f,validationGroups:i}=Ke(r),m=k(k({},u),f),g=a?e.computed(()=>{const y=e.unref(n);return y?e.unref(y[a]):void 0}):n,v=k({},e.unref(d)||{}),x=e.computed(()=>{const y=e.unref(d);return a?y?e.unref(y[a]):void 0:y}),V=Qe($,g,a,c,p,m,l,x,n),w=Je(h,g,p,c,m,l,x),O={};i&&Object.entries(i).forEach(y=>{let[B,C]=y;O[B]={$invalid:W(C,w,"$invalid"),$error:W(C,w,"$error"),$pending:W(C,w,"$pending"),$errors:re(C,w,"$errors"),$silentErrors:re(C,w,"$silentErrors")}});const{$dirty:E,$errors:I,$invalid:q,$anyDirty:Ee,$error:Ce,$pending:H,$touch:G,$reset:ke,$silentErrors:Pe,$commit:Y}=Ye(V,w,s),Re=a?e.computed({get:()=>e.unref(g),set:y=>{E.value=!0;const B=e.unref(n),C=e.unref(d);C&&(C[a]=v[a]),e.isRef(B[a])?B[a].value=y:B[a]=y}}):null;a&&m.$autoDirty&&e.watch(g,()=>{E.value||G();const y=e.unref(d);y&&(y[a]=v[a])},{flush:"sync"});async function Ve(){return G(),m.$rewardEarly&&(Y(),await e.nextTick()),await e.nextTick(),new Promise(y=>{if(!H.value)return y(!q.value);const B=e.watch(H,()=>{y(!q.value),B()})})}function Oe(y){return(s.value||{})[y]}function Be(){e.isRef(d)?d.value=v:Object.keys(v).length===0?Object.keys(d).forEach(y=>{delete d[y]}):Object.assign(d,v)}return e.reactive(k(k(k({},V),{},{$model:Re,$dirty:E,$error:Ce,$errors:I,$invalid:q,$anyDirty:Ee,$pending:H,$touch:G,$reset:ke,$path:p||Ze,$silentErrors:Pe,$validate:Ve,$commit:Y},s&&{$getResultsForChild:Oe,$clearExternalResults:Be,$validationGroups:O}),w))}class et{constructor(){this.storage=new Map}set(r,n,a){this.storage.set(r,{rules:n,result:a})}checkRulesValidity(r,n,a){const o=Object.keys(a),s=Object.keys(n);return s.length!==o.length||!s.every(u=>o.includes(u))?!1:s.every(u=>n[u].$params?Object.keys(n[u].$params).every(l=>e.unref(a[u].$params[l])===e.unref(n[u].$params[l])):!0)}get(r,n){const a=this.storage.get(r);if(!a)return;const{rules:o,result:s}=a,c=this.checkRulesValidity(r,n,o),u=s.$unwatch?s.$unwatch:()=>({});return c?s:{$dirty:s.$dirty,$partial:!0,$unwatch:u}}}const L={COLLECT_ALL:!0,COLLECT_NONE:!1},ne=Symbol("vuelidate#injectChildResults"),ae=Symbol("vuelidate#removeChildResults");function tt(t){let{$scope:r,instance:n}=t;const a={},o=e.ref([]),s=e.computed(()=>o.value.reduce((p,$)=>(p[$]=e.unref(a[$]),p),{}));function c(p,$){let{$registerAs:h,$scope:f,$stopPropagation:i}=$;i||r===L.COLLECT_NONE||f===L.COLLECT_NONE||r!==L.COLLECT_ALL&&r!==f||(a[h]=p,o.value.push(h))}n.__vuelidateInjectInstances=[].concat(n.__vuelidateInjectInstances||[],c);function u(p){o.value=o.value.filter($=>$!==p),delete a[p]}n.__vuelidateRemoveInstances=[].concat(n.__vuelidateRemoveInstances||[],u);const l=e.inject(ne,[]);e.provide(ne,n.__vuelidateInjectInstances);const d=e.inject(ae,[]);return e.provide(ae,n.__vuelidateRemoveInstances),{childResults:s,sendValidationResultsToParent:l,removeValidationResultsFromParent:d}}function $e(t){return new Proxy(t,{get(r,n){return typeof r[n]=="object"?$e(r[n]):e.computed(()=>r[n])}})}let oe=0;function rt(t,r){var n;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(a=t,t=void 0,r=void 0);let{$registerAs:o,$scope:s=L.COLLECT_ALL,$stopPropagation:c,$externalResults:u,currentVueInstance:l}=a;const d=l||((n=e.getCurrentInstance())===null||n===void 0?void 0:n.proxy),p=d?d.$options:{};o||(oe+=1,o=`_vuelidate_${oe}`);const $=e.ref({}),h=new et,{childResults:f,sendValidationResultsToParent:i,removeValidationResultsFromParent:m}=d?tt({$scope:s,instance:d}):{childResults:e.ref({})};if(!t&&p.validations){const g=p.validations;r=e.ref({}),e.onBeforeMount(()=>{r.value=d,e.watch(()=>D(g)?g.call(r.value,new $e(r.value)):g,v=>{$.value=U({validations:v,state:r,childResults:f,resultsCache:h,globalConfig:a,instance:d,externalResults:u||d.vuelidateExternalResults})},{immediate:!0})}),a=p.validationsConfig||a}else{const g=e.isRef(t)||Ge(t)?t:e.reactive(t||{});e.watch(g,v=>{$.value=U({validations:v,state:r,childResults:f,resultsCache:h,globalConfig:a,instance:d??{},externalResults:u})},{immediate:!0})}return d&&(i.forEach(g=>g($,{$registerAs:o,$scope:s,$stopPropagation:c})),e.onBeforeUnmount(()=>m.forEach(g=>g(o)))),e.computed(()=>k(k({},e.unref($.value)),f.value))}var b=(t=>(t.CHECKBOX="checkbox",t.TEXT="text",t.PASSWORD="password",t))(b||{});const nt=["id","name","placeholder","value"],at=["id","name","placeholder","value"],ot=["id","name","checked","value"],st=["id"],lt=["for"],ve=e.defineComponent({__name:"PdapInput",props:{error:{},id:{},label:{},name:{},placeholder:{},type:{},value:{},defaultChecked:{type:Boolean}},emits:["change","input"],setup(t,{emit:r}){const n=t,a=r,o=()=>{c.value=!c.value,a("change",c.value.toString())},s=l=>{a("input",l.target.value)},c=e.ref(n.defaultChecked),u=e.computed(()=>`pdap-${n.name}-input-error`);return(l,d)=>{var p;return e.openBlock(),e.createBlock(e.unref(be),{class:e.normalizeClass({"pdap-input":!0,"pdap-input-error":Number((p=l.error)==null?void 0:p.length)>=1})},{default:e.withCtx(()=>[l.type===e.unref(b).TEXT?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0,id:l.id,type:"text",name:l.name,placeholder:l.placeholder,value:l.value},l.$attrs,{onInput:s}),null,16,nt)):e.createCommentVNode("",!0),l.type===e.unref(b).PASSWORD?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1,id:l.id,type:"password",name:l.name,placeholder:l.placeholder,value:l.value},l.$attrs,{onInput:s}),null,16,at)):l.type===e.unref(b).CHECKBOX?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:2,id:l.id,class:"pdap-input-checkbox",name:l.name,checked:c.value,type:"checkbox",value:l.value},l.$attrs,{onChange:o}),null,16,ot)):e.createCommentVNode("",!0),l.error?(e.openBlock(),e.createElementBlock("div",{key:3,id:u.value,class:"pdap-input-error-message"},e.toDisplayString(l.error),9,st)):e.createCommentVNode("",!0),e.createElementVNode("label",{class:"pdap-input-label",for:l.id},e.toDisplayString(l.label),9,lt)]),_:1},8,["class"])}}});function se(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function j(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?se(Object(n),!0).forEach(function(a){it(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function it(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function T(t){return typeof t=="function"}function M(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function F(t){return T(t.$validator)?j({},t):{$validator:t}}function ut(t){return M(t)&&T(t.then)}function P(t){return typeof t=="object"?t.$valid:t}function S(t){return t.$validator||t}function K(t,r){if(!M(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!M(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=F(r);return n.$params=j(j({},n.$params||{}),t),n}function A(t,r){if(!T(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!M(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=F(r);return n.$message=t,n}function ct(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=F(t);return j(j({},n),{},{$async:!0,$watchTargets:r})}function dt(t){return{$validator(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return e.unref(r).reduce((s,c,u)=>{const l=Object.entries(c).reduce((d,p)=>{let[$,h]=p;const f=t[$]||{},i=Object.entries(f).reduce((m,g)=>{let[v,x]=g;const w=S(x).call(this,h,c,u,...a),O=P(w);if(m.$data[v]=w,m.$data.$invalid=!O||!!m.$data.$invalid,m.$data.$error=m.$data.$invalid,!O){let E=x.$message||"";const I=x.$params||{};typeof E=="function"&&(E=E({$pending:!1,$invalid:!O,$params:I,$model:h,$response:w})),m.$errors.push({$property:$,$message:E,$params:I,$response:w,$model:h,$pending:!1,$validator:v})}return{$valid:m.$valid&&O,$data:m.$data,$errors:m.$errors}},{$valid:!0,$data:{},$errors:[]});return d.$data[$]=i.$data,d.$errors[$]=i.$errors,{$valid:d.$valid&&i.$valid,$data:d.$data,$errors:d.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:s.$valid&&l.$valid,$data:s.$data.concat(l.$data),$errors:s.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:r=>{let{$response:n}=r;return n?n.$errors.map(a=>Object.values(a).map(o=>o.map(s=>s.$message)).reduce((o,s)=>o.concat(s),[])):[]}}}const _=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let r in t)return!0;return!1}return!!String(t).length},Z=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function R(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a=>(a=e.unref(a),!_(a)||r.every(o=>(o.lastIndex=0,o.test(a))))}var N=Object.freeze({__proto__:null,forEach:dt,len:Z,normalizeValidatorObject:F,regex:R,req:_,unwrap:e.unref,unwrapNormalizedValidator:S,unwrapValidatorResponse:P,withAsync:ct,withMessage:A,withParams:K}),mt=R(/^[a-zA-Z]*$/),pt={$validator:mt,$message:"The value is not alphabetical",$params:{type:"alpha"}},ft=R(/^[a-zA-Z0-9]*$/),gt={$validator:ft,$message:"The value must be alpha-numeric",$params:{type:"alphaNum"}},ht=R(/^\d*(\.\d+)?$/),$t={$validator:ht,$message:"Value must be numeric",$params:{type:"numeric"}};function vt(t,r){return n=>!_(n)||(!/\s/.test(n)||n instanceof Date)&&+e.unref(t)<=+n&&+e.unref(r)>=+n}function yt(t,r){return{$validator:vt(t,r),$message:n=>{let{$params:a}=n;return`The value must be between ${a.min} and ${a.max}`},$params:{min:t,max:r,type:"between"}}}const _t=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;var wt=R(_t),Q={$validator:wt,$message:"Value is not a valid email address",$params:{type:"email"}};function bt(t){if(!_(t))return!0;if(typeof t!="string")return!1;const r=t.split(".");return r.length===4&&r.every(xt)}const xt=t=>{if(t.length>3||t.length===0||t[0]==="0"&&t!=="0"||!t.match(/^\d+$/))return!1;const r=+t|0;return r>=0&&r<=255};var Et={$validator:bt,$message:"The value is not a valid IP address",$params:{type:"ipAddress"}};function Ct(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:":";return r=>{if(t=e.unref(t),!_(r))return!0;if(typeof r!="string")return!1;const n=typeof t=="string"&&t!==""?r.split(t):r.length===12||r.length===16?r.match(/.{2}/g):null;return n!==null&&(n.length===6||n.length===8)&&n.every(kt)}}const kt=t=>t.toLowerCase().match(/^[0-9a-f]{2}$/);function Pt(t){return{$validator:Ct(t),$message:"The value is not a valid MAC Address",$params:{type:"macAddress"}}}function Rt(t){return r=>!_(r)||Z(r)<=e.unref(t)}function Vt(t){return{$validator:Rt(t),$message:r=>{let{$params:n}=r;return`The maximum length allowed is ${n.max}`},$params:{max:t,type:"maxLength"}}}function Ot(t){return r=>!_(r)||Z(r)>=e.unref(t)}function Bt(t){return{$validator:Ot(t),$message:r=>{let{$params:n}=r;return`This field should be at least ${n.min} characters long`},$params:{min:t,type:"minLength"}}}function St(t){return typeof t=="string"&&(t=t.trim()),_(t)}var J={$validator:St,$message:"Value is required",$params:{type:"required"}};const le=(t,r)=>t?_(typeof r=="string"?r.trim():r):!0;function jt(t){return function(r,n){if(typeof t!="function")return le(e.unref(t),r);const a=t.call(this,r,n);return le(a,r)}}function Nt(t){return{$validator:jt(t),$message:"The value is required",$params:{type:"requiredIf",prop:t}}}const ie=(t,r)=>t?!0:_(typeof r=="string"?r.trim():r);function Tt(t){return function(r,n){if(typeof t!="function")return ie(e.unref(t),r);const a=t.call(this,r,n);return ie(a,r)}}function At(t){return{$validator:Tt(t),$message:"The value is required",$params:{type:"requiredUnless",prop:t}}}function It(t){return r=>e.unref(r)===e.unref(t)}function Lt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:It(t),$message:n=>`The value must be equal to the ${r} value`,$params:{equalTo:t,otherName:r,type:"sameAs"}}}const zt=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;var Dt=R(zt),Mt={$validator:Dt,$message:"The value is not a valid URL address",$params:{type:"url"}};function Ft(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>P(o)?o:S(s).apply(this,n),!1)}}function qt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const c=await o;return P(c)?c:S(s).apply(this,n)},Promise.resolve(!1))}}function Ht(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(c=>c.$async),o=r.reduce((c,u)=>u.$watchTargets?c.concat(u.$watchTargets):c,[]);let s=()=>!1;return r.length&&(s=a?qt(r):Ft(r)),{$async:a,$validator:s,$watchTargets:o}}function Gt(){return K({type:"or"},A("The value does not match any of the provided validators",Ht(...arguments)))}function Wt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>P(o)?S(s).apply(this,n):o,!0)}}function Ut(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const c=await o;return P(c)?S(s).apply(this,n):c},Promise.resolve(!0))}}function Xt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(c=>c.$async),o=r.reduce((c,u)=>u.$watchTargets?c.concat(u.$watchTargets):c,[]);let s=()=>!1;return r.length&&(s=a?Ut(r):Wt(r)),{$async:a,$validator:s,$watchTargets:o}}function Kt(){return K({type:"and"},A("The value does not match all of the provided validators",Xt(...arguments)))}function Zt(t){return function(r,n){if(!_(r))return!0;const a=S(t).call(this,r,n);return ut(a)?a.then(o=>!P(o)):!P(a)}}function Qt(t){return{$validator:Zt(t),$message:"The value does not match the provided validator",$params:{type:"not"}}}function Jt(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r>=+e.unref(t)}function Yt(t){return{$validator:Jt(t),$message:r=>{let{$params:n}=r;return`The minimum value allowed is ${n.min}`},$params:{min:t,type:"minValue"}}}function er(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r<=+e.unref(t)}var tr=t=>({$validator:er(t),$message:r=>{let{$params:n}=r;return`The maximum value allowed is ${n.max}`},$params:{max:t,type:"maxValue"}}),rr=R(/(^[0-9]*$)|(^-[0-9]+$)/),nr={$validator:rr,$message:"Value is not an integer",$params:{type:"integer"}},ar=R(/^[-]?\d*(\.\d+)?$/),or={$validator:ar,$message:"Value must be decimal",$params:{type:"decimal"}};function sr(t){let{t:r,messagePath:n=o=>{let{$validator:s}=o;return`validations.${s}`},messageParams:a=o=>o}=t;return function(s){let{withArguments:c=!1,messagePath:u=n,messageParams:l=a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function d(p){return r(u(p),l(j({model:p.$model,property:p.$property,pending:p.$pending,invalid:p.$invalid,response:p.$response,validator:p.$validator,propertyPath:p.$propertyPath},p.$params)))}return c&&typeof s=="function"?function(){return A(d,s(...arguments))}:A(d,s)}}const ye=Object.freeze(Object.defineProperty({__proto__:null,alpha:pt,alphaNum:gt,and:Kt,between:yt,createI18nMessage:sr,decimal:or,email:Q,helpers:N,integer:nr,ipAddress:Et,macAddress:Pt,maxLength:Vt,maxValue:tr,minLength:Bt,minValue:Yt,not:Qt,numeric:$t,or:Gt,required:J,requiredIf:Nt,requiredUnless:At,sameAs:Lt,url:Mt},Symbol.toStringTag,{value:"Module"})),_e=N.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/);function ue(t){return["maxLength","minLength"].includes(t)}function ce(t){return t==="required"}function de(t){return t==="email"}function me(t){return t==="password"}function lr(t,r){return{[t]:ye[t](r)}}function ir(t,r,n){return{[t]:N.withMessage(n,ye[t](r))}}function ur(){return{required:J}}function cr(t){return{required:N.withMessage(t,J)}}function dr(){return{email:Q}}function mr(t){return{email:N.withMessage(t,Q)}}function pr(){return{password:_e}}function fr(t){return{password:N.withMessage(t,_e)}}function gr(t,r){if(ue(t)&&typeof r.message=="string"&&typeof r.value=="number")return ir(t,r.value,r.message);if(ue(t)&&typeof r.message>"u"&&typeof r.value=="number")return lr(t,r.value);if(de(t)&&typeof r.message=="string")return mr(r.message);if(de(t)&&typeof r.message>"u")return dr();if(me(t)&&typeof r.message=="string")return fr(r.message);if(me(t)&&typeof r.message>"u")return pr();if(ce(t)&&typeof r.message=="string")return cr(r.message);if(ce(t)&&typeof r.message>"u")return ur();throw new Error("No valid rule detected")}const hr=["id","name"],$r={key:0,class:"pdap-form-error-message"},we=e.defineComponent({__name:"PdapForm",props:{error:{default:null},id:{},name:{},schema:{}},emits:["submit","change"],setup(t,{emit:r}){const n=t,a=r,o=e.computed(()=>n.schema.map(h=>{const f={...h};return delete f.validators,f}));let s=e.reactive(o.value.reduce((h,f)=>{switch(f.type){case b.CHECKBOX:return{...h,[f.name]:String(f.defaultChecked)};case b.TEXT:case b.PASSWORD:default:return{...h,[f.name]:f.value}}},{}));const c=n.schema.reduce((h,f)=>{const i=Object.entries(f.validators??{}).reduce((m,[g,v])=>({...m,...gr(g,v)}),{});return{...h,[f.name]:{...i}}},{}),u=rt(c,s,{$autoDirty:!1,$lazy:!0}),l=e.ref(n.error);function d(h,f){s[h]=f,p()}e.watchEffect(()=>{n.error?l.value=n.error:l.value&&u.value.$errors.length===0?l.value=null:!l.value&&u.value.$errors.length>0&&(l.value="Please update this form to correct the errors")}),e.watchEffect(()=>{console.debug(`PdapForm ${n.name}
|
2
|
+
`,{errorMessage:l.value,props:n,schema:n.schema,data:o,values:s,vuelidate:{rules:c,v$:u}})});function p(){a("change",{...s})}async function $(h){if(await u.value.$validate()){a("submit",{...s}),u.value.$reset(),h.target.reset(),s=Object.entries(s).reduce((m,[g,v])=>({...m,[g]:["true","false"].includes(v)?v:""}),{});return}}return(h,f)=>(e.openBlock(),e.createElementBlock("form",{id:h.id,name:h.name,class:"pdap-form",onChange:p,onSubmit:f[0]||(f[0]=e.withModifiers(i=>$(i),["prevent"]))},[typeof l.value=="string"?(e.openBlock(),e.createElementBlock("div",$r,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>{var m,g,v,x;return e.openBlock(),e.createBlock(ve,e.mergeProps(i,{key:i.name,error:(m=e.unref(u)[i.name])!=null&&m.$error?(x=(v=(g=e.unref(u)[i.name])==null?void 0:g.$errors)==null?void 0:v[0])==null?void 0:x.$message:"",value:e.unref(s)[i.name],onChange:V=>d(i.name,V),onInput:V=>d(i.name,V)}),null,16,["error","value","onChange","onInput"])}),128)),e.renderSlot(h.$slots,"default")],40,hr))}});const be=e.defineComponent({__name:"GridContainer",props:{columns:{default:"auto"},component:{default:"div"},rows:{default:"auto"},templateColumns:{},templateRows:{}},setup(t){const r=t,n=e.reactive({"pdap-grid-container":!0,[`pdap-grid-container-column-${r.columns}`]:r.columns!=="auto"}),a=r.templateRows||typeof r.rows=="number",o=r.templateRows??`repeat(${r.rows}, minmax(0, 1fr))`,s=e.reactive({...a&&{gridTemplateRows:o},...r.templateColumns&&{gridTemplateColumns:r.templateColumns}});return(c,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component),{class:e.normalizeClass(n),style:e.normalizeStyle(s)},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}});const vr=e.defineComponent({__name:"GridItem",props:{component:{default:"div"},spanColumn:{default:1},spanRow:{default:1}},setup(t){const r=t,n=e.reactive({"pdap-grid-item":!0,[`pdap-grid-item-span-column-${r.spanColumn}`]:r.spanColumn>1}),a=e.reactive({...r.spanRow>1&&{gridRow:`span ${r.spanRow} / span ${r.spanRow}`}});return(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.component),{class:e.normalizeClass(n),style:e.normalizeStyle(a)},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});const yr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[e.createElementVNode("path",{d:"M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"})],-1),_r=[yr],wr=["aria-expanded"],br=["href"],xe=e.defineComponent({__name:"PdapNav",props:{topPosition:{}},setup(t){let r=e.inject("navLinks");typeof r>"u"&&(r=[],console.error(`Hey, PDAP developer
|
3
|
+
`,"Did you forget to inject some linkData for the Nav component?"));const n=e.reactive({isExpanded:!1,isMobile:!0}),a=e.reactive({"pdap-nav":!0});e.onBeforeMount(()=>{o(),window.addEventListener("resize",o)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",o)});async function o(){window.innerWidth<=1024?n.isMobile=!0:n.isMobile=!1,await e.nextTick()}async function s(){var u,l;const c=document.querySelector("body");!n.isExpanded&&n.isMobile?(n.isExpanded=!0,c!=null&&c.classList.contains("lock-scroll")||(u=document.querySelector("body"))==null||u.classList.add("lock-scroll")):n.isExpanded&&n.isMobile&&(n.isExpanded=!1,(l=document.querySelector("body"))==null||l.classList.remove("lock-scroll")),await e.nextTick()}return(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{"aria-controls":"nav",class:"pdap-nav-open-button",role:"button",onClick:s},_r),e.createElementVNode("nav",{id:"nav","aria-expanded":n.isMobile&&n.isExpanded||!n.isMobile,class:e.normalizeClass(a),style:e.normalizeStyle(n.isMobile?{top:`${c.topPosition}px`}:{})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),l=>(e.openBlock(),e.createElementBlock("li",{key:l.text,class:"pdap-nav-link-container"},[l.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-nav-link",href:l.href,target:"_blank",referrerpolicy:"no-referrer",onClick:s},e.toDisplayString(l.text),9,br)):e.createCommentVNode("",!0),l.path?(e.openBlock(),e.createBlock(e.unref(X.RouterLink),{key:1,"active-class":"pdap-nav-link-current","exact-active-class":"pdap-nav-link-current-exact",class:"pdap-nav-link",to:l.path,onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))],14,wr)],64))}});const xr=["href"],Er=["src"],Cr=["src"],kr=e.defineComponent({__name:"PdapHeader",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/lockup.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.ref(),a=e.ref(null),o=r.logoImageAnchorPath.startsWith("/");e.onMounted(()=>{s(),window.addEventListener("resize",s)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",s)});function s(){a.value&&(n.value=a.value.offsetHeight)}return(c,u)=>(e.openBlock(),e.createElementBlock("header",{ref_key:"el",ref:a,class:"pdap-header"},[e.unref(o)?(e.openBlock(),e.createBlock(e.unref(X.RouterLink),{key:1,to:c.logoImageAnchorPath,class:"logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:c.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Cr)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:c.logoImageAnchorPath,class:"logo"},[e.createElementVNode("img",{src:c.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Er)],8,xr)),e.createVNode(xe,{"top-position":n.value},null,8,["top-position"])],512))}});const Pr=e.createElementVNode("h2",{class:"mt-0"},"Search our database",-1),Rr=e.createElementVNode("p",{class:"pb-4 md:pb-8"},[e.createTextVNode(" If you are looking for something specific, we may already be tracking it. "),e.createElementVNode("a",{href:"https://pdap.io/data"},"Learn more about the data here.")],-1),Vr=e.defineComponent({__name:"QuickSearchForm",props:{baseUrlForRedirect:{default:"https://data-sources.pdap.io"}},setup(t){const r=X.useRouter(),n=t,a=[{id:"search-term",name:"searchTerm",label:"What are you looking for?",type:b.TEXT,placeholder:"Enter a keyword, or 'all'",value:""},{id:"location",name:"location",label:"From where?",type:b.TEXT,placeholder:"Enter a place, or 'all'",value:""}],o=e.ref(void 0);function s(u){o.value&&Object.values(u).some(Boolean)&&(o.value=void 0)}function c(u){if(Object.values(u).every(p=>!p)){o.value="Either a search term or a location is required.";return}let{location:l,searchTerm:d}=u;l=l&&l.length>0?l:"all",d=d&&d.length>0?d:"all",r.getRoutes().some(p=>p.path.includes("/search/"))?r.push(`/search/${d}/${l}`):window.location.assign(`${n.baseUrlForRedirect}/search/${d}/${l}`)}return(u,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(z,{class:"p-0"},{default:e.withCtx(()=>[Pr,Rr]),_:1}),e.createVNode(z,{alignment:"center",class:"pdap-quick-search-form h-full max-h-[75-vh] justify-start p-0"},{default:e.withCtx(()=>[e.createVNode(we,{id:"quick-search-form",class:"flex flex-wrap gap-x-4",error:o.value,schema:a,name:"quickSearchForm",onChange:s,onSubmit:c},{default:e.withCtx(()=>[e.createVNode(pe,{type:"submit",class:"flex-grow-0 flex-shrink-0 basis-full max-w-[unset] mt-4"},{default:e.withCtx(()=>[e.createTextVNode("Search Data Sources")]),_:1})]),_:1},8,["error"])]),_:1})],64))}});const Or=["alt","src"],Br=e.defineComponent({__name:"TileIcon",props:{imgAltText:{},imgSrc:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("img",{class:"pdap-tile-icon",alt:r.imgAltText,src:r.imgSrc},null,8,Or))}});const Sr={content:["./src/**/*.vue","./src/**/*.css"],theme:{extend:{colors:{brand:{blue:{light:"rgba(var(--color-brand-blue-light)/<alpha-value>)",medium:"rgba(var(--color-brand-blue-medium)/<alpha-value>)"},gold:"rgba(var(--color-brand-gold)/<alpha-value>)",wine:"rgba(var(--color-brand-wine)/<alpha-value>)"},neutral:{50:"rgba(var(--color-neutral-50)/<alpha-value>)",100:"rgba(var(--color-neutral-100)/<alpha-value>)",200:"rgba(var(--color-neutral-200)/<alpha-value>)",300:"rgba(var(--color-neutral-300)/<alpha-value>)",400:"rgba(var(--color-neutral-400)/<alpha-value>)",500:"rgba(var(--color-neutral-500)/<alpha-value>)",600:"rgba(var(--color-neutral-600)/<alpha-value>)",700:"rgba(var(--color-neutral-700)/<alpha-value>)",800:"rgba(var(--color-neutral-800)/<alpha-value>)",900:"rgba(var(--color-neutral-900)/<alpha-value>)",950:"rgba(var(--color-neutral-950)/<alpha-value>)"}},brightness:{85:".85"},maxWidth:{"4xl":"59rem"},screens:{xs:"500px"}},fontFamily:{sans:['"Libre Franklin"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"sans-serif"],serif:["ui-serif","Georgia"],mono:['"Source Code Pro"',"monospace","ui-monospace","SFMono-Regular"]},fontSize:{xs:"0.75rem",sm:"0.875rem",med:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.75rem","4xl":"2rem","5xl":"2.625rem","6xl":"3rem"}}};exports.Button=pe;exports.FlexContainer=z;exports.Footer=qe;exports.Form=we;exports.GridContainer=be;exports.GridItem=vr;exports.Header=kr;exports.Input=ve;exports.Nav=xe;exports.PdapInputTypes=b;exports.QuickSearchForm=Vr;exports.TileIcon=Br;exports.tailwindConfig=Sr;
|
package/dist/index.js
CHANGED
@@ -165,7 +165,7 @@ function Oe(e, t) {
|
|
165
165
|
}
|
166
166
|
return r;
|
167
167
|
}
|
168
|
-
function
|
168
|
+
function L(e) {
|
169
169
|
for (var t = 1; t < arguments.length; t++) {
|
170
170
|
var r = arguments[t] != null ? arguments[t] : {};
|
171
171
|
t % 2 ? Oe(Object(r), !0).forEach(function(n) {
|
@@ -457,21 +457,21 @@ function fe(e) {
|
|
457
457
|
nestedValidators: h,
|
458
458
|
config: f,
|
459
459
|
validationGroups: i
|
460
|
-
} = Rt(t), p =
|
460
|
+
} = Rt(t), p = L(L({}, l), f), g = n ? _(() => {
|
461
461
|
const w = d(r);
|
462
462
|
return w ? d(w[n]) : void 0;
|
463
|
-
}) : r, v =
|
463
|
+
}) : r, v = L({}, d(c) || {}), A = _(() => {
|
464
464
|
const w = d(c);
|
465
465
|
return n ? w ? d(w[n]) : void 0 : w;
|
466
466
|
}), F = Ct($, g, n, u, m, p, o, A, r), C = Et(h, g, m, u, p, o, A), q = {};
|
467
467
|
i && Object.entries(i).forEach((w) => {
|
468
|
-
let [N,
|
468
|
+
let [N, k] = w;
|
469
469
|
q[N] = {
|
470
|
-
$invalid: de(
|
471
|
-
$error: de(
|
472
|
-
$pending: de(
|
473
|
-
$errors: Ee(
|
474
|
-
$silentErrors: Ee(
|
470
|
+
$invalid: de(k, C, "$invalid"),
|
471
|
+
$error: de(k, C, "$error"),
|
472
|
+
$pending: de(k, C, "$pending"),
|
473
|
+
$errors: Ee(k, C, "$errors"),
|
474
|
+
$silentErrors: Ee(k, C, "$silentErrors")
|
475
475
|
};
|
476
476
|
});
|
477
477
|
const {
|
@@ -489,8 +489,8 @@ function fe(e) {
|
|
489
489
|
get: () => d(g),
|
490
490
|
set: (w) => {
|
491
491
|
T.value = !0;
|
492
|
-
const N = d(r),
|
493
|
-
|
492
|
+
const N = d(r), k = d(c);
|
493
|
+
k && (k[n] = v[n]), pe(N[n]) ? N[n].value = w : N[n] = w;
|
494
494
|
}
|
495
495
|
}) : null;
|
496
496
|
n && p.$autoDirty && Z(g, () => {
|
@@ -517,7 +517,7 @@ function fe(e) {
|
|
517
517
|
delete c[w];
|
518
518
|
}) : Object.assign(c, v);
|
519
519
|
}
|
520
|
-
return E(
|
520
|
+
return E(L(L(L({}, F), {}, {
|
521
521
|
$model: Qe,
|
522
522
|
$dirty: T,
|
523
523
|
$error: Xe,
|
@@ -666,10 +666,10 @@ function It(e, t) {
|
|
666
666
|
$registerAs: a,
|
667
667
|
$scope: s,
|
668
668
|
$stopPropagation: u
|
669
|
-
})), $e(() => p.forEach((g) => g(a)))), _(() =>
|
669
|
+
})), $e(() => p.forEach((g) => g(a)))), _(() => L(L({}, d($.value)), f.value));
|
670
670
|
}
|
671
671
|
var S = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.TEXT = "text", e.PASSWORD = "password", e))(S || {});
|
672
|
-
const Tt = ["id", "name", "placeholder", "value"],
|
672
|
+
const Tt = ["id", "name", "placeholder", "value"], kt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "checked", "value"], Vt = ["id"], zt = ["for"], Mt = /* @__PURE__ */ j({
|
673
673
|
__name: "PdapInput",
|
674
674
|
props: {
|
675
675
|
error: {},
|
@@ -712,7 +712,7 @@ const Tt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "placehol
|
|
712
712
|
name: o.name,
|
713
713
|
placeholder: o.placeholder,
|
714
714
|
value: o.value
|
715
|
-
}, o.$attrs, { onInput: s }), null, 16,
|
715
|
+
}, o.$attrs, { onInput: s }), null, 16, kt)) : o.type === d(S).CHECKBOX ? (y(), x("input", te({
|
716
716
|
key: 2,
|
717
717
|
id: o.id,
|
718
718
|
class: "pdap-input-checkbox",
|
@@ -720,7 +720,7 @@ const Tt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "placehol
|
|
720
720
|
checked: u.value,
|
721
721
|
type: "checkbox",
|
722
722
|
value: o.value
|
723
|
-
}, o.$attrs, { onChange: a }), null, 16,
|
723
|
+
}, o.$attrs, { onChange: a }), null, 16, Lt)) : z("", !0),
|
724
724
|
o.error ? (y(), x("div", {
|
725
725
|
key: 3,
|
726
726
|
id: l.value,
|
@@ -1065,13 +1065,13 @@ function dr(e) {
|
|
1065
1065
|
}
|
1066
1066
|
};
|
1067
1067
|
}
|
1068
|
-
const
|
1068
|
+
const ke = (e, t) => e ? !0 : O(typeof t == "string" ? t.trim() : t);
|
1069
1069
|
function pr(e) {
|
1070
1070
|
return function(t, r) {
|
1071
1071
|
if (typeof e != "function")
|
1072
|
-
return
|
1072
|
+
return ke(d(e), t);
|
1073
1073
|
const n = e.call(this, t, r);
|
1074
|
-
return
|
1074
|
+
return ke(n, t);
|
1075
1075
|
};
|
1076
1076
|
}
|
1077
1077
|
function mr(e) {
|
@@ -1223,14 +1223,14 @@ var Ir = (e) => ({
|
|
1223
1223
|
max: e,
|
1224
1224
|
type: "maxValue"
|
1225
1225
|
}
|
1226
|
-
}), Tr = D(/(^[0-9]*$)|(^-[0-9]+$)/),
|
1226
|
+
}), Tr = D(/(^[0-9]*$)|(^-[0-9]+$)/), kr = {
|
1227
1227
|
$validator: Tr,
|
1228
1228
|
$message: "Value is not an integer",
|
1229
1229
|
$params: {
|
1230
1230
|
type: "integer"
|
1231
1231
|
}
|
1232
|
-
},
|
1233
|
-
$validator:
|
1232
|
+
}, Lr = D(/^[-]?\d*(\.\d+)?$/), Vr = {
|
1233
|
+
$validator: Lr,
|
1234
1234
|
$message: "Value must be decimal",
|
1235
1235
|
$params: {
|
1236
1236
|
type: "decimal"
|
@@ -1279,7 +1279,7 @@ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1279
1279
|
decimal: Vr,
|
1280
1280
|
email: be,
|
1281
1281
|
helpers: X,
|
1282
|
-
integer:
|
1282
|
+
integer: kr,
|
1283
1283
|
ipAddress: tr,
|
1284
1284
|
macAddress: ar,
|
1285
1285
|
maxLength: or,
|
@@ -1297,7 +1297,7 @@ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1297
1297
|
}, Symbol.toStringTag, { value: "Module" })), We = X.regex(
|
1298
1298
|
/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/
|
1299
1299
|
);
|
1300
|
-
function
|
1300
|
+
function Le(e) {
|
1301
1301
|
return ["maxLength", "minLength"].includes(e);
|
1302
1302
|
}
|
1303
1303
|
function Ve(e) {
|
@@ -1344,13 +1344,13 @@ function Gr(e) {
|
|
1344
1344
|
};
|
1345
1345
|
}
|
1346
1346
|
function Wr(e, t) {
|
1347
|
-
if (
|
1347
|
+
if (Le(e) && typeof t.message == "string" && typeof t.value == "number")
|
1348
1348
|
return Dr(
|
1349
1349
|
e,
|
1350
1350
|
t.value,
|
1351
1351
|
t.message
|
1352
1352
|
);
|
1353
|
-
if (
|
1353
|
+
if (Le(e) && typeof t.message > "u" && typeof t.value == "number")
|
1354
1354
|
return Mr(e, t.value);
|
1355
1355
|
if (ze(e) && typeof t.message == "string")
|
1356
1356
|
return Br(t.message);
|
@@ -1653,7 +1653,7 @@ const rn = ["href"], nn = ["src"], an = ["src"], mn = /* @__PURE__ */ j({
|
|
1653
1653
|
}
|
1654
1654
|
});
|
1655
1655
|
const sn = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1), on = /* @__PURE__ */ b("p", { class: "pb-4 md:pb-8" }, [
|
1656
|
-
/* @__PURE__ */ B(" If you
|
1656
|
+
/* @__PURE__ */ B(" If you are looking for something specific, we may already be tracking it. "),
|
1657
1657
|
/* @__PURE__ */ b("a", { href: "https://pdap.io/data" }, "Learn more about the data here.")
|
1658
1658
|
], -1), fn = /* @__PURE__ */ j({
|
1659
1659
|
__name: "QuickSearchForm",
|