├── .editorconfig ├── .env.example ├── .eslintrc.js ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── main.yml ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── analyze.config.js ├── docs ├── .vitepress │ ├── config.js │ └── dist │ │ ├── assets │ │ ├── app.cd2b655c.js │ │ ├── index.md.6cec344f.js │ │ ├── index.md.6cec344f.lean.js │ │ └── style.a87b28a3.css │ │ ├── hashmap.json │ │ └── index.html ├── VueDadataExample.vue └── index.md ├── index.html ├── package.json ├── public └── index.html ├── ru ├── CHANGELOG.md └── README.md ├── src ├── @types │ └── vite-env.d.ts ├── App.vue ├── VueDadata.test.ts ├── VueDadata.vue ├── api │ ├── index.ts │ └── suggestions.ts ├── classes.ts ├── const │ ├── bounds.const.ts │ ├── classes.const.ts │ ├── highlight-options.const.ts │ └── index.ts ├── highlight-options.ts ├── index.css ├── index.ts ├── main.ts ├── suggestions.ts └── types │ ├── address.types.ts │ ├── classes.types.ts │ ├── helpers.types.ts │ ├── highlight-options.types.ts │ ├── index.ts │ ├── key-event.enum.ts │ ├── location-options.types.ts │ └── suggestion.dto.ts ├── tsconfig.json ├── tsconfig.node.json ├── vite.config.ts ├── vitest.config.ts └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 2 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.yml] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | VITE_APP_DADATA_API_KEY= 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | ignorePatterns: [ 4 | 'node_modules', 5 | 'dist', 6 | 'dist-ssr', 7 | 'package-lock.json', 8 | 'yarn.lock.json', 9 | '*.local', 10 | ], 11 | env: { 12 | browser: true, 13 | es2021: true, 14 | }, 15 | extends: [ 16 | 'plugin:vue/vue3-recommended', 17 | 'plugin:import/recommended', 18 | 'plugin:import/typescript', 19 | 'airbnb-base', 20 | '@vue/typescript/recommended', 21 | 22 | ], 23 | parser: 'vue-eslint-parser', 24 | parserOptions: { 25 | project: './tsconfig.json', 26 | sourceType: 'module', 27 | parser: { 28 | ts: '@typescript-eslint/parser', 29 | }, 30 | ecmaVersion: 2018, 31 | ecmaFeatures: { 32 | globalReturn: false, 33 | impliedStrict: false, 34 | jsx: false, 35 | }, 36 | }, 37 | rules: { 38 | 'no-param-reassign': 'off', 39 | 'no-unused-vars': 'off', 40 | '@typescript-eslint/no-unused-vars': ['error'], 41 | 'consistent-return': 'off', 42 | 'no-underscore-dangle': 'off', 43 | 'vue/define-emits-declaration': ['error', 'type-based'], 44 | 'vue/html-closing-bracket-newline': ['error', { 45 | singleline: 'never', 46 | multiline: 'never', 47 | }], 48 | 'import/prefer-default-export': 'off', 49 | 'import/no-extraneous-dependencies': 'off', 50 | 'padding-line-between-statements': [ 51 | 'error', 52 | { blankLine: 'always', prev: '*', next: 'return' }, 53 | { blankLine: 'always', prev: ['const', 'var', 'let'], next: '*' }, 54 | { blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] }, 55 | ], 56 | 'max-len': ['warn', { code: 150 }], 57 | 'import/extensions': [ 58 | 'error', 59 | 'ignorePackages', 60 | { 61 | js: 'never', 62 | jsx: 'never', 63 | ts: 'never', 64 | tsx: 'never', 65 | '': 'never', 66 | }, 67 | ], 68 | 'no-useless-constructor': 'off', 69 | 'class-methods-use-this': 'off', 70 | }, 71 | settings: { 72 | 'import/extensions': ['.js', '.jsx', '.ts', '.tsx'], 73 | 'import/parsers': { 74 | '@typescript-eslint/parser': ['.ts', '.tsx'], 75 | }, 76 | 'import/resolver': { 77 | typescript: true, 78 | node: { 79 | extensions: ['.js', '.jsx', '.ts', '.tsx'], 80 | }, 81 | }, 82 | }, 83 | 84 | }; 85 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # 2 | #name: Publish 3 | # 4 | #on: 5 | # release: 6 | # types: [published] 7 | # 8 | #jobs: 9 | # build: 10 | # runs-on: ubuntu-latest 11 | # steps: 12 | # - uses: actions/checkout@v1 13 | # - uses: actions/setup-node@v1 14 | # with: 15 | # node-version: 14 16 | # registry-url: https://registry.npmjs.org/ 17 | # - run: yarn install 18 | # - run: yarn build 19 | # - run: npm publish --access public 20 | # env: 21 | # NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | 5 | # local env files 6 | .env 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw* 23 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | [Link to RU changelog](https://github.com/ikloster03/vue-dadata/tree/master/ru/CHANGELOG.md) 4 | 5 | ## v2.0.0-beta.1 - June 06, 2020 6 | 7 | Rewrite release for vue2 8 | 9 | ## v1.4.6 - June 06, 2020 10 | 11 | Add ci/cd 12 | 13 | ## v1.3.2 - June 06, 2020 14 | 15 | RU documentation 16 | 17 | ## v1.3.0 - June 05, 2020 18 | 19 | Add new props 20 | 21 | ## v1.2.0 - February 09, 2020 22 | 23 | Proxy attributes 24 | 25 | ## v1.1.0 - October 31, 2019 26 | 27 | Add url props 28 | 29 | ## v1.0.0 - October 27, 2019 30 | 31 | First release 32 | 33 | ## v0.1.2 - October 27, 2019 34 | 35 | Pre-release 36 | 37 | ## v0.1.1 - October 26, 2019 38 | 39 | Test npm 40 | 41 | ## v0.1.0 - October 17, 2019 42 | 43 | Repository was initialized 44 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Ivan Monastyrev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Dadata 2 | 3 | [![npm version](https://badge.fury.io/js/vue-dadata.svg)](https://badge.fury.io/js/vue-dadata) 4 | [![npm downloads](https://img.shields.io/npm/dw/vue-dadata)](https://badge.fury.io/js/vue-dadata) 5 | [![NPM license](https://img.shields.io/npm/l/vue-dadata)](https://github.com/ikloster03/vue-dadata/blob/main/LICENSE) 6 | [![npm type definitions](https://img.shields.io/npm/types/vue-dadata)](https://github.com/ikloster03/vue-dadata) 7 | 8 | [comment]: <> (![Publish](https://github.com/ikloster03/vue-dadata/workflows/Publish/badge.svg)) 9 | 10 | It's a vue component for hinting addresses using [DaData.ru](https://dadata.ru). 11 | 12 | | Version | Description | 13 | |-----------|----------------------| 14 | | 1.\*.\* | Old version for vue2 | 15 | | 2.\*.\* | New version for vue2 | 16 | | 3.\*.\* | New version for vue3 | 17 | 18 | ## Install 19 | 20 | [npm package](https://www.npmjs.com/package/vue-dadata) 21 | 22 | ```bash 23 | # old version vue2 24 | $ npm install vue-dadata@1.4.12 --save 25 | # new version vue2 (in progress) 26 | $ npm install vue-dadata@2.0.0-beta.2 --save 27 | # vue3 (in progress) 28 | $ npm install vue-dadata --save 29 | ``` 30 | 31 | ## Usage 32 | 33 | ```html 34 | 41 | 42 | 63 | ``` 64 | 65 | ### Properties 66 | 67 | | Prop | Required | Type | Description | Default | 68 | |------------------|----------|------------|----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------| 69 | | token | Yes | `string` | Auth token DaData.ru | - | 70 | | modelValue | Yes | `string` | v-model for query | - | 71 | | suggestion | No | `object` | v-model for [suggestion](https://github.com/ikloster03/vue-dadata/blob/master/src/types/suggestion.dto.ts#L24) | `undefined` | 72 | | placeholder | No | `string` | Text placeholder | `''` | 73 | | url | No | `string` | special url for dadata api | `'https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address'` | 74 | | debounceWait | No | `string` | waiting time | `'1000ms'` | 75 | | disabled | No | `boolean` | disabled | `false` | 76 | | fromBound | No | `string` | Dadata bound type FROM | `undefined` | 77 | | toBound | No | `string` | Dadata bound type TO | `undefined` | 78 | | inputName | No | `string` | Input name attribute | `'vue-dadata-input'` | 79 | | locationOptions | No | `object` | Location options for choosing cities or countries | `undefined` | 80 | | classes | No | `object` | classes | [DEFAULT_CLASSES](https://github.com/ikloster03/vue-dadata/blob/master/src/const/classes.const.ts) | 81 | | highlightOptions | No | `object` | highlight options for [vue-word-highlighter](https://github.com/kawamataryo/vue-word-highlighter) | [DEFAULT_HIGHLIGHT_OPTIONS](https://github.com/ikloster03/vue-dadata/blob/master/src/const/highlight-options.const.ts) | 82 | | autocomplete | No | `boolean` | can autocomplete query, after blur | `undefined` | 83 | 84 | 85 | ## Peer dependencies 86 | - [vue](https://github.com/vuejs/vue) 87 | 88 | ## Dependencies 89 | - [axios](https://github.com/axios/axios) 90 | - [vue-debounce](https://github.com/dhershman1/vue-debounce) 91 | - [vue-word-highlighter](https://github.com/kawamataryo/vue-word-highlighter) 92 | 93 | Copyright (c) 2019 - 2022 Ivan Monastyrev . Licensed under the [MIT license](https://github.com/ikloster03/vue-dadata/blob/master/LICENSE). 94 | -------------------------------------------------------------------------------- /analyze.config.js: -------------------------------------------------------------------------------- 1 | import { visualizer } from 'rollup-plugin-visualizer'; 2 | import vue from '@vitejs/plugin-vue'; 3 | 4 | import { defineConfig } from 'vite'; 5 | import { resolve } from 'path'; 6 | 7 | // https://vitejs.dev/config/ 8 | export default defineConfig({ 9 | plugins: [ 10 | vue(), 11 | visualizer({ 12 | open: true, 13 | title: 'vue3-truncate-html Bundle Visualizer', 14 | }), 15 | ], 16 | build: { 17 | lib: { 18 | entry: resolve(__dirname, 'src/index.ts'), 19 | name: 'vue3-truncate-html', 20 | }, 21 | rollupOptions: { 22 | // make sure to externalize deps that shouldn't be bundled 23 | // into your library 24 | external: ['vue'], 25 | output: { 26 | // Provide global variables to use in the UMD build 27 | // for externalized deps 28 | globals: { 29 | vue: 'Vue', 30 | }, 31 | }, 32 | }, 33 | }, 34 | }); 35 | -------------------------------------------------------------------------------- /docs/.vitepress/config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitepress' 2 | import dotenv from 'dotenv' 3 | 4 | dotenv.config() 5 | 6 | export default defineConfig({ 7 | lang: 'en', 8 | title: 'vue3-truncate-html', 9 | description: 'A Vue 3 component for html truncating', 10 | // locales: { 11 | // '/en/': { 12 | // lang: 'en', 13 | // title: 'vue3-truncate-html', 14 | // description: '' 15 | // }, 16 | // '/ru/': { 17 | // lang: 'ru', 18 | // title: 'vue3-truncate-html', 19 | // description: '' 20 | // }, 21 | // }, 22 | themeConfig: { 23 | docsDir: 'docs', 24 | // algolia: { 25 | // appId: process.env.ALGOLIA_APP_ID, 26 | // apiKey: process.env.ALGOLIA_API_KEY, 27 | // indexName: process.env.ALGOLIA_INDEX_NAME 28 | // }, 29 | // locales: { 30 | // '/en/': { 31 | // label: 'English', 32 | // selectText: 'English', 33 | // }, 34 | // '/ru/': { 35 | // label: 'Русский', 36 | // selectText: 'Русский', 37 | // }, 38 | // }, 39 | nav: [ 40 | { 41 | text: 'Github', 42 | link: 'https://github.com/ikloster03/vue-dadata', 43 | }, 44 | { 45 | text: 'NPM', 46 | link: 'https://www.npmjs.com/package/vue-dadata', 47 | }, 48 | ], 49 | sidebar: { 50 | // 'en': [ 51 | // { 52 | // text: 'Introduction', 53 | // link: '/en/index', 54 | // }, 55 | // { 56 | // text: 'Getting started', 57 | // link: '/en/getting-started', 58 | // }, 59 | // { 60 | // text: 'API', 61 | // link: '/en/api', 62 | // }, 63 | // { 64 | // text: 'Examples', 65 | // link: '/examples', 66 | // }, 67 | // ], 68 | // 'ru': [ 69 | // { 70 | // text: 'Вступление', 71 | // link: '/ru/index', 72 | // }, 73 | // { 74 | // text: 'Быстрый старт', 75 | // link: '/ru/getting-started', 76 | // }, 77 | // { 78 | // text: 'API', 79 | // link: '/ru/api', 80 | // }, 81 | // { 82 | // text: 'Examples', 83 | // link: '/examples', 84 | // }, 85 | // ] 86 | } 87 | } 88 | }) 89 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/app.cd2b655c.js: -------------------------------------------------------------------------------- 1 | const Fo="modulepreload",Os={},Mo="/",Ro=function(t,n){return!n||n.length===0?t():Promise.all(n.map(s=>{if(s=`${Mo}${s}`,s in Os)return;Os[s]=!0;const r=s.endsWith(".css"),o=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${o}`))return;const i=document.createElement("link");if(i.rel=r?"stylesheet":Fo,r||(i.as="script",i.crossOrigin=""),i.href=s,document.head.appendChild(i),r)return new Promise((l,c)=>{i.addEventListener("load",l),i.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t())};function os(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r!!n[r.toLowerCase()]:r=>!!n[r]}const No="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",So=os(No);function gr(e){return!!e||e===""}function is(e){if(F(e)){const t={};for(let n=0;n{if(n){const s=n.split(Bo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ut(e){let t="";if(pe(e))t=e;else if(F(e))for(let n=0;npe(e)?e:e==null?"":F(e)||fe(e)&&(e.toString===xr||!H(e.toString))?JSON.stringify(e,vr,2):String(e),vr=(e,t)=>t&&t.__v_isRef?vr(e,t.value):yt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:br(t)?{[`Set(${t.size})`]:[...t.values()]}:fe(t)&&!F(t)&&!wr(t)?String(t):t,Q={},bt=[],Re=()=>{},jo=()=>!1,Do=/^on[^a-z]/,zt=e=>Do.test(e),ls=e=>e.startsWith("onUpdate:"),we=Object.assign,cs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ko=Object.prototype.hasOwnProperty,W=(e,t)=>Ko.call(e,t),F=Array.isArray,yt=e=>xn(e)==="[object Map]",br=e=>xn(e)==="[object Set]",H=e=>typeof e=="function",pe=e=>typeof e=="string",as=e=>typeof e=="symbol",fe=e=>e!==null&&typeof e=="object",yr=e=>fe(e)&&H(e.then)&&H(e.catch),xr=Object.prototype.toString,xn=e=>xr.call(e),Wo=e=>xn(e).slice(8,-1),wr=e=>xn(e)==="[object Object]",us=e=>pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Mt=os(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),wn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},qo=/-(\w)/g,Ue=wn(e=>e.replace(qo,(t,n)=>n?n.toUpperCase():"")),Vo=/\B([A-Z])/g,dt=wn(e=>e.replace(Vo,"-$1").toLowerCase()),$n=wn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Bn=wn(e=>e?`on${$n(e)}`:""),Ut=(e,t)=>!Object.is(e,t),on=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Wn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Fs;const zo=()=>Fs||(Fs=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let He;class Jo{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&He&&(this.parent=He,this.index=(He.scopes||(He.scopes=[])).push(this)-1)}run(t){if(this.active){const n=He;try{return He=this,t()}finally{He=n}}}on(){He=this}off(){He=this.parent}stop(t){if(this.active){let n,s;for(n=0,s=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},$r=e=>(e.w&tt)>0,kr=e=>(e.n&tt)>0,Xo=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s{(f==="length"||f>=s)&&l.push(c)});else switch(n!==void 0&&l.push(i.get(n)),t){case"add":F(e)?us(n)&&l.push(i.get("length")):(l.push(i.get(lt)),yt(e)&&l.push(i.get(zn)));break;case"delete":F(e)||(l.push(i.get(lt)),yt(e)&&l.push(i.get(zn)));break;case"set":yt(e)&&l.push(i.get(lt));break}if(l.length===1)l[0]&&Jn(l[0]);else{const c=[];for(const f of l)f&&c.push(...f);Jn(fs(c))}}function Jn(e,t){const n=F(e)?e:[...e];for(const s of n)s.computed&&Rs(s);for(const s of n)s.computed||Rs(s)}function Rs(e,t){(e!==Oe||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const Qo=os("__proto__,__v_isRef,__isVue"),Tr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(as)),Go=hs(),ei=hs(!1,!0),ti=hs(!0),Ns=ni();function ni(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=V(this);for(let o=0,i=this.length;o{e[t]=function(...n){Ct();const s=V(this)[t].apply(this,n);return Tt(),s}}),e}function hs(e=!1,t=!1){return function(s,r,o){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_isShallow")return t;if(r==="__v_raw"&&o===(e?t?vi:Or:t?Ir:Ar).get(s))return s;const i=F(s);if(!e&&i&&W(Ns,r))return Reflect.get(Ns,r,o);const l=Reflect.get(s,r,o);return(as(r)?Tr.has(r):Qo(r))||(e||Ce(s,"get",r),t)?l:he(l)?i&&us(r)?l:l.value:fe(l)?e?Fr(l):En(l):l}}const si=Lr(),ri=Lr(!0);function Lr(e=!1){return function(n,s,r,o){let i=n[s];if(jt(i)&&he(i)&&!he(r))return!1;if(!e&&!jt(r)&&(Yn(r)||(r=V(r),i=V(i)),!F(n)&&he(i)&&!he(r)))return i.value=r,!0;const l=F(n)&&us(s)?Number(s)e,kn=e=>Reflect.getPrototypeOf(e);function Zt(e,t,n=!1,s=!1){e=e.__v_raw;const r=V(e),o=V(t);n||(t!==o&&Ce(r,"get",t),Ce(r,"get",o));const{has:i}=kn(r),l=s?ps:n?gs:Dt;if(i.call(r,t))return l(e.get(t));if(i.call(r,o))return l(e.get(o));e!==r&&e.get(t)}function Qt(e,t=!1){const n=this.__v_raw,s=V(n),r=V(e);return t||(e!==r&&Ce(s,"has",e),Ce(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Gt(e,t=!1){return e=e.__v_raw,!t&&Ce(V(e),"iterate",lt),Reflect.get(e,"size",e)}function Ss(e){e=V(e);const t=V(this);return kn(t).has.call(t,e)||(t.add(e),qe(t,"add",e,e)),this}function Hs(e,t){t=V(t);const n=V(this),{has:s,get:r}=kn(n);let o=s.call(n,e);o||(e=V(e),o=s.call(n,e));const i=r.call(n,e);return n.set(e,t),o?Ut(t,i)&&qe(n,"set",e,t):qe(n,"add",e,t),this}function Bs(e){const t=V(this),{has:n,get:s}=kn(t);let r=n.call(t,e);r||(e=V(e),r=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return r&&qe(t,"delete",e,void 0),o}function Us(){const e=V(this),t=e.size!==0,n=e.clear();return t&&qe(e,"clear",void 0,void 0),n}function en(e,t){return function(s,r){const o=this,i=o.__v_raw,l=V(i),c=t?ps:e?gs:Dt;return!e&&Ce(l,"iterate",lt),i.forEach((f,h)=>s.call(r,c(f),c(h),o))}}function tn(e,t,n){return function(...s){const r=this.__v_raw,o=V(r),i=yt(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,f=r[e](...s),h=n?ps:t?gs:Dt;return!t&&Ce(o,"iterate",c?zn:lt),{next(){const{value:m,done:x}=f.next();return x?{value:m,done:x}:{value:l?[h(m[0]),h(m[1])]:h(m),done:x}},[Symbol.iterator](){return this}}}}function Ye(e){return function(...t){return e==="delete"?!1:this}}function ui(){const e={get(o){return Zt(this,o)},get size(){return Gt(this)},has:Qt,add:Ss,set:Hs,delete:Bs,clear:Us,forEach:en(!1,!1)},t={get(o){return Zt(this,o,!1,!0)},get size(){return Gt(this)},has:Qt,add:Ss,set:Hs,delete:Bs,clear:Us,forEach:en(!1,!0)},n={get(o){return Zt(this,o,!0)},get size(){return Gt(this,!0)},has(o){return Qt.call(this,o,!0)},add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear"),forEach:en(!0,!1)},s={get(o){return Zt(this,o,!0,!0)},get size(){return Gt(this,!0)},has(o){return Qt.call(this,o,!0)},add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear"),forEach:en(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=tn(o,!1,!1),n[o]=tn(o,!0,!1),t[o]=tn(o,!1,!0),s[o]=tn(o,!0,!0)}),[e,n,t,s]}const[fi,di,hi,pi]=ui();function _s(e,t){const n=t?e?pi:hi:e?di:fi;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(W(n,r)&&r in s?n:s,r,o)}const _i={get:_s(!1,!1)},mi={get:_s(!1,!0)},gi={get:_s(!0,!1)},Ar=new WeakMap,Ir=new WeakMap,Or=new WeakMap,vi=new WeakMap;function bi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function yi(e){return e.__v_skip||!Object.isExtensible(e)?0:bi(Wo(e))}function En(e){return jt(e)?e:ms(e,!1,Pr,_i,Ar)}function xi(e){return ms(e,!1,ai,mi,Ir)}function Fr(e){return ms(e,!0,ci,gi,Or)}function ms(e,t,n,s,r){if(!fe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=yi(e);if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function xt(e){return jt(e)?xt(e.__v_raw):!!(e&&e.__v_isReactive)}function jt(e){return!!(e&&e.__v_isReadonly)}function Yn(e){return!!(e&&e.__v_isShallow)}function Mr(e){return xt(e)||jt(e)}function V(e){const t=e&&e.__v_raw;return t?V(t):e}function Rt(e){return an(e,"__v_skip",!0),e}const Dt=e=>fe(e)?En(e):e,gs=e=>fe(e)?Fr(e):e;function Rr(e){Ge&&Oe&&(e=V(e),Cr(e.dep||(e.dep=fs())))}function Nr(e,t){e=V(e),e.dep&&Jn(e.dep)}function he(e){return!!(e&&e.__v_isRef===!0)}function Cn(e){return Sr(e,!1)}function wi(e){return Sr(e,!0)}function Sr(e,t){return he(e)?e:new $i(e,t)}class $i{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:V(t),this._value=n?t:Dt(t)}get value(){return Rr(this),this._value}set value(t){t=this.__v_isShallow?t:V(t),Ut(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:Dt(t),Nr(this))}}function $(e){return he(e)?e.value:e}const ki={get:(e,t,n)=>$(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return he(r)&&!he(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Hr(e){return xt(e)?e:new Proxy(e,ki)}function Br(e){const t=F(e)?new Array(e.length):{};for(const n in e)t[n]=Ci(e,n);return t}class Ei{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function Ci(e,t,n){const s=e[t];return he(s)?s:new Ei(e,t,n)}class Ti{constructor(t,n,s,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ds(t,()=>{this._dirty||(this._dirty=!0,Nr(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=V(this);return Rr(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Li(e,t,n=!1){let s,r;const o=H(e);return o?(s=e,r=Re):(s=e.get,r=e.set),new Ti(s,r,o||!r,n)}function et(e,t,n,s){let r;try{r=s?e(...s):e()}catch(o){Tn(o,t,n)}return r}function Ne(e,t,n,s){if(H(e)){const o=et(e,t,n,s);return o&&yr(o)&&o.catch(i=>{Tn(i,t,n)}),o}const r=[];for(let o=0;o>>1;Kt(Ee[s])We&&Ee.splice(t,1)}function Wr(e,t,n,s){F(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?s+1:s))&&n.push(e),Kr()}function Oi(e){Wr(e,Ft,Nt,mt)}function Fi(e){Wr(e,Ze,St,gt)}function Ln(e,t=null){if(Nt.length){for(Zn=t,Ft=[...new Set(Nt)],Nt.length=0,mt=0;mtKt(n)-Kt(s)),gt=0;gte.id==null?1/0:e.id;function qr(e){Xn=!1,un=!0,Ln(e),Ee.sort((n,s)=>Kt(n)-Kt(s));const t=Re;try{for(We=0;WeT.trim())),m&&(r=n.map(Wn))}let l,c=s[l=Bn(t)]||s[l=Bn(Ue(t))];!c&&o&&(c=s[l=Bn(dt(t))]),c&&Ne(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ne(f,e,6,r)}}function Vr(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!H(e)){const c=f=>{const h=Vr(f,t,!0);h&&(l=!0,we(i,h))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(s.set(e,null),null):(F(o)?o.forEach(c=>i[c]=null):we(i,o),s.set(e,i),i)}function Pn(e,t){return!e||!zt(t)?!1:(t=t.slice(2).replace(/Once$/,""),W(e,t[0].toLowerCase()+t.slice(1))||W(e,dt(t))||W(e,t))}let ye=null,An=null;function dn(e){const t=ye;return ye=e,An=e&&e.type.__scopeId||null,t}function zr(e){An=e}function Jr(){An=null}function Ke(e,t=ye,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Xs(-1);const o=dn(t),i=e(...r);return dn(o),s._d&&Xs(1),i};return s._n=!0,s._c=!0,s._d=!0,s}function Un(e){const{type:t,vnode:n,proxy:s,withProxy:r,props:o,propsOptions:[i],slots:l,attrs:c,emit:f,render:h,renderCache:m,data:x,setupState:T,ctx:M,inheritAttrs:z}=e;let B,v;const E=dn(e);try{if(n.shapeFlag&4){const j=r||s;B=Ie(h.call(j,j,m,o,T,x,M)),v=c}else{const j=t;B=Ie(j.length>1?j(o,{attrs:c,slots:l,emit:f}):j(o,null)),v=t.props?c:Ri(c)}}catch(j){Bt.length=0,Tn(j,e,1),B=U(Ve)}let L=B;if(v&&z!==!1){const j=Object.keys(v),{shapeFlag:Y}=L;j.length&&Y&7&&(i&&j.some(ls)&&(v=Ni(v,i)),L=$t(L,v))}return n.dirs&&(L=$t(L),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition&&(L.transition=n.transition),B=L,dn(E),B}const Ri=e=>{let t;for(const n in e)(n==="class"||n==="style"||zt(n))&&((t||(t={}))[n]=e[n]);return t},Ni=(e,t)=>{const n={};for(const s in e)(!ls(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Si(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,f=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?js(s,i,f):!!i;if(c&8){const h=t.dynamicProps;for(let m=0;me.__isSuspense;function Yr(e,t){t&&t.pendingBranch?F(e)?t.effects.push(...e):t.effects.push(e):Fi(e)}function Ui(e,t){if(_e){let n=_e.provides;const s=_e.parent&&_e.parent.provides;s===n&&(n=_e.provides=Object.create(s)),n[e]=t}}function Ht(e,t,n=!1){const s=_e||ye;if(s){const r=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&H(t)?t.call(s.proxy):t}}function Xr(e,t){return bs(e,null,t)}const Ds={};function ct(e,t,n){return bs(e,t,n)}function bs(e,t,{immediate:n,deep:s,flush:r,onTrack:o,onTrigger:i}=Q){const l=_e;let c,f=!1,h=!1;if(he(e)?(c=()=>e.value,f=Yn(e)):xt(e)?(c=()=>e,s=!0):F(e)?(h=!0,f=e.some(v=>xt(v)||Yn(v)),c=()=>e.map(v=>{if(he(v))return v.value;if(xt(v))return it(v);if(H(v))return et(v,l,2)})):H(e)?t?c=()=>et(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return m&&m(),Ne(e,l,3,[x])}:c=Re,t&&s){const v=c;c=()=>it(v())}let m,x=v=>{m=B.onStop=()=>{et(v,l,4)}};if(Vt)return x=Re,t?n&&Ne(t,l,3,[c(),h?[]:void 0,x]):c(),Re;let T=h?[]:Ds;const M=()=>{if(!!B.active)if(t){const v=B.run();(s||f||(h?v.some((E,L)=>Ut(E,T[L])):Ut(v,T)))&&(m&&m(),Ne(t,l,3,[v,T===Ds?void 0:T,x]),T=v)}else B.run()};M.allowRecurse=!!t;let z;r==="sync"?z=M:r==="post"?z=()=>$e(M,l&&l.suspense):z=()=>Oi(M);const B=new ds(c,z);return t?n?M():T=B.run():r==="post"?$e(B.run.bind(B),l&&l.suspense):B.run(),()=>{B.stop(),l&&l.scope&&cs(l.scope.effects,B)}}function ji(e,t,n){const s=this.proxy,r=pe(e)?e.includes(".")?Zr(s,e):()=>s[e]:e.bind(s,s);let o;H(t)?o=t:(o=t.handler,n=t);const i=_e;kt(this);const l=bs(r,o.bind(s),n);return i?kt(i):at(),l}function Zr(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r{it(n,t)});else if(wr(e))for(const n in e)it(e[n],t);return e}function ce(e){return H(e)?{setup:e,name:e.name}:e}const wt=e=>!!e.type.__asyncLoader,Qr=e=>e.type.__isKeepAlive;function Di(e,t){Gr(e,"a",t)}function Ki(e,t){Gr(e,"da",t)}function Gr(e,t,n=_e){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(In(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Qr(r.parent.vnode)&&Wi(s,t,n,r),r=r.parent}}function Wi(e,t,n,s){const r=In(t,e,s,!0);On(()=>{cs(s[t],r)},n)}function In(e,t,n=_e,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Ct(),kt(n);const l=Ne(t,n,e,i);return at(),Tt(),l});return s?r.unshift(o):r.push(o),o}}const ze=e=>(t,n=_e)=>(!Vt||e==="sp")&&In(e,t,n),qi=ze("bm"),Lt=ze("m"),Vi=ze("bu"),eo=ze("u"),zi=ze("bum"),On=ze("um"),Ji=ze("sp"),Yi=ze("rtg"),Xi=ze("rtc");function Zi(e,t=_e){In("ec",e,t)}function of(e,t){const n=ye;if(n===null)return e;const s=Rn(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;ot(i,l,void 0,o&&o[l]));else{const i=Object.keys(e);r=new Array(i.length);for(let l=0,c=i.length;lgn(t)?!(t.type===Ve||t.type===de&&!no(t.children)):!0)?e:null}const Qn=e=>e?_o(e)?Rn(e)||e.proxy:Qn(e.parent):null,pn=we(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qn(e.parent),$root:e=>Qn(e.root),$emit:e=>e.emit,$options:e=>ro(e),$forceUpdate:e=>e.f||(e.f=()=>Dr(e.update)),$nextTick:e=>e.n||(e.n=jr.bind(e.proxy)),$watch:e=>ji.bind(e)}),el={get({_:e},t){const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;let f;if(t[0]!=="$"){const T=i[t];if(T!==void 0)switch(T){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(s!==Q&&W(s,t))return i[t]=1,s[t];if(r!==Q&&W(r,t))return i[t]=2,r[t];if((f=e.propsOptions[0])&&W(f,t))return i[t]=3,o[t];if(n!==Q&&W(n,t))return i[t]=4,n[t];Gn&&(i[t]=0)}}const h=pn[t];let m,x;if(h)return t==="$attrs"&&Ce(e,"get",t),h(e);if((m=l.__cssModules)&&(m=m[t]))return m;if(n!==Q&&W(n,t))return i[t]=4,n[t];if(x=c.config.globalProperties,W(x,t))return x[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return r!==Q&&W(r,t)?(r[t]=n,!0):s!==Q&&W(s,t)?(s[t]=n,!0):W(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let l;return!!n[i]||e!==Q&&W(e,i)||t!==Q&&W(t,i)||(l=o[0])&&W(l,i)||W(s,i)||W(pn,i)||W(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:W(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let Gn=!0;function tl(e){const t=ro(e),n=e.proxy,s=e.ctx;Gn=!1,t.beforeCreate&&Ws(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:f,created:h,beforeMount:m,mounted:x,beforeUpdate:T,updated:M,activated:z,deactivated:B,beforeDestroy:v,beforeUnmount:E,destroyed:L,unmounted:j,render:Y,renderTracked:ne,renderTriggered:G,errorCaptured:D,serverPrefetch:re,expose:le,inheritAttrs:oe,components:Le,directives:me,filters:R}=t;if(f&&nl(f,s,null,e.appContext.config.unwrapInjectedRef),i)for(const ie in i){const ee=i[ie];H(ee)&&(s[ie]=ee.bind(n))}if(r){const ie=r.call(n,n);fe(ie)&&(e.data=En(ie))}if(Gn=!0,o)for(const ie in o){const ee=o[ie],je=H(ee)?ee.bind(n,n):H(ee.get)?ee.get.bind(n,n):Re,Nn=!H(ee)&&H(ee.set)?ee.set.bind(n):Re,Pt=K({get:je,set:Nn});Object.defineProperty(s,ie,{enumerable:!0,configurable:!0,get:()=>Pt.value,set:ht=>Pt.value=ht})}if(l)for(const ie in l)so(l[ie],s,n,ie);if(c){const ie=H(c)?c.call(n):c;Reflect.ownKeys(ie).forEach(ee=>{Ui(ee,ie[ee])})}h&&Ws(h,e,"c");function se(ie,ee){F(ee)?ee.forEach(je=>ie(je.bind(n))):ee&&ie(ee.bind(n))}if(se(qi,m),se(Lt,x),se(Vi,T),se(eo,M),se(Di,z),se(Ki,B),se(Zi,D),se(Xi,ne),se(Yi,G),se(zi,E),se(On,j),se(Ji,re),F(le))if(le.length){const ie=e.exposed||(e.exposed={});le.forEach(ee=>{Object.defineProperty(ie,ee,{get:()=>n[ee],set:je=>n[ee]=je})})}else e.exposed||(e.exposed={});Y&&e.render===Re&&(e.render=Y),oe!=null&&(e.inheritAttrs=oe),Le&&(e.components=Le),me&&(e.directives=me)}function nl(e,t,n=Re,s=!1){F(e)&&(e=es(e));for(const r in e){const o=e[r];let i;fe(o)?"default"in o?i=Ht(o.from||r,o.default,!0):i=Ht(o.from||r):i=Ht(o),he(i)&&s?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[r]=i}}function Ws(e,t,n){Ne(F(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function so(e,t,n,s){const r=s.includes(".")?Zr(n,s):()=>n[s];if(pe(e)){const o=t[e];H(o)&&ct(r,o)}else if(H(e))ct(r,e.bind(n));else if(fe(e))if(F(e))e.forEach(o=>so(o,t,n,s));else{const o=H(e.handler)?e.handler.bind(n):t[e.handler];H(o)&&ct(r,o,e)}}function ro(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>_n(c,f,i,!0)),_n(c,t,i)),o.set(t,c),c}function _n(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&_n(e,o,n,!0),r&&r.forEach(i=>_n(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=sl[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const sl={data:qs,props:rt,emits:rt,methods:rt,computed:rt,beforeCreate:be,created:be,beforeMount:be,mounted:be,beforeUpdate:be,updated:be,beforeDestroy:be,beforeUnmount:be,destroyed:be,unmounted:be,activated:be,deactivated:be,errorCaptured:be,serverPrefetch:be,components:rt,directives:rt,watch:ol,provide:qs,inject:rl};function qs(e,t){return t?e?function(){return we(H(e)?e.call(this,this):e,H(t)?t.call(this,this):t)}:t:e}function rl(e,t){return rt(es(e),es(t))}function es(e){if(F(e)){const t={};for(let n=0;n0)&&!(i&16)){if(i&8){const h=e.vnode.dynamicProps;for(let m=0;m{c=!0;const[x,T]=io(m,t,!0);we(i,x),T&&l.push(...T)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!o&&!c)return s.set(e,bt),bt;if(F(o))for(let h=0;h-1,T[1]=z<0||M-1||W(T,"default"))&&l.push(m)}}}const f=[i,l];return s.set(e,f),f}function Vs(e){return e[0]!=="$"}function zs(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Js(e,t){return zs(e)===zs(t)}function Ys(e,t){return F(t)?t.findIndex(n=>Js(n,e)):H(t)&&Js(t,e)?0:-1}const lo=e=>e[0]==="_"||e==="$stable",ys=e=>F(e)?e.map(Ie):[Ie(e)],cl=(e,t,n)=>{if(t._n)return t;const s=Ke((...r)=>ys(t(...r)),n);return s._c=!1,s},co=(e,t,n)=>{const s=e._ctx;for(const r in e){if(lo(r))continue;const o=e[r];if(H(o))t[r]=cl(r,o,s);else if(o!=null){const i=ys(o);t[r]=()=>i}}},ao=(e,t)=>{const n=ys(t);e.slots.default=()=>n},al=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=V(t),an(t,"_",n)):co(t,e.slots={})}else e.slots={},t&&ao(e,t);an(e.slots,Mn,1)},ul=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=Q;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:(we(r,t),!n&&l===1&&delete r._):(o=!t.$stable,co(t,r)),i=t}else t&&(ao(e,t),i={default:1});if(o)for(const l in r)!lo(l)&&!(l in i)&&delete r[l]};function uo(){return{app:null,config:{isNativeTag:jo,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let fl=0;function dl(e,t){return function(s,r=null){H(s)||(s=Object.assign({},s)),r!=null&&!fe(r)&&(r=null);const o=uo(),i=new Set;let l=!1;const c=o.app={_uid:fl++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:Al,get config(){return o.config},set config(f){},use(f,...h){return i.has(f)||(f&&H(f.install)?(i.add(f),f.install(c,...h)):H(f)&&(i.add(f),f(c,...h))),c},mixin(f){return o.mixins.includes(f)||o.mixins.push(f),c},component(f,h){return h?(o.components[f]=h,c):o.components[f]},directive(f,h){return h?(o.directives[f]=h,c):o.directives[f]},mount(f,h,m){if(!l){const x=U(s,r);return x.appContext=o,h&&t?t(x,f):e(x,f,m),l=!0,c._container=f,f.__vue_app__=c,Rn(x.component)||x.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(f,h){return o.provides[f]=h,c}};return c}}function mn(e,t,n,s,r=!1){if(F(e)){e.forEach((x,T)=>mn(x,t&&(F(t)?t[T]:t),n,s,r));return}if(wt(s)&&!r)return;const o=s.shapeFlag&4?Rn(s.component)||s.component.proxy:s.el,i=r?null:o,{i:l,r:c}=e,f=t&&t.r,h=l.refs===Q?l.refs={}:l.refs,m=l.setupState;if(f!=null&&f!==c&&(pe(f)?(h[f]=null,W(m,f)&&(m[f]=null)):he(f)&&(f.value=null)),H(c))et(c,l,12,[i,h]);else{const x=pe(c),T=he(c);if(x||T){const M=()=>{if(e.f){const z=x?h[c]:c.value;r?F(z)&&cs(z,o):F(z)?z.includes(o)||z.push(o):x?(h[c]=[o],W(m,c)&&(m[c]=h[c])):(c.value=[o],e.k&&(h[e.k]=c.value))}else x?(h[c]=i,W(m,c)&&(m[c]=i)):he(c)&&(c.value=i,e.k&&(h[e.k]=i))};i?(M.id=-1,$e(M,n)):M()}}}let Xe=!1;const nn=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",sn=e=>e.nodeType===8;function hl(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:o,parentNode:i,remove:l,insert:c,createComment:f}}=e,h=(v,E)=>{if(!E.hasChildNodes()){n(null,v,E),fn();return}Xe=!1,m(E.firstChild,v,null,null,null),fn(),Xe&&console.error("Hydration completed but contains mismatches.")},m=(v,E,L,j,Y,ne=!1)=>{const G=sn(v)&&v.data==="[",D=()=>z(v,E,L,j,Y,G),{type:re,ref:le,shapeFlag:oe,patchFlag:Le}=E,me=v.nodeType;E.el=v,Le===-2&&(ne=!1,E.dynamicChildren=null);let R=null;switch(re){case Wt:me!==3?E.children===""?(c(E.el=r(""),i(v),v),R=v):R=D():(v.data!==E.children&&(Xe=!0,v.data=E.children),R=o(v));break;case Ve:me!==8||G?R=D():R=o(v);break;case ln:if(me!==1)R=D();else{R=v;const Pe=!E.children.length;for(let se=0;se{ne=ne||!!E.dynamicChildren;const{type:G,props:D,patchFlag:re,shapeFlag:le,dirs:oe}=E,Le=G==="input"&&oe||G==="option";if(Le||re!==-1){if(oe&&Be(E,null,L,"created"),D)if(Le||!ne||re&48)for(const R in D)(Le&&R.endsWith("value")||zt(R)&&!Mt(R))&&s(v,R,null,D[R],!1,void 0,L);else D.onClick&&s(v,"onClick",null,D.onClick,!1,void 0,L);let me;if((me=D&&D.onVnodeBeforeMount)&&Te(me,L,E),oe&&Be(E,null,L,"beforeMount"),((me=D&&D.onVnodeMounted)||oe)&&Yr(()=>{me&&Te(me,L,E),oe&&Be(E,null,L,"mounted")},j),le&16&&!(D&&(D.innerHTML||D.textContent))){let R=T(v.firstChild,E,v,L,j,Y,ne);for(;R;){Xe=!0;const Pe=R;R=R.nextSibling,l(Pe)}}else le&8&&v.textContent!==E.children&&(Xe=!0,v.textContent=E.children)}return v.nextSibling},T=(v,E,L,j,Y,ne,G)=>{G=G||!!E.dynamicChildren;const D=E.children,re=D.length;for(let le=0;le{const{slotScopeIds:G}=E;G&&(Y=Y?Y.concat(G):G);const D=i(v),re=T(o(v),E,D,L,j,Y,ne);return re&&sn(re)&&re.data==="]"?o(E.anchor=re):(Xe=!0,c(E.anchor=f("]"),D,re),re)},z=(v,E,L,j,Y,ne)=>{if(Xe=!0,E.el=null,ne){const re=B(v);for(;;){const le=o(v);if(le&&le!==re)l(le);else break}}const G=o(v),D=i(v);return l(v),n(null,E,D,G,L,j,nn(D),Y),G},B=v=>{let E=0;for(;v;)if(v=o(v),v&&sn(v)&&(v.data==="["&&E++,v.data==="]")){if(E===0)return o(v);E--}return v};return[h,m]}const $e=Yr;function pl(e){return _l(e,hl)}function _l(e,t){const n=zo();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:f,setElementText:h,parentNode:m,nextSibling:x,setScopeId:T=Re,cloneNode:M,insertStaticContent:z}=e,B=(a,u,d,_=null,p=null,y=null,k=!1,b=null,w=!!u.dynamicChildren)=>{if(a===u)return;a&&!It(a,u)&&(_=Xt(a),Je(a,p,y,!0),a=null),u.patchFlag===-2&&(w=!1,u.dynamicChildren=null);const{type:g,ref:A,shapeFlag:C}=u;switch(g){case Wt:v(a,u,d,_);break;case Ve:E(a,u,d,_);break;case ln:a==null&&L(u,d,_,k);break;case de:me(a,u,d,_,p,y,k,b,w);break;default:C&1?ne(a,u,d,_,p,y,k,b,w):C&6?R(a,u,d,_,p,y,k,b,w):(C&64||C&128)&&g.process(a,u,d,_,p,y,k,b,w,pt)}A!=null&&p&&mn(A,a&&a.ref,y,u||a,!u)},v=(a,u,d,_)=>{if(a==null)s(u.el=l(u.children),d,_);else{const p=u.el=a.el;u.children!==a.children&&f(p,u.children)}},E=(a,u,d,_)=>{a==null?s(u.el=c(u.children||""),d,_):u.el=a.el},L=(a,u,d,_)=>{[a.el,a.anchor]=z(a.children,u,d,_,a.el,a.anchor)},j=({el:a,anchor:u},d,_)=>{let p;for(;a&&a!==u;)p=x(a),s(a,d,_),a=p;s(u,d,_)},Y=({el:a,anchor:u})=>{let d;for(;a&&a!==u;)d=x(a),r(a),a=d;r(u)},ne=(a,u,d,_,p,y,k,b,w)=>{k=k||u.type==="svg",a==null?G(u,d,_,p,y,k,b,w):le(a,u,p,y,k,b,w)},G=(a,u,d,_,p,y,k,b)=>{let w,g;const{type:A,props:C,shapeFlag:I,transition:O,patchFlag:q,dirs:X}=a;if(a.el&&M!==void 0&&q===-1)w=a.el=M(a.el);else{if(w=a.el=i(a.type,y,C&&C.is,C),I&8?h(w,a.children):I&16&&re(a.children,w,null,_,p,y&&A!=="foreignObject",k,b),X&&Be(a,null,_,"created"),C){for(const te in C)te!=="value"&&!Mt(te)&&o(w,te,null,C[te],y,a.children,_,p,De);"value"in C&&o(w,"value",null,C.value),(g=C.onVnodeBeforeMount)&&Te(g,_,a)}D(w,a,a.scopeId,k,_)}X&&Be(a,null,_,"beforeMount");const Z=(!p||p&&!p.pendingBranch)&&O&&!O.persisted;Z&&O.beforeEnter(w),s(w,u,d),((g=C&&C.onVnodeMounted)||Z||X)&&$e(()=>{g&&Te(g,_,a),Z&&O.enter(w),X&&Be(a,null,_,"mounted")},p)},D=(a,u,d,_,p)=>{if(d&&T(a,d),_)for(let y=0;y<_.length;y++)T(a,_[y]);if(p){let y=p.subTree;if(u===y){const k=p.vnode;D(a,k,k.scopeId,k.slotScopeIds,p.parent)}}},re=(a,u,d,_,p,y,k,b,w=0)=>{for(let g=w;g{const b=u.el=a.el;let{patchFlag:w,dynamicChildren:g,dirs:A}=u;w|=a.patchFlag&16;const C=a.props||Q,I=u.props||Q;let O;d&&st(d,!1),(O=I.onVnodeBeforeUpdate)&&Te(O,d,u,a),A&&Be(u,a,d,"beforeUpdate"),d&&st(d,!0);const q=p&&u.type!=="foreignObject";if(g?oe(a.dynamicChildren,g,b,d,_,q,y):k||je(a,u,b,null,d,_,q,y,!1),w>0){if(w&16)Le(b,u,C,I,d,_,p);else if(w&2&&C.class!==I.class&&o(b,"class",null,I.class,p),w&4&&o(b,"style",C.style,I.style,p),w&8){const X=u.dynamicProps;for(let Z=0;Z{O&&Te(O,d,u,a),A&&Be(u,a,d,"updated")},_)},oe=(a,u,d,_,p,y,k)=>{for(let b=0;b{if(d!==_){for(const b in _){if(Mt(b))continue;const w=_[b],g=d[b];w!==g&&b!=="value"&&o(a,b,g,w,k,u.children,p,y,De)}if(d!==Q)for(const b in d)!Mt(b)&&!(b in _)&&o(a,b,d[b],null,k,u.children,p,y,De);"value"in _&&o(a,"value",d.value,_.value)}},me=(a,u,d,_,p,y,k,b,w)=>{const g=u.el=a?a.el:l(""),A=u.anchor=a?a.anchor:l("");let{patchFlag:C,dynamicChildren:I,slotScopeIds:O}=u;O&&(b=b?b.concat(O):O),a==null?(s(g,d,_),s(A,d,_),re(u.children,d,A,p,y,k,b,w)):C>0&&C&64&&I&&a.dynamicChildren?(oe(a.dynamicChildren,I,d,p,y,k,b),(u.key!=null||p&&u===p.subTree)&&fo(a,u,!0)):je(a,u,d,A,p,y,k,b,w)},R=(a,u,d,_,p,y,k,b,w)=>{u.slotScopeIds=b,a==null?u.shapeFlag&512?p.ctx.activate(u,d,_,k,w):Pe(u,d,_,p,y,k,w):se(a,u,w)},Pe=(a,u,d,_,p,y,k)=>{const b=a.component=$l(a,_,p);if(Qr(a)&&(b.ctx.renderer=pt),kl(b),b.asyncDep){if(p&&p.registerDep(b,ie),!a.el){const w=b.subTree=U(Ve);E(null,w,u,d)}return}ie(b,a,u,d,p,y,k)},se=(a,u,d)=>{const _=u.component=a.component;if(Si(a,u,d))if(_.asyncDep&&!_.asyncResolved){ee(_,u,d);return}else _.next=u,Ii(_.update),_.update();else u.el=a.el,_.vnode=u},ie=(a,u,d,_,p,y,k)=>{const b=()=>{if(a.isMounted){let{next:A,bu:C,u:I,parent:O,vnode:q}=a,X=A,Z;st(a,!1),A?(A.el=q.el,ee(a,A,k)):A=q,C&&on(C),(Z=A.props&&A.props.onVnodeBeforeUpdate)&&Te(Z,O,A,q),st(a,!0);const te=Un(a),Ae=a.subTree;a.subTree=te,B(Ae,te,m(Ae.el),Xt(Ae),a,p,y),A.el=te.el,X===null&&Hi(a,te.el),I&&$e(I,p),(Z=A.props&&A.props.onVnodeUpdated)&&$e(()=>Te(Z,O,A,q),p)}else{let A;const{el:C,props:I}=u,{bm:O,m:q,parent:X}=a,Z=wt(u);if(st(a,!1),O&&on(O),!Z&&(A=I&&I.onVnodeBeforeMount)&&Te(A,X,u),st(a,!0),C&&Hn){const te=()=>{a.subTree=Un(a),Hn(C,a.subTree,a,p,null)};Z?u.type.__asyncLoader().then(()=>!a.isUnmounted&&te()):te()}else{const te=a.subTree=Un(a);B(null,te,d,_,a,p,y),u.el=te.el}if(q&&$e(q,p),!Z&&(A=I&&I.onVnodeMounted)){const te=u;$e(()=>Te(A,X,te),p)}(u.shapeFlag&256||X&&wt(X.vnode)&&X.vnode.shapeFlag&256)&&a.a&&$e(a.a,p),a.isMounted=!0,u=d=_=null}},w=a.effect=new ds(b,()=>Dr(g),a.scope),g=a.update=()=>w.run();g.id=a.uid,st(a,!0),g()},ee=(a,u,d)=>{u.component=a;const _=a.vnode.props;a.vnode=u,a.next=null,ll(a,u.props,_,d),ul(a,u.children,d),Ct(),Ln(void 0,a.update),Tt()},je=(a,u,d,_,p,y,k,b,w=!1)=>{const g=a&&a.children,A=a?a.shapeFlag:0,C=u.children,{patchFlag:I,shapeFlag:O}=u;if(I>0){if(I&128){Pt(g,C,d,_,p,y,k,b,w);return}else if(I&256){Nn(g,C,d,_,p,y,k,b,w);return}}O&8?(A&16&&De(g,p,y),C!==g&&h(d,C)):A&16?O&16?Pt(g,C,d,_,p,y,k,b,w):De(g,p,y,!0):(A&8&&h(d,""),O&16&&re(C,d,_,p,y,k,b,w))},Nn=(a,u,d,_,p,y,k,b,w)=>{a=a||bt,u=u||bt;const g=a.length,A=u.length,C=Math.min(g,A);let I;for(I=0;IA?De(a,p,y,!0,!1,C):re(u,d,_,p,y,k,b,w,C)},Pt=(a,u,d,_,p,y,k,b,w)=>{let g=0;const A=u.length;let C=a.length-1,I=A-1;for(;g<=C&&g<=I;){const O=a[g],q=u[g]=w?Qe(u[g]):Ie(u[g]);if(It(O,q))B(O,q,d,null,p,y,k,b,w);else break;g++}for(;g<=C&&g<=I;){const O=a[C],q=u[I]=w?Qe(u[I]):Ie(u[I]);if(It(O,q))B(O,q,d,null,p,y,k,b,w);else break;C--,I--}if(g>C){if(g<=I){const O=I+1,q=OI)for(;g<=C;)Je(a[g],p,y,!0),g++;else{const O=g,q=g,X=new Map;for(g=q;g<=I;g++){const ke=u[g]=w?Qe(u[g]):Ie(u[g]);ke.key!=null&&X.set(ke.key,g)}let Z,te=0;const Ae=I-q+1;let _t=!1,Ps=0;const At=new Array(Ae);for(g=0;g=Ae){Je(ke,p,y,!0);continue}let Se;if(ke.key!=null)Se=X.get(ke.key);else for(Z=q;Z<=I;Z++)if(At[Z-q]===0&&It(ke,u[Z])){Se=Z;break}Se===void 0?Je(ke,p,y,!0):(At[Se-q]=g+1,Se>=Ps?Ps=Se:_t=!0,B(ke,u[Se],d,null,p,y,k,b,w),te++)}const As=_t?ml(At):bt;for(Z=As.length-1,g=Ae-1;g>=0;g--){const ke=q+g,Se=u[ke],Is=ke+1{const{el:y,type:k,transition:b,children:w,shapeFlag:g}=a;if(g&6){ht(a.component.subTree,u,d,_);return}if(g&128){a.suspense.move(u,d,_);return}if(g&64){k.move(a,u,d,pt);return}if(k===de){s(y,u,d);for(let C=0;Cb.enter(y),p);else{const{leave:C,delayLeave:I,afterLeave:O}=b,q=()=>s(y,u,d),X=()=>{C(y,()=>{q(),O&&O()})};I?I(y,q,X):X()}else s(y,u,d)},Je=(a,u,d,_=!1,p=!1)=>{const{type:y,props:k,ref:b,children:w,dynamicChildren:g,shapeFlag:A,patchFlag:C,dirs:I}=a;if(b!=null&&mn(b,null,d,a,!0),A&256){u.ctx.deactivate(a);return}const O=A&1&&I,q=!wt(a);let X;if(q&&(X=k&&k.onVnodeBeforeUnmount)&&Te(X,u,a),A&6)Oo(a.component,d,_);else{if(A&128){a.suspense.unmount(d,_);return}O&&Be(a,null,u,"beforeUnmount"),A&64?a.type.remove(a,u,d,p,pt,_):g&&(y!==de||C>0&&C&64)?De(g,u,d,!1,!0):(y===de&&C&384||!p&&A&16)&&De(w,u,d),_&&Ts(a)}(q&&(X=k&&k.onVnodeUnmounted)||O)&&$e(()=>{X&&Te(X,u,a),O&&Be(a,null,u,"unmounted")},d)},Ts=a=>{const{type:u,el:d,anchor:_,transition:p}=a;if(u===de){Io(d,_);return}if(u===ln){Y(a);return}const y=()=>{r(d),p&&!p.persisted&&p.afterLeave&&p.afterLeave()};if(a.shapeFlag&1&&p&&!p.persisted){const{leave:k,delayLeave:b}=p,w=()=>k(d,y);b?b(a.el,y,w):w()}else y()},Io=(a,u)=>{let d;for(;a!==u;)d=x(a),r(a),a=d;r(u)},Oo=(a,u,d)=>{const{bum:_,scope:p,update:y,subTree:k,um:b}=a;_&&on(_),p.stop(),y&&(y.active=!1,Je(k,a,u,d)),b&&$e(b,u),$e(()=>{a.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&a.asyncDep&&!a.asyncResolved&&a.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},De=(a,u,d,_=!1,p=!1,y=0)=>{for(let k=y;ka.shapeFlag&6?Xt(a.component.subTree):a.shapeFlag&128?a.suspense.next():x(a.anchor||a.el),Ls=(a,u,d)=>{a==null?u._vnode&&Je(u._vnode,null,null,!0):B(u._vnode||null,a,u,null,null,null,d),fn(),u._vnode=a},pt={p:B,um:Je,m:ht,r:Ts,mt:Pe,mc:re,pc:je,pbc:oe,n:Xt,o:e};let Sn,Hn;return t&&([Sn,Hn]=t(pt)),{render:Ls,hydrate:Sn,createApp:dl(Ls,Sn)}}function st({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function fo(e,t,n=!1){const s=e.children,r=t.children;if(F(s)&&F(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}const gl=e=>e.__isTeleport,de=Symbol(void 0),Wt=Symbol(void 0),Ve=Symbol(void 0),ln=Symbol(void 0),Bt=[];let Fe=null;function P(e=!1){Bt.push(Fe=e?null:[])}function vl(){Bt.pop(),Fe=Bt[Bt.length-1]||null}let qt=1;function Xs(e){qt+=e}function ho(e){return e.dynamicChildren=qt>0?Fe||bt:null,vl(),qt>0&&Fe&&Fe.push(e),e}function N(e,t,n,s,r,o){return ho(S(e,t,n,s,r,o,!0))}function ge(e,t,n,s,r){return ho(U(e,t,n,s,r,!0))}function gn(e){return e?e.__v_isVNode===!0:!1}function It(e,t){return e.type===t.type&&e.key===t.key}const Mn="__vInternal",po=({key:e})=>e!=null?e:null,cn=({ref:e,ref_key:t,ref_for:n})=>e!=null?pe(e)||he(e)||H(e)?{i:ye,r:e,k:t,f:!!n}:e:null;function S(e,t=null,n=null,s=0,r=null,o=e===de?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&po(t),ref:t&&cn(t),scopeId:An,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null};return l?(xs(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=pe(n)?8:16),qt>0&&!i&&Fe&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Fe.push(c),c}const U=bl;function bl(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Qi)&&(e=Ve),gn(e)){const l=$t(e,t,!0);return n&&xs(l,n),qt>0&&!o&&Fe&&(l.shapeFlag&6?Fe[Fe.indexOf(e)]=l:Fe.push(l)),l.patchFlag|=-2,l}if(Pl(e)&&(e=e.__vccOpts),t){t=yl(t);let{class:l,style:c}=t;l&&!pe(l)&&(t.class=ut(l)),fe(c)&&(Mr(c)&&!F(c)&&(c=we({},c)),t.style=is(c))}const i=pe(e)?1:Bi(e)?128:gl(e)?64:fe(e)?4:H(e)?2:0;return S(e,t,n,s,r,i,o,!0)}function yl(e){return e?Mr(e)||Mn in e?we({},e):e:null}function $t(e,t,n=!1){const{props:s,ref:r,patchFlag:o,children:i}=e,l=t?ws(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&po(l),ref:t&&t.ref?n&&r?F(r)?r.concat(cn(t)):[r,cn(t)]:cn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==de?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$t(e.ssContent),ssFallback:e.ssFallback&&$t(e.ssFallback),el:e.el,anchor:e.anchor}}function Jt(e=" ",t=0){return U(Wt,null,e,t)}function J(e="",t=!1){return t?(P(),ge(Ve,null,e)):U(Ve,null,e)}function Ie(e){return e==null||typeof e=="boolean"?U(Ve):F(e)?U(de,null,e.slice()):typeof e=="object"?Qe(e):U(Wt,null,String(e))}function Qe(e){return e.el===null||e.memo?e:$t(e)}function xs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(F(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),xs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(Mn in t)?t._ctx=ye:r===3&&ye&&(ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else H(t)?(t={default:t,_ctx:ye},n=32):(t=String(t),s&64?(n=16,t=[Jt(t)]):n=8);e.children=t,e.shapeFlag|=n}function ws(...e){const t={};for(let n=0;n{_e=e,e.scope.on()},at=()=>{_e&&_e.scope.off(),_e=null};function _o(e){return e.vnode.shapeFlag&4}let Vt=!1;function kl(e,t=!1){Vt=t;const{props:n,children:s}=e.vnode,r=_o(e);il(e,n,r,t),al(e,s);const o=r?El(e,t):void 0;return Vt=!1,o}function El(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Rt(new Proxy(e.ctx,el));const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?Tl(e):null;kt(e),Ct();const o=et(s,e,0,[e.props,r]);if(Tt(),at(),yr(o)){if(o.then(at,at),t)return o.then(i=>{Zs(e,i,t)}).catch(i=>{Tn(i,e,0)});e.asyncDep=o}else Zs(e,o,t)}else mo(e,t)}function Zs(e,t,n){H(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:fe(t)&&(e.setupState=Hr(t)),mo(e,n)}let Qs;function mo(e,t,n){const s=e.type;if(!e.render){if(!t&&Qs&&!s.render){const r=s.template;if(r){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,f=we(we({isCustomElement:o,delimiters:l},i),c);s.render=Qs(r,f)}}e.render=s.render||Re}kt(e),Ct(),tl(e),Tt(),at()}function Cl(e){return new Proxy(e.attrs,{get(t,n){return Ce(e,"get","$attrs"),t[n]}})}function Tl(e){const t=s=>{e.exposed=s||{}};let n;return{get attrs(){return n||(n=Cl(e))},slots:e.slots,emit:e.emit,expose:t}}function Rn(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Hr(Rt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in pn)return pn[n](e)}}))}function Ll(e){return H(e)&&e.displayName||e.name}function Pl(e){return H(e)&&"__vccOpts"in e}const K=(e,t)=>Li(e,t,Vt);function ft(e,t,n){const s=arguments.length;return s===2?fe(t)&&!F(t)?gn(t)?U(e,null,[t]):U(e,t):U(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&gn(n)&&(n=[n]),U(e,t,n))}const Al="3.2.36",Il="http://www.w3.org/2000/svg",ot=typeof document!="undefined"?document:null,Gs=ot&&ot.createElement("template"),Ol={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t?ot.createElementNS(Il,e):ot.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>ot.createTextNode(e),createComment:e=>ot.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ot.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Gs.innerHTML=s?`${e}`:e;const l=Gs.content;if(s){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Fl(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Ml(e,t,n){const s=e.style,r=pe(n);if(n&&!r){for(const o in n)ns(s,o,n[o]);if(t&&!pe(t))for(const o in t)n[o]==null&&ns(s,o,"")}else{const o=s.display;r?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=o)}}const er=/\s*!important$/;function ns(e,t,n){if(F(n))n.forEach(s=>ns(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Rl(e,t);er.test(n)?e.setProperty(dt(s),n.replace(er,""),"important"):e[s]=n}}const tr=["Webkit","Moz","ms"],jn={};function Rl(e,t){const n=jn[t];if(n)return n;let s=Ue(t);if(s!=="filter"&&s in e)return jn[t]=s;s=$n(s);for(let r=0;r{let e=Date.now,t=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let ss=0;const Bl=Promise.resolve(),Ul=()=>{ss=0},jl=()=>ss||(Bl.then(Ul),ss=go());function vt(e,t,n,s){e.addEventListener(t,n,s)}function Dl(e,t,n,s){e.removeEventListener(t,n,s)}function Kl(e,t,n,s,r=null){const o=e._vei||(e._vei={}),i=o[t];if(s&&i)i.value=s;else{const[l,c]=Wl(t);if(s){const f=o[t]=ql(s,r);vt(e,l,f,c)}else i&&(Dl(e,l,i,c),o[t]=void 0)}}const sr=/(?:Once|Passive|Capture)$/;function Wl(e){let t;if(sr.test(e)){t={};let n;for(;n=e.match(sr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[dt(e.slice(2)),t]}function ql(e,t){const n=s=>{const r=s.timeStamp||go();(Hl||r>=n.attached-1)&&Ne(Vl(s,n.value),t,5,[s])};return n.value=e,n.attached=jl(),n}function Vl(e,t){if(F(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const rr=/^on[a-z]/,zl=(e,t,n,s,r=!1,o,i,l,c)=>{t==="class"?Fl(e,s,r):t==="style"?Ml(e,n,s):zt(t)?ls(t)||Kl(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Jl(e,t,s,r))?Sl(e,t,s,o,i,l,c):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Nl(e,t,s,r))};function Jl(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&rr.test(t)&&H(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||rr.test(t)&&pe(n)?!1:t in e}const or=e=>{const t=e.props["onUpdate:modelValue"]||!1;return F(t)?n=>on(t,n):t};function Yl(e){e.target.composing=!0}function ir(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const lf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e._assign=or(r);const o=s||r.props&&r.props.type==="number";vt(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=Wn(l)),e._assign(l)}),n&&vt(e,"change",()=>{e.value=e.value.trim()}),t||(vt(e,"compositionstart",Yl),vt(e,"compositionend",ir),vt(e,"change",ir))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:r}},o){if(e._assign=or(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||s&&e.value.trim()===t||(r||e.type==="number")&&Wn(e.value)===t))return;const i=t==null?"":t;e.value!==i&&(e.value=i)}},Xl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},cf=(e,t)=>n=>{if(!("key"in n))return;const s=dt(n.key);if(t.some(r=>r===s||Xl[r]===s))return e(n)},Zl=we({patchProp:zl},Ol);let Dn,lr=!1;function Ql(){return Dn=lr?Dn:pl(Zl),lr=!0,Dn}const Gl=(...e)=>{const t=Ql().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ec(s);if(r)return n(r,!0,r instanceof SVGElement)},t};function ec(e){return pe(e)?document.querySelector(e):e}var tc='{"lang":"en","title":"vue3-truncate-html","description":"A Vue 3 component for html truncating","base":"/","head":[],"themeConfig":{"docsDir":"docs","nav":[{"text":"Github","link":"https://github.com/ikloster03/vue-dadata"},{"text":"NPM","link":"https://www.npmjs.com/package/vue-dadata"}],"sidebar":{}},"locales":{},"langs":{},"scrollOffset":90}';const vo=/^https?:/i,Me=typeof window!="undefined";function nc(e,t){t.sort((n,s)=>{const r=s.split("/").length-n.split("/").length;return r!==0?r:s.length-n.length});for(const n of t)if(e.startsWith(n))return n}function cr(e,t){const n=nc(t,Object.keys(e));return n?e[n]:void 0}function sc(e){const{locales:t}=e.themeConfig||{},n=e.locales;return t&&n?Object.keys(t).reduce((s,r)=>(s[r]={label:t[r].label,lang:n[r].lang},s),{}):{}}function rc(e,t){t=oc(e,t);const n=cr(e.locales||{},t),s=cr(e.themeConfig.locales||{},t);return Object.assign({},e,n,{themeConfig:Object.assign({},e.themeConfig,s,{locales:{}}),lang:(n||e).lang,locales:{},langs:sc(e)})}function oc(e,t){if(!Me)return t;const n=e.base,s=n.endsWith("/")?n.slice(0,-1):n;return t.slice(s.length)}const bo=Symbol(),Yt=wi(ic(tc));function ic(e){return JSON.parse(e)}function lc(e){const t=K(()=>rc(Yt.value,e.path));return{site:t,theme:K(()=>t.value.themeConfig),page:K(()=>e.data),frontmatter:K(()=>e.data.frontmatter),lang:K(()=>t.value.lang),localePath:K(()=>{const{langs:n,lang:s}=t.value,r=Object.keys(n).find(o=>n[o].lang===s);return Et(r||"/")}),title:K(()=>e.data.title?e.data.title+" | "+t.value.title:t.value.title),description:K(()=>e.data.description||t.value.description)}}function ve(){const e=Ht(bo);if(!e)throw new Error("vitepress data not properly injected in app");return e}function cc(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Et(e){return vo.test(e)?e:cc(Yt.value.base,e)}function yo(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t.endsWith("/")&&(t+="index"),Me){const n="/";t=t.slice(n.length).replace(/\//g,"_")+".md";const s=__VP_HASH_MAP__[t.toLowerCase()];t=`${n}assets/${t}.${s}.js`}else t=`./${t.slice(1).replace(/\//g,"_")}.md.js`;return t}const xo=Symbol(),ar="http://a.com",wo={relativePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{},lastUpdated:0},ac=()=>({path:"/",component:null,data:wo});function uc(e,t){const n=En(ac());function s(i=Me?location.href:"/"){const l=new URL(i,ar);return!l.pathname.endsWith("/")&&!l.pathname.endsWith(".html")&&(l.pathname+=".html",i=l.pathname+l.search+l.hash),Me&&(history.replaceState({scrollPosition:window.scrollY},document.title),history.pushState(null,"",i)),o(i)}let r=null;async function o(i,l=0,c=!1){const f=new URL(i,ar),h=r=f.pathname;try{let m=e(h);if("then"in m&&typeof m.then=="function"&&(m=await m),r===h){r=null;const{default:x,__pageData:T}=m;if(!x)throw new Error(`Invalid route component: ${x}`);n.path=h,n.component=Rt(x),n.data=Rt(JSON.parse(T)),Me&&jr(()=>{if(f.hash&&!l){let M=null;try{M=document.querySelector(decodeURIComponent(f.hash))}catch(z){console.warn(z)}if(M){ur(M,f.hash);return}}window.scrollTo(0,l)})}}catch(m){if(m.message.match(/fetch/)||console.error(m),!c)try{const x=await fetch(Yt.value.base+"hashmap.json");window.__VP_HASH_MAP__=await x.json(),await o(i,l,!0);return}catch{}r===h&&(r=null,n.path=h,n.component=t?Rt(t):null,n.data=wo)}}return Me&&(window.addEventListener("click",i=>{const l=i.target.closest("a");if(l){const{href:c,protocol:f,hostname:h,pathname:m,hash:x,target:T}=l,M=window.location,z=m.match(/\.\w+$/);!i.ctrlKey&&!i.shiftKey&&!i.altKey&&!i.metaKey&&T!=="_blank"&&f===M.protocol&&h===M.hostname&&!(z&&z[0]!==".html")&&(i.preventDefault(),m===M.pathname?x&&x!==M.hash&&(history.pushState(null,"",x),window.dispatchEvent(new Event("hashchange")),ur(l,x,l.classList.contains("header-anchor"))):s(c))}},{capture:!0}),window.addEventListener("popstate",i=>{o(location.href,i.state&&i.state.scrollPosition||0)}),window.addEventListener("hashchange",i=>{i.preventDefault()})),{route:n,go:s}}function fc(){const e=Ht(xo);if(!e)throw new Error("useRouter() is called without provider.");return e}function nt(){return fc().route}function ur(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.querySelector(decodeURIComponent(t))}catch(r){console.warn(r)}if(s){let r=Yt.value.scrollOffset;typeof r=="string"&&(r=document.querySelector(r).getBoundingClientRect().bottom+24);const o=parseInt(window.getComputedStyle(s).paddingTop,10),i=window.scrollY+s.getBoundingClientRect().top-r+o;!n||Math.abs(i-window.scrollY)>window.innerHeight?window.scrollTo(0,i):window.scrollTo({left:0,top:i,behavior:"smooth"})}}function dc(e,t){let n=[],s=!0;const r=o=>{if(s){s=!1;return}const i=[],l=Math.min(n.length,o.length);for(let c=0;cdocument.head.removeChild(c)),o.slice(l).forEach(c=>{const f=fr(c);document.head.appendChild(f),i.push(f)}),n=i};Xr(()=>{const o=e.data,i=t.value,l=o&&o.title,c=o&&o.description,f=o&&o.frontmatter.head;document.title=(l?l+" | ":"")+i.title,document.querySelector("meta[name=description]").setAttribute("content",c||i.description),r([...f?pc(f):[]])})}function fr([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),s}function hc(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function pc(e){return e.filter(t=>!hc(t))}const _c=ce({name:"VitePressContent",setup(){const e=nt();return()=>ft("div",{style:{position:"relative"}},[e.component?ft(e.component):null])}});var ae=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n};const mc=/#.*$/,gc=/(index)?\.(md|html)$/,vn=/\/$/,vc=/^[a-z]+:/i;function $s(e){return Array.isArray(e)}function ks(e){return vc.test(e)}function bc(e,t){if(t===void 0)return!1;const n=dr(`/${e.data.relativePath}`),s=dr(t);return n===s}function dr(e){return decodeURI(e).replace(mc,"").replace(gc,"")}function yc(e,t){const n=e.endsWith("/"),s=t.startsWith("/");return n&&s?e.slice(0,-1)+t:!n&&!s?`${e}/${t}`:e+t}function rs(e){return/^\//.test(e)?e:`/${e}`}function $o(e){return e.replace(/(index)?(\.(md|html))?$/,"")||"/"}function xc(e){return e===!1||e==="auto"||$s(e)}function wc(e){return e.children!==void 0}function $c(e){return $s(e)?e.length===0:!e}function Es(e,t){if(xc(e))return e;t=rs(t);for(const n in e)if(t.startsWith(rs(n)))return e[n];return"auto"}function ko(e){return e.reduce((t,n)=>(n.link&&t.push({text:n.text,link:$o(n.link)}),wc(n)&&(t=[...t,...ko(n.children)]),t),[])}function Eo(e){const t=nt(),n=ks(e.value.link);return{props:K(()=>{const r=hr(`/${t.data.relativePath}`);let o=!1;if(e.value.activeMatch)o=new RegExp(e.value.activeMatch).test(r);else{const i=hr(e.value.link);o=i==="/"?i===r:r.startsWith(i)}return{class:{active:o,isExternal:n},href:n?e.value.link:Et(e.value.link),target:e.value.target||(n?"_blank":null),rel:e.value.rel||(n?"noopener noreferrer":null),"aria-label":e.value.ariaLabel}}),isExternal:n}}function hr(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\.(html|md)$/,"").replace(/\/index$/,"/")}const kc={},Ec={class:"icon outbound",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"},Cc=S("path",{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"},null,-1),Tc=S("polygon",{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"},null,-1),Lc=[Cc,Tc];function Pc(e,t){return P(),N("svg",Ec,Lc)}var Cs=ae(kc,[["render",Pc]]);const Ac={class:"nav-link"},Ic=ce({name:"NavLink",props:{item:null},setup(e){const n=Br(e),{props:s,isExternal:r}=Eo(n.item);return(o,i)=>(P(),N("div",Ac,[S("a",ws({class:"item"},$(s)),[Jt(xe(e.item.text)+" ",1),$(r)?(P(),ge(Cs,{key:0})):J("",!0)],16)]))}});var bn=ae(Ic,[["__scopeId","data-v-b8818f8c"]]);const Oc={key:0,class:"home-hero"},Fc={key:0,class:"figure"},Mc=["src","alt"],Rc={key:1,id:"main-title",class:"title"},Nc={key:2,class:"tagline"},Sc=ce({name:"HomeHero",setup(e){const{site:t,frontmatter:n}=ve(),s=K(()=>{const{heroImage:i,heroText:l,tagline:c,actionLink:f,actionText:h}=n.value;return i||l||c||f&&h}),r=K(()=>n.value.heroText||t.value.title),o=K(()=>n.value.tagline||t.value.description);return(i,l)=>$(s)?(P(),N("header",Oc,[$(n).heroImage?(P(),N("figure",Fc,[S("img",{class:"image",src:$(Et)($(n).heroImage),alt:$(n).heroAlt},null,8,Mc)])):J("",!0),$(r)?(P(),N("h1",Rc,xe($(r)),1)):J("",!0),$(o)?(P(),N("p",Nc,xe($(o)),1)):J("",!0),$(n).actionLink&&$(n).actionText?(P(),ge(bn,{key:3,item:{link:$(n).actionLink,text:$(n).actionText},class:"action"},null,8,["item"])):J("",!0),$(n).altActionLink&&$(n).altActionText?(P(),ge(bn,{key:4,item:{link:$(n).altActionLink,text:$(n).altActionText},class:"action alt"},null,8,["item"])):J("",!0)])):J("",!0)}});var Hc=ae(Sc,[["__scopeId","data-v-370f18c0"]]);const Bc={key:0,class:"home-features"},Uc={class:"wrapper"},jc={class:"container"},Dc={class:"features"},Kc={key:0,class:"title"},Wc={key:1,class:"details"},qc=ce({name:"HomeFeatures",setup(e){const{frontmatter:t}=ve(),n=K(()=>t.value.features&&t.value.features.length>0),s=K(()=>t.value.features?t.value.features:[]);return(r,o)=>$(n)?(P(),N("div",Bc,[S("div",Uc,[S("div",jc,[S("div",Dc,[(P(!0),N(de,null,Fn($(s),(i,l)=>(P(),N("section",{key:l,class:"feature"},[i.title?(P(),N("h2",Kc,xe(i.title),1)):J("",!0),i.details?(P(),N("p",Wc,xe(i.details),1)):J("",!0)]))),128))])])])])):J("",!0)}});var Vc=ae(qc,[["__scopeId","data-v-e39c13e0"]]);const zc={key:0,class:"footer"},Jc={class:"container"},Yc={class:"text"},Xc=ce({name:"HomeFooter",setup(e){const{frontmatter:t}=ve();return(n,s)=>$(t).footer?(P(),N("footer",zc,[S("div",Jc,[S("p",Yc,xe($(t).footer),1)])])):J("",!0)}});var Zc=ae(Xc,[["__scopeId","data-v-30918238"]]);const Qc={class:"home","aria-labelledby":"main-title"},Gc={class:"home-content"},ea=ce({name:"Home",setup(e){return(t,n)=>{const s=hn("Content");return P(),N("main",Qc,[U(Hc),ue(t.$slots,"hero",{},void 0,!0),U(Vc),S("div",Gc,[U(s)]),ue(t.$slots,"features",{},void 0,!0),U(Zc),ue(t.$slots,"footer",{},void 0,!0)])}}});var ta=ae(ea,[["__scopeId","data-v-10122c92"]]);const na=["href","aria-label"],sa=["src"],ra=ce({name:"NavBarTitle",setup(e){const{site:t,theme:n,localePath:s}=ve();return(r,o)=>(P(),N("a",{class:"nav-bar-title",href:$(s),"aria-label":`${$(t).title}, back to home`},[$(n).logo?(P(),N("img",{key:0,class:"logo",src:$(Et)($(n).logo),alt:"Logo"},null,8,sa)):J("",!0),Jt(" "+xe($(t).title),1)],8,na))}});var oa=ae(ra,[["__scopeId","data-v-cc01ef16"]]);function ia(){const{site:e,localePath:t,theme:n}=ve();return K(()=>{const s=e.value.langs,r=Object.keys(s);if(r.length<2)return null;const i=nt().path.replace(t.value,""),l=r.map(f=>({text:s[f].label,link:`${f}${i}`}));return{text:n.value.selectText||"Languages",items:l}})}const la=["GitHub","GitLab","Bitbucket"].map(e=>[e,new RegExp(e,"i")]);function ca(){const{site:e}=ve();return K(()=>{const t=e.value.themeConfig,n=t.docsRepo||t.repo;if(!n)return null;const s=aa(n);return{text:ua(s,t.repoLabel),link:s}})}function aa(e){return vo.test(e)?e:`https://github.com/${e}`}function ua(e,t){if(t)return t;const n=e.match(/^https?:\/\/[^/]+/);if(!n)return"Source";const s=la.find(([r,o])=>o.test(n[0]));return s&&s[0]?s[0]:"Source"}const fa=e=>(zr("data-v-bbc27490"),e=e(),Jr(),e),da={class:"nav-dropdown-link-item"},ha=fa(()=>S("span",{class:"arrow"},null,-1)),pa={class:"text"},_a={class:"icon"},ma=ce({name:"NavDropdownLinkItem",props:{item:null},setup(e){const n=Br(e),{props:s,isExternal:r}=Eo(n.item);return(o,i)=>(P(),N("div",da,[S("a",ws({class:"item"},$(s)),[ha,S("span",pa,xe(e.item.text),1),S("span",_a,[$(r)?(P(),ge(Cs,{key:0})):J("",!0)])],16)]))}});var ga=ae(ma,[["__scopeId","data-v-bbc27490"]]);const va=["aria-label"],ba={class:"button-text"},ya={class:"dialog"},xa=ce({name:"NavDropdownLink",props:{item:null},setup(e){const t=nt(),n=Cn(!1);ct(()=>t.path,()=>{n.value=!1});function s(){n.value=!n.value}return(r,o)=>(P(),N("div",{class:ut(["nav-dropdown-link",{open:n.value}])},[S("button",{class:"button","aria-label":e.item.ariaLabel,onClick:s},[S("span",ba,xe(e.item.text),1),S("span",{class:ut(["button-arrow",n.value?"down":"right"])},null,2)],8,va),S("ul",ya,[(P(!0),N(de,null,Fn(e.item.items,i=>(P(),N("li",{key:i.text,class:"dialog-item"},[U(ga,{item:i},null,8,["item"])]))),128))])],2))}});var pr=ae(xa,[["__scopeId","data-v-56bf3a3f"]]);const wa={key:0,class:"nav-links"},$a={key:1,class:"item"},ka={key:2,class:"item"},Ea=ce({name:"NavLinks",setup(e){const{theme:t}=ve(),n=ia(),s=ca(),r=K(()=>t.value.nav||s.value||n.value);return(o,i)=>$(r)?(P(),N("nav",wa,[$(t).nav?(P(!0),N(de,{key:0},Fn($(t).nav,l=>(P(),N("div",{key:l.text,class:"item"},[l.items?(P(),ge(pr,{key:0,item:l},null,8,["item"])):(P(),ge(bn,{key:1,item:l},null,8,["item"]))]))),128)):J("",!0),$(n)?(P(),N("div",$a,[U(pr,{item:$(n)},null,8,["item"])])):J("",!0),$(s)?(P(),N("div",ka,[U(bn,{item:$(s)},null,8,["item"])])):J("",!0)])):J("",!0)}});var Co=ae(Ea,[["__scopeId","data-v-eab3edfe"]]);const Ca={emits:["toggle"]},Ta=S("svg",{class:"icon",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"},[S("path",{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z",class:""})],-1),La=[Ta];function Pa(e,t,n,s,r,o){return P(),N("div",{class:"sidebar-button",onClick:t[0]||(t[0]=i=>e.$emit("toggle"))},La)}var Aa=ae(Ca,[["render",Pa]]);const Ia=e=>(zr("data-v-675d8756"),e=e(),Jr(),e),Oa={class:"nav-bar"},Fa=Ia(()=>S("div",{class:"flex-grow"},null,-1)),Ma={class:"nav"},Ra=ce({name:"NavBar",emits:["toggle"],setup(e){return(t,n)=>(P(),N("header",Oa,[U(Aa,{onToggle:n[0]||(n[0]=s=>t.$emit("toggle"))}),U(oa),Fa,S("div",Ma,[U(Co)]),ue(t.$slots,"search",{},void 0,!0)]))}});var Na=ae(Ra,[["__scopeId","data-v-675d8756"]]);function Sa(){let e=null,t=null;const n=Da(s,300);function s(){const i=Ha(),l=Ba(i);for(let c=0;c ul > li");l&&l!==t.parentElement?(e=l.querySelector("a"),e&&e.classList.add("active")):e=null}function o(i){i&&i.classList.remove("active")}Lt(()=>{s(),window.addEventListener("scroll",n)}),eo(()=>{r(decodeURIComponent(location.hash))}),On(()=>{window.removeEventListener("scroll",n)})}function Ha(){return[].slice.call(document.querySelectorAll(".sidebar a.sidebar-link-item"))}function Ba(e){return[].slice.call(document.querySelectorAll(".header-anchor")).filter(t=>e.some(n=>n.hash===t.hash))}function Ua(){return document.querySelector(".nav-bar").offsetHeight}function _r(e){const t=Ua();return e.parentElement.offsetTop-t-15}function ja(e,t,n){const s=window.scrollY;return e===0&&s===0?[!0,null]:s<_r(t)?[!1,null]:!n||s<_r(n)?[!0,decodeURIComponent(t.hash)]:[!1,null]}function Da(e,t){let n,s=!1;return()=>{n&&clearTimeout(n),s?n=setTimeout(e,t):(e(),s=!0,setTimeout(()=>{s=!1},t))}}function Ka(){const e=nt(),{site:t}=ve();return Sa(),K(()=>{const n=e.data.headers,s=e.data.frontmatter.sidebar,r=e.data.frontmatter.sidebarDepth;if(s===!1)return[];if(s==="auto")return mr(n,r);const o=Es(t.value.themeConfig.sidebar,e.data.relativePath);return o===!1?[]:o==="auto"?mr(n,r):o})}function mr(e,t){const n=[];if(e===void 0)return[];let s;return e.forEach(({level:r,title:o,slug:i})=>{if(r-1>t)return;const l={text:o,link:`#${i}`};r===2?(s=l,n.push(l)):s&&(s.children||(s.children=[])).push(l)}),n}const To=e=>{const t=nt(),{site:n,frontmatter:s}=ve(),r=e.depth||1,o=s.value.sidebarDepth||1/0,i=t.data.headers,l=e.item.text,c=Wa(n.value.base,e.item.link),f=e.item.children,h=bc(t,e.item.link),m=r0?ft("ul",{class:"sidebar-links"},t.map(r=>ft(To,{item:r,depth:s}))):e&&n?Lo(!1,qa(n),void 0,s):null}function qa(e){return Po(Va(e))}function Va(e){e=e.map(n=>Object.assign({},n));let t;return e.forEach(n=>{n.level===2?t=n:t&&(t.children||(t.children=[])).push(n)}),e.filter(n=>n.level===2)}function Po(e){return e.map(t=>({text:t.title,link:`#${t.slug}`,children:t.children?Po(t.children):void 0}))}const za={key:0,class:"sidebar-links"},Ja=ce({name:"SideBarLinks",setup(e){const t=Ka();return(n,s)=>$(t).length>0?(P(),N("ul",za,[(P(!0),N(de,null,Fn($(t),r=>(P(),ge($(To),{item:r},null,8,["item"]))),256))])):J("",!0)}});const Ya=ce({name:"SideBar",props:{open:{type:Boolean}},setup(e){return(t,n)=>(P(),N("aside",{class:ut(["sidebar",{open:e.open}])},[U(Co,{class:"nav"}),ue(t.$slots,"sidebar-top",{},void 0,!0),U(Ja),ue(t.$slots,"sidebar-bottom",{},void 0,!0)],2))}});var Xa=ae(Ya,[["__scopeId","data-v-83e92a68"]]);const Za=/bitbucket.org/;function Qa(){const{page:e,theme:t,frontmatter:n}=ve(),s=K(()=>{const{repo:o,docsDir:i="",docsBranch:l="master",docsRepo:c=o,editLinks:f}=t.value,h=n.value.editLink!=null?n.value.editLink:f,{relativePath:m}=e.value;return!h||!m||!o?null:Ga(o,c,i,l,m)}),r=K(()=>t.value.editLinkText||"Edit this page");return{url:s,text:r}}function Ga(e,t,n,s,r){return Za.test(e)?tu(e,t,n,s,r):eu(e,t,n,s,r)}function eu(e,t,n,s,r){return(ks(t)?t:`https://github.com/${t}`).replace(vn,"")+`/edit/${s}/`+(n?n.replace(vn,"")+"/":"")+r}function tu(e,t,n,s,r){return(ks(t)?t:e).replace(vn,"")+`/src/${s}/`+(n?n.replace(vn,"")+"/":"")+r+`?mode=edit&spa=0&at=${s}&fileviewer=file-view-default`}const nu={class:"edit-link"},su=["href"],ru=ce({name:"EditLink",setup(e){const{url:t,text:n}=Qa();return(s,r)=>(P(),N("div",nu,[$(t)?(P(),N("a",{key:0,class:"link",href:$(t),target:"_blank",rel:"noopener noreferrer"},[Jt(xe($(n))+" ",1),U(Cs,{class:"icon"})],8,su)):J("",!0)]))}});var ou=ae(ru,[["__scopeId","data-v-1ed99556"]]);const iu={key:0,class:"last-updated"},lu={class:"prefix"},cu={class:"datetime"},au=ce({name:"LastUpdated",setup(e){const{theme:t,page:n}=ve(),s=K(()=>{const i=t.value.lastUpdated;return i!==void 0&&i!==!1&&n.value.lastUpdated!==0}),r=K(()=>{const i=t.value.lastUpdated;return i===!0?"Last Updated":i}),o=Cn("");return Lt(()=>{Xr(()=>{o.value=new Date(n.value.lastUpdated).toLocaleString("en-US")})}),(i,l)=>$(s)?(P(),N("p",iu,[S("span",lu,xe($(r))+":",1),S("span",cu,xe(o.value),1)])):J("",!0)}});var uu=ae(au,[["__scopeId","data-v-abce3432"]]);const fu={class:"page-footer"},du={class:"edit"},hu={class:"updated"},pu=ce({name:"PageFooter",setup(e){const{page:t}=ve();return(n,s)=>(P(),N("footer",fu,[S("div",du,[U(ou)]),S("div",hu,[$(t).lastUpdated?(P(),ge(uu,{key:0})):J("",!0)])]))}});var _u=ae(pu,[["__scopeId","data-v-07c132fc"]]);function mu(){const{page:e,theme:t}=ve(),n=K(()=>$o(rs(e.value.relativePath))),s=K(()=>{const c=Es(t.value.sidebar,n.value);return $s(c)?ko(c):[]}),r=K(()=>s.value.findIndex(c=>c.link===n.value)),o=K(()=>{if(t.value.nextLinks!==!1&&r.value>-1&&r.value{if(t.value.prevLinks!==!1&&r.value>0)return s.value[r.value-1]}),l=K(()=>!!o.value||!!i.value);return{next:o,prev:i,hasLinks:l}}const gu={},vu={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},bu=S("path",{d:"M19,11H7.4l5.3-5.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-7,7c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.2-0.1,0.5,0,0.8c0.1,0.1,0.1,0.2,0.2,0.3l7,7c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4L7.4,13H19c0.6,0,1-0.4,1-1S19.6,11,19,11z"},null,-1),yu=[bu];function xu(e,t){return P(),N("svg",vu,yu)}var wu=ae(gu,[["render",xu]]);const $u={},ku={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Eu=S("path",{d:"M19.9,12.4c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-7-7c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l5.3,5.3H5c-0.6,0-1,0.4-1,1s0.4,1,1,1h11.6l-5.3,5.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l7-7C19.8,12.6,19.9,12.5,19.9,12.4z"},null,-1),Cu=[Eu];function Tu(e,t){return P(),N("svg",ku,Cu)}var Lu=ae($u,[["render",Tu]]);const Pu={key:0,class:"next-and-prev-link"},Au={class:"container"},Iu={class:"prev"},Ou=["href"],Fu={class:"text"},Mu={class:"next"},Ru=["href"],Nu={class:"text"},Su=ce({name:"NextAndPrevLinks",setup(e){const{hasLinks:t,prev:n,next:s}=mu();return(r,o)=>$(t)?(P(),N("div",Pu,[S("div",Au,[S("div",Iu,[$(n)?(P(),N("a",{key:0,class:"link",href:$(Et)($(n).link)},[U(wu,{class:"icon icon-prev"}),S("span",Fu,xe($(n).text),1)],8,Ou)):J("",!0)]),S("div",Mu,[$(s)?(P(),N("a",{key:0,class:"link",href:$(Et)($(s).link)},[S("span",Nu,xe($(s).text),1),U(Lu,{class:"icon icon-next"})],8,Ru)):J("",!0)])])])):J("",!0)}});var Hu=ae(Su,[["__scopeId","data-v-38ede35f"]]);const Bu={class:"page"},Uu={class:"container"},ju=ce({name:"Page",setup(e){return(t,n)=>{const s=hn("Content");return P(),N("main",Bu,[S("div",Uu,[ue(t.$slots,"top",{},void 0,!0),U(s,{class:"content"}),U(_u),U(Hu),ue(t.$slots,"bottom",{},void 0,!0)])])}}});var Du=ae(ju,[["__scopeId","data-v-7eddb2c4"]]);const Ku={key:0,id:"ads-container"},Wu=ce({name:"Layout",setup(e){const t=()=>null,n=t,s=t,r=t,o=nt(),{site:i,page:l,theme:c,frontmatter:f}=ve(),h=K(()=>!!f.value.customLayout),m=K(()=>!!f.value.home),x=K(()=>Object.keys(i.value.langs).length>1),T=K(()=>{const L=c.value;return f.value.navbar===!1||L.navbar===!1?!1:i.value.title||L.logo||L.repo||L.nav}),M=Cn(!1),z=K(()=>f.value.home||f.value.sidebar===!1?!1:!$c(Es(c.value.sidebar,o.data.relativePath))),B=L=>{M.value=typeof L=="boolean"?L:!M.value},v=B.bind(null,!1);ct(o,v);const E=K(()=>[{"no-navbar":!T.value,"sidebar-open":M.value,"no-sidebar":!z.value}]);return(L,j)=>{const Y=hn("Content"),ne=hn("Debug");return P(),N(de,null,[S("div",{class:ut(["theme",$(E)])},[$(T)?(P(),ge(Na,{key:0,onToggle:B},{search:Ke(()=>[ue(L.$slots,"navbar-search",{},()=>[$(c).algolia?(P(),ge($(r),{key:0,options:$(c).algolia,multilang:$(x)},null,8,["options","multilang"])):J("",!0)])]),_:3})):J("",!0),U(Xa,{open:M.value},{"sidebar-top":Ke(()=>[ue(L.$slots,"sidebar-top")]),"sidebar-bottom":Ke(()=>[ue(L.$slots,"sidebar-bottom")]),_:3},8,["open"]),S("div",{class:"sidebar-mask",onClick:j[0]||(j[0]=G=>B(!1))}),$(h)?(P(),ge(Y,{key:1})):$(m)?ue(L.$slots,"home",{key:2},()=>[U(ta,null,{hero:Ke(()=>[ue(L.$slots,"home-hero")]),features:Ke(()=>[ue(L.$slots,"home-features")]),footer:Ke(()=>[ue(L.$slots,"home-footer")]),_:3})]):(P(),ge(Du,{key:3},{top:Ke(()=>[ue(L.$slots,"page-top-ads",{},()=>[$(c).carbonAds&&$(c).carbonAds.carbon?(P(),N("div",Ku,[(P(),ge($(n),{key:"carbon"+$(l).relativePath,code:$(c).carbonAds.carbon,placement:$(c).carbonAds.placement},null,8,["code","placement"]))])):J("",!0)]),ue(L.$slots,"page-top")]),bottom:Ke(()=>[ue(L.$slots,"page-bottom"),ue(L.$slots,"page-bottom-ads",{},()=>[$(c).carbonAds&&$(c).carbonAds.custom?(P(),ge($(s),{key:"custom"+$(l).relativePath,code:$(c).carbonAds.custom,placement:$(c).carbonAds.placement},null,8,["code","placement"])):J("",!0)])]),_:3}))],2),U(ne)],64)}}}),qu={class:"theme"},Vu=S("h1",null,"404",-1),zu=["href"],Ju=ce({name:"NotFound",setup(e){const{site:t}=ve(),n=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."];function s(){return n[Math.floor(Math.random()*n.length)]}return(r,o)=>(P(),N("div",qu,[Vu,S("blockquote",null,xe(s()),1),S("a",{href:$(t).base,"aria-label":"go to home"},"Take me home.",8,zu)]))}}),yn={Layout:Wu,NotFound:Ju},Kn=new Set,Ao=()=>document.createElement("link"),Yu=e=>{const t=Ao();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Xu=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let rn;const Zu=Me&&(rn=Ao())&&rn.relList&&rn.relList.supports&&rn.relList.supports("prefetch")?Yu:Xu;function Qu(){if(!Me||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(o=>{o.forEach(i=>{if(i.isIntersecting){const l=i.target;n.unobserve(l);const{pathname:c}=l;if(!Kn.has(c)){Kn.add(c);const f=yo(c);Zu(f)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(o=>{const{target:i,hostname:l,pathname:c}=o,f=c.match(/\.\w+$/);f&&f[0]!==".html"||i!=="_blank"&&l===location.hostname&&(c!==location.pathname?n.observe(o):Kn.add(c))})})};Lt(s);const r=nt();ct(()=>r.path,s),On(()=>{n&&n.disconnect()})}const Gu=ce({setup(e,{slots:t}){const n=Cn(!1);return Lt(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}}),ef=yn.NotFound||(()=>"404 Not Found"),tf={name:"VitePressApp",setup(){const{site:e}=ve();return Lt(()=>{ct(()=>e.value.lang,t=>{document.documentElement.lang=t},{immediate:!0})}),Qu(),()=>ft(yn.Layout)}};function nf(){const e=rf(),t=sf();t.provide(xo,e);const n=lc(e.route);return t.provide(bo,n),t.component("Content",_c),t.component("ClientOnly",Gu),t.component("Debug",()=>null),Object.defineProperty(t.config.globalProperties,"$frontmatter",{get(){return n.frontmatter.value}}),yn.enhanceApp&&yn.enhanceApp({app:t,router:e,siteData:Yt}),{app:t,router:e,data:n}}function sf(){return Gl(tf)}function rf(){let e=Me,t;return uc(n=>{let s=yo(n);return e&&(t=s),(e||t===s)&&(s=s.replace(/\.js$/,".lean.js")),Me?(e=!1,Ro(()=>import(s),[])):require(s)},ef)}if(Me){const{app:e,router:t,data:n}=nf();t.go().then(()=>{dc(t.route,n.site),e.mount("#app")})}export{de as F,ae as _,N as a,S as b,K as c,nf as createApp,ce as d,of as e,cf as f,ue as g,ft as h,J as i,hn as j,Fn as k,ge as l,ws as m,ut as n,P as o,U as p,Jt as q,Cn as r,lf as v,ct as w}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/index.md.6cec344f.js: -------------------------------------------------------------------------------- 1 | var st=Object.defineProperty,ot=Object.defineProperties;var it=Object.getOwnPropertyDescriptors;var Re=Object.getOwnPropertySymbols;var ut=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;var Pe=(e,t,r)=>t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,W=(e,t)=>{for(var r in t||(t={}))ut.call(t,r)&&Pe(e,r,t[r]);if(Re)for(var r of Re(t))lt.call(t,r)&&Pe(e,r,t[r]);return e},X=(e,t)=>ot(e,it(t));import{d as we,h as Fe,c as k,r as _,w as dt,_ as He,o as F,a as G,b as Y,e as ft,v as ct,n as Z,f as ee,g as pt,i as mt,j as Ve,F as vt,k as ht,l as yt,m as gt,p as Me,q as bt}from"./app.cd2b655c.js";const xe=e=>e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),St=(e,t)=>{if(!t.query||t.query instanceof String&&!t.query.trim())return e;const r=(n=>{let a;if(n.query instanceof RegExp)return new RegExp(String.raw`(${n.query.source})`,"g"+(n.caseSensitive?"":"i"));if(n.splitBySpace){const s=n.query.trim().replace(/\s+/g," ");a=String.raw`(${s.split(/\s/).map(xe).join("|")})`}else a=String.raw`(${xe(n.query)})`;return new RegExp(String.raw`${a}`,"g"+(n.caseSensitive?"":"i"))})({query:t.query,splitBySpace:t.splitBySpace,caseSensitive:t.caseSensitive});return e.split(r).map(n=>r.test(n)?Fe(t.highlightTag,{class:t.highlightClass,style:t.highlightStyle},n):n)};var wt=we({name:"VueWordHighlighter",props:{query:{type:[String,Object],required:!0,default:""},caseSensitive:{type:Boolean,default:!1},splitBySpace:{type:Boolean,default:!1},highlightClass:{type:[Object,String,Array],default:""},highlightStyle:{type:[Object,String,Array],default:""},highlightTag:{type:String,default:"mark"},wrapperTag:{type:String,default:"span"},wrapperClass:{type:[Object,String,Array],default:""},textToHighlight:{type:String,default:""}},emits:["matches"],setup:(e,t)=>()=>{const r=e.textToHighlight?e.textToHighlight:(s=>{if(s&&s.default){const i=s.default();let o;return o=i[0].children,typeof o=="string"?o:""}return""})(t.slots),n=St(r,{query:e.query,splitBySpace:e.splitBySpace,caseSensitive:e.caseSensitive,highlightTag:e.highlightTag,highlightClass:e.highlightClass,highlightStyle:e.highlightStyle});var a;return t.emit("matches",typeof(a=n)=="string"?[]:a.filter(s=>typeof s!="string").map(s=>typeof s=="string"?s:s.children)),Fe(e.wrapperTag,{class:e.wrapperClass},n)}}),H=(e=>(e.Enter="enter",e.Esc="esc",e.Up="up",e.Down="down",e))(H||{});const I={container:"vue-dadata",search:"vue-dadata__search",input:"vue-dadata__input",suggestions:"vue-dadata__suggestions",suggestionItem:"vue-dadata__suggestions-item",suggestionCurrentItem:"vue-dadata__suggestions-item_current"},N={caseSensitive:!1,splitBySpace:!1,highlightTag:"mark",highlightClass:"vue-dadata__suggestion-item-text_highlight",highlightStyle:"",wrapperTag:"span",wrapperClass:""},Et=e=>k(()=>{var t,r,n,a,s,i;return{container:(t=e==null?void 0:e.container)!=null?t:I.container,search:(r=e==null?void 0:e.search)!=null?r:I.search,input:(n=e==null?void 0:e.input)!=null?n:I.input,suggestions:(a=e==null?void 0:e.suggestions)!=null?a:I.suggestions,suggestionItem:(s=e==null?void 0:e.suggestionItem)!=null?s:I.suggestionItem,suggestionCurrentItem:(i=e==null?void 0:e.suggestionCurrentItem)!=null?i:I.suggestionCurrentItem}}),Ct=e=>k(()=>{var t,r,n,a,s,i,o;return{caseSensitive:(t=e==null?void 0:e.caseSensitive)!=null?t:N.caseSensitive,splitBySpace:(r=e==null?void 0:e.splitBySpace)!=null?r:N.splitBySpace,highlightTag:(n=e==null?void 0:e.highlightTag)!=null?n:N.highlightTag,highlightClass:(a=e==null?void 0:e.highlightClass)!=null?a:N.highlightClass,highlightStyle:(s=e==null?void 0:e.highlightStyle)!=null?s:N.highlightStyle,wrapperTag:(i=e==null?void 0:e.wrapperTag)!=null?i:N.wrapperTag,wrapperClass:(o=e==null?void 0:e.wrapperClass)!=null?o:N.wrapperClass}});var Tt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ge={exports:{}};(function(e,t){(function(r,n){n(t)})(Tt,function(r){function n(l,c){return function(f){if(Array.isArray(f))return f}(l)||function(f,p){var h=f==null?null:typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var b,C,m=[],S=!0,$=!1;try{for(h=h.call(f);!(S=(b=h.next()).done)&&(m.push(b.value),!p||m.length!==p);S=!0);}catch(x){$=!0,C=x}finally{try{S||h.return==null||h.return()}finally{if($)throw C}}return m}}(l,c)||function(f,p){if(!!f){if(typeof f=="string")return a(f,p);var h=Object.prototype.toString.call(f).slice(8,-1);if(h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set")return Array.from(f);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return a(f,p)}}(l,c)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2 | In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function a(l,c){(c==null||c>l.length)&&(c=l.length);for(var f=0,p=new Array(c);f0?Array.isArray(p)?i(p):i(p.split(",")):i((f=c,Array.isArray(f)?f:f==null?[]:[f]))}function d(l){return l===""}function g(l,c){return l==="Enter"&&(!c.lock||c.unlock)}function u(l,c,f){return d(l)&&f.fireonempty&&(c==="Enter"||c===" ")}function v(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=l.lock,f=c!==void 0&&c,p=l.listenTo,h=p===void 0?"keyup":p,b=l.defaultTime,C=b===void 0?"300ms":b,m=l.fireOnEmpty,S=m!==void 0&&m,$=l.cancelOnEmpty,x=$!==void 0&&$,R=l.trim,q=R!==void 0&&R;return{bind:function(M,U,le){var J=U.value,K=U.arg,de=K===void 0?C:K,fe=U.modifiers,P=Object.assign({lock:f,trim:q,fireonempty:S,cancelonempty:x},fe),ce=o(le.data.attrs,h),j=s(function(y){J(y.target.value,y)},de);function pe(y){var z=P.trim?y.target.value.trim():y.target.value;d(z)&&P.cancelonempty?j.cancel():g(y.key,P)||u(z,y.key,P)?(j.cancel(),J(y.target.value,y)):j(y)}ce.forEach(function(y){M.addEventListener(y,pe)})}}}var E={install:function(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l.directive("debounce",v(c))}};r.debounce=s,r.default=E,r.vue3Debounce=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=l.lock,f=c!==void 0&&c,p=l.listenTo,h=p===void 0?"keyup":p,b=l.defaultTime,C=b===void 0?"300ms":b,m=l.fireOnEmpty,S=m!==void 0&&m,$=l.cancelOnEmpty,x=$!==void 0&&$,R=l.trim,q=R!==void 0&&R;return{created:function(M,U,le){var J=U.value,K=U.arg,de=K===void 0?C:K,fe=U.modifiers,P=Object.assign({lock:f,trim:q,fireonempty:S,cancelonempty:x},fe),ce=o(le.props,h),j=s(function(y){J(y.target.value,y)},de);function pe(y){var z=P.trim?y.target.value.trim():y.target.value;d(z)&&P.cancelonempty?j.cancel():g(y.key,P)||u(z,y.key,P)?(j.cancel(),J(y.target.value,y)):j(y)}ce.forEach(function(y){M.addEventListener(y,pe)})}}},Object.defineProperty(r,"__esModule",{value:!0})})})(ge,ge.exports);var Ee={exports:{}},Je=function(t,r){return function(){for(var a=new Array(arguments.length),s=0;s=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([a]):r[n]=r[n]?r[n]+", "+a:a}}),r},Ne=T,tr=Ne.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function a(s){var i=s;return t&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(i){var o=Ne.isString(i)?a(i):i;return o.protocol===n.protocol&&o.host===n.host}}():function(){return function(){return!0}}();function Ae(e){this.message=e}Ae.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Ae.prototype.__CANCEL__=!0;var oe=Ae,re=T,rr=Kt,nr=zt,ar=Xe,sr=Qt,or=er,ir=tr,ve=Qe,ur=Ye,lr=oe,Oe=function(t){return new Promise(function(n,a){var s=t.data,i=t.headers,o=t.responseType,d;function g(){t.cancelToken&&t.cancelToken.unsubscribe(d),t.signal&&t.signal.removeEventListener("abort",d)}re.isFormData(s)&&delete i["Content-Type"];var u=new XMLHttpRequest;if(t.auth){var v=t.auth.username||"",E=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.Authorization="Basic "+btoa(v+":"+E)}var l=sr(t.baseURL,t.url);u.open(t.method.toUpperCase(),ar(l,t.params,t.paramsSerializer),!0),u.timeout=t.timeout;function c(){if(!!u){var p="getAllResponseHeaders"in u?or(u.getAllResponseHeaders()):null,h=!o||o==="text"||o==="json"?u.responseText:u.response,b={data:h,status:u.status,statusText:u.statusText,headers:p,config:t,request:u};rr(function(m){n(m),g()},function(m){a(m),g()},b),u=null}}if("onloadend"in u?u.onloadend=c:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(c)},u.onabort=function(){!u||(a(ve("Request aborted",t,"ECONNABORTED",u)),u=null)},u.onerror=function(){a(ve("Network Error",t,null,u)),u=null},u.ontimeout=function(){var h=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",b=t.transitional||ur;t.timeoutErrorMessage&&(h=t.timeoutErrorMessage),a(ve(h,t,b.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},re.isStandardBrowserEnv()){var f=(t.withCredentials||ir(l))&&t.xsrfCookieName?nr.read(t.xsrfCookieName):void 0;f&&(i[t.xsrfHeaderName]=f)}"setRequestHeader"in u&&re.forEach(i,function(h,b){typeof s=="undefined"&&b.toLowerCase()==="content-type"?delete i[b]:u.setRequestHeader(b,h)}),re.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),o&&o!=="json"&&(u.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&u.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(d=function(p){!u||(a(!p||p&&p.type?new lr("canceled"):p),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(d),t.signal&&(t.signal.aborted?d():t.signal.addEventListener("abort",d))),s||(s=null),u.send(s)})},w=T,Ue=Vt,dr=Ge,fr=Ye,cr={"Content-Type":"application/x-www-form-urlencoded"};function je(e,t){!w.isUndefined(e)&&w.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function pr(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Oe),e}function mr(e,t,r){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var ie={transitional:fr,adapter:pr(),transformRequest:[function(t,r){return Ue(r,"Accept"),Ue(r,"Content-Type"),w.isFormData(t)||w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)?t:w.isArrayBufferView(t)?t.buffer:w.isURLSearchParams(t)?(je(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):w.isObject(t)||r&&r["Content-Type"]==="application/json"?(je(r,"application/json"),mr(t)):t}],transformResponse:[function(t){var r=this.transitional||ie.transitional,n=r&&r.silentJSONParsing,a=r&&r.forcedJSONParsing,s=!n&&this.responseType==="json";if(s||a&&w.isString(t)&&t.length)try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?dr(i,this,"E_JSON_PARSE"):i}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};w.forEach(["delete","get","head"],function(t){ie.headers[t]={}});w.forEach(["post","put","patch"],function(t){ie.headers[t]=w.merge(cr)});var $e=ie,vr=T,hr=$e,yr=function(t,r,n){var a=this||hr;return vr.forEach(n,function(i){t=i.call(a,t,r)}),t},Ze=function(t){return!!(t&&t.__CANCEL__)},Ie=T,he=yr,gr=Ze,br=$e,Sr=oe;function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Sr("canceled")}var wr=function(t){ye(t),t.headers=t.headers||{},t.data=he.call(t,t.data,t.headers,t.transformRequest),t.headers=Ie.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Ie.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var r=t.adapter||br.adapter;return r(t).then(function(a){return ye(t),a.data=he.call(t,a.data,a.headers,t.transformResponse),a},function(a){return gr(a)||(ye(t),a&&a.response&&(a.response.data=he.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})},A=T,et=function(t,r){r=r||{};var n={};function a(u,v){return A.isPlainObject(u)&&A.isPlainObject(v)?A.merge(u,v):A.isPlainObject(v)?A.merge({},v):A.isArray(v)?v.slice():v}function s(u){if(A.isUndefined(r[u])){if(!A.isUndefined(t[u]))return a(void 0,t[u])}else return a(t[u],r[u])}function i(u){if(!A.isUndefined(r[u]))return a(void 0,r[u])}function o(u){if(A.isUndefined(r[u])){if(!A.isUndefined(t[u]))return a(void 0,t[u])}else return a(void 0,r[u])}function d(u){if(u in r)return a(t[u],r[u]);if(u in t)return a(void 0,t[u])}var g={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:d};return A.forEach(Object.keys(t).concat(Object.keys(r)),function(v){var E=g[v]||s,l=E(v);A.isUndefined(l)&&E!==d||(n[v]=l)}),n},tt={version:"0.26.1"},Er=tt.version,Be={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var ke={};Be.transitional=function(t,r,n){function a(s,i){return"[Axios v"+Er+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return function(s,i,o){if(t===!1)throw new Error(a(i," has been removed"+(r?" in "+r:"")));return r&&!ke[i]&&(ke[i]=!0,console.warn(a(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,o):!0}};function Cr(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var s=n[a],i=t[s];if(i){var o=e[s],d=o===void 0||i(o,s,e);if(d!==!0)throw new TypeError("option "+s+" must be "+d);continue}if(r!==!0)throw Error("Unknown option "+s)}}var Tr={assertOptions:Cr,validators:Be},rt=T,Ar=Xe,De=Ft,Le=wr,ue=et,nt=Tr,L=nt.validators;function Q(e){this.defaults=e,this.interceptors={request:new De,response:new De}}Q.prototype.request=function(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ue(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&nt.assertOptions(n,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1);var a=[],s=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(r)===!1||(s=s&&l.synchronous,a.unshift(l.fulfilled,l.rejected))});var i=[];this.interceptors.response.forEach(function(l){i.push(l.fulfilled,l.rejected)});var o;if(!s){var d=[Le,void 0];for(Array.prototype.unshift.apply(d,a),d=d.concat(i),o=Promise.resolve(r);d.length;)o=o.then(d.shift(),d.shift());return o}for(var g=r;a.length;){var u=a.shift(),v=a.shift();try{g=u(g)}catch(E){v(E);break}}try{o=Le(g)}catch(E){return Promise.reject(E)}for(;i.length;)o=o.then(i.shift(),i.shift());return o};Q.prototype.getUri=function(t){return t=ue(this.defaults,t),Ar(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};rt.forEach(["delete","get","head","options"],function(t){Q.prototype[t]=function(r,n){return this.request(ue(n||{},{method:t,url:r,data:(n||{}).data}))}});rt.forEach(["post","put","patch"],function(t){Q.prototype[t]=function(r,n,a){return this.request(ue(a||{},{method:t,url:r,data:n}))}});var $r=Q,Br=oe;function V(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(a){t=a});var r=this;this.promise.then(function(n){if(!!r._listeners){var a,s=r._listeners.length;for(a=0;a{var i,o;const t=(i=e.url)!=null?i:Ir,r=(o=e.count)!=null?o:10;let n={query:e.query,count:r};e.toBound&&(n=X(W({},n),{to_bound:{value:e.toBound}})),e.fromBound&&(n=X(W({},n),{from_bound:{value:e.fromBound}})),e.locationOptions&&(n=X(W({},n),{language:e.locationOptions.language,locations:e.locationOptions.locations,locations_boost:e.locationOptions.locationsBoost}));const a={headers:X(W({},kr),{Authorization:`Token ${e.token}`})},{data:{suggestions:s}}=await jr.post(t,n,a);return s},Lr=(e,t)=>{const r=k({get:()=>e.modelValue,set:m=>t("update:modelValue",m)}),n=k({get:()=>e.suggestion,set:m=>t("update:suggestion",m)}),a=_(!1),s=_(!0),i=_(-1),o=_([]),d=async m=>{try{const S={token:e.token,query:r.value,url:e.url,toBound:e.toBound,fromBound:e.fromBound,locationOptions:e.locationOptions,count:m};return Dr(S)}catch(S){return t("handleError",S),new Promise($=>{$([])})}},g=ge.exports.debounce(async()=>{o.value=await d()},e.debounceWait);dt(r,async()=>{g()});const u=()=>{e.disabled||(s.value=!1,i.value=-1)},v=m=>{e.disabled||o.value.length>=m-1&&(r.value=o.value[m].value,n.value=o.value[m])},E=()=>{e.disabled||(s.value=!0)},l=k(()=>i.valuei.value>=0),f=k(()=>c.value&&l.value);return{queryProxy:r,suggestionProxy:n,inputFocused:a,suggestionsVisible:s,suggestionIndex:i,suggestionList:o,onInputChange:E,onKeyPress:(m,S)=>{e.disabled||(m.preventDefault(),S===H.Enter&&f.value&&(v(i.value),u()),S===H.Esc&&(s.value=!1),S===H.Up&&c.value&&(i.value-=1),S===H.Down&&l.value&&(i.value+=1))},onInputFocus:()=>{e.disabled||(a.value=!0)},onInputBlur:()=>{var m;e.disabled||(e.autocomplete&&(r.value=n.value?(m=n.value)==null?void 0:m.value:""),a.value=!1)},onSuggestionClick:m=>{e.disabled||(v(m),u())}}};const _r=we({name:"VueDadata",components:{WordHighlighter:wt},props:{token:{type:String,required:!0},modelValue:{type:String,required:!0},suggestion:{type:Object,default:()=>{}},placeholder:{type:String,default:""},url:{type:String,default:void 0},debounceWait:{type:String||Number,default:"1000ms"},disabled:{type:Boolean,default:!1},fromBound:{type:String,default:void 0},toBound:{type:String,default:void 0},inputName:{type:String,default:"vue-dadata-input"},locationOptions:{type:Object,default:void 0},classes:{type:Object,default:()=>I},highlightOptions:{type:Object,default:()=>N},autocomplete:{type:Boolean,default:!1}},emits:["update:modelValue","update:suggestion","handleError"],setup(e,{emit:t}){const r=Et(e.classes),n=Ct(e.highlightOptions),{queryProxy:a,suggestionProxy:s,inputFocused:i,suggestionsVisible:o,suggestionIndex:d,suggestionList:g,onInputChange:u,onKeyPress:v,onInputFocus:E,onInputBlur:l,onSuggestionClick:c}=Lr(e,t);return{KeyEvent:H,queryProxy:a,suggestionProxy:s,inputFocused:i,suggestionsVisible:o,suggestionList:g,proxyClasses:r,proxyHighlightOptions:n,suggestionIndex:d,onInputChange:u,onKeyPress:v,onInputFocus:E,onInputBlur:l,onSuggestionClick:c}}}),Fr=["name","disabled","placeholder"];function Hr(e,t,r,n,a,s){const i=Ve("word-highlighter");return F(),G("div",{class:Z(e.proxyClasses.container)},[Y("div",{class:Z(e.proxyClasses.search)},[ft(Y("input",{"onUpdate:modelValue":t[0]||(t[0]=o=>e.queryProxy=o),type:"text",name:e.inputName,class:Z(e.proxyClasses.input),disabled:e.disabled,placeholder:e.placeholder,onInput:t[1]||(t[1]=(...o)=>e.onInputChange&&e.onInputChange(...o)),onKeyup:[t[2]||(t[2]=ee(o=>e.onKeyPress(o,e.KeyEvent.Enter),["enter"])),t[3]||(t[3]=ee(o=>e.onKeyPress(o,e.KeyEvent.Esc),["esc"])),t[4]||(t[4]=ee(o=>e.onKeyPress(o,e.KeyEvent.Up),["up"])),t[5]||(t[5]=ee(o=>e.onKeyPress(o,e.KeyEvent.Down),["down"]))],onFocus:t[6]||(t[6]=(...o)=>e.onInputFocus&&e.onInputFocus(...o)),onBlur:t[7]||(t[7]=(...o)=>e.onInputBlur&&e.onInputBlur(...o))},null,42,Fr),[[ct,e.queryProxy]])],2),e.inputFocused&&e.suggestionsVisible&&!e.disabled?(F(),G("div",{key:0,class:Z(e.proxyClasses.suggestions)},[pt(e.$slots,"suggestions",{suggestionList:e.suggestionList,suggestionIndex:e.suggestionIndex,query:e.queryProxy,suggestion:e.suggestionProxy},()=>[(F(!0),G(vt,null,ht(e.suggestionList,(o,d)=>(F(),yt(i,gt({key:`suggestion_${d}`},e.proxyHighlightOptions,{"wrapper-class":e.proxyClasses.suggestionItem,class:d===e.suggestionIndex?e.proxyClasses.suggestionCurrentItem:"",query:e.queryProxy,"text-to-highlight":o.value,onMousedown:g=>e.onSuggestionClick(d)}),null,16,["wrapper-class","class","query","text-to-highlight","onMousedown"]))),128))])],2)):mt("",!0)],2)}var Vr=He(_r,[["render",Hr]]);const Mr=we({name:"VueTruncateHtmlExample",components:{VueDadata:Vr},setup(){const e=_(""),t=_(void 0);return{token:"6d5ae0cd4d7090915fbf17acd0e84feea9effb65",query:e,suggestion:t}}}),Jr={class:"vue-truncate-html-example"};function Kr(e,t,r,n,a,s){const i=Ve("vue-dadata");return F(),G("div",Jr,[Me(i,{modelValue:e.query,"onUpdate:modelValue":t[0]||(t[0]=o=>e.query=o),suggestion:e.suggestion,"onUpdate:suggestion":t[1]||(t[1]=o=>e.suggestion=o),token:e.token,autocomplete:!0},null,8,["modelValue","suggestion","token"])])}var zr=He(Mr,[["render",Kr]]);const Wr=Y("h1",{id:"vue-dadata",tabindex:"-1"},[bt("vue-dadata "),Y("a",{class:"header-anchor",href:"#vue-dadata","aria-hidden":"true"},"#")],-1),Xr=Y("p",null,"vue-dadata \u044D\u0442\u043E open-source \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0434\u043B\u044F \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A \u043F\u043E \u0430\u0434\u0440\u0435\u0441\u0430\u043C",-1),Zr='{"title":"\u0412\u0432\u0435\u0434\u0435\u043D\u0438\u0435","description":"","frontmatter":{"title":"\u0412\u0432\u0435\u0434\u0435\u043D\u0438\u0435"},"headers":[],"relativePath":"index.md"}',Gr={},en=Object.assign(Gr,{name:"index",setup(e){return(t,r)=>(F(),G("div",null,[Wr,Xr,Me(zr)]))}});export{Zr as __pageData,en as default}; 4 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/index.md.6cec344f.lean.js: -------------------------------------------------------------------------------- 1 | var st=Object.defineProperty,ot=Object.defineProperties;var it=Object.getOwnPropertyDescriptors;var Re=Object.getOwnPropertySymbols;var ut=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;var Pe=(e,t,r)=>t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,W=(e,t)=>{for(var r in t||(t={}))ut.call(t,r)&&Pe(e,r,t[r]);if(Re)for(var r of Re(t))lt.call(t,r)&&Pe(e,r,t[r]);return e},X=(e,t)=>ot(e,it(t));import{d as we,h as Fe,c as k,r as _,w as dt,_ as He,o as F,a as G,b as Y,e as ft,v as ct,n as Z,f as ee,g as pt,i as mt,j as Ve,F as vt,k as ht,l as yt,m as gt,p as Me,q as bt}from"./app.cd2b655c.js";const xe=e=>e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),St=(e,t)=>{if(!t.query||t.query instanceof String&&!t.query.trim())return e;const r=(n=>{let a;if(n.query instanceof RegExp)return new RegExp(String.raw`(${n.query.source})`,"g"+(n.caseSensitive?"":"i"));if(n.splitBySpace){const s=n.query.trim().replace(/\s+/g," ");a=String.raw`(${s.split(/\s/).map(xe).join("|")})`}else a=String.raw`(${xe(n.query)})`;return new RegExp(String.raw`${a}`,"g"+(n.caseSensitive?"":"i"))})({query:t.query,splitBySpace:t.splitBySpace,caseSensitive:t.caseSensitive});return e.split(r).map(n=>r.test(n)?Fe(t.highlightTag,{class:t.highlightClass,style:t.highlightStyle},n):n)};var wt=we({name:"VueWordHighlighter",props:{query:{type:[String,Object],required:!0,default:""},caseSensitive:{type:Boolean,default:!1},splitBySpace:{type:Boolean,default:!1},highlightClass:{type:[Object,String,Array],default:""},highlightStyle:{type:[Object,String,Array],default:""},highlightTag:{type:String,default:"mark"},wrapperTag:{type:String,default:"span"},wrapperClass:{type:[Object,String,Array],default:""},textToHighlight:{type:String,default:""}},emits:["matches"],setup:(e,t)=>()=>{const r=e.textToHighlight?e.textToHighlight:(s=>{if(s&&s.default){const i=s.default();let o;return o=i[0].children,typeof o=="string"?o:""}return""})(t.slots),n=St(r,{query:e.query,splitBySpace:e.splitBySpace,caseSensitive:e.caseSensitive,highlightTag:e.highlightTag,highlightClass:e.highlightClass,highlightStyle:e.highlightStyle});var a;return t.emit("matches",typeof(a=n)=="string"?[]:a.filter(s=>typeof s!="string").map(s=>typeof s=="string"?s:s.children)),Fe(e.wrapperTag,{class:e.wrapperClass},n)}}),H=(e=>(e.Enter="enter",e.Esc="esc",e.Up="up",e.Down="down",e))(H||{});const I={container:"vue-dadata",search:"vue-dadata__search",input:"vue-dadata__input",suggestions:"vue-dadata__suggestions",suggestionItem:"vue-dadata__suggestions-item",suggestionCurrentItem:"vue-dadata__suggestions-item_current"},N={caseSensitive:!1,splitBySpace:!1,highlightTag:"mark",highlightClass:"vue-dadata__suggestion-item-text_highlight",highlightStyle:"",wrapperTag:"span",wrapperClass:""},Et=e=>k(()=>{var t,r,n,a,s,i;return{container:(t=e==null?void 0:e.container)!=null?t:I.container,search:(r=e==null?void 0:e.search)!=null?r:I.search,input:(n=e==null?void 0:e.input)!=null?n:I.input,suggestions:(a=e==null?void 0:e.suggestions)!=null?a:I.suggestions,suggestionItem:(s=e==null?void 0:e.suggestionItem)!=null?s:I.suggestionItem,suggestionCurrentItem:(i=e==null?void 0:e.suggestionCurrentItem)!=null?i:I.suggestionCurrentItem}}),Ct=e=>k(()=>{var t,r,n,a,s,i,o;return{caseSensitive:(t=e==null?void 0:e.caseSensitive)!=null?t:N.caseSensitive,splitBySpace:(r=e==null?void 0:e.splitBySpace)!=null?r:N.splitBySpace,highlightTag:(n=e==null?void 0:e.highlightTag)!=null?n:N.highlightTag,highlightClass:(a=e==null?void 0:e.highlightClass)!=null?a:N.highlightClass,highlightStyle:(s=e==null?void 0:e.highlightStyle)!=null?s:N.highlightStyle,wrapperTag:(i=e==null?void 0:e.wrapperTag)!=null?i:N.wrapperTag,wrapperClass:(o=e==null?void 0:e.wrapperClass)!=null?o:N.wrapperClass}});var Tt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ge={exports:{}};(function(e,t){(function(r,n){n(t)})(Tt,function(r){function n(l,c){return function(f){if(Array.isArray(f))return f}(l)||function(f,p){var h=f==null?null:typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var b,C,m=[],S=!0,$=!1;try{for(h=h.call(f);!(S=(b=h.next()).done)&&(m.push(b.value),!p||m.length!==p);S=!0);}catch(x){$=!0,C=x}finally{try{S||h.return==null||h.return()}finally{if($)throw C}}return m}}(l,c)||function(f,p){if(!!f){if(typeof f=="string")return a(f,p);var h=Object.prototype.toString.call(f).slice(8,-1);if(h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set")return Array.from(f);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return a(f,p)}}(l,c)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2 | In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function a(l,c){(c==null||c>l.length)&&(c=l.length);for(var f=0,p=new Array(c);f0?Array.isArray(p)?i(p):i(p.split(",")):i((f=c,Array.isArray(f)?f:f==null?[]:[f]))}function d(l){return l===""}function g(l,c){return l==="Enter"&&(!c.lock||c.unlock)}function u(l,c,f){return d(l)&&f.fireonempty&&(c==="Enter"||c===" ")}function v(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=l.lock,f=c!==void 0&&c,p=l.listenTo,h=p===void 0?"keyup":p,b=l.defaultTime,C=b===void 0?"300ms":b,m=l.fireOnEmpty,S=m!==void 0&&m,$=l.cancelOnEmpty,x=$!==void 0&&$,R=l.trim,q=R!==void 0&&R;return{bind:function(M,U,le){var J=U.value,K=U.arg,de=K===void 0?C:K,fe=U.modifiers,P=Object.assign({lock:f,trim:q,fireonempty:S,cancelonempty:x},fe),ce=o(le.data.attrs,h),j=s(function(y){J(y.target.value,y)},de);function pe(y){var z=P.trim?y.target.value.trim():y.target.value;d(z)&&P.cancelonempty?j.cancel():g(y.key,P)||u(z,y.key,P)?(j.cancel(),J(y.target.value,y)):j(y)}ce.forEach(function(y){M.addEventListener(y,pe)})}}}var E={install:function(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l.directive("debounce",v(c))}};r.debounce=s,r.default=E,r.vue3Debounce=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=l.lock,f=c!==void 0&&c,p=l.listenTo,h=p===void 0?"keyup":p,b=l.defaultTime,C=b===void 0?"300ms":b,m=l.fireOnEmpty,S=m!==void 0&&m,$=l.cancelOnEmpty,x=$!==void 0&&$,R=l.trim,q=R!==void 0&&R;return{created:function(M,U,le){var J=U.value,K=U.arg,de=K===void 0?C:K,fe=U.modifiers,P=Object.assign({lock:f,trim:q,fireonempty:S,cancelonempty:x},fe),ce=o(le.props,h),j=s(function(y){J(y.target.value,y)},de);function pe(y){var z=P.trim?y.target.value.trim():y.target.value;d(z)&&P.cancelonempty?j.cancel():g(y.key,P)||u(z,y.key,P)?(j.cancel(),J(y.target.value,y)):j(y)}ce.forEach(function(y){M.addEventListener(y,pe)})}}},Object.defineProperty(r,"__esModule",{value:!0})})})(ge,ge.exports);var Ee={exports:{}},Je=function(t,r){return function(){for(var a=new Array(arguments.length),s=0;s=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([a]):r[n]=r[n]?r[n]+", "+a:a}}),r},Ne=T,tr=Ne.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function a(s){var i=s;return t&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(i){var o=Ne.isString(i)?a(i):i;return o.protocol===n.protocol&&o.host===n.host}}():function(){return function(){return!0}}();function Ae(e){this.message=e}Ae.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Ae.prototype.__CANCEL__=!0;var oe=Ae,re=T,rr=Kt,nr=zt,ar=Xe,sr=Qt,or=er,ir=tr,ve=Qe,ur=Ye,lr=oe,Oe=function(t){return new Promise(function(n,a){var s=t.data,i=t.headers,o=t.responseType,d;function g(){t.cancelToken&&t.cancelToken.unsubscribe(d),t.signal&&t.signal.removeEventListener("abort",d)}re.isFormData(s)&&delete i["Content-Type"];var u=new XMLHttpRequest;if(t.auth){var v=t.auth.username||"",E=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.Authorization="Basic "+btoa(v+":"+E)}var l=sr(t.baseURL,t.url);u.open(t.method.toUpperCase(),ar(l,t.params,t.paramsSerializer),!0),u.timeout=t.timeout;function c(){if(!!u){var p="getAllResponseHeaders"in u?or(u.getAllResponseHeaders()):null,h=!o||o==="text"||o==="json"?u.responseText:u.response,b={data:h,status:u.status,statusText:u.statusText,headers:p,config:t,request:u};rr(function(m){n(m),g()},function(m){a(m),g()},b),u=null}}if("onloadend"in u?u.onloadend=c:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(c)},u.onabort=function(){!u||(a(ve("Request aborted",t,"ECONNABORTED",u)),u=null)},u.onerror=function(){a(ve("Network Error",t,null,u)),u=null},u.ontimeout=function(){var h=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",b=t.transitional||ur;t.timeoutErrorMessage&&(h=t.timeoutErrorMessage),a(ve(h,t,b.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},re.isStandardBrowserEnv()){var f=(t.withCredentials||ir(l))&&t.xsrfCookieName?nr.read(t.xsrfCookieName):void 0;f&&(i[t.xsrfHeaderName]=f)}"setRequestHeader"in u&&re.forEach(i,function(h,b){typeof s=="undefined"&&b.toLowerCase()==="content-type"?delete i[b]:u.setRequestHeader(b,h)}),re.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),o&&o!=="json"&&(u.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&u.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(d=function(p){!u||(a(!p||p&&p.type?new lr("canceled"):p),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(d),t.signal&&(t.signal.aborted?d():t.signal.addEventListener("abort",d))),s||(s=null),u.send(s)})},w=T,Ue=Vt,dr=Ge,fr=Ye,cr={"Content-Type":"application/x-www-form-urlencoded"};function je(e,t){!w.isUndefined(e)&&w.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function pr(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Oe),e}function mr(e,t,r){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var ie={transitional:fr,adapter:pr(),transformRequest:[function(t,r){return Ue(r,"Accept"),Ue(r,"Content-Type"),w.isFormData(t)||w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)?t:w.isArrayBufferView(t)?t.buffer:w.isURLSearchParams(t)?(je(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):w.isObject(t)||r&&r["Content-Type"]==="application/json"?(je(r,"application/json"),mr(t)):t}],transformResponse:[function(t){var r=this.transitional||ie.transitional,n=r&&r.silentJSONParsing,a=r&&r.forcedJSONParsing,s=!n&&this.responseType==="json";if(s||a&&w.isString(t)&&t.length)try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?dr(i,this,"E_JSON_PARSE"):i}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};w.forEach(["delete","get","head"],function(t){ie.headers[t]={}});w.forEach(["post","put","patch"],function(t){ie.headers[t]=w.merge(cr)});var $e=ie,vr=T,hr=$e,yr=function(t,r,n){var a=this||hr;return vr.forEach(n,function(i){t=i.call(a,t,r)}),t},Ze=function(t){return!!(t&&t.__CANCEL__)},Ie=T,he=yr,gr=Ze,br=$e,Sr=oe;function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Sr("canceled")}var wr=function(t){ye(t),t.headers=t.headers||{},t.data=he.call(t,t.data,t.headers,t.transformRequest),t.headers=Ie.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Ie.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var r=t.adapter||br.adapter;return r(t).then(function(a){return ye(t),a.data=he.call(t,a.data,a.headers,t.transformResponse),a},function(a){return gr(a)||(ye(t),a&&a.response&&(a.response.data=he.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})},A=T,et=function(t,r){r=r||{};var n={};function a(u,v){return A.isPlainObject(u)&&A.isPlainObject(v)?A.merge(u,v):A.isPlainObject(v)?A.merge({},v):A.isArray(v)?v.slice():v}function s(u){if(A.isUndefined(r[u])){if(!A.isUndefined(t[u]))return a(void 0,t[u])}else return a(t[u],r[u])}function i(u){if(!A.isUndefined(r[u]))return a(void 0,r[u])}function o(u){if(A.isUndefined(r[u])){if(!A.isUndefined(t[u]))return a(void 0,t[u])}else return a(void 0,r[u])}function d(u){if(u in r)return a(t[u],r[u]);if(u in t)return a(void 0,t[u])}var g={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:d};return A.forEach(Object.keys(t).concat(Object.keys(r)),function(v){var E=g[v]||s,l=E(v);A.isUndefined(l)&&E!==d||(n[v]=l)}),n},tt={version:"0.26.1"},Er=tt.version,Be={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var ke={};Be.transitional=function(t,r,n){function a(s,i){return"[Axios v"+Er+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return function(s,i,o){if(t===!1)throw new Error(a(i," has been removed"+(r?" in "+r:"")));return r&&!ke[i]&&(ke[i]=!0,console.warn(a(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,o):!0}};function Cr(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var s=n[a],i=t[s];if(i){var o=e[s],d=o===void 0||i(o,s,e);if(d!==!0)throw new TypeError("option "+s+" must be "+d);continue}if(r!==!0)throw Error("Unknown option "+s)}}var Tr={assertOptions:Cr,validators:Be},rt=T,Ar=Xe,De=Ft,Le=wr,ue=et,nt=Tr,L=nt.validators;function Q(e){this.defaults=e,this.interceptors={request:new De,response:new De}}Q.prototype.request=function(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ue(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&nt.assertOptions(n,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1);var a=[],s=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(r)===!1||(s=s&&l.synchronous,a.unshift(l.fulfilled,l.rejected))});var i=[];this.interceptors.response.forEach(function(l){i.push(l.fulfilled,l.rejected)});var o;if(!s){var d=[Le,void 0];for(Array.prototype.unshift.apply(d,a),d=d.concat(i),o=Promise.resolve(r);d.length;)o=o.then(d.shift(),d.shift());return o}for(var g=r;a.length;){var u=a.shift(),v=a.shift();try{g=u(g)}catch(E){v(E);break}}try{o=Le(g)}catch(E){return Promise.reject(E)}for(;i.length;)o=o.then(i.shift(),i.shift());return o};Q.prototype.getUri=function(t){return t=ue(this.defaults,t),Ar(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};rt.forEach(["delete","get","head","options"],function(t){Q.prototype[t]=function(r,n){return this.request(ue(n||{},{method:t,url:r,data:(n||{}).data}))}});rt.forEach(["post","put","patch"],function(t){Q.prototype[t]=function(r,n,a){return this.request(ue(a||{},{method:t,url:r,data:n}))}});var $r=Q,Br=oe;function V(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(a){t=a});var r=this;this.promise.then(function(n){if(!!r._listeners){var a,s=r._listeners.length;for(a=0;a{var i,o;const t=(i=e.url)!=null?i:Ir,r=(o=e.count)!=null?o:10;let n={query:e.query,count:r};e.toBound&&(n=X(W({},n),{to_bound:{value:e.toBound}})),e.fromBound&&(n=X(W({},n),{from_bound:{value:e.fromBound}})),e.locationOptions&&(n=X(W({},n),{language:e.locationOptions.language,locations:e.locationOptions.locations,locations_boost:e.locationOptions.locationsBoost}));const a={headers:X(W({},kr),{Authorization:`Token ${e.token}`})},{data:{suggestions:s}}=await jr.post(t,n,a);return s},Lr=(e,t)=>{const r=k({get:()=>e.modelValue,set:m=>t("update:modelValue",m)}),n=k({get:()=>e.suggestion,set:m=>t("update:suggestion",m)}),a=_(!1),s=_(!0),i=_(-1),o=_([]),d=async m=>{try{const S={token:e.token,query:r.value,url:e.url,toBound:e.toBound,fromBound:e.fromBound,locationOptions:e.locationOptions,count:m};return Dr(S)}catch(S){return t("handleError",S),new Promise($=>{$([])})}},g=ge.exports.debounce(async()=>{o.value=await d()},e.debounceWait);dt(r,async()=>{g()});const u=()=>{e.disabled||(s.value=!1,i.value=-1)},v=m=>{e.disabled||o.value.length>=m-1&&(r.value=o.value[m].value,n.value=o.value[m])},E=()=>{e.disabled||(s.value=!0)},l=k(()=>i.valuei.value>=0),f=k(()=>c.value&&l.value);return{queryProxy:r,suggestionProxy:n,inputFocused:a,suggestionsVisible:s,suggestionIndex:i,suggestionList:o,onInputChange:E,onKeyPress:(m,S)=>{e.disabled||(m.preventDefault(),S===H.Enter&&f.value&&(v(i.value),u()),S===H.Esc&&(s.value=!1),S===H.Up&&c.value&&(i.value-=1),S===H.Down&&l.value&&(i.value+=1))},onInputFocus:()=>{e.disabled||(a.value=!0)},onInputBlur:()=>{var m;e.disabled||(e.autocomplete&&(r.value=n.value?(m=n.value)==null?void 0:m.value:""),a.value=!1)},onSuggestionClick:m=>{e.disabled||(v(m),u())}}};const _r=we({name:"VueDadata",components:{WordHighlighter:wt},props:{token:{type:String,required:!0},modelValue:{type:String,required:!0},suggestion:{type:Object,default:()=>{}},placeholder:{type:String,default:""},url:{type:String,default:void 0},debounceWait:{type:String||Number,default:"1000ms"},disabled:{type:Boolean,default:!1},fromBound:{type:String,default:void 0},toBound:{type:String,default:void 0},inputName:{type:String,default:"vue-dadata-input"},locationOptions:{type:Object,default:void 0},classes:{type:Object,default:()=>I},highlightOptions:{type:Object,default:()=>N},autocomplete:{type:Boolean,default:!1}},emits:["update:modelValue","update:suggestion","handleError"],setup(e,{emit:t}){const r=Et(e.classes),n=Ct(e.highlightOptions),{queryProxy:a,suggestionProxy:s,inputFocused:i,suggestionsVisible:o,suggestionIndex:d,suggestionList:g,onInputChange:u,onKeyPress:v,onInputFocus:E,onInputBlur:l,onSuggestionClick:c}=Lr(e,t);return{KeyEvent:H,queryProxy:a,suggestionProxy:s,inputFocused:i,suggestionsVisible:o,suggestionList:g,proxyClasses:r,proxyHighlightOptions:n,suggestionIndex:d,onInputChange:u,onKeyPress:v,onInputFocus:E,onInputBlur:l,onSuggestionClick:c}}}),Fr=["name","disabled","placeholder"];function Hr(e,t,r,n,a,s){const i=Ve("word-highlighter");return F(),G("div",{class:Z(e.proxyClasses.container)},[Y("div",{class:Z(e.proxyClasses.search)},[ft(Y("input",{"onUpdate:modelValue":t[0]||(t[0]=o=>e.queryProxy=o),type:"text",name:e.inputName,class:Z(e.proxyClasses.input),disabled:e.disabled,placeholder:e.placeholder,onInput:t[1]||(t[1]=(...o)=>e.onInputChange&&e.onInputChange(...o)),onKeyup:[t[2]||(t[2]=ee(o=>e.onKeyPress(o,e.KeyEvent.Enter),["enter"])),t[3]||(t[3]=ee(o=>e.onKeyPress(o,e.KeyEvent.Esc),["esc"])),t[4]||(t[4]=ee(o=>e.onKeyPress(o,e.KeyEvent.Up),["up"])),t[5]||(t[5]=ee(o=>e.onKeyPress(o,e.KeyEvent.Down),["down"]))],onFocus:t[6]||(t[6]=(...o)=>e.onInputFocus&&e.onInputFocus(...o)),onBlur:t[7]||(t[7]=(...o)=>e.onInputBlur&&e.onInputBlur(...o))},null,42,Fr),[[ct,e.queryProxy]])],2),e.inputFocused&&e.suggestionsVisible&&!e.disabled?(F(),G("div",{key:0,class:Z(e.proxyClasses.suggestions)},[pt(e.$slots,"suggestions",{suggestionList:e.suggestionList,suggestionIndex:e.suggestionIndex,query:e.queryProxy,suggestion:e.suggestionProxy},()=>[(F(!0),G(vt,null,ht(e.suggestionList,(o,d)=>(F(),yt(i,gt({key:`suggestion_${d}`},e.proxyHighlightOptions,{"wrapper-class":e.proxyClasses.suggestionItem,class:d===e.suggestionIndex?e.proxyClasses.suggestionCurrentItem:"",query:e.queryProxy,"text-to-highlight":o.value,onMousedown:g=>e.onSuggestionClick(d)}),null,16,["wrapper-class","class","query","text-to-highlight","onMousedown"]))),128))])],2)):mt("",!0)],2)}var Vr=He(_r,[["render",Hr]]);const Mr=we({name:"VueTruncateHtmlExample",components:{VueDadata:Vr},setup(){const e=_(""),t=_(void 0);return{token:"6d5ae0cd4d7090915fbf17acd0e84feea9effb65",query:e,suggestion:t}}}),Jr={class:"vue-truncate-html-example"};function Kr(e,t,r,n,a,s){const i=Ve("vue-dadata");return F(),G("div",Jr,[Me(i,{modelValue:e.query,"onUpdate:modelValue":t[0]||(t[0]=o=>e.query=o),suggestion:e.suggestion,"onUpdate:suggestion":t[1]||(t[1]=o=>e.suggestion=o),token:e.token,autocomplete:!0},null,8,["modelValue","suggestion","token"])])}var zr=He(Mr,[["render",Kr]]);const Wr=Y("h1",{id:"vue-dadata",tabindex:"-1"},[bt("vue-dadata "),Y("a",{class:"header-anchor",href:"#vue-dadata","aria-hidden":"true"},"#")],-1),Xr=Y("p",null,"vue-dadata \u044D\u0442\u043E open-source \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0434\u043B\u044F \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A \u043F\u043E \u0430\u0434\u0440\u0435\u0441\u0430\u043C",-1),Zr='{"title":"\u0412\u0432\u0435\u0434\u0435\u043D\u0438\u0435","description":"","frontmatter":{"title":"\u0412\u0432\u0435\u0434\u0435\u043D\u0438\u0435"},"headers":[],"relativePath":"index.md"}',Gr={},en=Object.assign(Gr,{name:"index",setup(e){return(t,r)=>(F(),G("div",null,[Wr,Xr,Me(zr)]))}});export{Zr as __pageData,en as default}; 4 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/assets/style.a87b28a3.css: -------------------------------------------------------------------------------- 1 | :root{--c-white: #ffffff;--c-white-dark: #f8f8f8;--c-black: #000000;--c-divider-light: rgba(60, 60, 67, .12);--c-divider-dark: rgba(84, 84, 88, .48);--c-text-light-1: #2c3e50;--c-text-light-2: #476582;--c-text-light-3: #90a4b7;--c-brand: #3eaf7c;--c-brand-light: #4abf8a;--font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--font-family-mono: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;--z-index-navbar: 10;--z-index-sidebar: 6;--shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16);--header-height: 3.6rem}:root{--c-divider: var(--c-divider-light);--c-text: var(--c-text-light-1);--c-text-light: var(--c-text-light-2);--c-text-lighter: var(--c-text-light-3);--c-bg: var(--c-white);--c-bg-accent: var(--c-white-dark);--code-line-height: 24px;--code-font-family: var(--font-family-mono);--code-font-size: 14px;--code-inline-bg-color: rgba(27, 31, 35, .05);--code-bg-color: #282c34}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:1.4;font-family:var(--font-family-base);font-size:16px;font-weight:400;color:var(--c-text);background-color:var(--c-bg);direction:ltr;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:1.25}h1,h2,h3,h4,h5,h6,strong,b{font-weight:600}h1:hover .header-anchor,h1:focus .header-anchor,h2:hover .header-anchor,h2:focus .header-anchor,h3:hover .header-anchor,h3:focus .header-anchor,h4:hover .header-anchor,h4:focus .header-anchor,h5:hover .header-anchor,h5:focus .header-anchor,h6:hover .header-anchor,h6:focus .header-anchor{opacity:1}h1{margin-top:1.5rem;font-size:1.9rem}@media screen and (min-width: 420px){h1{font-size:2.2rem}}h2{margin-top:2.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--c-divider);padding-bottom:.3rem;line-height:1.25;font-size:1.65rem}h2+h3{margin-top:1.5rem}h3{margin-top:2rem;font-size:1.35rem}h4{font-size:1.15rem}p,ol,ul{margin:1rem 0;line-height:1.7}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{text-decoration:none;color:var(--c-brand)}a:hover{text-decoration:underline}a.header-anchor{float:left;margin-top:.125em;margin-left:-.87em;padding-right:.23em;font-size:.85em;opacity:0}a.header-anchor:hover,a.header-anchor:focus{text-decoration:none}figure{margin:0}img{max-width:100%}ul,ol{padding-left:1.25em}li>ul,li>ol{margin:0}table{display:block;border-collapse:collapse;margin:1rem 0;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}th,td{border:1px solid #dfe2e5;padding:.6em 1em}blockquote{margin:1rem 0;border-left:.2rem solid #dfe2e5;padding:.25rem 0 .25rem 1rem;font-size:1rem;color:#999}blockquote>p{margin:0}form{margin:0}.theme.sidebar-open .sidebar-mask{display:block}.theme.no-navbar>h1,.theme.no-navbar>h2,.theme.no-navbar>h3,.theme.no-navbar>h4,.theme.no-navbar>h5,.theme.no-navbar>h6{margin-top:1.5rem;padding-top:0}.theme.no-navbar aside{top:0}@media screen and (min-width: 720px){.theme.no-sidebar aside{display:none}.theme.no-sidebar main{margin-left:0}}.sidebar-mask{position:fixed;z-index:2;display:none;width:100vw;height:100vh}code{margin:0;border-radius:3px;padding:.25rem .5rem;font-family:var(--code-font-family);font-size:.85em;color:var(--c-text-light);background-color:var(--code-inline-bg-color)}code .token.deleted{color:#ec5975}code .token.inserted{color:var(--c-brand)}div[class*=language-]{position:relative;margin:1rem -1.5rem;background-color:var(--code-bg-color);overflow-x:auto}li>div[class*=language-]{border-radius:6px 0 0 6px;margin:1rem -1.5rem 1rem -1.25rem;line-height:initial}@media (min-width: 420px){div[class*=language-]{margin:1rem 0;border-radius:6px}li>div[class*=language-]{margin:1rem 0 1rem 0rem;border-radius:6px}}[class*=language-] pre,[class*=language-] code{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;background:transparent}[class*=language-] pre{position:relative;z-index:1;margin:0;padding:1.25rem 1.5rem;overflow-x:auto}[class*=language-] code{padding:0;line-height:var(--code-line-height);font-size:var(--code-font-size);color:#eee}.highlight-lines{position:absolute;top:0;bottom:0;left:0;padding:1.25rem 0;width:100%;line-height:var(--code-line-height);font-family:var(--code-font-family);font-size:var(--code-font-size);user-select:none;overflow:hidden}.highlight-lines .highlighted{background-color:#000000a8}div[class*=language-].line-numbers-mode{padding-left:3.5rem}.line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid rgba(0,0,0,.5);padding:1.25rem 0;width:3.5rem;text-align:center;line-height:var(--code-line-height);font-family:var(--code-font-family);font-size:var(--code-font-size);color:#888}div[class*=language-]:before{position:absolute;top:.6em;right:1em;z-index:2;font-size:.8rem;color:#888}div[class~=language-html]:before,div[class~=language-markup]:before{content:"html"}div[class~=language-md]:before,div[class~=language-markdown]:before{content:"md"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"styl"}div[class~=language-js]:before,div[class~=language-javascript]:before{content:"js"}div[class~=language-ts]:before,div[class~=language-typescript]:before{content:"ts"}div[class~=language-json]:before{content:"json"}div[class~=language-rb]:before,div[class~=language-ruby]:before{content:"rb"}div[class~=language-py]:before,div[class~=language-python]:before{content:"py"}div[class~=language-sh]:before,div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}div[class~=language-go]:before{content:"go"}div[class~=language-rust]:before{content:"rust"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-vue]:before{content:"vue"}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999}.token.punctuation{color:#ccc}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.number,.token.function{color:#f08d49}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699}.token.operator,.token.entity,.token.url{color:#67cdcc}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.custom-block.tip,.custom-block.info,.custom-block.warning,.custom-block.danger{margin:1rem 0;border-left:.5rem solid;padding:.1rem 1.5rem;overflow-x:auto}.custom-block.tip{background-color:#f3f5f7;border-color:var(--c-brand)}.custom-block.info{background-color:#f3f5f7;border-color:var(--c-text-light-2)}.custom-block.warning{border-color:#e7c000;color:#6b5900;background-color:#ffe5644d}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:var(--c-text)}.custom-block.danger{border-color:#c00;color:#4d0000;background-color:#ffe6e6}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:var(--c-text)}.custom-block.details{position:relative;display:block;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.custom-block-title{margin-bottom:-.4rem;font-weight:600}.sidebar-links{margin:0;padding:0;list-style:none}.sidebar-link-item{display:block;margin:0;border-left:.25rem solid transparent;color:var(--c-text)}a.sidebar-link-item:hover{text-decoration:none;color:var(--c-brand)}a.sidebar-link-item.active{color:var(--c-brand)}.sidebar>.sidebar-links{padding:.75rem 0 5rem}@media (min-width: 720px){.sidebar>.sidebar-links{padding:1.5rem 0}}.sidebar>.sidebar-links>.sidebar-link+.sidebar-link{padding-top:.5rem}@media (min-width: 720px){.sidebar>.sidebar-links>.sidebar-link+.sidebar-link{padding-top:1.25rem}}.sidebar>.sidebar-links>.sidebar-link>.sidebar-link-item{padding:.35rem 1.5rem .35rem 1.25rem;font-size:1.1rem;font-weight:700}.sidebar>.sidebar-links>.sidebar-link>a.sidebar-link-item.active{border-left-color:var(--c-brand);font-weight:600}.sidebar>.sidebar-links>.sidebar-link>.sidebar-links>.sidebar-link>.sidebar-link-item{display:block;padding:.35rem 1.5rem .35rem 2rem;line-height:1.4;font-size:1rem;font-weight:400}.sidebar>.sidebar-links>.sidebar-link>.sidebar-links>.sidebar-link>a.sidebar-link-item.active{border-left-color:var(--c-brand);font-weight:600}.sidebar>.sidebar-links>.sidebar-link>.sidebar-links>.sidebar-link>.sidebar-links>.sidebar-link>.sidebar-link-item{display:block;padding:.3rem 1.5rem .3rem 3rem;line-height:1.4;font-size:.9rem;font-weight:400}.sidebar>.sidebar-links>.sidebar-link>.sidebar-links>.sidebar-link>.sidebar-links>.sidebar-link>.sidebar-links>.sidebar-link>.sidebar-link-item{display:block;padding:.3rem 1.5rem .3rem 4rem;line-height:1.4;font-size:.9rem;font-weight:400}.debug[data-v-bf835584]{box-sizing:border-box;position:fixed;right:8px;bottom:8px;z-index:9999;border-radius:4px;width:74px;height:32px;color:#eee;overflow:hidden;cursor:pointer;background-color:#000000d9;transition:all .15s ease}.debug[data-v-bf835584]:hover{background-color:#000000bf}.debug.open[data-v-bf835584]{right:0;bottom:0;width:100%;height:100%;margin-top:0;border-radius:0;padding:0;overflow:scroll}@media (min-width: 512px){.debug.open[data-v-bf835584]{width:512px}}.debug.open[data-v-bf835584]:hover{background-color:#000000d9}.title[data-v-bf835584]{margin:0;padding:6px 16px;line-height:20px;font-size:13px}.block[data-v-bf835584]{margin:2px 0 0;border-top:1px solid rgba(255,255,255,.16);padding:8px 16px;font-family:Hack,monospace;font-size:13px}.block+.block[data-v-bf835584]{margin-top:8px}.icon.outbound{position:relative;top:-1px;display:inline-block;vertical-align:middle;color:var(--c-text-lighter)}.item[data-v-b8818f8c]{display:block;padding:0 1.5rem;line-height:36px;font-size:1rem;font-weight:600;color:var(--c-text);white-space:nowrap}.item[data-v-b8818f8c]:hover,.item.active[data-v-b8818f8c]{text-decoration:none;color:var(--c-brand)}.item.external[data-v-b8818f8c]:hover{border-bottom-color:transparent;color:var(--c-text)}@media (min-width: 720px){.item[data-v-b8818f8c]{border-bottom:2px solid transparent;padding:0;line-height:24px;font-size:.9rem;font-weight:500}.item[data-v-b8818f8c]:hover,.item.active[data-v-b8818f8c]{border-bottom-color:var(--c-brand);color:var(--c-text)}}.home-hero[data-v-370f18c0]{margin:2.5rem 0 2.75rem;padding:0 1.5rem;text-align:center}@media (min-width: 420px){.home-hero[data-v-370f18c0]{margin:3.5rem 0}}@media (min-width: 720px){.home-hero[data-v-370f18c0]{margin:4rem 0 4.25rem}}.figure[data-v-370f18c0]{padding:0 1.5rem}.image[data-v-370f18c0]{display:block;margin:0 auto;width:auto;max-width:100%;max-height:280px}.title[data-v-370f18c0]{margin-top:1.5rem;font-size:2rem}@media (min-width: 420px){.title[data-v-370f18c0]{font-size:3rem}}@media (min-width: 720px){.title[data-v-370f18c0]{margin-top:2rem}}.tagline[data-v-370f18c0]{margin:0;margin-top:.25rem;line-height:1.3;font-size:1.2rem;color:var(--c-text-light)}@media (min-width: 420px){.tagline[data-v-370f18c0]{line-height:1.2;font-size:1.6rem}}.action[data-v-370f18c0]{margin-top:1.5rem;display:inline-block}.action.alt[data-v-370f18c0]{margin-left:1.5rem}@media (min-width: 420px){.action[data-v-370f18c0]{margin-top:2rem;display:inline-block}}.action[data-v-370f18c0] .item{display:inline-block;border-radius:6px;padding:0 20px;line-height:44px;font-size:1rem;font-weight:500;color:var(--c-bg);background-color:var(--c-brand);border:2px solid var(--c-brand);transition:background-color .1s ease}.action.alt[data-v-370f18c0] .item{background-color:var(--c-bg);color:var(--c-brand)}.action[data-v-370f18c0] .item:hover{text-decoration:none;color:var(--c-bg);background-color:var(--c-brand-light)}@media (min-width: 420px){.action[data-v-370f18c0] .item{padding:0 24px;line-height:52px;font-size:1.2rem;font-weight:500}}.home-features[data-v-e39c13e0]{margin:0 auto;padding:2.5rem 0 2.75rem;max-width:960px}.home-hero+.home-features[data-v-e39c13e0]{padding-top:0}@media (min-width: 420px){.home-features[data-v-e39c13e0]{padding:3.25rem 0 3.5rem}.home-hero+.home-features[data-v-e39c13e0]{padding-top:0}}@media (min-width: 720px){.home-features[data-v-e39c13e0]{padding-right:1.5rem;padding-left:1.5rem}}.wrapper[data-v-e39c13e0]{padding:0 1.5rem}.home-hero+.home-features .wrapper[data-v-e39c13e0]{border-top:1px solid var(--c-divider);padding-top:2.5rem}@media (min-width: 420px){.home-hero+.home-features .wrapper[data-v-e39c13e0]{padding-top:3.25rem}}@media (min-width: 720px){.wrapper[data-v-e39c13e0]{padding-right:0;padding-left:0}}.container[data-v-e39c13e0]{margin:0 auto;max-width:392px}@media (min-width: 720px){.container[data-v-e39c13e0]{max-width:960px}}.features[data-v-e39c13e0]{display:flex;flex-wrap:wrap;margin:-20px -24px}.feature[data-v-e39c13e0]{flex-shrink:0;padding:20px 24px;width:100%}@media (min-width: 720px){.feature[data-v-e39c13e0]{width:calc(100% / 3)}}.title[data-v-e39c13e0]{margin:0;border-bottom:0;line-height:1.4;font-size:1.25rem;font-weight:500}@media (min-width: 420px){.title[data-v-e39c13e0]{font-size:1.4rem}}.details[data-v-e39c13e0]{margin:0;line-height:1.6;font-size:1rem;color:var(--c-text-light)}.title+.details[data-v-e39c13e0]{padding-top:.25rem}.footer[data-v-30918238]{margin:0 auto;max-width:960px}@media (min-width: 720px){.footer[data-v-30918238]{padding:0 1.5rem}}.container[data-v-30918238]{padding:2rem 1.5rem 2.25rem}.home-hero+.footer .container[data-v-30918238],.home-features+.footer .container[data-v-30918238],.home-content+.footer .container[data-v-30918238]{border-top:1px solid var(--c-divider)}@media (min-width: 420px){.container[data-v-30918238]{padding:3rem 1.5rem 3.25rem}}.text[data-v-30918238]{margin:0;text-align:center;line-height:1.4;font-size:.9rem;color:var(--c-text-light)}.home[data-v-10122c92]{padding-top:var(--header-height)}.home-content[data-v-10122c92]{max-width:960px;margin:0 auto;padding:0 1.5rem}.nav-bar-title[data-v-cc01ef16]{font-size:1.3rem;font-weight:600;color:var(--c-text);display:flex;justify-content:center;align-items:center}.nav-bar-title[data-v-cc01ef16]:hover{text-decoration:none}.logo[data-v-cc01ef16]{margin-right:.75rem;height:1.3rem;vertical-align:bottom}.item[data-v-bbc27490]{display:block;padding:0 1.5rem 0 2.5rem;line-height:32px;font-size:.9rem;font-weight:500;color:var(--c-text);white-space:nowrap}@media (min-width: 720px){.item[data-v-bbc27490]{padding:0 24px 0 12px;line-height:32px;font-size:.85rem;font-weight:500;color:var(--c-text);white-space:nowrap}.item.active .arrow[data-v-bbc27490]{opacity:1}}.item[data-v-bbc27490]:hover,.item.active[data-v-bbc27490]{text-decoration:none;color:var(--c-brand)}.item.external[data-v-bbc27490]:hover{border-bottom-color:transparent;color:var(--c-text)}@media (min-width: 720px){.arrow[data-v-bbc27490]{display:inline-block;margin-right:8px;border-top:6px solid #ccc;border-right:4px solid transparent;border-bottom:0;border-left:4px solid transparent;vertical-align:middle;opacity:0;transform:translateY(-2px) rotate(-90deg)}}.nav-dropdown-link[data-v-56bf3a3f]{position:relative;height:36px;overflow:hidden;cursor:pointer}@media (min-width: 720px){.nav-dropdown-link[data-v-56bf3a3f]{height:auto;overflow:visible}.nav-dropdown-link:hover .dialog[data-v-56bf3a3f]{display:block}}.nav-dropdown-link.open[data-v-56bf3a3f]{height:auto}.button[data-v-56bf3a3f]{display:block;border:0;padding:0 1.5rem;width:100%;text-align:left;line-height:36px;font-family:var(--font-family-base);font-size:1rem;font-weight:600;color:var(--c-text);white-space:nowrap;background-color:transparent;cursor:pointer}.button[data-v-56bf3a3f]:focus{outline:0}@media (min-width: 720px){.button[data-v-56bf3a3f]{border-bottom:2px solid transparent;padding:0;line-height:24px;font-size:.9rem;font-weight:500}}.button-arrow[data-v-56bf3a3f]{display:inline-block;margin-top:-1px;margin-left:8px;border-top:6px solid #ccc;border-right:4px solid transparent;border-bottom:0;border-left:4px solid transparent;vertical-align:middle}.button-arrow.right[data-v-56bf3a3f]{transform:rotate(-90deg)}@media (min-width: 720px){.button-arrow.right[data-v-56bf3a3f]{transform:rotate(0)}}.dialog[data-v-56bf3a3f]{margin:0;padding:0;list-style:none}@media (min-width: 720px){.dialog[data-v-56bf3a3f]{display:none;position:absolute;top:26px;right:-8px;border-radius:6px;padding:12px 0;min-width:128px;background-color:var(--c-bg);box-shadow:var(--shadow-3)}}.nav-links[data-v-eab3edfe]{padding:.75rem 0;border-bottom:1px solid var(--c-divider)}@media (min-width: 720px){.nav-links[data-v-eab3edfe]{display:flex;padding:6px 0 0;align-items:center;border-bottom:0}.item+.item[data-v-eab3edfe]{padding-left:24px}}.sidebar-button{position:absolute;top:.6rem;left:1rem;display:none;padding:.6rem;cursor:pointer}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media screen and (max-width: 719px){.sidebar-button{display:block}}.nav-bar[data-v-675d8756]{position:fixed;top:0;right:0;left:0;z-index:var(--z-index-navbar);display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--c-divider);padding:.7rem 1.5rem .7rem 4rem;height:var(--header-height);background-color:var(--c-bg)}@media (min-width: 720px){.nav-bar[data-v-675d8756]{padding:.7rem 1.5rem}}.flex-grow[data-v-675d8756]{flex-grow:1}.nav[data-v-675d8756]{display:none}@media (min-width: 720px){.nav[data-v-675d8756]{display:block}}.sidebar[data-v-83e92a68]{position:fixed;top:var(--header-height);bottom:0;left:0;z-index:var(--z-index-sidebar);border-right:1px solid var(--c-divider);width:16.4rem;background-color:var(--c-bg);overflow-y:auto;transform:translate(-100%);transition:transform .25s ease}@media (min-width: 720px){.sidebar[data-v-83e92a68]{transform:translate(0)}}@media (min-width: 960px){.sidebar[data-v-83e92a68]{width:20rem}}.sidebar.open[data-v-83e92a68]{transform:translate(0)}.nav[data-v-83e92a68]{display:block}@media (min-width: 720px){.nav[data-v-83e92a68]{display:none}}.link[data-v-1ed99556]{display:inline-block;font-size:1rem;font-weight:500;color:var(--c-text-light)}.link[data-v-1ed99556]:hover{text-decoration:none;color:var(--c-brand)}.icon[data-v-1ed99556]{margin-left:4px}.last-updated[data-v-abce3432]{display:inline-block;margin:0;line-height:1.4;font-size:.9rem;color:var(--c-text-light)}@media (min-width: 960px){.last-updated[data-v-abce3432]{font-size:1rem}}.prefix[data-v-abce3432]{display:inline-block;font-weight:500}.datetime[data-v-abce3432]{display:inline-block;margin-left:6px;font-weight:400}.page-footer[data-v-07c132fc]{padding-top:1rem;padding-bottom:1rem;overflow:auto}@media (min-width: 960px){.page-footer[data-v-07c132fc]{display:flex;justify-content:space-between;align-items:center}}.updated[data-v-07c132fc]{padding-top:4px}@media (min-width: 960px){.updated[data-v-07c132fc]{padding-top:0}}.next-and-prev-link[data-v-38ede35f]{padding-top:1rem}.container[data-v-38ede35f]{display:flex;justify-content:space-between;border-top:1px solid var(--c-divider);padding-top:1rem}.prev[data-v-38ede35f],.next[data-v-38ede35f]{display:flex;flex-shrink:0;width:50%}.prev[data-v-38ede35f]{justify-content:flex-start;padding-right:12px}.next[data-v-38ede35f]{justify-content:flex-end;padding-left:12px}.link[data-v-38ede35f]{display:inline-flex;align-items:center;max-width:100%;font-size:1rem;font-weight:500}.text[data-v-38ede35f]{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon[data-v-38ede35f]{display:block;flex-shrink:0;width:16px;height:16px;fill:var(--c-text);transform:translateY(1px)}.icon-prev[data-v-38ede35f]{margin-right:8px}.icon-next[data-v-38ede35f]{margin-left:8px}.page[data-v-7eddb2c4]{padding-top:var(--header-height)}@media (min-width: 720px){.page[data-v-7eddb2c4]{margin-left:16.4rem}}@media (min-width: 960px){.page[data-v-7eddb2c4]{margin-left:20rem}}.container[data-v-7eddb2c4]{margin:0 auto;padding:0 1.5rem 4rem;max-width:48rem}.content[data-v-7eddb2c4]{padding-bottom:1.5rem}@media (max-width: 420px){.content[data-v-7eddb2c4]{clear:both}}#ads-container{margin:0 auto}@media (min-width: 420px){#ads-container{position:relative;right:0;float:right;margin:-8px -8px 24px 24px;width:146px}}@media (max-width: 420px){#ads-container{height:105px;margin:1.75rem 0}}@media (min-width: 1400px){#ads-container{position:fixed;right:8px;bottom:8px}}.vue-dadata{width:100%;position:relative}.vue-dadata__input{font-size:14px;width:100%;height:47px;outline:none;border-radius:4px;border:1px solid #f1c40f;transition:.3s;box-sizing:border-box;padding:0 5px}.vue-dadata__input:focus{box-shadow:inset 0 1px 1px #00000013,0 0 0 3px #ff9a001a;border-color:#ff931e}.vue-dadata__suggestions{position:absolute;z-index:10;width:100%;display:flex;flex-direction:column;background-color:#fff}.vue-dadata__suggestions-item{padding:10px;cursor:pointer;transition:.3s}.vue-dadata__suggestions-item-highlight,.vue-dadata__suggestions-item:hover{background-color:#ffdfbd}.vue-dadata{width:100%;position:relative}.vue-dadata__input{font-size:14px;width:100%;height:47px;outline:none;border-radius:4px;border:1px solid #f1c40f;transition:.3s;box-sizing:border-box;padding:0 5px}.vue-dadata__input:focus{box-shadow:inset 0 1px 1px #00000013,0 0 0 3px #ff9a001a;border-color:#ff931e}.vue-dadata__suggestions{position:absolute;z-index:10;width:100%;display:flex;flex-direction:column;background-color:#fff}.vue-dadata__suggestions-item{padding:10px;cursor:pointer;transition:.3s}.vue-dadata__suggestions-item-highlight,.vue-dadata__suggestions-item:hover{background-color:#ffdfbd}.vue-dadata__suggestions-item_current{background-color:#fff5e7} 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/hashmap.json: -------------------------------------------------------------------------------- 1 | {"index.md":"6cec344f"} 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Введение | vue3-truncate-html 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

