uikit 3.16.24-dev.d6158da87 → 3.16.25-dev.12f581d90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +0 -9
- package/.prettierrc.json +3 -4
- package/CHANGELOG.md +2 -1
- package/build/build.js +2 -2
- package/build/less.js +2 -2
- package/build/prefix.js +3 -3
- package/build/release.js +7 -7
- package/build/scope.js +3 -3
- package/build/scss.js +9 -9
- package/build/util.js +11 -11
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +2 -2
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +18 -18
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +351 -350
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +353 -352
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +6 -6
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +69 -69
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +37 -37
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +222 -224
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +37 -37
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +300 -302
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +2 -2
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +95 -95
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +2 -2
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +452 -449
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +6837 -6836
- package/dist/js/uikit.min.js +1 -1
- package/package.json +8 -7
- package/src/js/api/app.js +1 -1
- package/src/js/api/boot.js +2 -2
- package/src/js/api/component.js +1 -1
- package/src/js/api/computed.js +2 -2
- package/src/js/api/events.js +2 -2
- package/src/js/api/global.js +3 -3
- package/src/js/api/hooks.js +4 -4
- package/src/js/api/instance.js +3 -3
- package/src/js/api/log.js +1 -1
- package/src/js/api/observables.js +1 -1
- package/src/js/api/observer.js +2 -2
- package/src/js/api/options.js +2 -2
- package/src/js/api/props.js +2 -2
- package/src/js/api/state.js +2 -2
- package/src/js/components/countdown.js +1 -1
- package/src/js/components/filter.js +5 -5
- package/src/js/components/internal/lightbox-animations.js +1 -1
- package/src/js/components/internal/slider-transitioner.js +6 -6
- package/src/js/components/internal/slideshow-animations.js +1 -1
- package/src/js/components/lightbox-panel.js +10 -10
- package/src/js/components/lightbox.js +2 -2
- package/src/js/components/notification.js +4 -4
- package/src/js/components/parallax.js +3 -3
- package/src/js/components/slider-parallax.js +1 -1
- package/src/js/components/slider.js +12 -12
- package/src/js/components/slideshow.js +3 -3
- package/src/js/components/sortable.js +4 -4
- package/src/js/components/tooltip.js +6 -6
- package/src/js/components/upload.js +4 -4
- package/src/js/core/accordion.js +8 -8
- package/src/js/core/alert.js +2 -2
- package/src/js/core/cover.js +1 -1
- package/src/js/core/drop.js +12 -12
- package/src/js/core/dropnav.js +7 -7
- package/src/js/core/form-custom.js +1 -1
- package/src/js/core/grid.js +9 -9
- package/src/js/core/height-match.js +2 -2
- package/src/js/core/height-viewport.js +1 -1
- package/src/js/core/icon.js +23 -23
- package/src/js/core/img.js +2 -2
- package/src/js/core/index.js +16 -14
- package/src/js/core/leader.js +2 -2
- package/src/js/core/modal.js +7 -7
- package/src/js/core/navbar.js +4 -4
- package/src/js/core/offcanvas.js +3 -3
- package/src/js/core/overflow-auto.js +3 -3
- package/src/js/core/responsive.js +3 -3
- package/src/js/core/scrollspy-nav.js +1 -1
- package/src/js/core/scrollspy.js +1 -1
- package/src/js/core/sticky.js +12 -12
- package/src/js/core/svg.js +4 -4
- package/src/js/core/switcher.js +7 -7
- package/src/js/core/tab.js +2 -2
- package/src/js/core/toggle.js +5 -5
- package/src/js/core/video.js +1 -1
- package/src/js/mixin/animate.js +1 -1
- package/src/js/mixin/i18n.js +1 -1
- package/src/js/mixin/internal/animate-fade.js +14 -14
- package/src/js/mixin/internal/animate-slide.js +1 -1
- package/src/js/mixin/internal/scroll.js +1 -1
- package/src/js/mixin/modal.js +15 -12
- package/src/js/mixin/parallax.js +2 -2
- package/src/js/mixin/position.js +2 -2
- package/src/js/mixin/slider-drag.js +1 -1
- package/src/js/mixin/slider-nav.js +8 -9
- package/src/js/mixin/slider.js +9 -9
- package/src/js/mixin/slideshow.js +1 -1
- package/src/js/mixin/togglable.js +4 -4
- package/src/js/uikit-core.js +2 -2
- package/src/js/uikit.js +2 -2
- package/src/js/util/animation.js +8 -8
- package/src/js/util/class.js +1 -1
- package/src/js/util/dimensions.js +5 -5
- package/src/js/util/dom.js +3 -3
- package/src/js/util/event.js +3 -3
- package/src/js/util/filter.js +1 -1
- package/src/js/util/lang.js +4 -4
- package/src/js/util/observer.js +2 -2
- package/src/js/util/player.js +1 -1
- package/src/js/util/position.js +5 -5
- package/src/js/util/selector.js +1 -1
- package/src/js/util/style.js +1 -1
- package/src/js/util/svg.js +2 -2
- package/src/js/util/viewport.js +6 -6
- package/tests/js/index.js +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.24-dev.d6158da87 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitLightbox=v(e.UIkit.util))})(this,function(e){"use strict";var v={slide:{show(t){return[{transform:y(t*-100)},{transform:y()}]},percent(t){return U(t)},translate(t,s){return[{transform:y(s*-100*t)},{transform:y(s*100*(1-t))}]}}};function U(t){return Math.abs(e.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function y(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function C(t){return`scale3d(${t}, ${t}, 1)`}var O={...v,fade:{show(){return[{opacity:0},{opacity:1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t},{opacity:t}]}},scale:{show(){return[{opacity:0,transform:C(1-.2)},{opacity:1,transform:C(1)}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:C(1-.2*t)},{opacity:t,transform:C(1-.2+.2*t)}]}}},q={connected(){e.addClass(this.$el,this.$options.id)}},V={props:{container:Boolean},data:{container:!0},computed:{container({container:t}){return t===!0&&this.$container||t&&e.$(t)}}},G={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:t}){return!!t[0]},hasTransition({animation:t}){return["slide","reveal"].some(s=>e.startsWith(t[0],s))}},methods:{async toggleElement(t,s,i){try{return await Promise.all(e.toNodes(t).map(n=>{const r=e.isBoolean(s)?s:!this.isToggled(n);if(!e.trigger(n,`before${r?"show":"hide"}`,[this]))return Promise.reject();const a=(e.isFunction(i)?i:i===!1||!this.hasAnimation?X:this.hasTransition?Y:J)(n,r,this),h=r?this.clsEnter:this.clsLeave;e.addClass(n,h),e.trigger(n,r?"show":"hide",[this]);const o=()=>{e.removeClass(n,h),e.trigger(n,r?"shown":"hidden",[this])};return a?a.then(o,()=>(e.removeClass(n,h),Promise.reject())):o()})),!0}catch{return!1}},isToggled(t=this.$el){return t=e.toNode(t),e.hasClass(t,this.clsEnter)?!0:e.hasClass(t,this.clsLeave)?!1:this.cls?e.hasClass(t,this.cls.split(" ")[0]):e.isVisible(t)},_toggle(t,s){if(!t)return;s=!!s;let i;this.cls?(i=e.includes(this.cls," ")||s!==e.hasClass(t,this.cls),i&&e.toggleClass(t,this.cls,e.includes(this.cls," ")?void 0:s)):(i=s===t.hidden,i&&(t.hidden=!s)),e.$$("[autofocus]",t).some(n=>e.isVisible(n)?n.focus()||!0:n.blur()),i&&e.trigger(t,"toggled",[s,this])}}};function X(t,s,{_toggle:i}){return e.Animation.cancel(t),e.Transition.cancel(t),i(t,s)}async function Y(t,s,{animation:i,duration:n,velocity:r,transition:a,_toggle:h}){var o;const[l="reveal",c="top"]=((o=i[0])==null?void 0:o.split("-"))||[],d=[["left","right"],["top","bottom"]],p=d[e.includes(d[0],c)?0:1],f=p[1]===c,b=["width","height"][d.indexOf(p)],w=`margin-${p[0]}`,A=`margin-${c}`;let k=e.dimensions(t)[b];const wt=e.Transition.inProgress(t);await e.Transition.cancel(t),s&&h(t,!0);const xt=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",w,A].map(W=>[W,t.style[W]])),I=e.dimensions(t),D=e.toFloat(e.css(t,w)),j=e.toFloat(e.css(t,A)),u=I[b]+j;!wt&&!s&&(k+=j);const[P]=e.wrapInner(t,"<div>");e.css(P,{boxSizing:"border-box",height:I.height,width:I.width,...e.css(t,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",A])}),e.css(t,{padding:0,border:0,minWidth:0,minHeight:0,[A]:0,width:I.width,height:I.height,overflow:"hidden",[b]:k});const z=k/u;n=(r*u+n)*(s?1-z:z);const R={[b]:s?u:0};f&&(e.css(t,w,u-k+D),R[w]=s?D:u+D),!f^l==="reveal"&&(e.css(P,w,-u+k),e.Transition.start(P,{[w]:s?0:-u},n,a));try{await e.Transition.start(t,R,n,a)}finally{e.css(t,xt),e.unwrap(P.firstChild),s||h(t,!1)}}function J(t,s,i){e.Animation.cancel(t);const{animation:n,duration:r,_toggle:a}=i;return s?(a(t,!0),e.Animation.in(t,n[0],r,i.origin)):e.Animation.out(t,n[1]||n[0],r,i.origin).then(()=>a(t,!1))}let E;function K(t){const s=e.on(t,"touchmove",n=>{if(n.targetTouches.length!==1||e.matches(n.target,'input[type="range"'))return;let{scrollHeight:r,clientHeight:a}=e.scrollParent(n.target);a>=r&&n.cancelable&&n.preventDefault()},{passive:!1});if(E)return s;E=!0;const{scrollingElement:i}=document;return e.css(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:e.width(window)-i.clientWidth||""}),()=>{E=!1,s(),e.css(i,{overflowY:"",touchAction:"",paddingRight:""})}}const m=[];var Q={mixins:[q,V,G],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel({selPanel:t},s){return e.$(t,s)},transitionElement(){return this.panel},bgClose({bgClose:t}){return t&&this.panel}},connected(){e.attr(this.panel||this.$el,"role",this.role),this.overlay&&e.attr(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){e.includes(m,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(t){const{current:s,defaultPrevented:i}=t,{hash:n}=s;!i&&n&&e.isSameSiteAnchor(s)&&!e.within(n,this.$el)&&e.$(n,document.body)?this.hide():e.matches(s,this.selClose)&&(t.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(t){t.defaultPrevented||(t.preventDefault(),this.isToggled()===e.includes(m,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(t){if(e.includes(m,this))return!1;!this.stack&&m.length?(Promise.all(m.map(s=>s.hide())).then(this.show),t.preventDefault()):m.push(this)}},{name:"show",self:!0,handler(){this.stack&&e.css(this.$el,"zIndex",e.toFloat(e.css(this.$el,"zIndex"))+m.length);const t=[this.overlay&&tt(this),this.overlay&&K(this.$el),this.bgClose&&et(this),this.escClose&&st(this)];e.once(this.$el,"hidden",()=>t.forEach(s=>s&&s()),{self:!0}),e.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){e.isFocusable(this.$el)||e.attr(this.$el,"tabindex","-1"),e.matches(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){e.includes(m,this)&&m.splice(m.indexOf(this),1),e.css(this.$el,"zIndex",""),m.some(t=>t.clsPage===this.clsPage)||e.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&e.parent(this.$el)!==this.container?(e.append(this.container,this.$el),new Promise(t=>requestAnimationFrame(()=>this.show().then(t)))):this.toggleElement(this.$el,!0,B)},hide(){return this.toggleElement(this.$el,!1,B)}}};function B(t,s,{transitionElement:i,_toggle:n}){return new Promise((r,a)=>e.once(t,"show hide",()=>{var h;(h=t._reject)==null||h.call(t),t._reject=a,n(t,s);const o=e.once(i,"transitionstart",()=>{e.once(i,"transitionend transitioncancel",r,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{o(),r()},Z(e.css(i,"transitionDuration")))})).then(()=>delete t._reject)}function Z(t){return t?e.endsWith(t,"ms")?e.toFloat(t):e.toFloat(t)*1e3:0}function tt(t){return e.on(document,"focusin",s=>{e.last(m)===t&&!e.within(s.target,t.$el)&&t.$el.focus()})}function et(t){return e.on(document,e.pointerDown,({target:s})=>{e.last(m)!==t||t.overlay&&!e.within(s,t.$el)||e.within(s,t.panel)||e.once(document,`${e.pointerUp} ${e.pointerCancel} scroll`,({defaultPrevented:i,type:n,target:r})=>{!i&&n===e.pointerUp&&s===r&&t.hide()},!0)})}function st(t){return e.on(document,"keydown",s=>{s.keyCode===27&&e.last(m)===t&&t.hide()})}function it(t,s,i,{animation:n,easing:r}){const{percent:a,translate:h,show:o=e.noop}=n,l=o(i);let c;return{dir:i,show(d,p=0,f){const $=f?"linear":r;return d-=Math.round(d*e.clamp(p,-1,1)),this.translate(p),T(s,"itemin",{percent:p,duration:d,timing:$,dir:i}),T(t,"itemout",{percent:1-p,duration:d,timing:$,dir:i}),new Promise(b=>{c||(c=b),Promise.all([e.Transition.start(s,l[1],d,$),e.Transition.start(t,l[0],d,$)]).then(()=>{this.reset(),c()},e.noop)})},cancel(){return e.Transition.cancel([s,t])},reset(){for(const d in l[0])e.css([s,t],d,"")},async forward(d,p=this.percent()){return await this.cancel(),this.show(d,p,!0)},translate(d){this.reset();const p=h(d,i);e.css(s,p[1]),e.css(t,p[0]),T(s,"itemtranslatein",{percent:d,dir:i}),T(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return a(t||s,s,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function T(t,s,i){e.trigger(t,e.createEvent(s,!1,!1,i))}var nt={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var i,n,r;let a=0;return((r=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:r.replace(/%s/g,()=>s[a++]||""))||""}}};const g={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function rt(t,s=[]){try{return t?e.startsWith(t,"{")?JSON.parse(t):s.length&&!e.includes(t,":")?{[s[0]]:t}:t.split(";").reduce((i,n)=>{const[r,a]=n.split(/:(.*)/);return r&&!e.isUndefined(a)&&(i[r.trim()]=a.trim()),i},{}):{}}catch{return{}}}function _(t,s=t.$el,i=""){if(s.id)return s.id;let n=`${t.$options.id}-${t._uid}${i}`;return e.$(`#${n}`)&&(n=_(t,s,`${i}-2`)),n}var ot={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav({selNav:t},s){return e.$(t,s)},navChildren(){return e.children(this.nav)},selNavItem({attrItem:t}){return`[${t}],[data-${t}]`},navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const i=e.data(s,this.attrItem),n=e.$("a,button",s)||s;let r,a=null;if(e.isNumeric(i)){const h=e.toNumber(i),o=this.slides[h];o&&(o.id||(o.id=_(this,o,`-item-${i}`)),a=o.id),r=this.t("slideX",e.toFloat(i)+1),e.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=_(this,this.list,"-items")),a=this.list.id),r=this.t(i);e.attr(n,{"aria-controls":a,"aria-label":e.attr(n,"aria-label")||r})}},slides(t){t.forEach((s,i)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let i=0;i<t;i++)e.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){e.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===g.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:i}=t,n=e.data(s,this.attrItem);if(!e.isNumeric(n))return;let r=i===g.HOME?0:i===g.END?"last":i===g.LEFT?"previous":i===g.RIGHT?"next":-1;~r&&(t.preventDefault(),this.show(r))}}],methods:{updateNav(){const t=this.getValidIndex();let s,i;for(const n of this.navItems){const r=e.data(n,this.attrItem),a=e.$("a,button",n)||n;if(e.isNumeric(r)){const o=e.toNumber(r)===t;e.toggleClass(n,this.clsActive,o),e.attr(a,{"aria-selected":o,tabindex:o?null:-1}),o&&(i=a),s||(s=e.matches(a,":focus"))}else e.toggleClass(n,"uk-invisible",this.finite&&(r==="previous"&&t===0||r==="next"&&t>=this.maxIndex));s&&i&&i.focus()}}}};const S={passive:!1,capture:!0},L={passive:!0,capture:!0},at="touchstart mousedown",N="touchmove mousemove",M="touchend touchcancel mouseup click input scroll";var ht={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=i=>{const n=e.getEventPos(i).x*(e.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(i)}}},events:[{name:at,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&ct(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:N,el(){return this.list},handler:e.noop,...S}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,N,this.move,S),e.on(document,M,this.end,L),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:i,prevIndex:n}=this,r=Math.abs(s),a=this.getIndex(n+this.dir),h=this._getDistance(n,a);for(;a!==n&&r>h;)this.drag-=h*this.dir,n=a,r-=h,a=this.getIndex(n+this.dir),h=this._getDistance(n,a);this.percent=r/h;const o=i[n],l=i[a],c=this.index!==a,d=n===a;let p;for(const f of[this.index,this.prevIndex])e.includes([a,n],f)||(e.trigger(i[f],"itemhidden",[this]),d&&(p=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||p)&&e.trigger(i[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=a,!d&&e.trigger(o,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!d&&l),c&&(!d&&e.trigger(o,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,N,this.move,S),e.off(document,M,this.end,L),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function ct(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}var dt={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};function lt(t){return pt(e.observeResize,t,"resize")}function pt(t,s,i){return{observe:t,handler(){this.$emit(i)},...s}}var mt={mixins:[dt,ht,ot,nt],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:t},s){return ft(s.offsetWidth/t)},list({selList:t},s){return e.$(t,s)},maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:lt(),methods:{show(t,s=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,r=s?0:n.length,a=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](t),!s&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const h=this.getIndex(this.index),o=e.hasClass(this.slides,this.clsActive)&&this.slides[h],l=this.getIndex(t,this.index),c=this.slides[l];if(o===c){a();return}if(this.dir=gt(t,h),this.prevIndex=h,this.index=l,o&&!e.trigger(o,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,o])){this.index=this.prevIndex,a();return}const d=this._show(o,c,s).then(()=>{o&&e.trigger(o,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return o&&e.trigger(o,"itemhide",[this]),e.trigger(c,"itemshow",[this]),d},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,i){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:i?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!i&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,i=this.index){const n=this._getTransitioner(s===i?!1:s,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,s=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,i*(e.isRtl?-1:1),n)}}};function gt(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function ft(t){return .5*t+300}var ut={mixins:[mt],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:v,Transitioner:it},computed:{animation({animation:t,Animations:s}){return{...s[t]||s.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){e.addClass(t,this.clsActive)},itemshown({target:t}){e.addClass(t,this.clsActivated)},itemhidden({target:t}){e.removeClass(t,this.clsActive,this.clsActivated)}}},vt={mixins:[Q,ut],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:O,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const t=e.$(this.template),s=e.$(this.selList,t);this.items.forEach(()=>e.append(s,"<li>"));const i=e.$("[uk-close]",t),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(e.append(this.container,t))},computed:{caption({selCaption:t},s){return e.$(t,s)}},events:[{name:`${e.pointerMove} ${e.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(t){t.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),e.removeClass(this.slides,this.clsActive),e.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler({keyCode:t}){if(!this.isToggled(this.$el)||!this.draggable)return;let s=-1;t===g.LEFT?s="previous":t===g.RIGHT?s="next":t===g.HOME?s=0:t===g.END&&(s="last"),~s&&this.show(s)}},{name:"beforeitemshow",handler(t){this.isToggled()||(this.draggable=!1,t.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=O.scale,e.removeClass(t.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){e.html(this.caption,this.getItem().caption||"");for(let t=-this.preload;t<=this.preload;t++)this.loadItem(this.index+t)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(t,s){const{source:i,type:n,alt:r="",poster:a,attrs:h={}}=s;if(this.setItem(s,"<span uk-spinner></span>"),!i)return;let o;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(n==="image"||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const c=x("img",{src:i,alt:r,...h});e.on(c,"load",()=>this.setItem(s,c)),e.on(c,"error",()=>this.setError(s))}else if(n==="video"||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=x("video",{src:i,poster:a,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...h});e.on(c,"loadedmetadata",()=>this.setItem(s,c)),e.on(c,"error",()=>this.setError(s))}else if(n==="iframe"||i.match(/\.(html|php)($|\?)/i))this.setItem(s,x("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...h}));else if(o=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(s,x("iframe",{src:`https://www.youtube${o[1]||""}.com/embed/${o[2]}${o[3]?`?${o[3]}`:""}`,width:1920,height:1080,...l,...h}));else if(o=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:d}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(s,x("iframe",{src:`https://player.vimeo.com/video/${o[1]}${o[2]?`?${o[2]}`:""}`,width:d,height:c,...l,...h}))}catch{this.setError(s)}}}],methods:{loadItem(t=this.index){const s=this.getItem(t);this.getSlide(s).childElementCount||e.trigger(this.$el,"itemload",[s])},getItem(t=this.index){return this.items[e.getIndex(t,this.slides)]},setItem(t,s){e.trigger(this.$el,"itemloaded",[this,e.html(this.getSlide(t),s)])},getSlide(t){return this.slides[this.items.indexOf(t)]},setError(t){this.setItem(t,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),e.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){e.removeClass(this.$el,"uk-active","uk-transition-active")}}};function x(t,s){const i=e.fragment(`<${t}>`);return e.attr(i,s),i}var F={install:bt,props:{toggle:String},data:{toggle:"a"},computed:{toggles({toggle:t},s){return e.$$(t,s)}},watch:{toggles(t){this.hide();for(const s of t)e.isTag(s,"a")&&e.attr(s,"role","button")}},disconnected(){this.hide()},events:{name:"click",delegate(){return`${this.toggle}:not(.uk-disabled)`},handler(t){t.preventDefault(),this.show(t.current)}},methods:{show(t){const s=e.uniqueBy(this.toggles.map(H),"source");if(e.isElement(t)){const{source:i}=H(t);t=e.findIndex(s,({source:n})=>i===n)}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:s}),e.on(this.panel.$el,"hidden",()=>this.panel=null),this.panel.show(t)},hide(){var t;return(t=this.panel)==null?void 0:t.hide()}}};function bt(t,s){t.lightboxPanel||t.component("lightboxPanel",vt),e.assign(s.props,t.component("lightboxPanel").options.props)}function H(t){const s={};for(const i of["href","caption","type","poster","alt","attrs"])s[i==="href"?"source":i]=e.data(t,i);return s.attrs=rt(s.attrs),s}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",F),F});
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,w){typeof exports=="object"&&typeof module<"u"?module.exports=w(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox",["uikit-util"],w):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitLightbox=w(e.UIkit.util))})(this,function(e){"use strict";function w(t,s=[]){try{return t?e.startsWith(t,"{")?JSON.parse(t):s.length&&!e.includes(t,":")?{[s[0]]:t}:t.split(";").reduce((i,n)=>{const[r,o]=n.split(/:(.*)/);return r&&!e.isUndefined(o)&&(i[r.trim()]=o.trim()),i},{}):{}}catch{return{}}}var q={connected(){e.addClass(this.$el,this.$options.id)}},V={props:{container:Boolean},data:{container:!0},computed:{container({container:t}){return t===!0&&this.$container||t&&e.$(t)}}};let E;function G(t){const s=e.on(t,"touchmove",n=>{if(n.targetTouches.length!==1||e.matches(n.target,'input[type="range"'))return;let{scrollHeight:r,clientHeight:o}=e.scrollParent(n.target);o>=r&&n.cancelable&&n.preventDefault()},{passive:!1});if(E)return s;E=!0;const{scrollingElement:i}=document;return e.css(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:e.width(window)-i.clientWidth||""}),()=>{E=!1,s(),e.css(i,{overflowY:"",touchAction:"",paddingRight:""})}}var X={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:t}){return!!t[0]},hasTransition({animation:t}){return["slide","reveal"].some(s=>e.startsWith(t[0],s))}},methods:{async toggleElement(t,s,i){try{return await Promise.all(e.toNodes(t).map(n=>{const r=e.isBoolean(s)?s:!this.isToggled(n);if(!e.trigger(n,"before".concat(r?"show":"hide"),[this]))return Promise.reject();const o=(e.isFunction(i)?i:i===!1||!this.hasAnimation?Y:this.hasTransition?J:K)(n,r,this),h=r?this.clsEnter:this.clsLeave;e.addClass(n,h),e.trigger(n,r?"show":"hide",[this]);const a=()=>{e.removeClass(n,h),e.trigger(n,r?"shown":"hidden",[this])};return o?o.then(a,()=>(e.removeClass(n,h),Promise.reject())):a()})),!0}catch{return!1}},isToggled(t=this.$el){return t=e.toNode(t),e.hasClass(t,this.clsEnter)?!0:e.hasClass(t,this.clsLeave)?!1:this.cls?e.hasClass(t,this.cls.split(" ")[0]):e.isVisible(t)},_toggle(t,s){if(!t)return;s=!!s;let i;this.cls?(i=e.includes(this.cls," ")||s!==e.hasClass(t,this.cls),i&&e.toggleClass(t,this.cls,e.includes(this.cls," ")?void 0:s)):(i=s===t.hidden,i&&(t.hidden=!s)),e.$$("[autofocus]",t).some(n=>e.isVisible(n)?n.focus()||!0:n.blur()),i&&e.trigger(t,"toggled",[s,this])}}};function Y(t,s,{_toggle:i}){return e.Animation.cancel(t),e.Transition.cancel(t),i(t,s)}async function J(t,s,{animation:i,duration:n,velocity:r,transition:o,_toggle:h}){var a;const[l="reveal",c="top"]=((a=i[0])==null?void 0:a.split("-"))||[],d=[["left","right"],["top","bottom"]],p=d[e.includes(d[0],c)?0:1],f=p[1]===c,v=["width","height"][d.indexOf(p)],b="margin-".concat(p[0]),A="margin-".concat(c);let I=e.dimensions(t)[v];const wt=e.Transition.inProgress(t);await e.Transition.cancel(t),s&&h(t,!0);const xt=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",b,A].map(U=>[U,t.style[U]])),y=e.dimensions(t),D=e.toFloat(e.css(t,b)),z=e.toFloat(e.css(t,A)),u=y[v]+z;!wt&&!s&&(I+=z);const[P]=e.wrapInner(t,"<div>");e.css(P,{boxSizing:"border-box",height:y.height,width:y.width,...e.css(t,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",A])}),e.css(t,{padding:0,border:0,minWidth:0,minHeight:0,[A]:0,width:y.width,height:y.height,overflow:"hidden",[v]:I});const R=I/u;n=(r*u+n)*(s?1-R:R);const W={[v]:s?u:0};f&&(e.css(t,b,u-I+D),W[b]=s?D:u+D),!f^l==="reveal"&&(e.css(P,b,-u+I),e.Transition.start(P,{[b]:s?0:-u},n,o));try{await e.Transition.start(t,W,n,o)}finally{e.css(t,xt),e.unwrap(P.firstChild),s||h(t,!1)}}function K(t,s,i){e.Animation.cancel(t);const{animation:n,duration:r,_toggle:o}=i;return s?(o(t,!0),e.Animation.in(t,n[0],r,i.origin)):e.Animation.out(t,n[1]||n[0],r,i.origin).then(()=>o(t,!1))}const m=[];var Q={mixins:[q,V,X],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel({selPanel:t},s){return e.$(t,s)},transitionElement(){return this.panel},bgClose({bgClose:t}){return t&&this.panel}},connected(){e.attr(this.panel||this.$el,"role",this.role),this.overlay&&e.attr(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){e.includes(m,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return"".concat(this.selClose,',a[href*="#"]')},handler(t){const{current:s,defaultPrevented:i}=t,{hash:n}=s;!i&&n&&e.isSameSiteAnchor(s)&&!e.within(n,this.$el)&&e.$(n,document.body)?this.hide():e.matches(s,this.selClose)&&(t.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(t){t.defaultPrevented||(t.preventDefault(),this.isToggled()===e.includes(m,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(t){if(e.includes(m,this))return!1;!this.stack&&m.length?(Promise.all(m.map(s=>s.hide())).then(this.show),t.preventDefault()):m.push(this)}},{name:"show",self:!0,handler(){this.stack&&e.css(this.$el,"zIndex",e.toFloat(e.css(this.$el,"zIndex"))+m.length);const t=[this.overlay&&tt(this),this.overlay&&G(this.$el),this.bgClose&&et(this),this.escClose&&st(this)];e.once(this.$el,"hidden",()=>t.forEach(s=>s&&s()),{self:!0}),e.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){e.isFocusable(this.$el)||e.attr(this.$el,"tabindex","-1"),e.matches(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){e.includes(m,this)&&m.splice(m.indexOf(this),1),e.css(this.$el,"zIndex",""),m.some(t=>t.clsPage===this.clsPage)||e.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&e.parent(this.$el)!==this.container?(e.append(this.container,this.$el),new Promise(t=>requestAnimationFrame(()=>this.show().then(t)))):this.toggleElement(this.$el,!0,O)},hide(){return this.toggleElement(this.$el,!1,O)}}};function O(t,s,{transitionElement:i,_toggle:n}){return new Promise((r,o)=>e.once(t,"show hide",()=>{var h;(h=t._reject)==null||h.call(t),t._reject=o,n(t,s);const a=e.once(i,"transitionstart",()=>{e.once(i,"transitionend transitioncancel",r,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{a(),r()},Z(e.css(i,"transitionDuration")))})).then(()=>delete t._reject)}function Z(t){return t?e.endsWith(t,"ms")?e.toFloat(t):e.toFloat(t)*1e3:0}function tt(t){return e.on(document,"focusin",s=>{e.last(m)===t&&!e.within(s.target,t.$el)&&t.$el.focus()})}function et(t){return e.on(document,e.pointerDown,({target:s})=>{e.last(m)!==t||t.overlay&&!e.within(s,t.$el)||e.within(s,t.panel)||e.once(document,"".concat(e.pointerUp," ").concat(e.pointerCancel," scroll"),({defaultPrevented:i,type:n,target:r})=>{!i&&n===e.pointerUp&&s===r&&t.hide()},!0)})}function st(t){return e.on(document,"keydown",s=>{s.keyCode===27&&e.last(m)===t&&t.hide()})}var B={slide:{show(t){return[{transform:$(t*-100)},{transform:$()}]},percent(t){return it(t)},translate(t,s){return[{transform:$(s*-100*t)},{transform:$(s*100*(1-t))}]}}};function it(t){return Math.abs(e.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function $(t=0,s="%"){return t+=t?s:"","translate3d(".concat(t,", 0, 0)")}function C(t){return"scale3d(".concat(t,", ").concat(t,", 1)")}function nt(t,s,i,{animation:n,easing:r}){const{percent:o,translate:h,show:a=e.noop}=n,l=a(i);let c;return{dir:i,show(d,p=0,f){const k=f?"linear":r;return d-=Math.round(d*e.clamp(p,-1,1)),this.translate(p),T(s,"itemin",{percent:p,duration:d,timing:k,dir:i}),T(t,"itemout",{percent:1-p,duration:d,timing:k,dir:i}),new Promise(v=>{c||(c=v),Promise.all([e.Transition.start(s,l[1],d,k),e.Transition.start(t,l[0],d,k)]).then(()=>{this.reset(),c()},e.noop)})},cancel(){return e.Transition.cancel([s,t])},reset(){for(const d in l[0])e.css([s,t],d,"")},async forward(d,p=this.percent()){return await this.cancel(),this.show(d,p,!0)},translate(d){this.reset();const p=h(d,i);e.css(s,p[1]),e.css(t,p[0]),T(s,"itemtranslatein",{percent:d,dir:i}),T(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return o(t||s,s,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function T(t,s,i){e.trigger(t,e.createEvent(s,!1,!1,i))}function rt(t){return ot(e.observeResize,t,"resize")}function ot(t,s,i){return{observe:t,handler(){this.$emit(i)},...s}}var at={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var i,n,r;let o=0;return((r=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:r.replace(/%s/g,()=>s[o++]||""))||""}}},ht={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const _={passive:!1,capture:!0},L={passive:!0,capture:!0},ct="touchstart mousedown",S="touchmove mousemove",M="touchend touchcancel mouseup click input scroll";var dt={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=i=>{const n=e.getEventPos(i).x*(e.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(i)}}},events:[{name:ct,passive:!0,delegate(){return"".concat(this.selList," > *")},handler(t){!this.draggable||!e.isTouch(t)&<(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:S,el(){return this.list},handler:e.noop,..._}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,S,this.move,_),e.on(document,M,this.end,L),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:i,prevIndex:n}=this,r=Math.abs(s),o=this.getIndex(n+this.dir),h=this._getDistance(n,o);for(;o!==n&&r>h;)this.drag-=h*this.dir,n=o,r-=h,o=this.getIndex(n+this.dir),h=this._getDistance(n,o);this.percent=r/h;const a=i[n],l=i[o],c=this.index!==o,d=n===o;let p;for(const f of[this.index,this.prevIndex])e.includes([o,n],f)||(e.trigger(i[f],"itemhidden",[this]),d&&(p=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||p)&&e.trigger(i[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=o,!d&&e.trigger(a,"beforeitemhide",[this]),e.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!d&&l),c&&(!d&&e.trigger(a,"itemhide",[this]),e.trigger(l,"itemshow",[this]))},end(){if(e.off(document,S,this.move,_),e.off(document,M,this.end,L),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function lt(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}function N(t,s=t.$el,i=""){if(s.id)return s.id;let n="".concat(t.$options.id,"-").concat(t._uid).concat(i);return e.$("#".concat(n))&&(n=N(t,s,"".concat(i,"-2"))),n}const g={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var pt={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav({selNav:t},s){return e.$(t,s)},navChildren(){return e.children(this.nav)},selNavItem({attrItem:t}){return"[".concat(t,"],[data-").concat(t,"]")},navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const i=e.data(s,this.attrItem),n=e.$("a,button",s)||s;let r,o=null;if(e.isNumeric(i)){const h=e.toNumber(i),a=this.slides[h];a&&(a.id||(a.id=N(this,a,"-item-".concat(i))),o=a.id),r=this.t("slideX",e.toFloat(i)+1),e.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=N(this,this.list,"-items")),o=this.list.id),r=this.t(i);e.attr(n,{"aria-controls":o,"aria-label":e.attr(n,"aria-label")||r})}},slides(t){t.forEach((s,i)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let i=0;i<t;i++)e.append(this.nav,"<li ".concat(this.attrItem,'="').concat(i,'"><a href></a></li>'))}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){e.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===g.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:i}=t,n=e.data(s,this.attrItem);if(!e.isNumeric(n))return;let r=i===g.HOME?0:i===g.END?"last":i===g.LEFT?"previous":i===g.RIGHT?"next":-1;~r&&(t.preventDefault(),this.show(r))}}],methods:{updateNav(){const t=this.getValidIndex();let s;for(const i of this.navItems){const n=e.data(i,this.attrItem),r=e.$("a,button",i)||i;if(e.isNumeric(n)){const h=e.toNumber(n)===t;e.toggleClass(i,this.clsActive,h),e.attr(r,{"aria-selected":h,tabindex:h?null:-1}),h&&(s||(s=e.matches(e.parent(i),":focus-within")&&r))}else e.toggleClass(i,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex));s&&e.isInView(s)&&s.focus()}}}},mt={mixins:[ht,dt,pt,at],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:t},s){return ft(s.offsetWidth/t)},list({selList:t},s){return e.$(t,s)},maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:rt(),methods:{show(t,s=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,r=s?0:n.length,o=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](t),!s&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const h=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[h],l=this.getIndex(t,this.index),c=this.slides[l];if(a===c){o();return}if(this.dir=gt(t,h),this.prevIndex=h,this.index=l,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,a])){this.index=this.prevIndex,o();return}const d=this._show(a,c,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(c,"itemshow",[this]),d},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,i){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:i?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!i&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,i=this.index){const n=this._getTransitioner(s===i?!1:s,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,s=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,i*(e.isRtl?-1:1),n)}}};function gt(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function ft(t){return .5*t+300}var ut={mixins:[mt],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:B,Transitioner:nt},computed:{animation({animation:t,Animations:s}){return{...s[t]||s.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){e.addClass(t,this.clsActive)},itemshown({target:t}){e.addClass(t,this.clsActivated)},itemhidden({target:t}){e.removeClass(t,this.clsActive,this.clsActivated)}}},F={...B,fade:{show(){return[{opacity:0},{opacity:1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t},{opacity:t}]}},scale:{show(){return[{opacity:0,transform:C(1-.2)},{opacity:1,transform:C(1)}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:C(1-.2*t)},{opacity:t,transform:C(1-.2+.2*t)}]}}},vt={mixins:[Q,ut],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:F,template:'<div class="uk-lightbox uk-overflow-hidden">\n <ul class="uk-lightbox-items"></ul>\n <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque">\n <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button>\n </div>\n <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a>\n <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a>\n <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div>\n </div>'}),created(){const t=e.$(this.template),s=e.$(this.selList,t);this.items.forEach(()=>e.append(s,"<li>"));const i=e.$("[uk-close]",t),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(e.append(this.container,t))},computed:{caption({selCaption:t},s){return e.$(t,s)}},events:[{name:"".concat(e.pointerMove," ").concat(e.pointerDown," keydown"),handler:"showControls"},{name:"click",self:!0,delegate(){return"".concat(this.selList," > *")},handler(t){t.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),e.removeClass(this.slides,this.clsActive),e.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler({keyCode:t}){if(!this.isToggled(this.$el)||!this.draggable)return;let s=-1;t===g.LEFT?s="previous":t===g.RIGHT?s="next":t===g.HOME?s=0:t===g.END&&(s="last"),~s&&this.show(s)}},{name:"beforeitemshow",handler(t){this.isToggled()||(this.draggable=!1,t.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=F.scale,e.removeClass(t.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){e.html(this.caption,this.getItem().caption||"");for(let t=-this.preload;t<=this.preload;t++)this.loadItem(this.index+t)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(t,s){const{source:i,type:n,alt:r="",poster:o,attrs:h={}}=s;if(this.setItem(s,"<span uk-spinner></span>"),!i)return;let a;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":"".concat(this.videoAutoplay)};if(n==="image"||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const c=x("img",{src:i,alt:r,...h});e.on(c,"load",()=>this.setItem(s,c)),e.on(c,"error",()=>this.setError(s))}else if(n==="video"||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=x("video",{src:i,poster:o,controls:"",playsinline:"","uk-video":"".concat(this.videoAutoplay),...h});e.on(c,"loadedmetadata",()=>this.setItem(s,c)),e.on(c,"error",()=>this.setError(s))}else if(n==="iframe"||i.match(/\.(html|php)($|\?)/i))this.setItem(s,x("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...h}));else if(a=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(s,x("iframe",{src:"https://www.youtube".concat(a[1]||"",".com/embed/").concat(a[2]).concat(a[3]?"?".concat(a[3]):""),width:1920,height:1080,...l,...h}));else if(a=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:d}=await(await fetch("https://vimeo.com/api/oembed.json?maxwidth=1920&url=".concat(encodeURI(i)),{credentials:"omit"})).json();this.setItem(s,x("iframe",{src:"https://player.vimeo.com/video/".concat(a[1]).concat(a[2]?"?".concat(a[2]):""),width:d,height:c,...l,...h}))}catch{this.setError(s)}}}],methods:{loadItem(t=this.index){const s=this.getItem(t);this.getSlide(s).childElementCount||e.trigger(this.$el,"itemload",[s])},getItem(t=this.index){return this.items[e.getIndex(t,this.slides)]},setItem(t,s){e.trigger(this.$el,"itemloaded",[this,e.html(this.getSlide(t),s)])},getSlide(t){return this.slides[this.items.indexOf(t)]},setError(t){this.setItem(t,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),e.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){e.removeClass(this.$el,"uk-active","uk-transition-active")}}};function x(t,s){const i=e.fragment("<".concat(t,">"));return e.attr(i,s),i}var H={install:bt,props:{toggle:String},data:{toggle:"a"},computed:{toggles({toggle:t},s){return e.$$(t,s)}},watch:{toggles(t){this.hide();for(const s of t)e.isTag(s,"a")&&e.attr(s,"role","button")}},disconnected(){this.hide()},events:{name:"click",delegate(){return"".concat(this.toggle,":not(.uk-disabled)")},handler(t){t.preventDefault(),this.show(t.current)}},methods:{show(t){const s=e.uniqueBy(this.toggles.map(j),"source");if(e.isElement(t)){const{source:i}=j(t);t=e.findIndex(s,({source:n})=>i===n)}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:s}),e.on(this.panel.$el,"hidden",()=>this.panel=null),this.panel.show(t)},hide(){var t;return(t=this.panel)==null?void 0:t.hide()}}};function bt(t,s){t.lightboxPanel||t.component("lightboxPanel",vt),e.assign(s.props,t.component("lightboxPanel").options.props)}function j(t){const s={};for(const i of["href","caption","type","poster","alt","attrs"])s[i==="href"?"source":i]=e.data(t,i);return s.attrs=w(s.attrs),s}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightbox",H),H});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -37,25 +37,25 @@
|
|
|
37
37
|
install,
|
|
38
38
|
computed: {
|
|
39
39
|
marginProp({ pos }) {
|
|
40
|
-
return
|
|
40
|
+
return "margin".concat(uikitUtil.startsWith(pos, "top") ? "Top" : "Bottom");
|
|
41
41
|
},
|
|
42
42
|
startProps() {
|
|
43
43
|
return { opacity: 0, [this.marginProp]: -this.$el.offsetHeight };
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
created() {
|
|
47
|
-
const posClass =
|
|
48
|
-
let container = uikitUtil.$(
|
|
47
|
+
const posClass = "".concat(this.clsContainer, "-").concat(this.pos);
|
|
48
|
+
let container = uikitUtil.$(".".concat(posClass), this.container);
|
|
49
49
|
if (!container || !uikitUtil.isVisible(container)) {
|
|
50
50
|
container = uikitUtil.append(
|
|
51
51
|
this.container,
|
|
52
|
-
|
|
52
|
+
'<div class="'.concat(this.clsContainer, " ").concat(posClass, '"></div>')
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
this.$mount(
|
|
56
56
|
uikitUtil.append(
|
|
57
57
|
container,
|
|
58
|
-
|
|
58
|
+
'<div class="'.concat(this.clsMsg).concat(this.status ? " ".concat(this.clsMsg, "-").concat(this.status) : "", '" role="alert">\n <a href class="').concat(this.clsClose, '" data-uk-close></a>\n <div>').concat(this.message, "</div>\n </div>")
|
|
59
59
|
)
|
|
60
60
|
);
|
|
61
61
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitnotification",["uikit-util"],o):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitNotification=o(t.UIkit.util))})(this,function(t){"use strict";var o={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},c={mixins:[o],functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",clsContainer:"uk-notification",clsClose:"uk-notification-close",clsMsg:"uk-notification-message"},install:r,computed:{marginProp({pos:s}){return"margin".concat(t.startsWith(s,"top")?"Top":"Bottom")},startProps(){return{opacity:0,[this.marginProp]:-this.$el.offsetHeight}}},created(){const s="".concat(this.clsContainer,"-").concat(this.pos);let e=t.$(".".concat(s),this.container);(!e||!t.isVisible(e))&&(e=t.append(this.container,'<div class="'.concat(this.clsContainer," ").concat(s,'"></div>'))),this.$mount(t.append(e,'<div class="'.concat(this.clsMsg).concat(this.status?" ".concat(this.clsMsg,"-").concat(this.status):"",'" role="alert">\n <a href class="').concat(this.clsClose,'" data-uk-close></a>\n <div>').concat(this.message,"</div>\n </div>")))},async connected(){const s=t.toFloat(t.css(this.$el,this.marginProp));await t.Transition.start(t.css(this.$el,this.startProps),{opacity:1,[this.marginProp]:s}),this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},events:{click(s){t.closest(s.target,'a[href="#"],a[href=""]')&&s.preventDefault(),this.close()},[t.pointerEnter](){this.timer&&clearTimeout(this.timer)},[t.pointerLeave](){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))}},methods:{async close(s){const e=n=>{const i=t.parent(n);t.trigger(n,"close",[this]),t.remove(n),i!=null&&i.hasChildNodes()||t.remove(i)};this.timer&&clearTimeout(this.timer),s||await t.Transition.start(this.$el,this.startProps),e(this.$el)}}};function r(s){s.notification.closeAll=function(e,n){t.apply(document.body,i=>{const a=s.getComponent(i,"notification");a&&(!e||e===a.group)&&a.close(n)})}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("notification",c),c});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -6,6 +6,37 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitParallax = factory(global.UIkit.util));
|
|
7
7
|
})(this, (function (uikitUtil) { 'use strict';
|
|
8
8
|
|
|
9
|
+
function resize(options) {
|
|
10
|
+
return observe(uikitUtil.observeResize, options, "resize");
|
|
11
|
+
}
|
|
12
|
+
function viewport() {
|
|
13
|
+
return observe((target, handler) => uikitUtil.observeViewportResize(handler));
|
|
14
|
+
}
|
|
15
|
+
function scroll(options) {
|
|
16
|
+
return observe(
|
|
17
|
+
(target, handler) => ({
|
|
18
|
+
disconnect: uikitUtil.on(target, "scroll", handler, {
|
|
19
|
+
passive: true,
|
|
20
|
+
capture: true
|
|
21
|
+
})
|
|
22
|
+
}),
|
|
23
|
+
{
|
|
24
|
+
target: () => document,
|
|
25
|
+
...options
|
|
26
|
+
},
|
|
27
|
+
"scroll"
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function observe(observe2, options, emit) {
|
|
31
|
+
return {
|
|
32
|
+
observe: observe2,
|
|
33
|
+
handler() {
|
|
34
|
+
this.$emit(emit);
|
|
35
|
+
},
|
|
36
|
+
...options
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
9
40
|
var Media = {
|
|
10
41
|
props: {
|
|
11
42
|
media: Boolean
|
|
@@ -37,12 +68,12 @@
|
|
|
37
68
|
function toMedia(value, element) {
|
|
38
69
|
if (uikitUtil.isString(value)) {
|
|
39
70
|
if (uikitUtil.startsWith(value, "@")) {
|
|
40
|
-
value = uikitUtil.toFloat(uikitUtil.css(element,
|
|
71
|
+
value = uikitUtil.toFloat(uikitUtil.css(element, "--uk-breakpoint-".concat(value.substr(1))));
|
|
41
72
|
} else if (isNaN(value)) {
|
|
42
73
|
return value;
|
|
43
74
|
}
|
|
44
75
|
}
|
|
45
|
-
return value && uikitUtil.isNumeric(value) ?
|
|
76
|
+
return value && uikitUtil.isNumeric(value) ? "(min-width: ".concat(value, "px)") : "";
|
|
46
77
|
}
|
|
47
78
|
|
|
48
79
|
function startsWith(str, search) {
|
|
@@ -85,6 +116,28 @@
|
|
|
85
116
|
return (key) => cache[key] || (cache[key] = fn(key));
|
|
86
117
|
}
|
|
87
118
|
|
|
119
|
+
function parent(element) {
|
|
120
|
+
var _a;
|
|
121
|
+
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
122
|
+
}
|
|
123
|
+
function filter(element, selector) {
|
|
124
|
+
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
125
|
+
}
|
|
126
|
+
function matches(element, selector) {
|
|
127
|
+
return toNodes(element).some((element2) => element2.matches(selector));
|
|
128
|
+
}
|
|
129
|
+
function closest(element, selector) {
|
|
130
|
+
return isElement(element) ? element.closest(startsWith(selector, ">") ? selector.slice(1) : selector) : toNodes(element).map((element2) => closest(element2, selector)).filter(Boolean);
|
|
131
|
+
}
|
|
132
|
+
function children(element, selector) {
|
|
133
|
+
element = toNode(element);
|
|
134
|
+
const children2 = element ? toArray(element.children) : [];
|
|
135
|
+
return selector ? filter(children2, selector) : children2;
|
|
136
|
+
}
|
|
137
|
+
function index(element, ref) {
|
|
138
|
+
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
139
|
+
}
|
|
140
|
+
|
|
88
141
|
function attr(element, name, value) {
|
|
89
142
|
var _a;
|
|
90
143
|
if (isObject(name)) {
|
|
@@ -112,28 +165,6 @@
|
|
|
112
165
|
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
113
166
|
}
|
|
114
167
|
|
|
115
|
-
function parent(element) {
|
|
116
|
-
var _a;
|
|
117
|
-
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
118
|
-
}
|
|
119
|
-
function filter(element, selector) {
|
|
120
|
-
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
121
|
-
}
|
|
122
|
-
function matches(element, selector) {
|
|
123
|
-
return toNodes(element).some((element2) => element2.matches(selector));
|
|
124
|
-
}
|
|
125
|
-
function closest(element, selector) {
|
|
126
|
-
return isElement(element) ? element.closest(startsWith(selector, ">") ? selector.slice(1) : selector) : toNodes(element).map((element2) => closest(element2, selector)).filter(Boolean);
|
|
127
|
-
}
|
|
128
|
-
function children(element, selector) {
|
|
129
|
-
element = toNode(element);
|
|
130
|
-
const children2 = element ? toArray(element.children) : [];
|
|
131
|
-
return selector ? filter(children2, selector) : children2;
|
|
132
|
-
}
|
|
133
|
-
function index(element, ref) {
|
|
134
|
-
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
168
|
function findAll(selector, context) {
|
|
138
169
|
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
139
170
|
}
|
|
@@ -166,7 +197,7 @@
|
|
|
166
197
|
sel = selectors.slice(1).join(" ");
|
|
167
198
|
}
|
|
168
199
|
if (ctx) {
|
|
169
|
-
selector +=
|
|
200
|
+
selector += "".concat(selector ? "," : "").concat(domPath(ctx), " ").concat(sel);
|
|
170
201
|
}
|
|
171
202
|
}
|
|
172
203
|
context = document;
|
|
@@ -186,12 +217,12 @@
|
|
|
186
217
|
while (element.parentNode) {
|
|
187
218
|
const id = attr(element, "id");
|
|
188
219
|
if (id) {
|
|
189
|
-
names.unshift(
|
|
220
|
+
names.unshift("#".concat(escape(id)));
|
|
190
221
|
break;
|
|
191
222
|
} else {
|
|
192
223
|
let { tagName } = element;
|
|
193
224
|
if (tagName !== "HTML") {
|
|
194
|
-
tagName +=
|
|
225
|
+
tagName += ":nth-child(".concat(index(element) + 1, ")");
|
|
195
226
|
}
|
|
196
227
|
names.unshift(tagName);
|
|
197
228
|
element = element.parentNode;
|
|
@@ -308,7 +339,7 @@
|
|
|
308
339
|
let unit = getUnit(stops) || { x: "px", y: "px", rotate: "deg" }[prop] || "";
|
|
309
340
|
let transformFn2;
|
|
310
341
|
if (prop === "x" || prop === "y") {
|
|
311
|
-
prop =
|
|
342
|
+
prop = "translate".concat(uikitUtil.ucfirst(prop));
|
|
312
343
|
transformFn2 = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === "px" ? 0 : 6));
|
|
313
344
|
} else if (prop === "scale") {
|
|
314
345
|
unit = "";
|
|
@@ -319,7 +350,7 @@
|
|
|
319
350
|
}
|
|
320
351
|
stops = parseStops(stops, transformFn2);
|
|
321
352
|
return (css2, percent) => {
|
|
322
|
-
css2.transform +=
|
|
353
|
+
css2.transform += " ".concat(prop, "(").concat(getValue(stops, percent)).concat(unit, ")");
|
|
323
354
|
};
|
|
324
355
|
}
|
|
325
356
|
function colorFn(prop, el, stops) {
|
|
@@ -333,7 +364,7 @@
|
|
|
333
364
|
value2 += p * (end[i] - value2);
|
|
334
365
|
return i === 3 ? uikitUtil.toFloat(value2) : parseInt(value2, 10);
|
|
335
366
|
}).join(",");
|
|
336
|
-
css2[prop] =
|
|
367
|
+
css2[prop] = "rgba(".concat(value, ")");
|
|
337
368
|
};
|
|
338
369
|
}
|
|
339
370
|
function parseColor(el, color) {
|
|
@@ -348,7 +379,7 @@
|
|
|
348
379
|
stops = parseStops(stops);
|
|
349
380
|
return (css2, percent) => {
|
|
350
381
|
const value = getValue(stops, percent);
|
|
351
|
-
css2.filter +=
|
|
382
|
+
css2.filter += " ".concat(prop, "(").concat(value + unit, ")");
|
|
352
383
|
};
|
|
353
384
|
}
|
|
354
385
|
function cssPropFn(prop, el, stops) {
|
|
@@ -414,30 +445,30 @@
|
|
|
414
445
|
const max = Math.max(...values);
|
|
415
446
|
const down = values.indexOf(min) < values.indexOf(max);
|
|
416
447
|
const diff = max - min;
|
|
417
|
-
positions[prop2] =
|
|
448
|
+
positions[prop2] = "".concat((down ? -diff : 0) - (down ? min : max), "px");
|
|
418
449
|
dimEl[prop2 === "bgy" ? "height" : "width"] += diff;
|
|
419
450
|
}
|
|
420
451
|
const dim = uikitUtil.Dimensions.cover(dimImage, dimEl);
|
|
421
452
|
for (const prop2 of bgProps) {
|
|
422
453
|
const attr = prop2 === "bgy" ? "height" : "width";
|
|
423
454
|
const overflow = dim[attr] - dimEl[attr];
|
|
424
|
-
positions[prop2] =
|
|
455
|
+
positions[prop2] = "max(".concat(getBackgroundPos(el, prop2), ",-").concat(overflow, "px) + ").concat(positions[prop2]);
|
|
425
456
|
}
|
|
426
457
|
const fn = setBackgroundPosFn(bgProps, positions, props2);
|
|
427
458
|
return (css2, percent) => {
|
|
428
459
|
fn(css2, percent);
|
|
429
|
-
css2.backgroundSize =
|
|
460
|
+
css2.backgroundSize = "".concat(dim.width, "px ").concat(dim.height, "px");
|
|
430
461
|
css2.backgroundRepeat = "no-repeat";
|
|
431
462
|
};
|
|
432
463
|
}
|
|
433
464
|
function getBackgroundPos(el, prop) {
|
|
434
|
-
return getCssValue(el,
|
|
465
|
+
return getCssValue(el, "background-position-".concat(prop.substr(-1)), "");
|
|
435
466
|
}
|
|
436
467
|
function setBackgroundPosFn(bgProps, positions, props2) {
|
|
437
468
|
return function(css2, percent) {
|
|
438
469
|
for (const prop of bgProps) {
|
|
439
470
|
const value = getValue(props2[prop], percent);
|
|
440
|
-
css2[
|
|
471
|
+
css2["background-position-".concat(prop.substr(-1))] = "calc(".concat(positions[prop], " + ").concat(value, "px)");
|
|
441
472
|
}
|
|
442
473
|
};
|
|
443
474
|
}
|
|
@@ -538,37 +569,6 @@
|
|
|
538
569
|
}, {});
|
|
539
570
|
}
|
|
540
571
|
|
|
541
|
-
function resize(options) {
|
|
542
|
-
return observe(uikitUtil.observeResize, options, "resize");
|
|
543
|
-
}
|
|
544
|
-
function viewport() {
|
|
545
|
-
return observe((target, handler) => uikitUtil.observeViewportResize(handler));
|
|
546
|
-
}
|
|
547
|
-
function scroll(options) {
|
|
548
|
-
return observe(
|
|
549
|
-
(target, handler) => ({
|
|
550
|
-
disconnect: uikitUtil.on(target, "scroll", handler, {
|
|
551
|
-
passive: true,
|
|
552
|
-
capture: true
|
|
553
|
-
})
|
|
554
|
-
}),
|
|
555
|
-
{
|
|
556
|
-
target: () => document,
|
|
557
|
-
...options
|
|
558
|
-
},
|
|
559
|
-
"scroll"
|
|
560
|
-
);
|
|
561
|
-
}
|
|
562
|
-
function observe(observe2, options, emit) {
|
|
563
|
-
return {
|
|
564
|
-
observe: observe2,
|
|
565
|
-
handler() {
|
|
566
|
-
this.$emit(emit);
|
|
567
|
-
},
|
|
568
|
-
...options
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
|
|
572
572
|
var Component = {
|
|
573
573
|
mixins: [Parallax],
|
|
574
574
|
props: {
|
|
@@ -595,7 +595,7 @@
|
|
|
595
595
|
},
|
|
596
596
|
end({ end, viewport: viewport2 }) {
|
|
597
597
|
return uikitUtil.toPx(
|
|
598
|
-
end || (viewport2 = (1 - viewport2) * 100) &&
|
|
598
|
+
end || (viewport2 = (1 - viewport2) * 100) && "".concat(viewport2, "vh+").concat(viewport2, "%"),
|
|
599
599
|
"height",
|
|
600
600
|
this.target,
|
|
601
601
|
true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(c,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],b):(c=typeof globalThis<"u"?globalThis:c||self,c.UIkitParallax=b(c.UIkit.util))})(this,function(c){"use strict";function b(n){return O(c.observeResize,n,"resize")}function X(){return O((n,t)=>c.observeViewportResize(t))}function Y(n){return O((t,e)=>({disconnect:c.on(t,"scroll",e,{passive:!0,capture:!0})}),{target:()=>document,...n},"scroll")}function O(n,t,e){return{observe:n,handler(){this.$emit(e)},...t}}var Z={props:{media:Boolean},data:{media:!1},connected(){const n=k(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,c.trigger(this.$el,c.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=c.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function k(n,t){if(c.isString(n)){if(c.startsWith(n,"@"))n=c.toFloat(c.css(t,"--uk-breakpoint-".concat(n.substr(1))));else if(isNaN(n))return n}return n&&c.isNumeric(n)?"(min-width: ".concat(n,"px)"):""}function E(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:Rn,from:U}=Array;function nn(n){return typeof n=="function"}function $(n){return n!==null&&typeof n=="object"}function tn(n){return $(n)&&n===n.window}function I(n){return R(n)>=1}function en(n){return R(n)===1}function R(n){return!tn(n)&&$(n)&&n.nodeType}function j(n){return typeof n=="string"}function rn(n){return n===void 0}function x(n){return u(n)[0]}function u(n){return I(n)?[n]:Array.from(n||[]).filter(I)}function P(n){const t=Object.create(null);return e=>t[e]||(t[e]=n(e))}function T(n){var t;return(t=x(n))==null?void 0:t.parentElement}function on(n,t){return u(n).filter(e=>W(e,t))}function W(n,t){return u(n).some(e=>e.matches(t))}function _(n,t){return en(n)?n.closest(E(t,">")?t.slice(1):t):u(n).map(e=>_(e,t)).filter(Boolean)}function cn(n,t){n=x(n);const e=n?U(n.children):[];return t?on(e,t):e}function sn(n,t){return t?u(n).indexOf(x(t)):cn(T(n)).indexOf(n)}function N(n,t,e){var o;if($(t)){for(const r in t)N(n,r,t[r]);return}if(rn(e))return(o=x(n))==null?void 0:o.getAttribute(t);for(const r of u(n))nn(e)&&(e=e.call(r,N(r,t))),e===null?an(r,t):r.setAttribute(t,e)}function an(n,t){u(n).forEach(e=>e.removeAttribute(t))}function fn(n,t){return u(gn(n,x(t),"querySelectorAll"))}const un=/(^|[^\\],)\s*[!>+~-]/,dn=P(n=>n.match(un)),hn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,ln=P(n=>n.replace(hn,"$1 *"));function gn(n,t=document,e){if(!n||!j(n))return n;if(n=ln(n),dn(n)){const o=bn(n);n="";for(let r of o){let i=t;if(r[0]==="!"){const a=r.substr(1).trim().split(" ");if(i=_(T(t),a[0]),r=a.slice(1).join(" ").trim(),!r.length&&o.length===1)return i}if(r[0]==="-"){const a=r.substr(1).trim().split(" "),s=(i||t).previousElementSibling;i=W(s,r.substr(1))?s:null,r=a.slice(1).join(" ")}i&&(n+="".concat(n?",":"").concat(xn(i)," ").concat(r))}t=document}try{return t[e](n)}catch{return null}}const mn=/.*?[^\\](?:,|$)/g,bn=P(n=>n.match(mn).map(t=>t.replace(/,$/,"").trim()));function xn(n){const t=[];for(;n.parentNode;){const e=N(n,"id");if(e){t.unshift("#".concat(pn(e)));break}else{let{tagName:o}=n;o!=="HTML"&&(o+=":nth-child(".concat(sn(n)+1,")")),t.unshift(o),n=n.parentNode}}return t.join(" > ")}function pn(n){return j(n)?CSS.escape(n):""}const yn=/^\s*<(\w+|!)[^>]*>/,wn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function vn(n){const t=wn.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("div");return yn.test(n)?e.insertAdjacentHTML("beforeend",n.trim()):e.textContent=n,Sn(e.childNodes)}function Sn(n){return n.length>1?n:n[0]}function Fn(n,t){return Mn(n)?u(vn(n)):fn(n,t)}function Mn(n){return j(n)&&E(n.trim(),"<")}function On(n){return Math.ceil(Math.max(0,...Fn("[stroke]",n).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const v={x:S,y:S,rotate:S,scale:S,color:C,backgroundColor:C,borderColor:C,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Pn,stroke:Nn,bgx:D,bgy:D},{keys:B}=Object;var $n={mixins:[Z],props:V(B(v),"list"),data:V(B(v),void 0),computed:{props(n,t){const e={};for(const r in n)r in v&&!c.isUndefined(n[r])&&(e[r]=n[r].slice());const o={};for(const r in e)o[r]=v[r](r,t,e[r],e);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))c.css(this.$el,n,"")},getCss(n){const t={transform:"",filter:""};for(const e in this.props)this.props[e](t,c.clamp(n));return t.willChange=Object.keys(t).filter(e=>t[e]!=="").map(c.propName).join(","),t}}};function S(n,t,e){let o=M(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",r;return n==="x"||n==="y"?(n="translate".concat(c.ucfirst(n)),r=i=>c.toFloat(c.toFloat(i).toFixed(o==="px"?0:6))):n==="scale"&&(o="",r=i=>M([i])?c.toPx(i,"width",t,!0)/t.offsetWidth:i),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,r),(i,a)=>{i.transform+=" ".concat(n,"(").concat(p(e,a)).concat(o,")")}}function C(n,t,e){return e.length===1&&e.unshift(y(t,n,"")),e=m(e,o=>jn(t,o)),(o,r)=>{const[i,a,s]=L(e,r),h=i.map((l,f)=>(l+=s*(a[f]-l),f===3?c.toFloat(l):parseInt(l,10))).join(",");o[n]="rgba(".concat(h,")")}}function jn(n,t){return y(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(c.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const o=M(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(r,i)=>{const a=p(e,i);r.filter+=" ".concat(n,"(").concat(a+o,")")}}function Pn(n,t,e){return e.length===1&&e.unshift(y(t,n,"")),e=m(e),(o,r)=>{o[n]=p(e,r)}}function Nn(n,t,e){e.length===1&&e.unshift(0);const o=M(e),r=On(t);return e=m(e.reverse(),i=>(i=c.toFloat(i),o==="%"?i*r/100:i)),e.some(([i])=>i)?(c.css(t,"strokeDasharray",r),(i,a)=>{i.strokeDashoffset=p(e,a)}):c.noop}function D(n,t,e,o){e.length===1&&e.unshift(0);const r=n==="bgy"?"height":"width";o[n]=m(e,s=>c.toPx(s,r,t));const i=["bgx","bgy"].filter(s=>s in o);if(i.length===2&&n==="bgx")return c.noop;if(y(t,"backgroundSize","")==="cover")return Cn(n,t,e,o);const a={};for(const s of i)a[s]=H(t,s);return q(i,a,o)}function Cn(n,t,e,o){const r=zn(t);if(!r.width)return c.noop;const i={width:t.offsetWidth,height:t.offsetHeight},a=["bgx","bgy"].filter(f=>f in o),s={};for(const f of a){const d=o[f].map(([In])=>In),w=Math.min(...d),A=Math.max(...d),K=d.indexOf(w)<d.indexOf(A),Q=A-w;s[f]="".concat((K?-Q:0)-(K?w:A),"px"),i[f==="bgy"?"height":"width"]+=Q}const h=c.Dimensions.cover(r,i);for(const f of a){const d=f==="bgy"?"height":"width",w=h[d]-i[d];s[f]="max(".concat(H(t,f),",-").concat(w,"px) + ").concat(s[f])}const l=q(a,s,o);return(f,d)=>{l(f,d),f.backgroundSize="".concat(h.width,"px ").concat(h.height,"px"),f.backgroundRepeat="no-repeat"}}function H(n,t){return y(n,"background-position-".concat(t.substr(-1)),"")}function q(n,t,e){return function(o,r){for(const i of n){const a=p(e[i],r);o["background-position-".concat(i.substr(-1))]="calc(".concat(t[i]," + ").concat(a,"px)")}}}const F={};function zn(n){const t=c.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[t])return F[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth)?(e.onload=()=>{F[t]=z(e),c.trigger(n,c.createEvent("load",!1))},z(e)):F[t]=z(e)}function z(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=c.toFloat){const e=[],{length:o}=n;let r=0;for(let i=0;i<o;i++){let[a,s]=c.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(a=t(a),s=s?c.toFloat(s)/100:null,i===0?s===null?s=0:s&&e.push([a,0]):i===o-1&&(s===null?s=1:s!==1&&(e.push([a,s]),s=1)),e.push([a,s]),s===null)r++;else if(r){const h=e[i-r-1][1],l=(s-h)/(r+1);for(let f=r;f>0;f--)e[i-f][1]=h+l*(r-f+1);r=0}}return e}function L(n,t){const e=c.findIndex(n.slice(1),([,o])=>t<=o)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function p(n,t){const[e,o,r]=L(n,t);return c.isNumber(e)?e+Math.abs(e-o)*r*(e<o?1:-1):+o}const An=/^-?\d+(\S+)?/;function M(n,t){var e;for(const o of n){const r=(e=o.match)==null?void 0:e.call(o,An);if(r)return r[1]}return t}function y(n,t,e){const o=n.style[t],r=c.css(c.css(n,t,e),t);return n.style[t]=o,r}function V(n,t){return n.reduce((e,o)=>(e[o]=t,e),{})}var G={mixins:[$n],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target({target:n},t){return J(n&&c.query(n,t)||t)},start({start:n}){return c.toPx(n,"height",this.target,!0)},end({end:n,viewport:t}){return c.toPx(n||(t=(1-t)*100)&&"".concat(t,"vh+").concat(t,"%"),"height",this.target,!0)}},observe:[b({target:({$el:n,target:t})=>[n,t,c.scrollParent(t,!0)]}),Y(),X()],update:{read({percent:n},t){if(t.has("scroll")||(n=!1),!c.isVisible(this.$el))return!1;if(!this.matchMedia)return;const e=n;return n=En(c.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:e===n?!1:this.getCss(n)}},write({style:n}){if(!this.matchMedia){this.reset();return}n&&c.css(this.$el,n)},events:["scroll","resize"]}};function En(n,t){return t>=0?Math.pow(n,t+1):1-Math.pow(1-n,1-t)}function J(n){return n?"offsetTop"in n?n:J(c.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",G),G});
|