pdap-design-system 2.0.5 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +41 -15
- package/bin/pdap-design-system-cli.js +1 -1
- package/dist/config/index.d.ts +2 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +429 -347
- package/dist/{index.d.ts → src/index.d.ts} +1 -0
- package/dist/tailwind.config.d.ts +2 -0
- package/docs/CONTRIBUTING.md +64 -0
- package/docs/components.md +555 -0
- package/package.json +42 -14
- package/CONTRIBUTING.md +0 -34
- package/dist/tools/testing/serializer.d.ts +0 -7
- package/dist/tools/testing/setup.d.ts +0 -1
- /package/dist/{components → src/components}/Button/PdapButton.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Button/index.d.ts +0 -0
- /package/dist/{components → src/components}/Button/types.d.ts +0 -0
- /package/dist/{components → src/components}/FlexContainer/FlexContainer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/FlexContainer/index.d.ts +0 -0
- /package/dist/{components → src/components}/FlexContainer/types.d.ts +0 -0
- /package/dist/{components → src/components}/Footer/PdapFooter.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Footer/index.d.ts +0 -0
- /package/dist/{components → src/components}/Footer/types.d.ts +0 -0
- /package/dist/{components → src/components}/Form/PdapForm.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Form/index.d.ts +0 -0
- /package/dist/{components → src/components}/Form/types.d.ts +0 -0
- /package/dist/{components → src/components}/GridContainer/GridContainer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/GridContainer/index.d.ts +0 -0
- /package/dist/{components → src/components}/GridContainer/types.d.ts +0 -0
- /package/dist/{components → src/components}/GridItem/GridItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/GridItem/index.d.ts +0 -0
- /package/dist/{components → src/components}/GridItem/types.d.ts +0 -0
- /package/dist/{components → src/components}/Header/PdapHeader.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Header/index.d.ts +0 -0
- /package/dist/{components → src/components}/Header/types.d.ts +0 -0
- /package/dist/{components → src/components}/Input/PdapInput.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Input/index.d.ts +0 -0
- /package/dist/{components → src/components}/Input/types.d.ts +0 -0
- /package/dist/{components → src/components}/Input/utils.d.ts +0 -0
- /package/dist/{components → src/components}/Nav/PdapNav.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Nav/index.d.ts +0 -0
- /package/dist/{components → src/components}/Nav/types.d.ts +0 -0
- /package/dist/{components → src/components}/QuickSearchForm/QuickSearchForm.vue.d.ts +0 -0
- /package/dist/{components → src/components}/QuickSearchForm/index.d.ts +0 -0
- /package/dist/{components → src/components}/TileIcon/TileIcon.vue.d.ts +0 -0
- /package/dist/{components → src/components}/TileIcon/index.d.ts +0 -0
- /package/dist/{components → src/components}/TileIcon/types.d.ts +0 -0
- /package/dist/{components → src/components}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/vuelidate.d.ts +0 -0
- /package/dist/{utils → src/utils}/vuelidate.test.d.ts +0 -0
package/README.md
CHANGED
@@ -13,7 +13,7 @@ npm install pdap-design-system
|
|
13
13
|
2. Import the stylesheet in the app's entrypoint (usually `index.js` or `main.js`, at the root of your project)
|
14
14
|
|
15
15
|
```
|
16
|
-
// index.js
|
16
|
+
// index.js | main.js
|
17
17
|
|
18
18
|
import 'pdap-design-system/styles';
|
19
19
|
```
|
@@ -24,14 +24,33 @@ import 'pdap-design-system/styles';
|
|
24
24
|
import { Button, Form } from 'pdap-design-system';
|
25
25
|
```
|
26
26
|
|
27
|
-
4.
|
27
|
+
4. Import and use the tailwind config (if your project is using tailwind)
|
28
|
+
|
29
|
+
```
|
30
|
+
// tailwind.config.js
|
31
|
+
import { tailwindConfig } from 'pdap-design-system';
|
32
|
+
|
33
|
+
/** @type {import('tailwindcss').Config} */
|
34
|
+
module.exports = {
|
35
|
+
// Spread base config
|
36
|
+
...tailwindConfig,
|
37
|
+
// Then override with `content` property and any other superseding config (if necessary - it really shouldn't be)
|
38
|
+
content: [
|
39
|
+
"./index.html",
|
40
|
+
"./src/**/*.{vue,js,css}",
|
41
|
+
],
|
42
|
+
}
|
43
|
+
|
44
|
+
```
|
45
|
+
|
46
|
+
5. If your project is using `TypeScript`, the component props definitions and other types are exposed for import as well.
|
28
47
|
_n.b. This can be particularly useful for composing `Form` schemas, where `Input` schema objects are defined differently depending on the `type` of input desired._
|
29
48
|
|
30
49
|
```
|
31
50
|
import { PdapInputTypes } from 'pdap-design-system';
|
32
51
|
```
|
33
52
|
|
34
|
-
|
53
|
+
6. See [the component documentation](./docs/components.md) for details on each component's API.
|
35
54
|
|
36
55
|
### About images
|
37
56
|
|
@@ -96,7 +115,7 @@ npm run build:watch
|
|
96
115
|
|
97
116
|
4. If you use VS Code as your editor, you may want to install the [tailwind VS Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss), which helps with intellisense and the custom at-rules used by TailwindCSS.
|
98
117
|
|
99
|
-
5. Read the [contributing guide](./CONTRIBUTING.md) for development requirements and tips.
|
118
|
+
5. Read the [contributing guide](./docs/CONTRIBUTING.md) for development requirements and tips.
|
100
119
|
|
101
120
|
## Assets
|
102
121
|
|
@@ -105,14 +124,21 @@ Use this [terminology](https://docs.pdap.io/activities/terms-and-definitions).
|
|
105
124
|
|
106
125
|
## Scripts reference
|
107
126
|
|
108
|
-
| Script | What it does
|
109
|
-
| -------------- |
|
110
|
-
| `
|
111
|
-
| `build
|
112
|
-
| `
|
113
|
-
| `
|
114
|
-
| `
|
115
|
-
| `
|
116
|
-
| `
|
117
|
-
| `test
|
118
|
-
| `
|
127
|
+
| Script | What it does |
|
128
|
+
| -------------- | -------------------------------------------------------- |
|
129
|
+
| `_commit` | Create conventional commits |
|
130
|
+
| `build` | Builds the library |
|
131
|
+
| `build:watch` | Builds the library and watches for file changes |
|
132
|
+
| `ci` | Removes all generated files and re-installs deps |
|
133
|
+
| `clean` | Removes all generated files (except `package-lock.json`) |
|
134
|
+
| `clean:deps` | Removes node_modules directory |
|
135
|
+
| `clean:build` | Removes dist directory |
|
136
|
+
| `clean:test` | Removes testing coverage reports |
|
137
|
+
| `lint` | Lints everything |
|
138
|
+
| `lint:es` | Lint `ts` and `vue` with `eslint` |
|
139
|
+
| `lint:css` | Lint `css` and `vue` with `stylelint` |
|
140
|
+
| `lint:ts` | Lint `ts` with `tsc` |
|
141
|
+
| `test` | Runs all test suites |
|
142
|
+
| `test:changed` | Runs only test suites affected by changed files |
|
143
|
+
| `typecheck` | Runs type check on all `ts` and `vue` files |
|
144
|
+
_n.b. There are some other scripts defined in the `package.json` `"scripts"` field, but they are mostly for CI or cleanup post-build, etc. You shouldn't need them._
|
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"),le=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 U=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 ke={class:"pdap-footer"},Re={class:"pdap-footer-social-links"},Ve=["href"],Oe=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" © 2023 Police Data Accessibility Project"),e.createElementVNode("br")],-1),Be=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"}," Privacy Policy"),e.createTextVNode(". "),e.createElementVNode("a",{href:"mailto:contact@pdap.io"},"contact@pdap.io")],-1),je={class:"pdap-footer-widget-links"},Te=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),Ae=["href"],Se=["src"],Ne=["src"],Le=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 l=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("footer",ke,[e.createVNode(U,{alignment:"center"},{default:e.withCtx(()=>[e.createElementVNode("ul",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),c=>(e.openBlock(),e.createElementBlock("li",{key:c.text,class:"pdap-footer-link-container"},[c.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-footer-social-link",href:c.href,target:"_blank",referrerpolicy:"no-referrer"},e.toDisplayString(c.text),9,Ve)):e.createCommentVNode("",!0),c.path?(e.openBlock(),e.createBlock(l,{key:1,"active-class":"pdap-footer-social-link-current","exact-active-class":"pdap-footer-social-link-current-exact",class:"pdap-footer-social-link",to:c.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))]),Oe,Be,e.createElementVNode("div",je,[Te,e.unref(a)?(e.openBlock(),e.createBlock(l,{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,Ne)]),_: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,Se)],8,Ae))])]),_:1})])}}});function Y(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 P(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Y(Object(n),!0).forEach(function(a){Ie(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Ie(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function ee(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 L(t){return typeof t=="function"}function ze(t){return e.isReactive(t)||e.isReadonly(t)}function ue(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 H(t,r,n){return e.computed(()=>t.some(a=>ue(r,a,{[n]:!1})[n]))}function te(t,r,n){return e.computed(()=>t.reduce((a,o)=>{const s=ue(r,o,{[n]:!1})[n]||[];return a.concat(s)},[]))}function de(t,r,n,a){return t.call(a,e.unref(r),e.unref(n),a)}function me(t){return t.$valid!==void 0?!t.$valid:!t}function De(t,r,n,a,o,s,l){let{$lazy:c,$rewardEarly:u}=o,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],m=arguments.length>8?arguments[8]:void 0,f=arguments.length>9?arguments[9]:void 0,g=arguments.length>10?arguments[10]:void 0;const h=e.ref(!!a.value),i=e.ref(0);n.value=!1;const p=e.watch([r,a].concat(d,g),()=>{if(c&&!a.value||u&&!f.value&&!n.value)return;let $;try{$=de(t,r,m,l)}catch(v){$=Promise.reject(v)}i.value++,n.value=!!i.value,h.value=!1,Promise.resolve($).then(v=>{i.value--,n.value=!!i.value,s.value=v,h.value=me(v)}).catch(v=>{i.value--,n.value=!!i.value,s.value=v,h.value=!0})},{immediate:!0,deep:typeof r=="object"});return{$invalid:h,$unwatch:p}}function Me(t,r,n,a,o,s,l,c){let{$lazy:u,$rewardEarly:d}=a;const m=()=>({}),f=e.computed(()=>{if(u&&!n.value||d&&!c.value)return!1;let g=!0;try{const h=de(t,r,l,s);o.value=h,g=me(h)}catch(h){o.value=h}return g});return{$unwatch:m,$invalid:f}}function qe(t,r,n,a,o,s,l,c,u,d,m){const f=e.ref(!1),g=t.$params||{},h=e.ref(null);let i,p;t.$async?{$invalid:i,$unwatch:p}=De(t.$validator,r,f,n,a,h,o,t.$watchTargets,u,d,m):{$invalid:i,$unwatch:p}=Me(t.$validator,r,n,a,h,o,u,d);const $=t.$message;return{$message:L($)?e.computed(()=>$(ee({$pending:f,$invalid:i,$params:ee(g),$model:r,$response:h,$validator:s,$propertyPath:c,$property:l}))):$||"",$params:g,$pending:f,$invalid:i,$response:h,$unwatch:p}}function Fe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=e.unref(t),n=Object.keys(r),a={},o={},s={};let l=null;return n.forEach(c=>{const u=r[c];switch(!0){case L(u.$validator):a[c]=u;break;case L(u):a[c]={$validator:u};break;case c==="$validationGroups":l=u;break;case c.startsWith("$"):s[c]=u;break;default:o[c]=u}}),{rules:a,nestedValidators:o,config:s,validationGroups:l}}const He="__root";function Ge(t,r,n,a,o,s,l,c,u){const d=Object.keys(t),m=a.get(o,t),f=e.ref(!1),g=e.ref(!1),h=e.ref(0);if(m){if(!m.$partial)return m;m.$unwatch(),f.value=m.$dirty.value}const i={$dirty:f,$path:o,$touch:()=>{f.value||(f.value=!0)},$reset:()=>{f.value&&(f.value=!1)},$commit:()=>{}};return d.length?(d.forEach(p=>{i[p]=qe(t[p],r,i.$dirty,s,l,p,n,o,u,g,h)}),i.$externalResults=e.computed(()=>c.value?[].concat(c.value).map((p,$)=>({$propertyPath:o,$property:n,$validator:"$externalResults",$uid:`${o}-externalResult-${$}`,$message:p,$params:{},$response:null,$pending:!1})):[]),i.$invalid=e.computed(()=>{const p=d.some($=>e.unref(i[$].$invalid));return g.value=p,!!i.$externalResults.value.length||p}),i.$pending=e.computed(()=>d.some(p=>e.unref(i[p].$pending))),i.$error=e.computed(()=>i.$dirty.value?i.$pending.value||i.$invalid.value:!1),i.$silentErrors=e.computed(()=>d.filter(p=>e.unref(i[p].$invalid)).map(p=>{const $=i[p];return e.reactive({$propertyPath:o,$property:n,$validator:p,$uid:`${o}-${p}`,$message:$.$message,$params:$.$params,$response:$.$response,$pending:$.$pending})}).concat(i.$externalResults.value)),i.$errors=e.computed(()=>i.$dirty.value?i.$silentErrors.value:[]),i.$unwatch=()=>d.forEach(p=>{i[p].$unwatch()}),i.$commit=()=>{g.value=!0,h.value=Date.now()},a.set(o,t,i),i):(m&&a.set(o,t,i),i)}function Xe(t,r,n,a,o,s,l){const c=Object.keys(t);return c.length?c.reduce((u,d)=>(u[d]=G({validations:t[d],state:r,key:d,parentKey:n,resultsCache:a,globalConfig:o,instance:s,externalResults:l}),u),{}):{}}function Ue(t,r,n){const a=e.computed(()=>[r,n].filter(i=>i).reduce((i,p)=>i.concat(Object.values(e.unref(p))),[])),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)||[],p=a.value.filter($=>(e.unref($).$silentErrors||[]).length).reduce(($,v)=>$.concat(...v.$silentErrors),[]);return i.concat(p)}),l=e.computed(()=>{const i=e.unref(t.$errors)||[],p=a.value.filter($=>(e.unref($).$errors||[]).length).reduce(($,v)=>$.concat(...v.$errors),[]);return i.concat(p)}),c=e.computed(()=>a.value.some(i=>i.$invalid)||e.unref(t.$invalid)||!1),u=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),m=e.computed(()=>o.value?u.value||c.value:!1),f=()=>{t.$touch(),a.value.forEach(i=>{i.$touch()})},g=()=>{t.$commit(),a.value.forEach(i=>{i.$commit()})},h=()=>{t.$reset(),a.value.forEach(i=>{i.$reset()})};return a.value.length&&a.value.every(i=>i.$dirty)&&f(),{$dirty:o,$errors:l,$invalid:c,$anyDirty:d,$error:m,$pending:u,$touch:f,$reset:h,$silentErrors:s,$commit:g}}function G(t){let{validations:r,state:n,key:a,parentKey:o,childResults:s,resultsCache:l,globalConfig:c={},instance:u,externalResults:d}=t;const m=o?`${o}.${a}`:a,{rules:f,nestedValidators:g,config:h,validationGroups:i}=Fe(r),p=P(P({},c),h),$=a?e.computed(()=>{const y=e.unref(n);return y?e.unref(y[a]):void 0}):n,v=P({},e.unref(d)||{}),B=e.computed(()=>{const y=e.unref(d);return a?y?e.unref(y[a]):void 0:y}),D=Ge(f,$,a,l,m,p,u,B,n),w=Xe(g,$,m,l,p,u,B),R={};i&&Object.entries(i).forEach(y=>{let[V,E]=y;R[V]={$invalid:H(E,w,"$invalid"),$error:H(E,w,"$error"),$pending:H(E,w,"$pending"),$errors:te(E,w,"$errors"),$silentErrors:te(E,w,"$silentErrors")}});const{$dirty:x,$errors:S,$invalid:M,$anyDirty:ye,$error:_e,$pending:q,$touch:F,$reset:we,$silentErrors:be,$commit:J}=Ue(D,w,s),xe=a?e.computed({get:()=>e.unref($),set:y=>{x.value=!0;const V=e.unref(n),E=e.unref(d);E&&(E[a]=v[a]),e.isRef(V[a])?V[a].value=y:V[a]=y}}):null;a&&p.$autoDirty&&e.watch($,()=>{x.value||F();const y=e.unref(d);y&&(y[a]=v[a])},{flush:"sync"});async function Ee(){return F(),p.$rewardEarly&&(J(),await e.nextTick()),await e.nextTick(),new Promise(y=>{if(!q.value)return y(!M.value);const V=e.watch(q,()=>{y(!M.value),V()})})}function Pe(y){return(s.value||{})[y]}function Ce(){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(P(P(P({},D),{},{$model:xe,$dirty:x,$error:_e,$errors:S,$invalid:M,$anyDirty:ye,$pending:q,$touch:F,$reset:we,$path:m||He,$silentErrors:be,$validate:Ee,$commit:J},s&&{$getResultsForChild:Pe,$clearExternalResults:Ce,$validationGroups:R}),w))}class We{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(c=>o.includes(c))?!1:s.every(c=>n[c].$params?Object.keys(n[c].$params).every(u=>e.unref(a[c].$params[u])===e.unref(n[c].$params[u])):!0)}get(r,n){const a=this.storage.get(r);if(!a)return;const{rules:o,result:s}=a,l=this.checkRulesValidity(r,n,o),c=s.$unwatch?s.$unwatch:()=>({});return l?s:{$dirty:s.$dirty,$partial:!0,$unwatch:c}}}const N={COLLECT_ALL:!0,COLLECT_NONE:!1},re=Symbol("vuelidate#injectChildResults"),ne=Symbol("vuelidate#removeChildResults");function Ke(t){let{$scope:r,instance:n}=t;const a={},o=e.ref([]),s=e.computed(()=>o.value.reduce((m,f)=>(m[f]=e.unref(a[f]),m),{}));function l(m,f){let{$registerAs:g,$scope:h,$stopPropagation:i}=f;i||r===N.COLLECT_NONE||h===N.COLLECT_NONE||r!==N.COLLECT_ALL&&r!==h||(a[g]=m,o.value.push(g))}n.__vuelidateInjectInstances=[].concat(n.__vuelidateInjectInstances||[],l);function c(m){o.value=o.value.filter(f=>f!==m),delete a[m]}n.__vuelidateRemoveInstances=[].concat(n.__vuelidateRemoveInstances||[],c);const u=e.inject(re,[]);e.provide(re,n.__vuelidateInjectInstances);const d=e.inject(ne,[]);return e.provide(ne,n.__vuelidateRemoveInstances),{childResults:s,sendValidationResultsToParent:u,removeValidationResultsFromParent:d}}function pe(t){return new Proxy(t,{get(r,n){return typeof r[n]=="object"?pe(r[n]):e.computed(()=>r[n])}})}let ae=0;function Qe(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=N.COLLECT_ALL,$stopPropagation:l,$externalResults:c,currentVueInstance:u}=a;const d=u||((n=e.getCurrentInstance())===null||n===void 0?void 0:n.proxy),m=d?d.$options:{};o||(ae+=1,o=`_vuelidate_${ae}`);const f=e.ref({}),g=new We,{childResults:h,sendValidationResultsToParent:i,removeValidationResultsFromParent:p}=d?Ke({$scope:s,instance:d}):{childResults:e.ref({})};if(!t&&m.validations){const $=m.validations;r=e.ref({}),e.onBeforeMount(()=>{r.value=d,e.watch(()=>L($)?$.call(r.value,new pe(r.value)):$,v=>{f.value=G({validations:v,state:r,childResults:h,resultsCache:g,globalConfig:a,instance:d,externalResults:c||d.vuelidateExternalResults})},{immediate:!0})}),a=m.validationsConfig||a}else{const $=e.isRef(t)||ze(t)?t:e.reactive(t||{});e.watch($,v=>{f.value=G({validations:v,state:r,childResults:h,resultsCache:g,globalConfig:a,instance:d??{},externalResults:c})},{immediate:!0})}return d&&(i.forEach($=>$(f,{$registerAs:o,$scope:s,$stopPropagation:l})),e.onBeforeUnmount(()=>p.forEach($=>$(o)))),e.computed(()=>P(P({},e.unref(f.value)),h.value))}var b=(t=>(t.CHECKBOX="checkbox",t.TEXT="text",t))(b||{});const Ze=["id","name","placeholder","value"],Je=["id","name","checked","value"],Ye=["id"],et=["for"],fe=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=()=>{l.value=!l.value,a("change",l.value.toString())},s=u=>{a("input",u.target.value)},l=e.ref(n.defaultChecked),c=e.computed(()=>`pdap-${n.name}-input-error`);return(u,d)=>{var m;return e.openBlock(),e.createBlock(e.unref(he),{class:e.normalizeClass({"pdap-input":!0,"pdap-input-error":Number((m=u.error)==null?void 0:m.length)>=1})},{default:e.withCtx(()=>[u.type===e.unref(b).TEXT?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0,id:u.id,type:"text",name:u.name,placeholder:u.placeholder,value:u.value},u.$attrs,{onInput:s}),null,16,Ze)):u.type===e.unref(b).CHECKBOX?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1,id:u.id,class:"pdap-input-checkbox",name:u.name,checked:l.value,type:"checkbox",value:u.value},u.$attrs,{onChange:o}),null,16,Je)):e.createCommentVNode("",!0),u.error?(e.openBlock(),e.createElementBlock("div",{key:2,id:c.value,class:"pdap-input-error-message"},e.toDisplayString(u.error),9,Ye)):e.createCommentVNode("",!0),e.createElementVNode("label",{class:"pdap-input-label",for:u.id},e.toDisplayString(u.label),9,et)]),_:1},8,["class"])}}});function oe(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?oe(Object(n),!0).forEach(function(a){tt(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function tt(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 I(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function z(t){return T(t.$validator)?j({},t):{$validator:t}}function rt(t){return I(t)&&T(t.then)}function C(t){return typeof t=="object"?t.$valid:t}function O(t){return t.$validator||t}function W(t,r){if(!I(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!I(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=z(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(!I(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=z(r);return n.$message=t,n}function nt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=z(t);return j(j({},n),{},{$async:!0,$watchTargets:r})}function at(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,l,c)=>{const u=Object.entries(l).reduce((d,m)=>{let[f,g]=m;const h=t[f]||{},i=Object.entries(h).reduce((p,$)=>{let[v,B]=$;const w=O(B).call(this,g,l,c,...a),R=C(w);if(p.$data[v]=w,p.$data.$invalid=!R||!!p.$data.$invalid,p.$data.$error=p.$data.$invalid,!R){let x=B.$message||"";const S=B.$params||{};typeof x=="function"&&(x=x({$pending:!1,$invalid:!R,$params:S,$model:g,$response:w})),p.$errors.push({$property:f,$message:x,$params:S,$response:w,$model:g,$pending:!1,$validator:v})}return{$valid:p.$valid&&R,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:[]});return d.$data[f]=i.$data,d.$errors[f]=i.$errors,{$valid:d.$valid&&i.$valid,$data:d.$data,$errors:d.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:s.$valid&&u.$valid,$data:s.$data.concat(u.$data),$errors:s.$errors.concat(u.$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},K=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function k(){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 Q=Object.freeze({__proto__:null,forEach:at,len:K,normalizeValidatorObject:z,regex:k,req:_,unwrap:e.unref,unwrapNormalizedValidator:O,unwrapValidatorResponse:C,withAsync:nt,withMessage:A,withParams:W}),ot=k(/^[a-zA-Z]*$/),st={$validator:ot,$message:"The value is not alphabetical",$params:{type:"alpha"}},it=k(/^[a-zA-Z0-9]*$/),ct={$validator:it,$message:"The value must be alpha-numeric",$params:{type:"alphaNum"}},lt=k(/^\d*(\.\d+)?$/),ut={$validator:lt,$message:"Value must be numeric",$params:{type:"numeric"}};function dt(t,r){return n=>!_(n)||(!/\s/.test(n)||n instanceof Date)&&+e.unref(t)<=+n&&+e.unref(r)>=+n}function mt(t,r){return{$validator:dt(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 pt=/^(?:[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 ft=k(pt),$t={$validator:ft,$message:"Value is not a valid email address",$params:{type:"email"}};function gt(t){if(!_(t))return!0;if(typeof t!="string")return!1;const r=t.split(".");return r.length===4&&r.every(ht)}const ht=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 vt={$validator:gt,$message:"The value is not a valid IP address",$params:{type:"ipAddress"}};function yt(){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(_t)}}const _t=t=>t.toLowerCase().match(/^[0-9a-f]{2}$/);function wt(t){return{$validator:yt(t),$message:"The value is not a valid MAC Address",$params:{type:"macAddress"}}}function bt(t){return r=>!_(r)||K(r)<=e.unref(t)}function xt(t){return{$validator:bt(t),$message:r=>{let{$params:n}=r;return`The maximum length allowed is ${n.max}`},$params:{max:t,type:"maxLength"}}}function Et(t){return r=>!_(r)||K(r)>=e.unref(t)}function Pt(t){return{$validator:Et(t),$message:r=>{let{$params:n}=r;return`This field should be at least ${n.min} characters long`},$params:{min:t,type:"minLength"}}}function Ct(t){return typeof t=="string"&&(t=t.trim()),_(t)}var Z={$validator:Ct,$message:"Value is required",$params:{type:"required"}};const se=(t,r)=>t?_(typeof r=="string"?r.trim():r):!0;function kt(t){return function(r,n){if(typeof t!="function")return se(e.unref(t),r);const a=t.call(this,r,n);return se(a,r)}}function Rt(t){return{$validator:kt(t),$message:"The value is required",$params:{type:"requiredIf",prop:t}}}const ie=(t,r)=>t?!0:_(typeof r=="string"?r.trim():r);function Vt(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 Ot(t){return{$validator:Vt(t),$message:"The value is required",$params:{type:"requiredUnless",prop:t}}}function Bt(t){return r=>e.unref(r)===e.unref(t)}function jt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:Bt(t),$message:n=>`The value must be equal to the ${r} value`,$params:{equalTo:t,otherName:r,type:"sameAs"}}}const Tt=/^(?:(?:(?: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 At=k(Tt),St={$validator:At,$message:"The value is not a valid URL address",$params:{type:"url"}};function Nt(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)=>C(o)?o:O(s).apply(this,n),!1)}}function Lt(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 l=await o;return C(l)?l:O(s).apply(this,n)},Promise.resolve(!1))}}function It(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(l=>l.$async),o=r.reduce((l,c)=>c.$watchTargets?l.concat(c.$watchTargets):l,[]);let s=()=>!1;return r.length&&(s=a?Lt(r):Nt(r)),{$async:a,$validator:s,$watchTargets:o}}function zt(){return W({type:"or"},A("The value does not match any of the provided validators",It(...arguments)))}function Dt(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)=>C(o)?O(s).apply(this,n):o,!0)}}function Mt(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 l=await o;return C(l)?O(s).apply(this,n):l},Promise.resolve(!0))}}function qt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(l=>l.$async),o=r.reduce((l,c)=>c.$watchTargets?l.concat(c.$watchTargets):l,[]);let s=()=>!1;return r.length&&(s=a?Mt(r):Dt(r)),{$async:a,$validator:s,$watchTargets:o}}function Ft(){return W({type:"and"},A("The value does not match all of the provided validators",qt(...arguments)))}function Ht(t){return function(r,n){if(!_(r))return!0;const a=O(t).call(this,r,n);return rt(a)?a.then(o=>!C(o)):!C(a)}}function Gt(t){return{$validator:Ht(t),$message:"The value does not match the provided validator",$params:{type:"not"}}}function Xt(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r>=+e.unref(t)}function Ut(t){return{$validator:Xt(t),$message:r=>{let{$params:n}=r;return`The minimum value allowed is ${n.min}`},$params:{min:t,type:"minValue"}}}function Wt(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r<=+e.unref(t)}var Kt=t=>({$validator:Wt(t),$message:r=>{let{$params:n}=r;return`The maximum value allowed is ${n.max}`},$params:{max:t,type:"maxValue"}}),Qt=k(/(^[0-9]*$)|(^-[0-9]+$)/),Zt={$validator:Qt,$message:"Value is not an integer",$params:{type:"integer"}},Jt=k(/^[-]?\d*(\.\d+)?$/),Yt={$validator:Jt,$message:"Value must be decimal",$params:{type:"decimal"}};function er(t){let{t:r,messagePath:n=o=>{let{$validator:s}=o;return`validations.${s}`},messageParams:a=o=>o}=t;return function(s){let{withArguments:l=!1,messagePath:c=n,messageParams:u=a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function d(m){return r(c(m),u(j({model:m.$model,property:m.$property,pending:m.$pending,invalid:m.$invalid,response:m.$response,validator:m.$validator,propertyPath:m.$propertyPath},m.$params)))}return l&&typeof s=="function"?function(){return A(d,s(...arguments))}:A(d,s)}}const $e=Object.freeze(Object.defineProperty({__proto__:null,alpha:st,alphaNum:ct,and:Ft,between:mt,createI18nMessage:er,decimal:Yt,email:$t,helpers:Q,integer:Zt,ipAddress:vt,macAddress:wt,maxLength:xt,maxValue:Kt,minLength:Pt,minValue:Ut,not:Gt,numeric:ut,or:zt,required:Z,requiredIf:Rt,requiredUnless:Ot,sameAs:jt,url:St},Symbol.toStringTag,{value:"Module"}));function ce(t){return["maxLength","minLength"].includes(t)}function tr(t,r){return{[t]:$e[t](r)}}function rr(t,r,n){return{[t]:Q.withMessage(n,$e[t](r))}}function nr(){return{required:Z}}function ar(t){return{required:Q.withMessage(t,Z)}}function or(t,r){if(ce(t)&&typeof r.message=="string"&&typeof r.value=="number")return rr(t,r.value,r.message);if(ce(t)&&typeof r.message>"u"&&typeof r.value=="number")return tr(t,r.value);if(t==="required"&&typeof r.message=="string")return ar(r.message);if(t==="required"&&typeof r.message>"u")return nr();throw new Error("No valid rule detected")}const sr={key:0,class:"pdap-form-error-message"},ge=e.defineComponent({__name:"PdapForm",props:{error:{default:null},id:{},name:{},schema:{}},emits:["submit"],setup(t,{emit:r}){const n=t,a=r,o=e.ref(n.schema.reduce((m,f)=>{switch(f.type){case b.CHECKBOX:return{...m,[f.name]:String(f.defaultChecked)};case b.TEXT:default:return{...m,[f.name]:f.value}}},{})),s=n.schema.reduce((m,f)=>{const g=Object.entries(f.validators??{}).reduce((h,[i,p])=>({...h,...or(i,p)}),{});return{...m,[f.name]:{...g}}},{}),l=Qe(s,o,{$autoDirty:!1,$lazy:!0}),c=e.ref(n.error);function u(m,f){o.value[m]=f}e.watchEffect(()=>{n.error?c.value=n.error:c.value&&l.value.$errors.length===0?c.value=null:!c.value&&l.value.$errors.length>0&&(c.value="Please update this form to correct the errors")}),e.watchEffect(()=>{console.debug(`PdapForm ${n.name}
|
2
|
-
`,{errorMessage:
|
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
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),U=require("vue-router"),ce=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 X=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 ke={class:"pdap-footer"},Re={class:"pdap-footer-social-links"},Oe=["href"],Ve=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" © 2023 Police Data Accessibility Project"),e.createElementVNode("br")],-1),Be=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"}," Privacy Policy"),e.createTextVNode(". "),e.createElementVNode("a",{href:"mailto:contact@pdap.io"},"contact@pdap.io")],-1),je={class:"pdap-footer-widget-links"},Te=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),Se=["href"],Ae=["src"],Ne=["src"],Le=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",ke,[e.createVNode(X,{alignment:"center"},{default:e.withCtx(()=>[e.createElementVNode("ul",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),i=>(e.openBlock(),e.createElementBlock("li",{key:i.text,class:"pdap-footer-link-container"},[i.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-footer-social-link",href:i.href,target:"_blank",referrerpolicy:"no-referrer"},e.toDisplayString(i.text),9,Oe)):e.createCommentVNode("",!0),i.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:i.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))]),Ve,Be,e.createElementVNode("div",je,[Te,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,Ne)]),_: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,Ae)],8,Se))])]),_:1})])}}});function Y(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 P(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Y(Object(n),!0).forEach(function(a){Ie(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Ie(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function ee(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 L(t){return typeof t=="function"}function ze(t){return e.isReactive(t)||e.isReadonly(t)}function ue(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 H(t,r,n){return e.computed(()=>t.some(a=>ue(r,a,{[n]:!1})[n]))}function te(t,r,n){return e.computed(()=>t.reduce((a,o)=>{const s=ue(r,o,{[n]:!1})[n]||[];return a.concat(s)},[]))}function de(t,r,n,a){return t.call(a,e.unref(r),e.unref(n),a)}function me(t){return t.$valid!==void 0?!t.$valid:!t}function De(t,r,n,a,o,s,c){let{$lazy:i,$rewardEarly:u}=o,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],m=arguments.length>8?arguments[8]:void 0,f=arguments.length>9?arguments[9]:void 0,$=arguments.length>10?arguments[10]:void 0;const h=e.ref(!!a.value),l=e.ref(0);n.value=!1;const p=e.watch([r,a].concat(d,$),()=>{if(i&&!a.value||u&&!f.value&&!n.value)return;let g;try{g=de(t,r,m,c)}catch(v){g=Promise.reject(v)}l.value++,n.value=!!l.value,h.value=!1,Promise.resolve(g).then(v=>{l.value--,n.value=!!l.value,s.value=v,h.value=me(v)}).catch(v=>{l.value--,n.value=!!l.value,s.value=v,h.value=!0})},{immediate:!0,deep:typeof r=="object"});return{$invalid:h,$unwatch:p}}function Me(t,r,n,a,o,s,c,i){let{$lazy:u,$rewardEarly:d}=a;const m=()=>({}),f=e.computed(()=>{if(u&&!n.value||d&&!i.value)return!1;let $=!0;try{const h=de(t,r,c,s);o.value=h,$=me(h)}catch(h){o.value=h}return $});return{$unwatch:m,$invalid:f}}function Fe(t,r,n,a,o,s,c,i,u,d,m){const f=e.ref(!1),$=t.$params||{},h=e.ref(null);let l,p;t.$async?{$invalid:l,$unwatch:p}=De(t.$validator,r,f,n,a,h,o,t.$watchTargets,u,d,m):{$invalid:l,$unwatch:p}=Me(t.$validator,r,n,a,h,o,u,d);const g=t.$message;return{$message:L(g)?e.computed(()=>g(ee({$pending:f,$invalid:l,$params:ee($),$model:r,$response:h,$validator:s,$propertyPath:i,$property:c}))):g||"",$params:$,$pending:f,$invalid:l,$response:h,$unwatch:p}}function qe(){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(i=>{const u=r[i];switch(!0){case L(u.$validator):a[i]=u;break;case L(u):a[i]={$validator:u};break;case i==="$validationGroups":c=u;break;case i.startsWith("$"):s[i]=u;break;default:o[i]=u}}),{rules:a,nestedValidators:o,config:s,validationGroups:c}}const He="__root";function Ge(t,r,n,a,o,s,c,i,u){const d=Object.keys(t),m=a.get(o,t),f=e.ref(!1),$=e.ref(!1),h=e.ref(0);if(m){if(!m.$partial)return m;m.$unwatch(),f.value=m.$dirty.value}const l={$dirty:f,$path:o,$touch:()=>{f.value||(f.value=!0)},$reset:()=>{f.value&&(f.value=!1)},$commit:()=>{}};return d.length?(d.forEach(p=>{l[p]=Fe(t[p],r,l.$dirty,s,c,p,n,o,u,$,h)}),l.$externalResults=e.computed(()=>i.value?[].concat(i.value).map((p,g)=>({$propertyPath:o,$property:n,$validator:"$externalResults",$uid:`${o}-externalResult-${g}`,$message:p,$params:{},$response:null,$pending:!1})):[]),l.$invalid=e.computed(()=>{const p=d.some(g=>e.unref(l[g].$invalid));return $.value=p,!!l.$externalResults.value.length||p}),l.$pending=e.computed(()=>d.some(p=>e.unref(l[p].$pending))),l.$error=e.computed(()=>l.$dirty.value?l.$pending.value||l.$invalid.value:!1),l.$silentErrors=e.computed(()=>d.filter(p=>e.unref(l[p].$invalid)).map(p=>{const g=l[p];return e.reactive({$propertyPath:o,$property:n,$validator:p,$uid:`${o}-${p}`,$message:g.$message,$params:g.$params,$response:g.$response,$pending:g.$pending})}).concat(l.$externalResults.value)),l.$errors=e.computed(()=>l.$dirty.value?l.$silentErrors.value:[]),l.$unwatch=()=>d.forEach(p=>{l[p].$unwatch()}),l.$commit=()=>{$.value=!0,h.value=Date.now()},a.set(o,t,l),l):(m&&a.set(o,t,l),l)}function Ue(t,r,n,a,o,s,c){const i=Object.keys(t);return i.length?i.reduce((u,d)=>(u[d]=G({validations:t[d],state:r,key:d,parentKey:n,resultsCache:a,globalConfig:o,instance:s,externalResults:c}),u),{}):{}}function Xe(t,r,n){const a=e.computed(()=>[r,n].filter(l=>l).reduce((l,p)=>l.concat(Object.values(e.unref(p))),[])),o=e.computed({get(){return t.$dirty.value||(a.value.length?a.value.every(l=>l.$dirty):!1)},set(l){t.$dirty.value=l}}),s=e.computed(()=>{const l=e.unref(t.$silentErrors)||[],p=a.value.filter(g=>(e.unref(g).$silentErrors||[]).length).reduce((g,v)=>g.concat(...v.$silentErrors),[]);return l.concat(p)}),c=e.computed(()=>{const l=e.unref(t.$errors)||[],p=a.value.filter(g=>(e.unref(g).$errors||[]).length).reduce((g,v)=>g.concat(...v.$errors),[]);return l.concat(p)}),i=e.computed(()=>a.value.some(l=>l.$invalid)||e.unref(t.$invalid)||!1),u=e.computed(()=>a.value.some(l=>e.unref(l.$pending))||e.unref(t.$pending)||!1),d=e.computed(()=>a.value.some(l=>l.$dirty)||a.value.some(l=>l.$anyDirty)||o.value),m=e.computed(()=>o.value?u.value||i.value:!1),f=()=>{t.$touch(),a.value.forEach(l=>{l.$touch()})},$=()=>{t.$commit(),a.value.forEach(l=>{l.$commit()})},h=()=>{t.$reset(),a.value.forEach(l=>{l.$reset()})};return a.value.length&&a.value.every(l=>l.$dirty)&&f(),{$dirty:o,$errors:c,$invalid:i,$anyDirty:d,$error:m,$pending:u,$touch:f,$reset:h,$silentErrors:s,$commit:$}}function G(t){let{validations:r,state:n,key:a,parentKey:o,childResults:s,resultsCache:c,globalConfig:i={},instance:u,externalResults:d}=t;const m=o?`${o}.${a}`:a,{rules:f,nestedValidators:$,config:h,validationGroups:l}=qe(r),p=P(P({},i),h),g=a?e.computed(()=>{const y=e.unref(n);return y?e.unref(y[a]):void 0}):n,v=P({},e.unref(d)||{}),B=e.computed(()=>{const y=e.unref(d);return a?y?e.unref(y[a]):void 0:y}),D=Ge(f,g,a,c,m,p,u,B,n),b=Ue($,g,m,c,p,u,B),R={};l&&Object.entries(l).forEach(y=>{let[O,E]=y;R[O]={$invalid:H(E,b,"$invalid"),$error:H(E,b,"$error"),$pending:H(E,b,"$pending"),$errors:te(E,b,"$errors"),$silentErrors:te(E,b,"$silentErrors")}});const{$dirty:x,$errors:A,$invalid:M,$anyDirty:ye,$error:_e,$pending:F,$touch:q,$reset:be,$silentErrors:we,$commit:J}=Xe(D,b,s),xe=a?e.computed({get:()=>e.unref(g),set:y=>{x.value=!0;const O=e.unref(n),E=e.unref(d);E&&(E[a]=v[a]),e.isRef(O[a])?O[a].value=y:O[a]=y}}):null;a&&p.$autoDirty&&e.watch(g,()=>{x.value||q();const y=e.unref(d);y&&(y[a]=v[a])},{flush:"sync"});async function Ee(){return q(),p.$rewardEarly&&(J(),await e.nextTick()),await e.nextTick(),new Promise(y=>{if(!F.value)return y(!M.value);const O=e.watch(F,()=>{y(!M.value),O()})})}function Pe(y){return(s.value||{})[y]}function Ce(){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(P(P(P({},D),{},{$model:xe,$dirty:x,$error:_e,$errors:A,$invalid:M,$anyDirty:ye,$pending:F,$touch:q,$reset:be,$path:m||He,$silentErrors:we,$validate:Ee,$commit:J},s&&{$getResultsForChild:Pe,$clearExternalResults:Ce,$validationGroups:R}),b))}class We{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(i=>o.includes(i))?!1:s.every(i=>n[i].$params?Object.keys(n[i].$params).every(u=>e.unref(a[i].$params[u])===e.unref(n[i].$params[u])):!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),i=s.$unwatch?s.$unwatch:()=>({});return c?s:{$dirty:s.$dirty,$partial:!0,$unwatch:i}}}const N={COLLECT_ALL:!0,COLLECT_NONE:!1},re=Symbol("vuelidate#injectChildResults"),ne=Symbol("vuelidate#removeChildResults");function Ke(t){let{$scope:r,instance:n}=t;const a={},o=e.ref([]),s=e.computed(()=>o.value.reduce((m,f)=>(m[f]=e.unref(a[f]),m),{}));function c(m,f){let{$registerAs:$,$scope:h,$stopPropagation:l}=f;l||r===N.COLLECT_NONE||h===N.COLLECT_NONE||r!==N.COLLECT_ALL&&r!==h||(a[$]=m,o.value.push($))}n.__vuelidateInjectInstances=[].concat(n.__vuelidateInjectInstances||[],c);function i(m){o.value=o.value.filter(f=>f!==m),delete a[m]}n.__vuelidateRemoveInstances=[].concat(n.__vuelidateRemoveInstances||[],i);const u=e.inject(re,[]);e.provide(re,n.__vuelidateInjectInstances);const d=e.inject(ne,[]);return e.provide(ne,n.__vuelidateRemoveInstances),{childResults:s,sendValidationResultsToParent:u,removeValidationResultsFromParent:d}}function pe(t){return new Proxy(t,{get(r,n){return typeof r[n]=="object"?pe(r[n]):e.computed(()=>r[n])}})}let ae=0;function Qe(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=N.COLLECT_ALL,$stopPropagation:c,$externalResults:i,currentVueInstance:u}=a;const d=u||((n=e.getCurrentInstance())===null||n===void 0?void 0:n.proxy),m=d?d.$options:{};o||(ae+=1,o=`_vuelidate_${ae}`);const f=e.ref({}),$=new We,{childResults:h,sendValidationResultsToParent:l,removeValidationResultsFromParent:p}=d?Ke({$scope:s,instance:d}):{childResults:e.ref({})};if(!t&&m.validations){const g=m.validations;r=e.ref({}),e.onBeforeMount(()=>{r.value=d,e.watch(()=>L(g)?g.call(r.value,new pe(r.value)):g,v=>{f.value=G({validations:v,state:r,childResults:h,resultsCache:$,globalConfig:a,instance:d,externalResults:i||d.vuelidateExternalResults})},{immediate:!0})}),a=m.validationsConfig||a}else{const g=e.isRef(t)||ze(t)?t:e.reactive(t||{});e.watch(g,v=>{f.value=G({validations:v,state:r,childResults:h,resultsCache:$,globalConfig:a,instance:d??{},externalResults:i})},{immediate:!0})}return d&&(l.forEach(g=>g(f,{$registerAs:o,$scope:s,$stopPropagation:c})),e.onBeforeUnmount(()=>p.forEach(g=>g(o)))),e.computed(()=>P(P({},e.unref(f.value)),h.value))}var w=(t=>(t.CHECKBOX="checkbox",t.TEXT="text",t))(w||{});const Ze=["id","name","placeholder","value"],Je=["id","name","checked","value"],Ye=["id"],et=["for"],fe=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=u=>{a("input",u.target.value)},c=e.ref(n.defaultChecked),i=e.computed(()=>`pdap-${n.name}-input-error`);return(u,d)=>{var m;return e.openBlock(),e.createBlock(e.unref(he),{class:e.normalizeClass({"pdap-input":!0,"pdap-input-error":Number((m=u.error)==null?void 0:m.length)>=1})},{default:e.withCtx(()=>[u.type===e.unref(w).TEXT?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0,id:u.id,type:"text",name:u.name,placeholder:u.placeholder,value:u.value},u.$attrs,{onInput:s}),null,16,Ze)):u.type===e.unref(w).CHECKBOX?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1,id:u.id,class:"pdap-input-checkbox",name:u.name,checked:c.value,type:"checkbox",value:u.value},u.$attrs,{onChange:o}),null,16,Je)):e.createCommentVNode("",!0),u.error?(e.openBlock(),e.createElementBlock("div",{key:2,id:i.value,class:"pdap-input-error-message"},e.toDisplayString(u.error),9,Ye)):e.createCommentVNode("",!0),e.createElementVNode("label",{class:"pdap-input-label",for:u.id},e.toDisplayString(u.label),9,et)]),_:1},8,["class"])}}});function oe(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?oe(Object(n),!0).forEach(function(a){tt(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function tt(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 I(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function z(t){return T(t.$validator)?j({},t):{$validator:t}}function rt(t){return I(t)&&T(t.then)}function C(t){return typeof t=="object"?t.$valid:t}function V(t){return t.$validator||t}function W(t,r){if(!I(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!I(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=z(r);return n.$params=j(j({},n.$params||{}),t),n}function S(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(!I(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=z(r);return n.$message=t,n}function nt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=z(t);return j(j({},n),{},{$async:!0,$watchTargets:r})}function at(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,i)=>{const u=Object.entries(c).reduce((d,m)=>{let[f,$]=m;const h=t[f]||{},l=Object.entries(h).reduce((p,g)=>{let[v,B]=g;const b=V(B).call(this,$,c,i,...a),R=C(b);if(p.$data[v]=b,p.$data.$invalid=!R||!!p.$data.$invalid,p.$data.$error=p.$data.$invalid,!R){let x=B.$message||"";const A=B.$params||{};typeof x=="function"&&(x=x({$pending:!1,$invalid:!R,$params:A,$model:$,$response:b})),p.$errors.push({$property:f,$message:x,$params:A,$response:b,$model:$,$pending:!1,$validator:v})}return{$valid:p.$valid&&R,$data:p.$data,$errors:p.$errors}},{$valid:!0,$data:{},$errors:[]});return d.$data[f]=l.$data,d.$errors[f]=l.$errors,{$valid:d.$valid&&l.$valid,$data:d.$data,$errors:d.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:s.$valid&&u.$valid,$data:s.$data.concat(u.$data),$errors:s.$errors.concat(u.$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},K=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function k(){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 Q=Object.freeze({__proto__:null,forEach:at,len:K,normalizeValidatorObject:z,regex:k,req:_,unwrap:e.unref,unwrapNormalizedValidator:V,unwrapValidatorResponse:C,withAsync:nt,withMessage:S,withParams:W}),ot=k(/^[a-zA-Z]*$/),st={$validator:ot,$message:"The value is not alphabetical",$params:{type:"alpha"}},lt=k(/^[a-zA-Z0-9]*$/),it={$validator:lt,$message:"The value must be alpha-numeric",$params:{type:"alphaNum"}},ct=k(/^\d*(\.\d+)?$/),ut={$validator:ct,$message:"Value must be numeric",$params:{type:"numeric"}};function dt(t,r){return n=>!_(n)||(!/\s/.test(n)||n instanceof Date)&&+e.unref(t)<=+n&&+e.unref(r)>=+n}function mt(t,r){return{$validator:dt(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 pt=/^(?:[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 ft=k(pt),gt={$validator:ft,$message:"Value is not a valid email address",$params:{type:"email"}};function $t(t){if(!_(t))return!0;if(typeof t!="string")return!1;const r=t.split(".");return r.length===4&&r.every(ht)}const ht=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 vt={$validator:$t,$message:"The value is not a valid IP address",$params:{type:"ipAddress"}};function yt(){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(_t)}}const _t=t=>t.toLowerCase().match(/^[0-9a-f]{2}$/);function bt(t){return{$validator:yt(t),$message:"The value is not a valid MAC Address",$params:{type:"macAddress"}}}function wt(t){return r=>!_(r)||K(r)<=e.unref(t)}function xt(t){return{$validator:wt(t),$message:r=>{let{$params:n}=r;return`The maximum length allowed is ${n.max}`},$params:{max:t,type:"maxLength"}}}function Et(t){return r=>!_(r)||K(r)>=e.unref(t)}function Pt(t){return{$validator:Et(t),$message:r=>{let{$params:n}=r;return`This field should be at least ${n.min} characters long`},$params:{min:t,type:"minLength"}}}function Ct(t){return typeof t=="string"&&(t=t.trim()),_(t)}var Z={$validator:Ct,$message:"Value is required",$params:{type:"required"}};const se=(t,r)=>t?_(typeof r=="string"?r.trim():r):!0;function kt(t){return function(r,n){if(typeof t!="function")return se(e.unref(t),r);const a=t.call(this,r,n);return se(a,r)}}function Rt(t){return{$validator:kt(t),$message:"The value is required",$params:{type:"requiredIf",prop:t}}}const le=(t,r)=>t?!0:_(typeof r=="string"?r.trim():r);function Ot(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 Vt(t){return{$validator:Ot(t),$message:"The value is required",$params:{type:"requiredUnless",prop:t}}}function Bt(t){return r=>e.unref(r)===e.unref(t)}function jt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:Bt(t),$message:n=>`The value must be equal to the ${r} value`,$params:{equalTo:t,otherName:r,type:"sameAs"}}}const Tt=/^(?:(?:(?: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 St=k(Tt),At={$validator:St,$message:"The value is not a valid URL address",$params:{type:"url"}};function Nt(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)=>C(o)?o:V(s).apply(this,n),!1)}}function Lt(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 C(c)?c:V(s).apply(this,n)},Promise.resolve(!1))}}function It(){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,i)=>i.$watchTargets?c.concat(i.$watchTargets):c,[]);let s=()=>!1;return r.length&&(s=a?Lt(r):Nt(r)),{$async:a,$validator:s,$watchTargets:o}}function zt(){return W({type:"or"},S("The value does not match any of the provided validators",It(...arguments)))}function Dt(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)=>C(o)?V(s).apply(this,n):o,!0)}}function Mt(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 C(c)?V(s).apply(this,n):c},Promise.resolve(!0))}}function Ft(){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,i)=>i.$watchTargets?c.concat(i.$watchTargets):c,[]);let s=()=>!1;return r.length&&(s=a?Mt(r):Dt(r)),{$async:a,$validator:s,$watchTargets:o}}function qt(){return W({type:"and"},S("The value does not match all of the provided validators",Ft(...arguments)))}function Ht(t){return function(r,n){if(!_(r))return!0;const a=V(t).call(this,r,n);return rt(a)?a.then(o=>!C(o)):!C(a)}}function Gt(t){return{$validator:Ht(t),$message:"The value does not match the provided validator",$params:{type:"not"}}}function Ut(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r>=+e.unref(t)}function Xt(t){return{$validator:Ut(t),$message:r=>{let{$params:n}=r;return`The minimum value allowed is ${n.min}`},$params:{min:t,type:"minValue"}}}function Wt(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r<=+e.unref(t)}var Kt=t=>({$validator:Wt(t),$message:r=>{let{$params:n}=r;return`The maximum value allowed is ${n.max}`},$params:{max:t,type:"maxValue"}}),Qt=k(/(^[0-9]*$)|(^-[0-9]+$)/),Zt={$validator:Qt,$message:"Value is not an integer",$params:{type:"integer"}},Jt=k(/^[-]?\d*(\.\d+)?$/),Yt={$validator:Jt,$message:"Value must be decimal",$params:{type:"decimal"}};function er(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:i=n,messageParams:u=a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function d(m){return r(i(m),u(j({model:m.$model,property:m.$property,pending:m.$pending,invalid:m.$invalid,response:m.$response,validator:m.$validator,propertyPath:m.$propertyPath},m.$params)))}return c&&typeof s=="function"?function(){return S(d,s(...arguments))}:S(d,s)}}const ge=Object.freeze(Object.defineProperty({__proto__:null,alpha:st,alphaNum:it,and:qt,between:mt,createI18nMessage:er,decimal:Yt,email:gt,helpers:Q,integer:Zt,ipAddress:vt,macAddress:bt,maxLength:xt,maxValue:Kt,minLength:Pt,minValue:Xt,not:Gt,numeric:ut,or:zt,required:Z,requiredIf:Rt,requiredUnless:Vt,sameAs:jt,url:At},Symbol.toStringTag,{value:"Module"}));function ie(t){return["maxLength","minLength"].includes(t)}function tr(t,r){return{[t]:ge[t](r)}}function rr(t,r,n){return{[t]:Q.withMessage(n,ge[t](r))}}function nr(){return{required:Z}}function ar(t){return{required:Q.withMessage(t,Z)}}function or(t,r){if(ie(t)&&typeof r.message=="string"&&typeof r.value=="number")return rr(t,r.value,r.message);if(ie(t)&&typeof r.message>"u"&&typeof r.value=="number")return tr(t,r.value);if(t==="required"&&typeof r.message=="string")return ar(r.message);if(t==="required"&&typeof r.message>"u")return nr();throw new Error("No valid rule detected")}const sr={key:0,class:"pdap-form-error-message"},$e=e.defineComponent({__name:"PdapForm",props:{error:{default:null},id:{},name:{},schema:{}},emits:["submit"],setup(t,{emit:r}){const n=t,a=r,o=e.ref(n.schema.reduce((m,f)=>{switch(f.type){case w.CHECKBOX:return{...m,[f.name]:String(f.defaultChecked)};case w.TEXT:default:return{...m,[f.name]:f.value}}},{})),s=n.schema.reduce((m,f)=>{const $=Object.entries(f.validators??{}).reduce((h,[l,p])=>({...h,...or(l,p)}),{});return{...m,[f.name]:{...$}}},{}),c=Qe(s,o,{$autoDirty:!1,$lazy:!0}),i=e.ref(n.error);function u(m,f){o.value[m]=f}e.watchEffect(()=>{n.error?i.value=n.error:i.value&&c.value.$errors.length===0?i.value=null:!i.value&&c.value.$errors.length>0&&(i.value="Please update this form to correct the errors")}),e.watchEffect(()=>{console.debug(`PdapForm ${n.name}
|
2
|
+
`,{errorMessage:i.value,props:n,values:o,vuelidate:{rules:s,v$:c}})});async function d(m){if(await c.value.$validate()){a("submit",{...o.value}),c.value.$reset(),m.target.reset(),o.value=Object.entries(o.value).reduce((h,[l,p])=>({...h,[l]:["true","false"].includes(p)?p:""}),{});return}}return(m,f)=>(e.openBlock(),e.createElementBlock("form",{class:"pdap-form",onSubmit:f[0]||(f[0]=e.withModifiers($=>d($),["prevent"]))},[typeof i.value=="string"?(e.openBlock(),e.createElementBlock("div",sr,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.schema,$=>{var h,l,p,g;return e.openBlock(),e.createBlock(fe,e.mergeProps((delete $.validators,$),{key:$.name,error:(h=e.unref(c)[$.name])!=null&&h.$error?(g=(p=(l=e.unref(c)[$.name])==null?void 0:l.$errors)==null?void 0:p[0])==null?void 0:g.$message:"",value:o.value[$.name],onChange:v=>$.type!==e.unref(w).TEXT?u($.name,v):void 0,onInput:v=>$.type===e.unref(w).TEXT?u($.name,v):void 0}),null,16,["error","value","onChange","onInput"])}),128)),e.renderSlot(m.$slots,"default")],32))}});const he=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,i)=>(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 lr=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 ir=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),cr=[ir],ur=["aria-expanded"],dr=["href"],ve=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 i,u;const c=document.querySelector("body");!n.isExpanded&&n.isMobile?(n.isExpanded=!0,c!=null&&c.classList.contains("lock-scroll")||(i=document.querySelector("body"))==null||i.classList.add("lock-scroll")):n.isExpanded&&n.isMobile&&(n.isExpanded=!1,(u=document.querySelector("body"))==null||u.classList.remove("lock-scroll")),await e.nextTick()}return(c,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{"aria-controls":"nav",class:"pdap-nav-open-button",role:"button",onClick:s},cr),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),u=>(e.openBlock(),e.createElementBlock("li",{key:u.text,class:"pdap-nav-link-container"},[u.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-nav-link",href:u.href,target:"_blank",referrerpolicy:"no-referrer",onClick:s},e.toDisplayString(u.text),9,dr)):e.createCommentVNode("",!0),u.path?(e.openBlock(),e.createBlock(e.unref(U.RouterLink),{key:1,"active-class":"pdap-nav-link-current","exact-active-class":"pdap-nav-link-current-exact",class:"pdap-nav-link",to:u.path,onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))],14,ur)],64))}});const mr=["href"],pr=["src"],fr=["src"],gr=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,i)=>(e.openBlock(),e.createElementBlock("header",{ref_key:"el",ref:a,class:"pdap-header"},[e.unref(o)?(e.openBlock(),e.createBlock(e.unref(U.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,fr)]),_: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,pr)],8,mr)),e.createVNode(ve,{"top-position":n.value},null,8,["top-position"])],512))}});const $r=e.defineComponent({__name:"QuickSearchForm",props:{mode:{default:"prod"}},setup(t){const r=U.useRouter(),n=t,a=[{id:"search-term",name:"searchTerm",label:"What are you looking for?",type:w.TEXT,placeholder:"Enter a keyword, type of public records, or 'all'",value:""},{id:"location",name:"location",label:"From where?",type:w.TEXT,placeholder:"Enter a state, county, municipality, or 'all'",value:""}],o=e.ref(void 0);function s(c){if(Object.values(c).every(d=>!d)){o.value="Either a search term or a location is required.";return}let{location:i,searchTerm:u}=c;if(i=i&&i.length>0?i:"all",u=u&&u.length>0?u:"all",r.getRoutes().some(d=>d.path.includes("/search/")))r.push(`/search/${u}/${i}`);else{const d=n.mode==="prod"?"https://data-sources.pdap.io":"https://data-sources.pdap.dev";window.location.assign(`${d}/search/${u}/${i}`)}}return(c,i)=>(e.openBlock(),e.createBlock(X,{alignment:"center",component:"div",class:"pdap-quick-search-form"},{default:e.withCtx(()=>[e.createVNode($e,{id:"quick-search-form",class:"small",error:o.value,schema:a,name:"quickSearchForm",onSubmit:s},{default:e.withCtx(()=>[e.createVNode(ce,{type:"submit"},{default:e.withCtx(()=>[e.createTextVNode("Search Data Sources")]),_:1})]),_:1},8,["error"])]),_:1}))}});const hr=["alt","src"],vr=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,hr))}});const yr={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"}}},_r=Object.freeze(Object.defineProperty({__proto__:null,default:yr},Symbol.toStringTag,{value:"Module"}));exports.Button=ce;exports.FlexContainer=X;exports.Footer=Le;exports.Form=$e;exports.GridContainer=he;exports.GridItem=lr;exports.Header=gr;exports.Input=fe;exports.Nav=ve;exports.PdapInputTypes=w;exports.QuickSearchForm=$r;exports.TileIcon=vr;exports.tailwindConfig=_r;
|