1 line
No EOL
12 KiB
JavaScript
1 line
No EOL
12 KiB
JavaScript
(()=>{var e,t={7485:(e,t,l)=>{"use strict";l.d(t,{JO:()=>i,MW:()=>n,Zg:()=>u,_o:()=>a,mL:()=>c,qv:()=>d,xt:()=>s});var r=l(9196),o=l(444);const i=()=>(0,r.createElement)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.22448 1.5L1.5 6.81504V11.7072L5.12953 9.06066C5.38061 8.87758 5.71858 8.86829 5.97934 9.0373L8.90601 10.9342L12.4772 7.46225C12.7683 7.17925 13.2317 7.17925 13.5228 7.46225L16.5 10.3568V2C16.5 1.72386 16.2761 1.5 16 1.5H6.22448ZM1.5 13.5636V16C1.5 16.2761 1.72386 16.5 2 16.5H16C16.2761 16.5 16.5 16.2761 16.5 16V12.4032L16.4772 12.4266L13 9.04603L9.52279 12.4266C9.27191 12.6706 8.88569 12.7086 8.59206 12.5183L5.59643 10.5766L1.5 13.5636ZM0 2C0 0.89543 0.895431 0 2 0H16C17.1046 0 18 0.895431 18 2V16C18 17.1046 17.1046 18 16 18H2C0.89543 18 0 17.1046 0 16V2Z",fill:"#1E1E1E"})),n=()=>(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"49",height:"48",viewBox:"0 0 49 48",fill:"none",className:"wc-block-product-gallery-large-image-next-previous-right--inside-image"},(0,r.createElement)("g",{filter:"url(#filter0_b_397_11354)"},(0,r.createElement)("rect",{x:"0.5",width:"48",height:"48",rx:"5",fill:"black",fillOpacity:"0.5"}),(0,r.createElement)("path",{d:"M21.7001 12L19.3 14L28.5 24L19.3 34L21.7001 36L32.5 24L21.7001 12Z",fill:"white"})),(0,r.createElement)("defs",null,(0,r.createElement)("filter",{id:"filter0_b_397_11354",x:"-9.5",y:"-10",width:"68",height:"68",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},(0,r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.createElement)("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"5"}),(0,r.createElement)("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_397_11354"}),(0,r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_backgroundBlur_397_11354",result:"shape"})))),a=()=>(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"49",height:"48",viewBox:"0 0 49 48",fill:"none",className:"wc-block-product-gallery-large-image-next-previous-left--inside-image"},(0,r.createElement)("g",{filter:"url(#filter0_b_397_11356)"},(0,r.createElement)("rect",{x:"0.5",width:"48",height:"48",rx:"5",fill:"black",fillOpacity:"0.5"}),(0,r.createElement)("path",{d:"M28.1 12L30.5 14L21.3 24L30.5 34L28.1 36L17.3 24L28.1 12Z",fill:"white"})),(0,r.createElement)("defs",null,(0,r.createElement)("filter",{id:"filter0_b_397_11356",x:"-9.5",y:"-10",width:"68",height:"68",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},(0,r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.createElement)("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"5"}),(0,r.createElement)("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_397_11356"}),(0,r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_backgroundBlur_397_11356",result:"shape"})))),s=()=>(0,r.createElement)(o.SVG,{width:"22",height:"38",viewBox:"0 0 22 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"wc-block-product-gallery-large-image-next-previous-right--outside-image"},(0,r.createElement)("path",{d:"M4.56666 0L0.766663 3.16667L15.3333 19L0.766663 34.8333L4.56666 38L21.6667 19L4.56666 0Z",fill:"black"})),c=()=>(0,r.createElement)(o.SVG,{width:"22",height:"38",viewBox:"0 0 22 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"wc-block-product-gallery-large-image-next-previous-left--outside-image"},(0,r.createElement)("path",{d:"M17.7 0L21.5 3.16667L6.93334 19L21.5 34.8333L17.7 38L0.600002 19L17.7 0Z",fill:"black"})),u=()=>(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"18",viewBox:"0 0 30 18",fill:"none"},(0,r.createElement)("path",{d:"M4.525 8.8L6.825 6.5L5.825 5.5L3.525 7.8C2.825 8.5 2.825 9.6 3.525 10.3L5.825 12.6L6.925 11.5L4.625 9.2C4.425 9.1 4.425 8.9 4.525 8.8Z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M25.4 8.8L23.1 6.5L24.1 5.5L26.4 7.8C27.1 8.5 27.1 9.6 26.4 10.3L24.1 12.6L23 11.5L25.3 9.2C25.5 9.1 25.5 8.9 25.4 8.8Z",fill:"currentColor"}),(0,r.createElement)("rect",{x:"0.75",y:"0.75",width:"28.5",height:"16.5",rx:"1.25",stroke:"currentColor",strokeWidth:"1.5"})),d=()=>(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"38",height:"18",viewBox:"0 0 38 18",fill:"none"},(0,r.createElement)("path",{d:"M1.525 8.3L5.825 4L4.825 3L0.525 7.3C-0.175 8 -0.175 9.1 0.525 9.8L4.825 14.1L5.925 13L1.625 8.7C1.425 8.6 1.425 8.4 1.525 8.3Z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M37.325 7.3L33.025 3L31.925 4.1L36.2251 8.4C36.3251 8.5 36.3251 8.7 36.2251 8.8L31.925 13.1L33.025 14.2L37.325 9.9C38.025 9.1 38.025 8 37.325 7.3Z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M25.925 0H11.925C10.825 0 9.92505 0.9 9.92505 2V16C9.92505 17.1 10.825 18 11.925 18H25.925C27.025 18 27.925 17.1 27.925 16V2C27.925 0.9 27.025 0 25.925 0ZM11.925 1.5H25.925C26.225 1.5 26.425 1.7 26.425 2V10.4L23.425 7.5C23.125 7.2 22.625 7.2 22.425 7.5L18.825 11L15.925 9C15.625 8.8 15.325 8.8 15.125 9L11.525 11.6V2C11.425 1.7 11.625 1.5 11.925 1.5ZM25.925 16.5H11.925C11.625 16.5 11.425 16.3 11.425 16V13.6L15.525 10.6L18.525 12.5C18.825 12.7 19.225 12.7 19.425 12.4L22.925 9L26.425 12.4V16C26.425 16.3 26.225 16.5 25.925 16.5Z",fill:"currentColor"}))},7170:(e,t,l)=>{"use strict";l.r(t);var r=l(4981),o=l(5271),i=l(9196),n=l(2175),a=l(9307),s=l(5609),c=l(4184),u=l.n(c),d=(l(251),l(7164)),p=l(3135);const g=e=>{switch(e){case"top":return"flex-start";case"center":return"center";default:return"flex-end"}},m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"woocommerce/product-gallery-large-image-next-previous","version":"1.0.0","title":"Next/Previous Buttons","description":"Display next and previous buttons.","category":"woocommerce","keywords":["WooCommerce"],"usesContext":["nextPreviousButtonsPosition","productGalleryClientId","postId"],"textdomain":"woocommerce","supports":{"layout":{"default":{"type":"flex","verticalAlignment":"bottom"},"allowVerticalAlignment":true,"allowJustification":false,"allowOrientation":false,"allowInheriting":false}},"ancestor":["woocommerce/product-gallery-large-image"]}');var w=l(7485);(0,o.EU)()&&(0,r.registerBlockType)(m,{icon:w.JO,edit:({attributes:e,context:t})=>{var l;const r=(0,n.useBlockProps)({style:{width:"100%",alignItems:g(null===(l=e.layout)||void 0===l?void 0:l.verticalAlignment)},className:u()("wc-block-editor-product-gallery-large-image-next-previous","wc-block-product-gallery-large-image-next-previous")}),o=(0,a.useMemo)((()=>(0,p.P)(t.nextPreviousButtonsPosition)),[t.nextPreviousButtonsPosition]);return(0,i.createElement)("div",{...r},(0,i.createElement)(n.InspectorControls,null,(0,i.createElement)(s.PanelBody,null,(0,i.createElement)(d.f,{context:t}))),(0,i.createElement)("div",{className:u()("wc-block-product-gallery-large-image-next-previous-container",`wc-block-product-gallery-large-image-next-previous--${null==o?void 0:o.classname}`)},(null==o?void 0:o.PrevButtonImage)&&(0,i.createElement)(o.PrevButtonImage,null),(null==o?void 0:o.NextButtonImage)&&(0,i.createElement)(o.NextButtonImage,null)))},save:()=>(0,i.createElement)("div",{...n.useBlockProps.save()})})},7164:(e,t,l)=>{"use strict";l.d(t,{f:()=>p});var r=l(9196),o=l(5736),i=l(9818),n=l(2175),a=l(5609),s=l(6477),c=l(7485);const u={[s.z.insideTheImage]:(0,r.createElement)(c.Zg,null),[s.z.outsideTheImage]:(0,r.createElement)(c.qv,null)},d=e=>{switch(e){case s.z.insideTheImage:return(0,o.__)("Next and previous buttons will appear inside the large image.","woocommerce");case s.z.outsideTheImage:return(0,o.__)("Next and previous buttons will appear on outside the large image.","woocommerce");default:return(0,o.__)("No next or previous button will be displayed.","woocommerce")}},p=({context:e})=>{const{productGalleryClientId:t,nextPreviousButtonsPosition:l}=e,{updateBlockAttributes:c}=(0,i.useDispatch)(n.store);return(0,r.createElement)(a.__experimentalToggleGroupControl,{label:(0,o.__)("Next/Prev Buttons","woocommerce"),className:"wc-block-editor-product-gallery-large-image-next-previous-settings",style:{width:"100%"},onChange:e=>c(t,{nextPreviousButtonsPosition:e}),help:d(l),value:l},(0,r.createElement)(a.__experimentalToggleGroupControlOption,{value:s.z.off,label:(0,o.__)("Off","woocommerce")}),(0,r.createElement)(a.__experimentalToggleGroupControlOption,{value:s.z.insideTheImage,label:u.insideTheImage}),(0,r.createElement)(a.__experimentalToggleGroupControlOption,{value:s.z.outsideTheImage,label:u.outsideTheImage}))}},6477:(e,t,l)=>{"use strict";l.d(t,{z:()=>r});let r=function(e){return e.off="off",e.insideTheImage="insideTheImage",e.outsideTheImage="outsideTheImage",e}({})},3135:(e,t,l)=>{"use strict";l.d(t,{P:()=>o});var r=l(7485);const o=e=>{switch(e){case"insideTheImage":return{PrevButtonImage:r._o,NextButtonImage:r.MW,classname:"inside-image"};case"outsideTheImage":return{PrevButtonImage:r.mL,NextButtonImage:r.xt,classname:"outside-image"};default:return null}}},7530:(e,t,l)=>{"use strict";l.d(t,{Lo:()=>w});var r,o,i,n,a,s,c,u,d,p,g=l(4617);const m=(0,g.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),w=(m.pluginUrl,m.pluginUrl,m.buildPhase),h=(null===(r=g.STORE_PAGES.shop)||void 0===r||r.permalink,null===(o=g.STORE_PAGES.checkout)||void 0===o||o.id,null===(i=g.STORE_PAGES.checkout)||void 0===i||i.permalink,null===(n=g.STORE_PAGES.privacy)||void 0===n||n.permalink,null===(a=g.STORE_PAGES.privacy)||void 0===a||a.title,null===(s=g.STORE_PAGES.terms)||void 0===s||s.permalink,null===(c=g.STORE_PAGES.terms)||void 0===c||c.title,null===(u=g.STORE_PAGES.cart)||void 0===u||u.id,null===(d=g.STORE_PAGES.cart)||void 0===d||d.permalink,null!==(p=g.STORE_PAGES.myaccount)&&void 0!==p&&p.permalink?g.STORE_PAGES.myaccount.permalink:(0,g.getSetting)("wpLoginUrl","/wp-login.php"),(0,g.getSetting)("localPickupEnabled",!1),(0,g.getSetting)("countries",{})),f=(0,g.getSetting)("countryData",{});Object.fromEntries(Object.keys(f).filter((e=>!0===f[e].allowBilling)).map((e=>[e,h[e]||""]))),Object.fromEntries(Object.keys(f).filter((e=>!0===f[e].allowBilling)).map((e=>[e,f[e].states||[]]))),Object.fromEntries(Object.keys(f).filter((e=>!0===f[e].allowShipping)).map((e=>[e,h[e]||""]))),Object.fromEntries(Object.keys(f).filter((e=>!0===f[e].allowShipping)).map((e=>[e,f[e].states||[]]))),Object.fromEntries(Object.keys(f).map((e=>[e,f[e].locale||[]])))},4478:(e,t,l)=>{"use strict";l.d(t,{EU:()=>o}),l(4981);var r=l(7530);const o=()=>r.Lo>2},5271:(e,t,l)=>{"use strict";l.d(t,{EU:()=>r.EU});var r=l(4478)},251:()=>{},9196:e=>{"use strict";e.exports=window.React},4617:e=>{"use strict";e.exports=window.wc.wcSettings},2175:e=>{"use strict";e.exports=window.wp.blockEditor},4981:e=>{"use strict";e.exports=window.wp.blocks},5609:e=>{"use strict";e.exports=window.wp.components},9818:e=>{"use strict";e.exports=window.wp.data},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},444:e=>{"use strict";e.exports=window.wp.primitives}},l={};function r(e){var o=l[e];if(void 0!==o)return o.exports;var i=l[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,l,o,i)=>{if(!l){var n=1/0;for(u=0;u<e.length;u++){for(var[l,o,i]=e[u],a=!0,s=0;s<l.length;s++)(!1&i||n>=i)&&Object.keys(r.O).every((e=>r.O[e](l[s])))?l.splice(s--,1):(a=!1,i<n&&(n=i));if(a){e.splice(u--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[l,o,i]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.j=4123,(()=>{var e={4123:0};r.O.j=t=>0===e[t];var t=(t,l)=>{var o,i,[n,a,s]=l,c=0;if(n.some((t=>0!==e[t]))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(s)var u=s(r)}for(t&&t(l);c<n.length;c++)i=n[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(u)},l=self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))})();var o=r.O(void 0,[2869],(()=>r(7170)));o=r.O(o),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-gallery-large-image-next-previous"]=o})(); |