nav-tab
Version:
A mobile touch-swappable navigation tabs component for Vue3.x
23 lines (22 loc) • 15.9 kB
JavaScript
;Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const J=process.env.NODE_ENV!=="production"?Object.freeze({}):{},Ce=process.env.NODE_ENV!=="production"?Object.freeze([]):[],re=()=>{},Te=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),D=Object.assign,h=Array.isArray,b=e=>typeof e=="function",N=e=>typeof e=="string",ke=e=>typeof e=="symbol",O=e=>e!==null&&typeof e=="object";let ne;const U=()=>ne||(ne=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function W(e){if(h(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=N(o)?Ie(o):W(o);if(s)for(const r in s)t[r]=s[r]}return t}else if(N(e)||O(e))return e}const Re=/;(?![^(]*\))/g,xe=/:([^]+)/,De=/\/\*[^]*?\*\//g;function Ie(e){const t={};return e.replace(De,"").split(Re).forEach(n=>{if(n){const o=n.split(xe);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Y(e){let t="";if(N(e))t=e;else if(h(e))for(let n=0;n<e.length;n++){const o=Y(e[n]);o&&(t+=o+" ")}else if(O(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/Symbol(process.env.NODE_ENV!=="production"?"Object iterate":"");Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":"");Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ke));function se(e){return K(e)?se(e.__v_raw):!!(e&&e.__v_isReactive)}function K(e){return!!(e&&e.__v_isReadonly)}function v(e){return!!(e&&e.__v_isShallow)}function j(e){return e?!!e.__v_raw:!1}function w(e){const t=e&&e.__v_raw;return t?w(t):e}function G(e){return e?e.__v_isRef===!0:!1}/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const S=[];function Fe(e){S.push(e)}function $e(){S.pop()}let z=!1;function k(e,...t){if(z)return;z=!0;const n=S.length?S[S.length-1].component:null,o=n&&n.appContext.config.warnHandler,s=Pe();if(o)Q(o,n,11,[e+t.map(r=>{var c,l;return(l=(c=r.toString)==null?void 0:c.call(r))!=null?l:JSON.stringify(r)}).join(""),n&&n.proxy,s.map(({vnode:r})=>`at <${be(n,r.type)}>`).join(`
`),s]);else{const r=[`[Vue warn]: ${e}`,...t];s.length&&r.push(`
`,...Ae(s)),console.warn(...r)}z=!1}function Pe(){let e=S[S.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function Ae(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
`],...He(n))}),t}function He({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,s=` at <${be(e.component,e.type,o)}`,r=">"+n;return e.props?[s,...Me(e.props),r]:[s+r]}function Me(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...ie(o,e[o]))}),n.length>3&&t.push(" ..."),t}function ie(e,t,n){return N(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:G(t)?(t=ie(e,w(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):b(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=w(t),n?t:[`${e}=`,t])}const ce={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Q(e,t,n,o){try{return o?e(...o):e()}catch(s){le(s,t,n)}}function le(e,t,n,o=!0){const s=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:c}=t&&t.appContext.config||J;if(t){let l=t.parent;const a=t.proxy,m=process.env.NODE_ENV!=="production"?ce[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const g=l.ec;if(g){for(let i=0;i<g.length;i++)if(g[i](e,a,m)===!1)return}l=l.parent}if(r){Q(r,null,10,[e,a,m]);return}}Ue(e,n,s,o,c)}function Ue(e,t,n,o=!0,s=!1){if(process.env.NODE_ENV!=="production"){const r=ce[t];if(n&&Fe(n),k(`Unhandled error${r?` during execution of ${r}`:""}`),n&&$e(),o)throw e;console.error(e)}else{if(s)throw e;console.error(e)}}const p=[];let y=-1;const T=[];let E=null,V=0;const ve=Promise.resolve();let q=null;const ze=100;function Be(e){let t=y+1,n=p.length;for(;t<n;){const o=t+n>>>1,s=p[o],r=x(s);r<e||r===e&&s.flags&2?t=o+1:n=o}return t}function Le(e){if(!(e.flags&1)){const t=x(e),n=p[p.length-1];!n||!(e.flags&2)&&t>=x(n)?p.push(e):p.splice(Be(t),0,e),e.flags|=1,ae()}}function ae(){q||(q=ve.then(ue))}function Je(e){h(e)?T.push(...e):E&&e.id===-1?E.splice(V+1,0,e):e.flags&1||(T.push(e),e.flags|=1),ae()}function Ke(e){if(T.length){const t=[...new Set(T)].sort((n,o)=>x(n)-x(o));if(T.length=0,E){E.push(...t);return}for(E=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),V=0;V<E.length;V++){const n=E[V];process.env.NODE_ENV!=="production"&&fe(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}E=null,V=0}}const x=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ue(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>fe(e,n):re;try{for(y=0;y<p.length;y++){const n=p[y];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Q(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;y<p.length;y++){const n=p[y];n&&(n.flags&=-2)}y=-1,p.length=0,Ke(e),q=null,(p.length||T.length)&&ue(e)}}function fe(e,t){const n=e.get(t)||0;if(n>ze){const o=t.i,s=o&&Ne(o.type);return le(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const B=new Map;process.env.NODE_ENV!=="production"&&(U().__VUE_HMR_RUNTIME__={createRecord:L(je),rerender:L(qe),reload:L(We)});const P=new Map;function je(e,t){return P.has(e)?!1:(P.set(e,{initialDef:A(t),instances:new Set}),!0)}function A(e){return Oe(e)?e.__vccOpts:e}function qe(e,t){const n=P.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(o=>{t&&(o.render=t,A(o.type).render=t),o.renderCache=[],o.update()}))}function We(e,t){const n=P.get(e);if(!n)return;t=A(t),oe(n.initialDef,t);const o=[...n.instances];for(let s=0;s<o.length;s++){const r=o[s],c=A(r.type);let l=B.get(c);l||(c!==n.initialDef&&oe(c,t),B.set(c,l=new Set)),l.add(r),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(l.add(r),r.ceReload(t.styles),l.delete(r)):r.parent?Le(()=>{r.parent.update(),l.delete(r)}):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),r.root.ce&&r!==r.root&&r.root.ce._removeChildStyle(c)}Je(()=>{B.clear()})}function oe(e,t){D(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function L(e){return(t,n)=>{try{return e(t,n)}catch(o){console.error(o),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let C,I=[];function pe(e,t){var n,o;C=e,C?(C.enabled=!0,I.forEach(({event:s,args:r})=>C.emit(s,...r)),I=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{pe(r,t)}),setTimeout(()=>{C||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,I=[])},3e3)):I=[]}let H=null,Ye=null;const Ge=e=>e.__isTeleport;function de(e,t){e.shapeFlag&6&&e.component?(e.transition=t,de(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function X(e,t){return b(e)?D({name:e.name},t,{setup:e}):e}U().requestIdleCallback;U().cancelIdleCallback;const Qe=Symbol.for("v-ndc"),Xe={};process.env.NODE_ENV!=="production"&&(Xe.ownKeys=e=>(k("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));const Ze={},me=e=>Object.getPrototypeOf(e)===Ze,et=e=>e.__isSuspense,_e=Symbol.for("v-fgt"),tt=Symbol.for("v-txt"),nt=Symbol.for("v-cmt"),F=[];let d=null;function Z(e=!1){F.push(d=e?null:[])}function ot(){F.pop(),d=F[F.length-1]||null}function rt(e){return e.dynamicChildren=d||Ce,ot(),d&&d.push(e),e}function ee(e,t,n,o,s,r){return rt(ge(e,t,n,o,s,r,!0))}function st(e){return e?e.__v_isVNode===!0:!1}const it=(...e)=>ye(...e),he=({key:e})=>e??null,$=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?N(e)||G(e)||b(e)?{i:H,r:e,k:t,f:!!n}:e:null);function ge(e,t=null,n=null,o=0,s=null,r=e===_e?0:1,c=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&he(t),ref:t&&$(t),scopeId:Ye,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:H};return l?(te(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=N(n)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&k("VNode created with invalid key (NaN). VNode type:",a.type),!c&&d&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&d.push(a),a}const ct=process.env.NODE_ENV!=="production"?it:ye;function ye(e,t=null,n=null,o=0,s=null,r=!1){if((!e||e===Qe)&&(process.env.NODE_ENV!=="production"&&!e&&k(`Invalid vnode type when creating vnode: ${e}.`),e=nt),st(e)){const l=M(e,t,!0);return n&&te(l,n),!r&&d&&(l.shapeFlag&6?d[d.indexOf(e)]=l:d.push(l)),l.patchFlag=-2,l}if(Oe(e)&&(e=e.__vccOpts),t){t=lt(t);let{class:l,style:a}=t;l&&!N(l)&&(t.class=Y(l)),O(a)&&(j(a)&&!h(a)&&(a=D({},a)),t.style=W(a))}const c=N(e)?1:et(e)?128:Ge(e)?64:O(e)?4:b(e)?2:0;return process.env.NODE_ENV!=="production"&&c&4&&j(e)&&(e=w(e),k("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
Component that was made reactive: `,e)),ge(e,t,n,o,s,c,r,!0)}function lt(e){return e?j(e)||me(e)?D({},e):e:null}function M(e,t,n=!1,o=!1){const{props:s,ref:r,patchFlag:c,children:l,transition:a}=e,m=t?ut(s||{},t):s,g={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&he(m),ref:t&&t.ref?n&&r?h(r)?r.concat($(t)):[r,$(t)]:$(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&c===-1&&h(l)?l.map(Ee):l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&M(e.ssContent),ssFallback:e.ssFallback&&M(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&de(g,a.clone(g)),g}function Ee(e){const t=M(e);return h(e.children)&&(t.children=e.children.map(Ee)),t}function at(e=" ",t=0){return ct(tt,null,e,t)}function te(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(h(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),te(e,s()),s._c&&(s._d=!0));return}else n=32,!t._&&!me(t)&&(t._ctx=H);else b(t)?(t={default:t,_ctx:H},n=32):(t=String(t),o&64?(n=16,t=[at(t)]):n=8);e.children=t,e.shapeFlag|=n}function ut(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const s in o)if(s==="class")t.class!==o.class&&(t.class=Y([t.class,o.class]));else if(s==="style")t.style=W([t.style,o.style]);else if(Te(s)){const r=t[s],c=o[s];c&&r!==c&&!(h(r)&&r.includes(c))&&(t[s]=r?[].concat(r,c):c)}else s!==""&&(t[s]=o[s])}return t}{const e=U(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),r=>{s.length>1?s.forEach(c=>c(r)):s[0](r)}};t("__VUE_INSTANCE_SETTERS__",n=>n),t("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;const ft=/(?:^|[-_])(\w)/g,pt=e=>e.replace(ft,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ne(e,t=!0){return b(e)?e.displayName||e.name:e.name||t&&e.__name}function be(e,t,n=!1){let o=Ne(t);if(!o&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(o=s[1])}if(!o&&e&&e.parent){const s=r=>{for(const c in r)if(r[c]===t)return c};o=s(e.components||e.parent.type.components)||s(e.appContext.components)}return o?pt(o):n?"App":"Anonymous"}function Oe(e){return b(e)&&"__vccOpts"in e}function dt(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},o={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(i){return O(i)?i.__isVue?["div",e,"VueInstance"]:G(i)?["div",{},["span",e,g(i)],"<",l("_value"in i?i._value:i),">"]:se(i)?["div",{},["span",e,v(i)?"ShallowReactive":"Reactive"],"<",l(i),`>${K(i)?" (readonly)":""}`]:K(i)?["div",{},["span",e,v(i)?"ShallowReadonly":"Readonly"],"<",l(i),">"]:null:null},hasBody(i){return i&&i.__isVue},body(i){if(i&&i.__isVue)return["div",{},...r(i.$)]}};function r(i){const u=[];i.type.props&&i.props&&u.push(c("props",w(i.props))),i.setupState!==J&&u.push(c("setup",i.setupState)),i.data!==J&&u.push(c("data",w(i.data)));const f=a(i,"computed");f&&u.push(c("computed",f));const _=a(i,"inject");return _&&u.push(c("injected",_)),u.push(["div",{},["span",{style:o.style+";opacity:0.66"},"$ (internal): "],["object",{object:i}]]),u}function c(i,u){return u=D({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},i],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(f=>["div",{},["span",o,f+": "],l(u[f],!1)])]]:["span",{}]}function l(i,u=!0){return typeof i=="number"?["span",t,i]:typeof i=="string"?["span",n,JSON.stringify(i)]:typeof i=="boolean"?["span",o,i]:O(i)?["object",{object:u?w(i):i}]:["span",n,String(i)]}function a(i,u){const f=i.type;if(b(f))return;const _={};for(const R in i.ctx)m(f,R,u)&&(_[R]=i.ctx[R]);return _}function m(i,u,f){const _=i[f];if(h(_)&&_.includes(u)||O(_)&&u in _||i.extends&&m(i.extends,u,f)||i.mixins&&i.mixins.some(R=>m(R,u,f)))return!0}function g(i){return v(i)?"ShallowRef":i.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;/**
* vue v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function mt(){dt()}process.env.NODE_ENV!=="production"&&mt();const we=X({name:"TabsHead",__name:"TabsHead",setup(e){return(t,n)=>(Z(),ee("h1",null,"TabsHead"))}}),Se=X({name:"TabsBottom",__name:"TabsBottom",setup(e){return(t,n)=>(Z(),ee("h1",null,"TabsBottom"))}}),Ve=X({name:"TabItem",__name:"TabItem",setup(e){return(t,n)=>(Z(),ee("h1",null,"TabItem"))}}),_t=[we,Se,Ve],ht=e=>{_t.forEach(t=>{if(t.name)e.component(t.name,t);else throw new Error(`Component has no name: ${t}`)})},gt={install:ht};exports.TabItem=Ve;exports.TabsBottom=Se;exports.TabsHead=we;exports.default=gt;
//# sourceMappingURL=nav-tab.cjs.map