JezK
Edit File: view.js
(()=>{"use strict";var t={5338:(t,e,n)=>{var r=n(5795);e.H=r.createRoot,r.hydrateRoot},5795:t=>{t.exports=window.ReactDOM}},e={};const n=window.React;var r=function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}(5338);const o=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}};const i="linear-gradient(135deg, #0040E3, #18D4FD)",a=t=>{const e=o(t);if(!e)return"none";return`url('${e.replace(/['"()]/g,"")}')`},s=(t,e)=>{return null==(n=e)||""===n||Array.isArray(n)&&0===n.length||"object"==typeof n&&0===Object.keys(n).length||"string"==typeof n&&""===n.trim()||"number"==typeof n&&0===n?"":`${t}: ${e};`;var n},c=(t,e=!0,n=!0,r=!0)=>{const{type:o="solid",color:c="",gradient:l=i,image:p={},position:u="center center",attachment:d="",repeat:f="no-repeat",size:m="",overlayColor:g=""}=t||{};return"gradient"===o&&n?s("background",l):"image"===o&&r?`background: ${a(p?.url)};\n\t\t\t\t${s("background-color",g)}\n\t\t\t\t${s("background-position",u)}\n\t\t\t\t${s("background-size",m)}\n\t\t\t\t${s("background-repeat",f)}\n\t\t\t\t${s("background-attachment",d)}\n\t\t\t\t${s("background-repeat",f)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&s("background",c)},l=t=>{const{color:e="",bgType:n="solid",bg:r="",gradient:o=i}=t||{};return`\n\t\t${s("color",e)}\n\t\t${o||r?s("background","gradient"===n?o:r):""}\n\t`},p=(t,e,n=!0)=>{const{fontFamily:r="Default",fontCategory:o="sans-serif",fontVariant:i=400,fontWeight:a,isUploadFont:c=!0,fontSize:l={desktop:null,tablet:null,mobile:null},fontStyle:p,textTransform:u,textDecoration:d,lineHeight:f,letterSpace:m}=e||{},g=!n||!r||"Default"===r,h=l?.desktop||l,y=l?.tablet||h,_=l?.mobile||y,b=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},v=`\n\t\t${g?"":`font-family: '${r}', ${o};`}\n\t\t${s("font-weight",a)}\n\t\t${s("font-size",b(h))}\n\t\t${s("font-style",p)}\n\t\t${s("text-transform",u)}\n\t\t${s("text-decoration",d)}\n\t\t${s("line-height",f)}\n\t\t${s("letter-spacing",m)}\n\t`,$=i&&400!==i?"400i"===i?":ital@1":i?.includes("00i")?`: ital, wght@1, ${i?.replace("00i","00")} `:`: wght@${i} `:"",w=g?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${$.replace(/ /g,"")}&display=swap`;return{googleFontLink:!c||g?"":`@import url(${w});`,styles:`${t}{\n\t\t\t${v}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${s("font-size",b(y))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${t}{\n\t\t\t\t${s("font-size",b(_))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},u=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const e=["top","right","bottom","left"];return e.map((e=>t[e]||"")).every((t=>!t))?"":e.map((e=>t[e]||"0")).join(" ")}return""},d=({attributes:t,id:e})=>{const{styles:r,layout:o,alignment:i}=t,{section:a,featureItems:s}=o||{},{sectionBg:d,featureItemsBg:f,featureItemsHovShadow:m,title:g,description:h,list:y,overviewBg:_,overviewFeature:b,overviewTitle:v,btnStyle:$}=r||{},w=`#${e}`,x=`${w} .bp-sc-feature-overview-section`,k=`${w} .product-card`,S=`${w} .product-title `,z=`${w} .product-description `,E=`${w} .product-features `,P=`${w} .product-overview `,O=`${w} .overview-title`,F=`${w} .overview-stats`,D=`${w} .cta-button`;return(0,n.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t\n\t\t${p("",g.typo)?.googleFontLink}\n\t\t${p("",h.typo)?.googleFontLink}\n\t\t${p("",y.typo)?.googleFontLink}\n\t\t${p("",v.typo)?.googleFontLink}\n\t\t${p("",b.typo)?.googleFontLink}\n\t\t${p("",$.typo)?.googleFontLink}\n\t\t\n ${p(S,g.typo)?.styles}\n ${p(z,h.typo)?.styles}\n ${p(k,y.typo)?.styles}\n ${p(O,v.typo)?.styles}\n ${p(F,b.typo)?.styles}\n ${p(D,$.typo)?.styles}\n\t\t\n\t\t${x} {\n\t\t\t${c(d)}\n\t\t\tmargin:${u(a?.margin?.desktop)};\n\t\t\tpadding:${u(a?.padding?.desktop)};\n\t\t\tmin-height: ${a?.minHeight?.desktop};\n\t\t\talign-items: ${i};\n\t\t}\n\t\t${k} {\n\t\t\t${c(f)}\n\t\t\tmargin:${u(s?.margin?.desktop)};\n\t\t\tpadding:${u(s?.padding?.desktop)};\n\t\t\twidth: ${s?.width?.desktop};\n\n\t\t\t&:hover {\n\t\t\t\tbox-shadow: 0 10px 60px ${m};\n\t\t\t}\n\t\t}\n\t\t${S}{\n\t\t\tcolor:${g.color};\n\t\t}\n\t\t${z}{\n\t\t\tcolor:${h.color};\n\t\t}\n\t\t${E}{\n\t\t\tcolor:${y.color};\n\t\t}\n\t\t${P}{\n\t\t\tbackground-color:${_};\n\t\t}\n\t\t${O}{\n\t\t\tcolor:${v.color};\n\t\t}\n\t\t${F}{\n\t\t\tcolor:${b.color};\n\t\t}\n\t\t${D}{\n\t\t\t${l($.colors)}\n\t\t\t&:hover{\n\t\t\t\t${l($.hovColors)}\n\t\t\t}\n\t\t}\n\n\t\t@media (min-width:641px) and (max-width: 1024px){\n\t\t\t\t\t\t\t${x} {\n\t\t\t\t\t\t\t\tmargin:${u(a?.margin?.tablet)};\n\t\t\t\t\t\t\t\tpadding:${u(a?.padding?.tablet)};\n\t\t\t\t\t\t\t\tmin-height: ${a?.minHeight?.tablet};\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t${k} {\n\t\t\t\t\t\t\t\tmargin:${u(s?.margin?.tablet)};\n\t\t\t\t\t\t\t\tpadding:${u(s?.padding?.tablet)};\n\t\t\t\t\t\t\t\twidth: ${s?.width?.tablet};\n\t\t\t\t\t\t\t}\n\t\t\t\t} \n\t\t\n\t\n\t\n\t\t@media (max-width: 480px){\n\t\t\t\t\t\t${x} {\n\t\t\t\t\t\t\tmargin:${u(a?.margin?.mobile)};\n\t\t\t\t\t\t\tpadding:${u(a?.padding?.mobile)};\n\t\t\t\t\t\t\tmin-height: ${a?.minHeight?.mobile};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t${k} {\n\t\t\t\t\t\t\tmargin:${u(s?.margin?.mobile)};\n\t\t\t\t\t\t\tpadding:${u(s?.padding?.mobile)};\n\t\t\t\t\t\t\twidth: ${s?.width?.mobile};\n\t\t\t\t\t\t}\n\t\t}\n\n\t`}})},f=window.wp.blockEditor,m=window.wp.i18n;var g=Symbol.for("immer-nothing"),h=Symbol.for("immer-draftable"),y=Symbol.for("immer-state");function _(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var b=Object.getPrototypeOf;function v(t){return!!t&&!!t[y]}function $(t){return!!t&&(x(t)||Array.isArray(t)||!!t[h]||!!t.constructor?.[h]||P(t)||O(t))}var w=Object.prototype.constructor.toString();function x(t){if(!t||"object"!=typeof t)return!1;const e=b(t);if(null===e)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===w}function k(t,e){0===S(t)?Reflect.ownKeys(t).forEach((n=>{e(n,t[n],t)})):t.forEach(((n,r)=>e(r,n,t)))}function S(t){const e=t[y];return e?e.type_:Array.isArray(t)?1:P(t)?2:O(t)?3:0}function z(t,e){return 2===S(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function E(t,e,n){const r=S(t);2===r?t.set(e,n):3===r?t.add(n):t[e]=n}function P(t){return t instanceof Map}function O(t){return t instanceof Set}function F(t){return t.copy_||t.base_}function D(t,e){if(P(t))return new Map(t);if(O(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=x(t);if(!0===e||"class_only"===e&&!n){const e=Object.getOwnPropertyDescriptors(t);delete e[y];let n=Reflect.ownKeys(e);for(let r=0;r<n.length;r++){const o=n[r],i=e[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[o]})}return Object.create(b(t),e)}{const e=b(t);if(null!==e&&n)return{...t};const r=Object.create(e);return Object.assign(r,t)}}function A(t,e=!1){return C(t)||v(t)||!$(t)||(S(t)>1&&(t.set=t.add=t.clear=t.delete=j),Object.freeze(t),e&&Object.entries(t).forEach((([t,e])=>A(e,!0)))),t}function j(){_(2)}function C(t){return Object.isFrozen(t)}var N,L={};function R(t){const e=L[t];return e||_(0),e}function M(){return N}function H(t,e){e&&(R("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function I(t){T(t),t.drafts_.forEach(B),t.drafts_=null}function T(t){t===N&&(N=t.parent_)}function W(t){return N={drafts_:[],parent_:N,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function B(t){const e=t[y];0===e.type_||1===e.type_?e.revoke_():e.revoked_=!0}function U(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return void 0!==t&&t!==n?(n[y].modified_&&(I(e),_(4)),$(t)&&(t=K(e,t),e.parent_||J(e,t)),e.patches_&&R("Patches").generateReplacementPatches_(n[y].base_,t,e.patches_,e.inversePatches_)):t=K(e,n,[]),I(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==g?t:void 0}function K(t,e,n){if(C(e))return e;const r=e[y];if(!r)return k(e,((o,i)=>G(t,r,e,o,i,n))),e;if(r.scope_!==t)return e;if(!r.modified_)return J(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const e=r.copy_;let o=e,i=!1;3===r.type_&&(o=new Set(e),e.clear(),i=!0),k(o,((o,a)=>G(t,r,e,o,a,n,i))),J(t,e,!1),n&&t.patches_&&R("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function G(t,e,n,r,o,i,a){if(v(o)){const a=K(t,o,i&&e&&3!==e.type_&&!z(e.assigned_,r)?i.concat(r):void 0);if(E(n,r,a),!v(a))return;t.canAutoFreeze_=!1}else a&&n.add(o);if($(o)&&!C(o)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;K(t,o),e&&e.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||J(t,o)}}function J(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&A(e,n)}var V={get(t,e){if(e===y)return t;const n=F(t);if(!z(n,e))return function(t,e,n){const r=X(e,n);return r?"value"in r?r.value:r.get?.call(t.draft_):void 0}(t,n,e);const r=n[e];return t.finalized_||!$(r)?r:r===q(t.base_,e)?(Y(t),t.copy_[e]=tt(r,t)):r},has:(t,e)=>e in F(t),ownKeys:t=>Reflect.ownKeys(F(t)),set(t,e,n){const r=X(F(t),e);if(r?.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const r=q(F(t),e),a=r?.[y];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(((o=n)===(i=r)?0!==o||1/o==1/i:o!=o&&i!=i)&&(void 0!==n||z(t.base_,e)))return!0;Y(t),Q(t)}var o,i;return t.copy_[e]===n&&(void 0!==n||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty:(t,e)=>(void 0!==q(t.base_,e)||e in t.base_?(t.assigned_[e]=!1,Y(t),Q(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0),getOwnPropertyDescriptor(t,e){const n=F(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.type_||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty(){_(11)},getPrototypeOf:t=>b(t.base_),setPrototypeOf(){_(12)}},Z={};function q(t,e){const n=t[y];return(n?F(n):t)[e]}function X(t,e){if(!(e in t))return;let n=b(t);for(;n;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=b(n)}}function Q(t){t.modified_||(t.modified_=!0,t.parent_&&Q(t.parent_))}function Y(t){t.copy_||(t.copy_=D(t.base_,t.scope_.immer_.useStrictShallowCopy_))}k(V,((t,e)=>{Z[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Z.deleteProperty=function(t,e){return Z.set.call(this,t,e,void 0)},Z.set=function(t,e,n){return V.set.call(this,t[0],e,n,t[0])};function tt(t,e){const n=P(t)?R("MapSet").proxyMap_(t,e):O(t)?R("MapSet").proxySet_(t,e):function(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:M(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=V;n&&(o=[r],i=Z);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,s}(t,e);return(e?e.scope_:M()).drafts_.push(n),n}function et(t){if(!$(t)||C(t))return t;const e=t[y];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=D(t,e.scope_.immer_.useStrictShallowCopy_)}else n=D(t,!0);return k(n,((t,e)=>{E(n,t,et(e))})),e&&(e.finalized_=!1),n}var nt=new class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,e,n)=>{if("function"==typeof t&&"function"!=typeof e){const n=e;e=t;const r=this;return function(t=n,...o){return r.produce(t,(t=>e.call(this,t,...o)))}}let r;if("function"!=typeof e&&_(6),void 0!==n&&"function"!=typeof n&&_(7),$(t)){const o=W(this),i=tt(t,void 0);let a=!0;try{r=e(i),a=!1}finally{a?I(o):T(o)}return H(o,n),U(r,o)}if(!t||"object"!=typeof t){if(r=e(t),void 0===r&&(r=t),r===g&&(r=void 0),this.autoFreeze_&&A(r,!0),n){const e=[],o=[];R("Patches").generateReplacementPatches_(t,r,e,o),n(e,o)}return r}_(1)},this.produceWithPatches=(t,e)=>{if("function"==typeof t)return(e,...n)=>this.produceWithPatches(e,(e=>t(e,...n)));let n,r;return[this.produce(t,e,((t,e)=>{n=t,r=e})),n,r]},"boolean"==typeof t?.autoFreeze&&this.setAutoFreeze(t.autoFreeze),"boolean"==typeof t?.useStrictShallowCopy&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){$(t)||_(8),v(t)&&(t=function(t){v(t)||_(10);return et(t)}(t));const e=W(this),n=tt(t,void 0);return n[y].isManual_=!0,T(e),n}finishDraft(t,e){const n=t&&t[y];n&&n.isManual_||_(9);const{scope_:r}=n;return H(r,e),U(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));const r=R("Patches").applyPatches_;return v(t)?r(t,e):this.produce(t,(t=>r(t,e)))}},rt=nt.produce;nt.produceWithPatches.bind(nt),nt.setAutoFreeze.bind(nt),nt.setUseStrictShallowCopy.bind(nt),nt.applyPatches.bind(nt),nt.createDraft.bind(nt),nt.finishDraft.bind(nt);const ot=(t,e,...n)=>{if(0===n.length)return e;const[r,...o]=n;return 0===o.length?rt(t,(t=>{t[r]=e})):rt(t,(t=>{Object.prototype.hasOwnProperty.call(t,r)||(t[r]={}),t[r]=ot(t[r],e,...o)}))},it=()=>(0,n.createElement)(f.InnerBlocks,{template:[["core/heading",{content:"3D Viewer",level:2,style:{spacing:{margin:"6px 0 19px 0"},typography:{fontSize:"22px",fontWeight:"900"},color:{text:"#000"}}}],["core/paragraph",{content:"Display interactive 3D models in posts, pages, or WooCommerce with full control over lighting, rotation, and layout. Supports major 3D formats, popular page builders, and Gutenberg blocks.",style:{spacing:{margin:"12px 0"},typography:{fontSize:"16px",lineHeight:"1.55"},color:{text:"#333"}}}],["core/paragraph",{content:"› Supports GLB, GLTF, OBJ, and STL 3D files <br>› WooCommerce-ready for 3D product previews <br>› Work with external model URLs (Amazon S3, Google Drive, etc.)",style:{spacing:{margin:"12px 0"},typography:{fontSize:"16px",lineHeight:"1.55"},color:{text:"#333"}}}]]}),at=["http","https","mailto","tel","sms","ftp","ftps"],st=(t,e="#")=>{if(!t)return e;const n=String(t).split("").filter((t=>{const e=t.charCodeAt(0);return!(e<32||127===e||e>=8203&&e<=8205||65279===e)})).join("").trim();if(""===n)return e;if(/^(\/|\.|#|\?)/.test(n))return n;const r=n.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);return r?at.includes(r[1].toLowerCase())?n:e:n},ct=(new Set(["svg","g","defs","symbol","use","title","desc","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","textpath","lineargradient","radialgradient","stop","clippath","mask","pattern","filter","fegaussianblur","feoffset","feblend","femerge","femergenode","fecolormatrix","fecomposite","feflood","i","span","b","strong","em","small","br","div","p","img"]),new Set(["viewbox","xmlns","xmlns:xlink","version","width","height","class","id","fill","fill-rule","fill-opacity","clip-rule","clip-path","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","d","points","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","transform","transform-origin","opacity","offset","stop-color","stop-opacity","gradientunits","gradienttransform","patternunits","maskunits","clippathunits","preserveaspectratio","aria-hidden","aria-label","role","focusable","style","font-size","font-family","font-weight","text-anchor","dominant-baseline","mix-blend-mode","vector-effect","paint-order","shape-rendering","alt","src","title","data-name","xml:space"]),({attributes:t,setAttributes:e,innerContent:r,isBackend:o=!1})=>{const{featureItem:i,options:a}=t||{},{image:s,rightConts:c}=i||{};return(0,n.createElement)("div",{className:"bp-sc-feature-overview-section"},(0,n.createElement)("div",{className:"product-card"},(0,n.createElement)("div",{className:"product-image-container"},(0,n.createElement)("img",{src:s,alt:"3D Viewer",className:"product-image"})),(0,n.createElement)("div",{className:" product-details"},o?(0,n.createElement)(it,null):(0,n.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})),(0,n.createElement)("div",{className:"product-section"},(0,n.createElement)("div",{className:"product-overview"},o?(0,n.createElement)(f.RichText,{className:"overview-title",tagName:"h3",placeholder:(0,m.__)("lists...","section-collection"),value:c?.title,onChange:t=>e({featureItem:ot(i,t,"rightConts","title")})}):(0,n.createElement)("h3",{className:"overview-title"},c?.title),(0,n.createElement)("ul",{className:"overview-stats"},c?.features.map(((t,r)=>o?(0,n.createElement)(f.RichText,{key:r,tagName:"li",placeholder:(0,m.__)("lists...","section-collection"),value:t,onChange:t=>e({featureItem:ot(i,t,"rightConts","features",r)})}):(0,n.createElement)("li",{key:r,dangerouslySetInnerHTML:{__html:t}})))),(0,n.createElement)("div",{className:"product-cta"},(0,n.createElement)("a",{href:st(c?.btn?.url),className:"cta-button",target:a.isNewTab?"_blank":"_self",rel:a.isNewTab?"noopener noreferrer":void 0},c?.btn?.title))))))});document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-feature-overview-feature-overview-section").forEach((t=>{const e=JSON.parse(t.dataset.attributes),o=JSON.parse(t.dataset.content);(0,r.H)(t).render((0,n.createElement)(n.Fragment,null,(0,n.createElement)(d,{attributes:e,id:t.id}),(0,n.createElement)(ct,{attributes:e,innerContent:o}))),t?.removeAttribute("data-attributes")}))}))})();