PageSourceSearch

https://marthaspantry.co.nz/_nuxt/BELPJenD.js

js marthaspantry.co.nz collected 2026-10-07 22:43:47 UTC 4,367 bytes, 1 lines download raw bytes

1import{b2 as B,cK as k,cC as F,b4 as P,cD as R,cX as z,aB as K,aN as d,cP as N,aI as g,cd as j,bs as E,cZ as Q,c9 as b}from"./oIXnuY9V.js";import{b as U}from"./nFCIIOQH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},f=new e.Error().stack;f&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[f]="96cfedc2-c091-40ed-b51e-090a42169457",e._sentryDebugIdIdentifier="sentry-dbid-96cfedc2-c091-40ed-b51e-090a42169457")}catch{}})();const G=B({name:"QRating",props:{...F,...k,modelValue:{type:Number,required:!0},max:{type:[String,Number],default:5},icon:[String,Array],iconHalf:[String,Array],iconSelected:[String,Array],iconAriaLabel:[String,Array],color:[String,Array],colorHalf:[String,Array],colorSelected:[String,Array],noReset:Boolean,noDimming:Boolean,readonly:Boolean,disable:Boolean},emits:["update:modelValue"],setup(e,{slots:f,emit:v}){const{proxy:{$q:h}}=P(),_=R(e),x=z(e),C=Q(x),o=K(0);let u={};const y=d(()=>e.readonly!==!0&&e.disable!==!0),H=d(()=>`q-rating row inline items-center q-rating--${y.value===!0?"":"non-"}editable`+(e.noDimming===!0?" q-rating--no-dimming":"")+(e.disable===!0?" disabled":"")+(e.color!==void 0&&Array.isArray(e.color)===!1?` text-${e.color}`:"")),$=d(()=>{const a=Array.isArray(e.icon)===!0?e.icon.length:0,n=Array.isArray(e.iconSelected)===!0?e.iconSelected.length:0,l=Array.isArray(e.iconHalf)===!0?e.iconHalf.length:0,r=Array.isArray(e.color)===!0?e.color.length:0,i=Array.isArray(e.colorSelected)===!0?e.colorSelected.length:0,t=Array.isArray(e.colorHalf)===!0?e.colorHalf.length:0;return{iconLen:a,icon:a>0?e.icon[a-1]:e.icon,selIconLen:n,selIcon:n>0?e.iconSelected[n-1]:e.iconSelected,halfIconLen:l,halfIcon:l>0?e.iconHalf[n-1]:e.iconHalf,colorLen:r,color:r>0?e.color[r-1]:e.color,selColorLen:i,selColor:i>0?e.colorSelected[i-1]:e.colorSelected,halfColorLen:t,halfColor:t>0?e.colorHalf[t-1]:e.colorHalf}}),V=d(()=>{if(typeof e.iconAriaLabel=="string"){const a=e.iconAriaLabel.length!==0?`${e.iconAriaLabel} `:"";return n=>`${a}${n}`}if(Array.isArray(e.iconAriaLabel)===!0){const a=e.iconAriaLabel.length;if(a>0)return n=>e.iconAriaLabel[Math.min(n,a)-1]}return(a,n)=>`${n} ${a}`}),q=d(()=>{const a=[],n=$.value,l=Math.ceil(e.modelValue),r=y.value===!0?0:null,i=e.iconHalf===void 0||l===e.modelValue?-1:l;for(let t=1;t<=e.max;t++){const c=o.value===0&&e.modelValue>=t||o.value>0&&o.value>=t,s=i===t&&o.value<t,m=o.value>0&&(s===!0?l:e.modelValue)>=t&&o.value<t,L=s===!0?t<=n.halfColorLen?e.colorHalf[t-1]:n.halfColor:n.selColor!==void 0&&c===!0?t<=n.selColorLen?e.colorSelected[t-1]:n.selColor:t<=n.colorLen?e.color[t-1]:n.color,D=(s===!0?t<=n.halfIconLen?e.iconHalf[t-1]:n.halfIcon:n.selIcon!==void 0&&(c===!0||m===!0)?t<=n.selIconLen?e.iconSelected[t-1]:n.selIcon:t<=n.iconLen?e.icon[t-1]:n.icon)||h.iconSet.rating.icon;a.push({name:(s===!0?t<=n.halfIconLen?e.iconHalf[t-1]:n.halfIcon:n.selIcon!==void 0&&(c===!0||m===!0)?t<=n.selIconLen?e.iconSelected[t-1]:n.selIcon:t<=n.iconLen?e.icon[t-1]:n.icon)||h.iconSet.rating.icon,attrs:{tabindex:r,role:"radio","aria-checked":e.modelValue===t?"true":"false","aria-label":V.value(t,D)},iconClass:"q-rating__icon"+(c===!0||s===!0?" q-rating__icon--active":"")+(m===!0?" q-rating__icon--exselected":"")+(o.value===t?" q-rating__icon--hovered":"")+(L!==void 0?` text-${L}`:"")})}return a}),w=d(()=>{const a={role:"radiogroup"};return e.disable===!0&&(a["aria-disabled"]="true"),e.readonly===!0&&(a["aria-readonly"]="true"),a});function A(a){if(y.value===!0){const n=U(parseInt(a,10),1,parseInt(e.max,10)),l=e.noReset!==!0&&e.modelValue===n?0:n;l!==e.modelValue&&v("update:modelValue",l),o.value=0}}function S(a){y.value===!0&&(o.value=a)}function M(a,n){switch(a.keyCode){case 13:case 32:return A(n),b(a);case 37:case 40:return u[`rt${n-1}`]&&u[`rt${n-1}`].focus(),b(a);case 39:case 38:return u[`rt${n+1}`]&&u[`rt${n+1}`].focus(),b(a)}}function I(){o.value=0}return N(()=>{u={}}),()=>{const a=[];return q.value.forEach(({iconClass:n,name:l,attrs:r},i)=>{const t=i+1;a.push(g("div",{key:t,ref:c=>{u[`rt${t}`]=c},class:"q-rating__icon-container flex flex-center",...r,onClick(){A(t)},onMouseover(){S(t)},onMouseout:I,onFocus(){S(t)},onBlur:I,onKeyup(c){M(c,t)}},j(f[`tip-${t}`],[g(E,{class:n,name:l})])))}),e.name!==void 0&&e.disable!==!0&&C(a,"push"),g("div",{class:H.value,style:_.value,...w.value},a)}}});
1export{G as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.