vue-dadata

vue-dadata это open-source библиотека для подсказок по адресам

17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/VueDadataExample.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 33 | 34 | 37 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Введение 3 | --- 4 | 5 | 6 | # vue-dadata 7 | 8 | vue-dadata это open-source библиотека для подсказок по адресам 9 | 10 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | vue-dadata 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-dadata", 3 | "version": "3.0.0-beta.13", 4 | "description": "Vue component for hinting addresses using dadata.ru", 5 | "keywords": [ 6 | "vue", 7 | "vue3", 8 | "typescript", 9 | "ts", 10 | "dadata", 11 | "hinting addresses" 12 | ], 13 | "homepage": "https://github.com/ikloster03/vue-dadata", 14 | "repository": "https://github.com/ikloster03/vue-dadata", 15 | "license": "MIT", 16 | "author": "Ivan Monastyrev ", 17 | "exports": { 18 | ".": { 19 | "import": "./dist/vue-dadata.js", 20 | "require": "./dist/vue-dadata.umd.js" 21 | }, 22 | "./*": "./*" 23 | }, 24 | "main": "./dist/vue-dadata.umd.js", 25 | "unpkg": "./dist/vue-dadata.umd.js", 26 | "jsdelivr": "./dist/vue-dadata.umd.js", 27 | "module": "./dist/vue-dadata.js", 28 | "typings": "./dist/index.d.ts", 29 | "files": [ 30 | "dist/*", 31 | "src/**/*.vue" 32 | ], 33 | "scripts": { 34 | "analyze": "vite build --config analyze.config.js", 35 | "build": "vite build", 36 | "build:docs": "vitepress build docs", 37 | "coverage": "vitest run --coverage", 38 | "coverage:report": "vite preview --outDir ./coverage", 39 | "dev": "vite --host", 40 | "dev:docs": "vitepress dev docs --port=8081", 41 | "lint": "eslint --ext .ts,.js,.vue --ignore-path .gitignore --fix src", 42 | "serve:docs": "vitepress serve docs", 43 | "sort": "npx sort-package-json", 44 | "test:dev": "vitest", 45 | "test:prod": "vitest run", 46 | "typecheck": "vue-tsc --noEmit" 47 | }, 48 | "dependencies": { 49 | "axios": "1.3.6", 50 | "vue-debounce": "4.0.0", 51 | "vue-word-highlighter": "1.2.3" 52 | }, 53 | "devDependencies": { 54 | "@rushstack/eslint-patch": "1.2.0", 55 | "@typescript-eslint/eslint-plugin": "5.59.1", 56 | "@typescript-eslint/parser": "5.59.1", 57 | "@vitejs/plugin-vue": "4.1.0", 58 | "@vitest/coverage-c8": "0.29.3", 59 | "@vitest/coverage-istanbul": "0.29.3", 60 | "@vue/compiler-sfc": "3.2.47", 61 | "@vue/eslint-config-typescript": "11.0.2", 62 | "@vue/test-utils": "2.3.2", 63 | "eslint": "8.39.0", 64 | "eslint-config-airbnb": "19.0.4", 65 | "eslint-import-resolver-typescript": "3.5.5", 66 | "eslint-plugin-import": "2.27.5", 67 | "eslint-plugin-simple-import-sort": "10.0.0", 68 | "eslint-plugin-vue": "9.11.0", 69 | "happy-dom": "8.9.0", 70 | "rollup-plugin-visualizer": "^5.5.4", 71 | "typescript": "5.0.4", 72 | "vite": "4.3.1", 73 | "vite-plugin-dts": "2.3.0", 74 | "vitepress": "1.0.0-alpha.74", 75 | "vitest": "0.29.3", 76 | "vue-tsc": "1.4.4" 77 | }, 78 | "peerDependencies": { 79 | "vue": "3.2.47" 80 | }, 81 | "engines": { 82 | "node": ">=14" 83 | } 84 | } -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | vue-dadata 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ru/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Сhangelog 2 | 3 | [Ссылка на EN changelog](https://github.com/ikloster03/vue-dadata/tree/master/CHANGELOG.md) 4 | 5 | ## v1.3.2 - 06 июня 2020 г. 6 | 7 | RU документация 8 | 9 | ## v1.3.0 - 05 июня 2020 г. 10 | 11 | Добавили новые свойства 12 | 13 | ## v1.2.0 - 09 февраля 2020 г. 14 | 15 | Атрибуты прокси 16 | 17 | ## v1.1.0 - 31 октября 2019 г. 18 | 19 | Добавить URL реквизит 20 | 21 | ## v1.0.0 - 27 октября 2019 г. 22 | 23 | Первый выпуск 24 | 25 | ## v0.1.2 - 27 октября 2019 г. 26 | 27 | Pre-release 28 | 29 | ## v0.1.1 - 26 октября 2019 г. 30 | 31 | Test npm 32 | 33 | ## v0.1.0 - 17 октября 2019 г. 34 | 35 | Создание репозитория 36 | -------------------------------------------------------------------------------- /ru/README.md: -------------------------------------------------------------------------------- 1 | # Vue Dadata 2 | 3 | ![Publish](https://github.com/ikloster03/vue-dadata/workflows/Publish/badge.svg) 4 | [![gitlocalized ](https://gitlocalize.com/repo/3342/whole_project/badge.svg)](https://gitlocalize.com/repo/3342/whole_project?utm_source=badge) 5 | 6 | Это vue компонент для подсказок с использованием сервиса [DaData.ru](https://dadata.ru). 7 | 8 | [Ссылка на EN документацию](https://github.com/ikloster03/vue-dadata/tree/master/README.md) 9 | 10 | ## Установка 11 | 12 | [npm package](https://www.npmjs.com/package/vue-dadata) 13 | 14 | ```bash 15 | $ npm install vue-dadata --save 16 | ``` 17 | 18 | [yarn package](https://yarnpkg.com/en/package/vue-dadata) 19 | 20 | ```bash 21 | $ yarn add vue-dadata 22 | ``` 23 | 24 | ## Применение 25 | 26 | ### Глобальный импорт 27 | 28 | ```js 29 | import VueDadata from 'vue-dadata' Vue.use(VueDadata) 30 | ``` 31 | 32 | ### Локальный импорт 33 | 34 | ```html 35 | 40 | 41 | 51 | ``` 52 | 53 | ### Свойства (пропсы) 54 | 55 | Свойство | Обязательно | Тип | Описание 56 | --- | --- | --- | --- 57 | token | Да | string | Авторизационный токен DaData.ru 58 | placeholder | Нет | string | Подсказка в input 59 | query | Нет | string | Поле ввода начального состояния 60 | autoload | Нет | boolean | Если `true` , то запрос на подсказки будет инициирован в фоновом режиме в созданном хуке 61 | onChange | Нет | function(suggestion: DadataSuggestion) -> void | Функция вызывается при выборе всплывающей подсказки 62 | autocomplete | Нет | string | Поле автозаполнения 63 | defaultClass | Нет | string | Компонент класса по умолчанию, значение по умолчанию - `vue-dadata` 64 | classes | Нет | string | Дополнительные классы 65 | inputName | Нет | string | Input name атрибут 66 | fromBound | Нет | string | Тип привязки Dadata ОТ 67 | toBound | Нет | string | Dadata привязанного типа к 68 | highlightClassName | Нет | string | Имя класса CSS, примененное к выделенному тексту 69 | unhighlightClassName | Нет | string | Имя класса CSS, примененное к невыделенному тексту 70 | highlightTag | Нет | string | Тип тега для обертывания вокруг выделенных совпадений; по умолчанию для `mark` но также может быть компонентом 71 | locationOptions | Нет | object | Варианты расположения для выбора городов или стран 72 | autoSelectOnEnter | Нет | boolean | Если `true`, то при нажатии клавиши `ENTER` будет выбираться первая подсказка, если не одна из подсказок не активна 73 | 74 | ## Зависимости 75 | 76 | - [axios](https://github.com/axios/axios) 77 | - [core-js](https://github.com/zloirock/core-js) 78 | - [vue](https://github.com/vuejs/vue) 79 | - [vue-class-component](https://github.com/vuejs/vue-class-component) 80 | - [vue-property-decorator](https://github.com/kaorun343/vue-property-decorator) 81 | - [vue-highlight-words](https://github.com/Astray-git/vue-highlight-words) 82 | - [vue-debounce-decorator](https://github.com/trepz/vue-debounce-decorator) 83 | 84 | ## Отчет о проблемах 85 | 86 | Если вы обнаружили ошибку или у вас есть запрос на добавление функции, сообщите об этом в [разделе проблем с](https://github.com/ikloster03/vue-dadata/issues) хранилищем. 87 | 88 | ## Собираемся сделать 89 | 90 | [Показать проект Vue Dadata](https://github.com/ikloster03/vue-dadata/projects/1) 91 | 92 | ## Основные этапы 93 | 94 | [Показать основные этапы](https://github.com/ikloster03/vue-dadata/milestones) 95 | 96 | ## Свяжитесь со мной 97 | 98 | - Сайт: [ikloster.ru](http://ikloster.ru) 99 | - E-mail: [ikloster@yandex.ru](mailto:ikloster@yandex.ru) 100 | - Twitter: [twitter.com/IvanMonastyrev](https://twitter.com/IvanMonastyrev) 101 | 102 | ## Авторы 103 | 104 | - [Valery Roshett](https://github.com/Roshett) 105 | - [Ilya Kiselev](https://github.com/kiselev-webdev) 106 | 107 | ## 108 | 109 | [CHANGELOG](https://github.com/ikloster03/vue-dadata/blob/master/CHANGELOG.md) 110 | 111 | ## 112 | 113 | [CONTRIBUTING](https://github.com/ikloster03/vue-dadata/blob/master/CONTRIBUTING.md) 114 | 115 | ## 116 | 117 | [ЛИЦЕНЗИЯ](https://github.com/ikloster03/vue-dadata/blob/master/LICENSE) 118 | 119 | Copyright (c) 2019 Иван Монастырев [ikloster@yandex.ru](mailto:ikloster@yandex.ru) . Лицензировано по [лицензии MIT](https://github.com/ikloster03/vue-dadata/blob/master/LICENSE) . 120 | -------------------------------------------------------------------------------- /src/@types/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import type { DefineComponent } from 'vue'; 5 | 6 | const component: DefineComponent<{}, {}, any>; 7 | export default component; 8 | } 9 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 40 | 41 | 44 | -------------------------------------------------------------------------------- /src/VueDadata.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ikloster03/vue-dadata/3320f779b57a70ad22627a995526d64a7c5eb7f1/src/VueDadata.test.ts -------------------------------------------------------------------------------- /src/VueDadata.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /src/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './suggestions'; 2 | -------------------------------------------------------------------------------- /src/api/suggestions.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import { SuggestionDto, SuggestionPayload, Suggestion } from '../types'; 3 | 4 | const DEFAULT_URL = 'https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address'; 5 | 6 | const DEFAULT_HEADERS = { 7 | 'Content-Type': 'application/json', 8 | Accept: 'application/json', 9 | }; 10 | 11 | export const getSuggestions = async (suggestion: SuggestionDto): Promise => { 12 | const url = suggestion.url ?? DEFAULT_URL; 13 | const count = suggestion.count ?? 10; 14 | 15 | let payload: SuggestionPayload = { 16 | query: suggestion.query, 17 | count, 18 | }; 19 | 20 | if (suggestion.toBound) { 21 | payload = { 22 | ...payload, 23 | to_bound: { value: suggestion.toBound }, 24 | }; 25 | } 26 | 27 | if (suggestion.fromBound) { 28 | payload = { 29 | ...payload, 30 | from_bound: { value: suggestion.fromBound }, 31 | }; 32 | } 33 | 34 | if (suggestion.locationOptions) { 35 | payload = { 36 | ...payload, 37 | language: suggestion.locationOptions.language, 38 | locations: suggestion.locationOptions.locations, 39 | locations_boost: suggestion.locationOptions.locationsBoost, 40 | }; 41 | } 42 | 43 | const config = { 44 | headers: { 45 | ...DEFAULT_HEADERS, 46 | Authorization: `Token ${suggestion.token}`, 47 | }, 48 | }; 49 | 50 | const { 51 | data: { suggestions }, 52 | } = await axios.post(url, payload, config); 53 | 54 | return suggestions; 55 | }; 56 | -------------------------------------------------------------------------------- /src/classes.ts: -------------------------------------------------------------------------------- 1 | import { computed, ComputedRef } from 'vue'; 2 | import { VueDadataClasses } from './types'; 3 | import { DEFAULT_CLASSES } from './const'; 4 | 5 | const useClasses = (classes?: VueDadataClasses): ComputedRef => computed(() => ({ 6 | container: classes?.container ?? DEFAULT_CLASSES.container, 7 | search: classes?.search ?? DEFAULT_CLASSES.search, 8 | input: classes?.input ?? DEFAULT_CLASSES.input, 9 | suggestions: classes?.suggestions ?? DEFAULT_CLASSES.suggestions, 10 | suggestionItem: classes?.suggestionItem ?? DEFAULT_CLASSES.suggestionItem, 11 | suggestionCurrentItem: classes?.suggestionCurrentItem ?? DEFAULT_CLASSES.suggestionCurrentItem, 12 | })); 13 | 14 | export default useClasses; 15 | -------------------------------------------------------------------------------- /src/const/bounds.const.ts: -------------------------------------------------------------------------------- 1 | export const BOUNDS = { 2 | COUNTRY: 'country' as const, 3 | REGION: 'region' as const, 4 | AREA: 'area' as const, 5 | CITY: 'city' as const, 6 | SETTLEMENT: 'settlement' as const, 7 | STREET: 'street' as const, 8 | HOUSE: 'house' as const, 9 | FLAT: 'flat' as const, 10 | }; 11 | -------------------------------------------------------------------------------- /src/const/classes.const.ts: -------------------------------------------------------------------------------- 1 | import { VueDadataClasses } from '../types'; 2 | 3 | export const DEFAULT_CLASSES: VueDadataClasses = { 4 | container: 'vue-dadata', 5 | search: 'vue-dadata__search', 6 | input: 'vue-dadata__input', 7 | suggestions: 'vue-dadata__suggestions', 8 | suggestionItem: 'vue-dadata__suggestions-item', 9 | suggestionCurrentItem: 'vue-dadata__suggestions-item_current', 10 | }; 11 | -------------------------------------------------------------------------------- /src/const/highlight-options.const.ts: -------------------------------------------------------------------------------- 1 | import { HighlightOptions } from '../types'; 2 | 3 | export const DEFAULT_HIGHLIGHT_OPTIONS: HighlightOptions = { 4 | caseSensitive: false, 5 | splitBySpace: false, 6 | highlightTag: 'mark', 7 | highlightClass: 'vue-dadata__suggestion-item-text_highlight', 8 | highlightStyle: '', 9 | wrapperTag: 'span', 10 | wrapperClass: '', 11 | }; 12 | -------------------------------------------------------------------------------- /src/const/index.ts: -------------------------------------------------------------------------------- 1 | export * from './bounds.const'; 2 | export * from './classes.const'; 3 | export * from './highlight-options.const'; 4 | -------------------------------------------------------------------------------- /src/highlight-options.ts: -------------------------------------------------------------------------------- 1 | import { computed, ComputedRef } from 'vue'; 2 | import { HighlightOptions } from './types'; 3 | import { DEFAULT_HIGHLIGHT_OPTIONS } from './const'; 4 | 5 | const useHighlightOptions = (highlightOptions?: HighlightOptions): ComputedRef => computed(() => ({ 6 | caseSensitive: highlightOptions?.caseSensitive ?? DEFAULT_HIGHLIGHT_OPTIONS.caseSensitive, 7 | splitBySpace: highlightOptions?.splitBySpace ?? DEFAULT_HIGHLIGHT_OPTIONS.splitBySpace, 8 | highlightTag: highlightOptions?.highlightTag ?? DEFAULT_HIGHLIGHT_OPTIONS.highlightTag, 9 | highlightClass: highlightOptions?.highlightClass ?? DEFAULT_HIGHLIGHT_OPTIONS.highlightClass, 10 | highlightStyle: highlightOptions?.highlightStyle ?? DEFAULT_HIGHLIGHT_OPTIONS.highlightStyle, 11 | wrapperTag: highlightOptions?.wrapperTag ?? DEFAULT_HIGHLIGHT_OPTIONS.wrapperTag, 12 | wrapperClass: highlightOptions?.wrapperClass ?? DEFAULT_HIGHLIGHT_OPTIONS.wrapperClass, 13 | })); 14 | 15 | export default useHighlightOptions; 16 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | .vue-dadata { 2 | width: 100%; 3 | position: relative; 4 | } 5 | 6 | .vue-dadata__input { 7 | font-size: 14px; 8 | width: 100%; 9 | height: 47px; 10 | outline: none; 11 | border-radius: 4px; 12 | border: 1px solid #f1c40f; 13 | transition: 0.3s; 14 | box-sizing: border-box; 15 | padding: 0 5px; 16 | } 17 | 18 | .vue-dadata__input:focus { 19 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 20 | 0 0 0 3px rgba(255, 154, 0, 0.1); 21 | border-color: #cf6e06; 22 | } 23 | 24 | .vue-dadata__suggestions { 25 | position: absolute; 26 | z-index: 10; 27 | width: 100%; 28 | display: flex; 29 | flex-direction: column; 30 | background-color: #fff; 31 | } 32 | 33 | .vue-dadata__suggestions-item { 34 | padding: 10px; 35 | cursor: pointer; 36 | transition: 0.3s; 37 | } 38 | 39 | .vue-dadata__suggestions-item-highlight { 40 | background-color: #cf6e06; 41 | } 42 | 43 | .vue-dadata__suggestions-item:hover { 44 | background-color: #cf6e06; 45 | } 46 | 47 | .vue-dadata__suggestions-item_current { 48 | background-color: #cf6e06; 49 | } -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VueDadata } from './VueDadata.vue'; 2 | export * from './types'; 3 | export * from './api'; 4 | export * from './const'; 5 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | import App from './App.vue'; 3 | 4 | const app = createApp(App); 5 | 6 | app.mount('#app'); 7 | -------------------------------------------------------------------------------- /src/suggestions.ts: -------------------------------------------------------------------------------- 1 | import { 2 | computed, ref, watch, Ref, 3 | } from 'vue'; 4 | import { debounce } from 'vue-debounce'; 5 | import { 6 | BoundsType, KeyEvent, LocationOptions, Suggestion, SuggestionDto, 7 | } from './types'; 8 | import { getSuggestions } from './api'; 9 | 10 | const useSuggestions = ( 11 | props: { 12 | modelValue: string, 13 | suggestion: Suggestion | undefined, 14 | token: string, 15 | url?: string, 16 | disabled?: boolean, 17 | debounceWait?: number | string, 18 | toBound?: BoundsType, 19 | fromBound?: BoundsType, 20 | locationOptions?: LocationOptions, 21 | autocomplete: boolean, 22 | }, 23 | // eslint-disable-next-line no-unused-vars 24 | emit: (event: 'update:modelValue' | 'update:suggestion' | 'handleError', ...args: any[]) => void, 25 | ) => { 26 | const queryProxy = computed({ 27 | get: () => props.modelValue, 28 | set: (value) => emit('update:modelValue', value), 29 | }); 30 | 31 | const suggestionProxy = computed({ 32 | get: () => props.suggestion, 33 | set: (value) => emit('update:suggestion', value), 34 | }); 35 | 36 | const inputFocused = ref(false); 37 | const suggestionsVisible = ref(true); 38 | const suggestionIndex = ref(-1); 39 | const suggestionList: Ref = ref([]); 40 | const suggestionItem: Ref = ref(undefined); 41 | 42 | const fetchSuggestions = async (count?: number): Promise => { 43 | try { 44 | const request: SuggestionDto = { 45 | token: props.token, 46 | query: queryProxy.value, 47 | url: props.url, 48 | toBound: props.toBound, 49 | fromBound: props.fromBound, 50 | locationOptions: props.locationOptions, 51 | count, 52 | }; 53 | 54 | return getSuggestions(request); 55 | } catch (error) { 56 | emit('handleError', error); 57 | 58 | return new Promise((resolve) => { 59 | resolve([]); 60 | }); 61 | } 62 | }; 63 | 64 | const fetchWithDebounce = debounce(async () => { 65 | suggestionList.value = await fetchSuggestions(); 66 | }, props.debounceWait as string | number); 67 | 68 | watch(queryProxy, async () => { 69 | fetchWithDebounce(); 70 | }); 71 | 72 | const resetSuggestions = () => { 73 | if (props.disabled) { 74 | return; 75 | } 76 | 77 | suggestionsVisible.value = false; 78 | suggestionIndex.value = -1; 79 | }; 80 | 81 | const selectSuggestion = (index: number) => { 82 | if (props.disabled) { 83 | return; 84 | } 85 | 86 | if (suggestionList.value.length >= index - 1) { 87 | queryProxy.value = suggestionList.value[index].value; 88 | suggestionItem.value = suggestionList.value[index]; 89 | suggestionProxy.value = suggestionList.value[index]; 90 | } 91 | }; 92 | 93 | const onInputChange = () => { 94 | if (props.disabled) { 95 | return; 96 | } 97 | 98 | suggestionsVisible.value = true; 99 | }; 100 | 101 | const limitUp = computed(() => suggestionIndex.value < suggestionList.value.length - 1); 102 | const limitDown = computed(() => suggestionIndex.value >= 0); 103 | const withinTheBoundaries = computed(() => limitDown.value && limitUp.value); 104 | 105 | const onKeyPress = (keyboardEvent: KeyboardEvent, keyEvent: KeyEvent) => { 106 | if (props.disabled) { 107 | return; 108 | } 109 | 110 | keyboardEvent.preventDefault(); 111 | 112 | if (keyEvent === KeyEvent.Enter) { 113 | if (withinTheBoundaries.value) { 114 | selectSuggestion(suggestionIndex.value); 115 | resetSuggestions(); 116 | } 117 | } 118 | 119 | if (keyEvent === KeyEvent.Esc) { 120 | suggestionsVisible.value = false; 121 | } 122 | 123 | if (keyEvent === KeyEvent.Up) { 124 | if (limitDown.value) { 125 | suggestionIndex.value -= 1; 126 | } 127 | } 128 | 129 | if (keyEvent === KeyEvent.Down) { 130 | if (limitUp.value) { 131 | suggestionIndex.value += 1; 132 | } 133 | } 134 | }; 135 | 136 | const onInputFocus = () => { 137 | if (props.disabled) { 138 | return; 139 | } 140 | 141 | inputFocused.value = true; 142 | }; 143 | 144 | const onInputBlur = () => { 145 | if (props.disabled) { 146 | return; 147 | } 148 | 149 | if (props.autocomplete) { 150 | queryProxy.value = suggestionItem.value ? suggestionItem.value?.value : ''; 151 | } 152 | 153 | inputFocused.value = false; 154 | }; 155 | 156 | const onSuggestionClick = (index: number) => { 157 | if (props.disabled) { 158 | return; 159 | } 160 | 161 | selectSuggestion(index); 162 | resetSuggestions(); 163 | }; 164 | 165 | return { 166 | queryProxy, 167 | suggestionProxy, 168 | inputFocused, 169 | suggestionsVisible, 170 | suggestionIndex, 171 | suggestionList, 172 | 173 | onInputChange, 174 | onKeyPress, 175 | onInputFocus, 176 | onInputBlur, 177 | onSuggestionClick, 178 | }; 179 | }; 180 | 181 | export default useSuggestions; 182 | -------------------------------------------------------------------------------- /src/types/address.types.ts: -------------------------------------------------------------------------------- 1 | import { ValueOf } from './helpers.types'; 2 | import { BOUNDS } from '../const'; 3 | 4 | export type CapitalMarkerType = '0' | '1' | '2' | '3' | '4'; 5 | export type QCGeoType = '0' | '1' | '2' | '3' | '4' | '5'; 6 | export type BoundsType = ValueOf 7 | 8 | export interface DadataAddress { 9 | area: string; 10 | area_fias_id: string; 11 | area_kladr_id: string; 12 | area_type: string; 13 | area_type_full: string; 14 | area_with_type: string; 15 | beltway_distance: null; 16 | beltway_hit: null; 17 | block: string; 18 | block_type: string; 19 | block_type_full: string; 20 | capital_marker: CapitalMarkerType; 21 | city: string; 22 | city_area: string; 23 | city_district: string; 24 | city_district_fias_id: string; 25 | city_district_kladr_id: string; 26 | city_district_type: string; 27 | city_district_type_full: string; 28 | city_district_with_type: string; 29 | city_fias_id: string; 30 | city_kladr_id: string; 31 | city_type: string; 32 | city_type_full: string; 33 | city_with_type: string; 34 | country: string; 35 | fias_id: string; 36 | fias_level: string; 37 | flat: string; 38 | flat_area: null; 39 | flat_price: null; 40 | flat_type: string; 41 | flat_type_full: string; 42 | geo_lat: string; 43 | geo_lon: string; 44 | history_values: string; 45 | house: string; 46 | house_fias_id: string; 47 | house_kladr_id: string; 48 | house_type: string; 49 | house_type_full: string; 50 | kladr_id: string; 51 | okato: string; 52 | oktmo: string; 53 | postal_box: string; 54 | postal_code: string; 55 | qc: null; 56 | qc_complete: null; 57 | qc_geo: QCGeoType; 58 | qc_house: null; 59 | region: string; 60 | region_fias_id: string; 61 | region_kladr_id: string; 62 | region_type: string; 63 | region_type_full: string; 64 | region_with_type: string; 65 | settlement: string; 66 | settlement_fias_id: string; 67 | settlement_kladr_id: string; 68 | settlement_type: string; 69 | settlement_type_full: string; 70 | settlement_with_type: string; 71 | source: string; 72 | square_meter_price: null; 73 | street: string; 74 | street_fias_id: string; 75 | street_kladr_id: string; 76 | street_type: string; 77 | street_type_full: string; 78 | street_with_type: string; 79 | tax_office: string; 80 | tax_office_legal: string; 81 | timezone: null; 82 | unparsed_parts: null; 83 | } 84 | -------------------------------------------------------------------------------- /src/types/classes.types.ts: -------------------------------------------------------------------------------- 1 | export interface VueDadataClasses { 2 | container?: string; 3 | search?: string; 4 | input?: string; 5 | suggestions?: string; 6 | suggestionItem?: string; 7 | suggestionCurrentItem?: string; 8 | } 9 | -------------------------------------------------------------------------------- /src/types/helpers.types.ts: -------------------------------------------------------------------------------- 1 | export type ValueOf = T[keyof T]; 2 | -------------------------------------------------------------------------------- /src/types/highlight-options.types.ts: -------------------------------------------------------------------------------- 1 | export interface HighlightOptions{ 2 | caseSensitive?: boolean; 3 | splitBySpace?: boolean; 4 | highlightTag?: string; 5 | highlightClass?: string | Record | string[]; 6 | highlightStyle?: string | Record | string[]; 7 | wrapperTag?: string; 8 | wrapperClass?: string | object | string[]; 9 | } 10 | -------------------------------------------------------------------------------- /src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './address.types'; 2 | export * from './suggestion.dto'; 3 | export * from './location-options.types'; 4 | export * from './classes.types'; 5 | export * from './highlight-options.types'; 6 | export * from './key-event.enum'; 7 | -------------------------------------------------------------------------------- /src/types/key-event.enum.ts: -------------------------------------------------------------------------------- 1 | export enum KeyEvent { 2 | Enter = 'enter', 3 | Esc = 'esc', 4 | Up = 'up', 5 | Down = 'down', 6 | } 7 | -------------------------------------------------------------------------------- /src/types/location-options.types.ts: -------------------------------------------------------------------------------- 1 | export interface LocationOptions { 2 | language?: string; 3 | locations: object[]; 4 | locationsBoost?: object[]; 5 | } 6 | -------------------------------------------------------------------------------- /src/types/suggestion.dto.ts: -------------------------------------------------------------------------------- 1 | import { LocationOptions } from './location-options.types'; 2 | import { BoundsType, DadataAddress } from './address.types'; 3 | 4 | export interface SuggestionDto { 5 | token: string; 6 | query: string; 7 | url?: string; 8 | count?: number; 9 | toBound?: BoundsType; 10 | fromBound?: BoundsType; 11 | locationOptions?: LocationOptions; 12 | } 13 | 14 | export interface SuggestionPayload { 15 | query: string; 16 | count?: number; 17 | to_bound?: { value: BoundsType}; 18 | from_bound?: { value: BoundsType}; 19 | language?: string; 20 | locations?: object[]; 21 | locations_boost?: object; 22 | } 23 | 24 | export interface Suggestion { 25 | value: string; 26 | unrestricted_value: string; 27 | data: DadataAddress; 28 | } 29 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "target": "ESNext", 5 | "strictPropertyInitialization": false, 6 | "useDefineForClassFields": true, 7 | "module": "ESNext", 8 | "moduleResolution": "Node", 9 | "strict": true, 10 | "jsx": "preserve", 11 | "sourceMap": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "esModuleInterop": true, 15 | "declaration": true, 16 | "lib": [ 17 | "ESNext", 18 | "DOM" 19 | ], 20 | "skipLibCheck": true, 21 | "paths": { 22 | "@/*": [ 23 | "./src/*", 24 | "./dist/*" 25 | ] 26 | } 27 | }, 28 | "include": [ 29 | "src/**/*.ts", 30 | "src/**/*.d.ts", 31 | "src/**/*.tsx", 32 | "src/**/*.vue" 33 | ], 34 | "exclude": [ 35 | "src/**/*.test.ts", 36 | ], 37 | "references": [ 38 | { 39 | "path": "./tsconfig.node.json" 40 | } 41 | ] 42 | } -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": [ 9 | "vite.config.ts" 10 | ] 11 | } -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import vue from '@vitejs/plugin-vue'; 2 | import { resolve } from 'path'; 3 | import { defineConfig } from 'vite'; 4 | import dts from 'vite-plugin-dts'; 5 | 6 | export default () => defineConfig({ 7 | plugins: [vue(), dts()], 8 | build: { 9 | lib: { 10 | entry: resolve(__dirname, 'src/index.ts'), 11 | name: 'VueDadata', 12 | formats: ['es', 'umd', 'cjs'], 13 | fileName: 'vue-dadata' 14 | 15 | }, 16 | rollupOptions: { 17 | // make sure to externalize deps that shouldn't be bundled 18 | // into your library 19 | external: ['vue'], 20 | output: { 21 | globals: { 22 | vue: 'Vue', 23 | }, 24 | } 25 | }, 26 | }, 27 | }); 28 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { defineConfig } from 'vitest/config'; 3 | import * as path from 'path'; 4 | import vue from '@vitejs/plugin-vue'; 5 | 6 | export default defineConfig({ 7 | test: { 8 | globals: true, 9 | environment: 'happy-dom', 10 | coverage: { 11 | // provider: 'istanbul', 12 | provider: 'c8', 13 | reporter: ['text', 'json', 'html'], 14 | }, 15 | include: ['./src/**/*.test.ts'] 16 | }, 17 | plugins: [ 18 | vue(), 19 | ], 20 | }); 21 | --------------------------------------------------------------------------------