geno/wp-content/plugins/woocommerce/assets/client/admin/wp-admin-scripts/wc-addons-tour.js

1 line
6.4 KiB
JavaScript
Raw Permalink Normal View History

2024-02-01 17:24:18 +05:30
(()=>{"use strict";var e={};(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);const o=window.wp.element,t=window.wc.components,n=window.wc.tracks,r=window.wp.data,a=window.wc.data,c=e=>{var o;const t=((null===(o=document.getElementById("wpadminbar"))||void 0===o?void 0:o.offsetHeight)||0)+8;e.top<t?window.scrollBy(0,e.top-t):e.bottom>window.innerHeight&&window.scrollBy(0,e.bottom-window.innerHeight)},l=window.wp.i18n,s=document.createElement("div");s.setAttribute("id","wc-addons-tour-root"),(0,o.render)((0,o.createElement)((()=>{const[e,s]=(0,o.useState)(!0),{updateOptions:i}=(0,r.useDispatch)(a.OPTIONS_STORE_NAME),m=(()=>{const e=(0,o.createElement)("br");return[{referenceElements:{desktop:'#adminmenu a[href="admin.php?page=wc-admin&path=%2Fextensions"]'},focusElement:{desktop:'#adminmenu a[href="admin.php?page=wc-admin&path=%2Fextensions"]'},meta:{name:"wc-extensions-menu-item",heading:(0,l.__)("Welcome to the WooCommerce Marketplace","woocommerce"),descriptions:{desktop:(0,o.createInterpolateElement)((0,l.__)("Power up your store by adding extra functionality with extensions or integrate your store with other software and services.<br/><br/>Here you'll find hundreds of trusted solutions for your store — all reviewed and approved by the Woo team.<br/><br/>You can also browse the Woo Marketplace at Woo.com.","woocommerce"),{br:e})}}},{referenceElements:{desktop:".woocommerce-marketplace__search"},focusElement:{desktop:".woocommerce-marketplace__search"},meta:{name:"wc-extensions-search",heading:(0,l.__)("Find exactly what you need","woocommerce"),descriptions:{desktop:(0,l.__)("Use the search box to find specific extensions or solutions.","woocommerce")}}},{referenceElements:{desktop:".woocommerce-marketplace__tab-browse"},focusElement:{desktop:".woocommerce-marketplace__tab-browse"},meta:{name:"wc-addons-categories",heading:(0,l.__)("Browse for new ideas","woocommerce"),descriptions:{desktop:(0,o.createInterpolateElement)((0,l.__)("Or if you're not sure exactly what you need, you can browse all available extensions by category.","woocommerce"),{br:e})}}},{referenceElements:{desktop:".woocommerce-marketplace__discover:first-child"},focusElement:{desktop:".woocommerce-marketplace__discover:first-child"},meta:{name:"wc-addons-featured",heading:(0,l.__)("Learn more about each product","woocommerce"),descriptions:{desktop:(0,o.createInterpolateElement)((0,l.__)("Scroll down to see all of the relevant extensions and solutions.<br/><br/>Click on any solution to learn more about its features, any installation requirements, and available documentation.","woocommerce"),{br:e})}}},{referenceElements:{desktop:".woocommerce-marketplace__header-meta"},focusElement:{desktop:".woocommerce-marketplace__header-meta"},meta:{name:"wc-addons-my-subscriptions",heading:(0,l.__)("Manage your purchases","woocommerce"),descriptions:{desktop:(0,o.createInterpolateElement)((0,l.__)("All of your Woo Marketplace purchases can be found here, or on Woo.com.<br/><br/>Every purchase is backed by our <a1>30-day money-back guarantee</a1>, and includes <a2>email and live chat support</a2>.<br/><br/>That's it! You're now ready to power up your store.","woocommerce"),{a1:(0,o.createElement)("a",{href:"https://woo.com/refund-policy/","aria-label":(0,l.__)("Refund policy","woocommerce")},(0,l.__)("30-day money-back guarantee","woocommerce")),a2:(0,o.createElement)("a",{href:"https://woo.com/my-account/create-a-ticket/","aria-label":(0,l.__)("Contact support","woocommerce")},(0,l.__)("email and live chat support","woocommerce")),br:e})}}}]})();if((0,o.useEffect)((()=>{if("true"===new URLSearchParams(location.search).get("tutorial")){var e;const o=((e,o,t)=>{const r=document.querySelector(e);let a=null==r?void 0:r.getBoundingClientRect().top;const c=setInterval((()=>{const e=null==r?void 0:r.getBoundingClientRect().top;a===e&&((()=>{var e,o;const t=null===(e=m[0])||void 0===e||null===(o=e.meta)||void 0===o?void 0:o.name;s(!0),(0,n.recordEvent