File: //proc/thread-self/cwd/wp-content/plugins/jeg-elementor-kit/assets/js/admin/admin.js.map
{"version":3,"file":"admin.js","mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACJA;AACA;AACA;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1BA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAMA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AAAA;AAIA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAjDA;AAAA;AAAA;AAmDA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAMA;AAAA;AAKA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAQA;AAEA;;;;;;;;;;;;;;;;;;;;ACnNA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAOA;AAEA;AACA;AAWA;AAEA;AACA;AAUA;AAEA;AACA;AAIA;AAEA;AACA;AAQA;AAEA;AACA;AAOA;AAGA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC3GA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;;;;;;;;;;;;;;AClEA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AAIA;AAIA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAGA;AAEA;;;;;;;;;;;;;;;;;;;ACrCA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAGA;AAAA;AAEA;AACA;AACA;AAAA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AAOA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAAA;AAEA;AAAA;AAKA;AAAA;AACA;AAAA;AACA;AAAA;AAIA;AAAA;AACA;AAAA;AACA;AAAA;AAIA;AAAA;AAGA;AAAA;AACA;AAAA;AAEA;AAAA;AAGA;AAAA;AAEA;AAAA;AAGA;AAAA;AAOA;AAAA;AACA;AAAA;AACA;AAAA;AASA;AAAA;AAEA;AAAA;AACA;AAAA;AACA;AAAA;AAOA;AAAA;AACA;AAAA;AAeA;AAAA;AAAA;AAAA;AAEA;AAAA;AAGA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AAAA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AAAA;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AAEA;AAMA;AAEA;AAGA;AAEA;AASA;AAPA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AAEA;AAAA;AAAA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAGA;AAEA;AAAA;AAAA;AACA;AAEA;AASA;AAPA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AAEA;AAAA;AAAA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAGA;AAEA;AAAA;AAAA;AACA;AAEA;AAUA;AARA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAAA;AAGA;AAWA;AAEA;;;;;;;;;;;;;;;;;;;AC7VA;AACA;AACA;AACA;AACA;AACA;AAKA;AAEA;AACA;AAKA;AAEA;AACA;AAKA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;;;;;;;;;;ACnJA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACnEA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACNA;AACA;;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA","sources":["webpack://jkit/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://jkit/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://jkit/./src/shared/components/pricing-modal.js","webpack://jkit/./src/shared/content/pricing/constants.js","webpack://jkit/./src/shared/content/pricing/helpers.js","webpack://jkit/./src/shared/content/pricing/hero.js","webpack://jkit/./src/shared/content/pricing/icons.js","webpack://jkit/./src/shared/content/pricing/plan-cards.js","webpack://jkit/./src/shared/helpers/index.js","webpack://jkit/./src/shared/modal-host.js","webpack://jkit/external window \"regeneratorRuntime\"","webpack://jkit/external window [\"wp\",\"element\"]","webpack://jkit/external window [\"wp\",\"i18n\"]","webpack://jkit/external window \"ReactDOM\"","webpack://jkit/webpack/bootstrap","webpack://jkit/webpack/runtime/compat get default export","webpack://jkit/webpack/runtime/define property getters","webpack://jkit/webpack/runtime/hasOwnProperty shorthand","webpack://jkit/webpack/runtime/make namespace object","webpack://jkit/./src/admin/index.js"],"sourcesContent":["function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nexport { _asyncToGenerator as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nexport { _iterableToArrayLimit as default };","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };","import { useState, useEffect, useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport Hero from '../content/pricing/hero';\nimport PlanCards from '../content/pricing/plan-cards';\nimport { loadCheckoutScript, getAvailableCycles } from '../content/pricing/helpers';\nimport { trackBeforeCheckout, getFreemiusPricing, getPricingPlan } from '../helpers';\n\nconst overlayStyle = {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: 'rgba(0,0,0,0.5)',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: 99999,\n};\n\nconst PricingModal = ({ isOpen, onClose }) => {\n const config = getFreemiusPricing();\n const [adminBarTop, setAdminBarTop] = useState(0);\n const [pricingData, setPricingData] = useState(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(null);\n const [billingCycle, setBillingCycle] = useState('annual');\n const [checkingOut, setCheckingOut] = useState(null);\n const fsHandlerRef = useRef(null);\n const [isMaximized, setIsMaximized] = useState(false);\n\n const currency = config?.currency || 'usd';\n useEffect(() => {\n const calcAdminBarTop = () => {\n try {\n const el = document.getElementById('wpadminbar');\n const h = el ? Math.ceil(el.getBoundingClientRect().height) : 0;\n setAdminBarTop(h);\n } catch (e) {\n setAdminBarTop(0);\n }\n };\n\n calcAdminBarTop();\n window.addEventListener('resize', calcAdminBarTop);\n window.addEventListener('orientationchange', calcAdminBarTop);\n\n return () => {\n window.removeEventListener('resize', calcAdminBarTop);\n window.removeEventListener('orientationchange', calcAdminBarTop);\n };\n }, []);\n useEffect(() => {\n if (!isOpen) setIsMaximized(false);\n }, [isOpen]);\n useEffect(() => {\n if (!isOpen) return;\n setError(null);\n\n if (!config) {\n setPricingData(null);\n setLoading(false);\n return;\n }\n\n const cache = window.JkitPricingCache || (window.JkitPricingCache = {});\n const localizedData =\n cache.data\n || window.JkitDashboardOption?.pricingData\n || window.jkit?.pricingData\n || null;\n\n if (localizedData) {\n cache.data = localizedData;\n cache.cycles = getAvailableCycles(localizedData.plans || []);\n\n setPricingData(localizedData);\n if (cache.cycles.length > 0) {\n setBillingCycle(cache.cycles[0]);\n }\n setLoading(false);\n return;\n }\n\n setPricingData(null);\n setError(__('Pricing data is unavailable. Please reload the page.', 'jeg-elementor-kit'));\n setLoading(false);\n }, [isOpen, config]);\n\n const handleCheckout = async (plan, pricingEntry) => {\n setCheckingOut(pricingEntry.id);\n await loadCheckoutScript(config.is_production);\n\n if (!window.FS || !window.FS.Checkout) {\n setCheckingOut(null);\n return;\n }\n\n if (!fsHandlerRef.current) {\n fsHandlerRef.current = window.FS.Checkout.configure({\n plugin_id: config.plugin_id,\n public_key: config.plugin_public_key,\n ...(config.sandbox && { sandbox: config.sandbox }),\n ...(config.s_ctx_type && { s_ctx_type: config.s_ctx_type }),\n ...(config.s_ctx_id && { s_ctx_id: config.s_ctx_id }),\n ...(config.s_ctx_ts && { s_ctx_ts: config.s_ctx_ts }),\n ...(config.s_ctx_secure && { s_ctx_secure: config.s_ctx_secure }),\n ...(config.home_url && { home_url: config.home_url }),\n ...(config.next && { next: config.next }),\n ...(config.is_network_admin && { is_network_admin: config.is_network_admin }),\n ...(config.plugin_version && { plugin_version: config.plugin_version }),\n });\n }\n\n const pricingPlan = getPricingPlan();\n const resolvedCoupon = (() => {\n if (!pricingPlan) return config.default_coupon || null;\n const id = String(pricingEntry.id);\n for (const key of ['basic', 'professional', 'agency']) {\n const p = pricingPlan[key];\n if (p?.pricing_id && id === String(p.pricing_id) && p.coupon) return p.coupon;\n }\n return config.default_coupon || null;\n })();\n\n const trackerId = trackBeforeCheckout();\n\n fsHandlerRef.current.open({\n name: plan.title || plan.name,\n licenses: pricingEntry.licenses || 1,\n billing_cycle: billingCycle,\n currency,\n pricing_id: pricingEntry.id,\n ...(resolvedCoupon && { coupon: resolvedCoupon }),\n tracker_id: trackerId,\n });\n\n setCheckingOut(null);\n };\n\n const toggleMaximize = (e) => {\n e?.stopPropagation();\n setIsMaximized((v) => !v);\n };\n\n if (!isOpen) return null;\n\n const visiblePlans = pricingData?.plans?.filter((p) => !p.is_hidden) || [];\n const availableCycles = getAvailableCycles(visiblePlans);\n const pricingPlan = getPricingPlan();\n const isEventActive = !!pricingPlan?.is_event_sales;\n const activePlan = pricingPlan;\n\n return (\n <div\n style={{ ...overlayStyle, top: adminBarTop ? `${adminBarTop}px` : overlayStyle.top }}\n onClick={onClose}\n aria-modal=\"true\"\n role=\"dialog\"\n >\n <div className={`f-pricing-modal__container ${isMaximized ? 'is-maximized' : ''}`} onClick={(e) => e.stopPropagation()}>\n <div className=\"f-pricing-modal__topbar\" role=\"toolbar\" aria-label={__('Modal controls', 'jeg-elementor-kit')}>\n <div className=\"f-pricing-modal__controls\">\n <button className=\"f-pricing-modal__dot is-max\" title={__('Maximize', 'jeg-elementor-kit')} onClick={toggleMaximize} aria-pressed={isMaximized}>\n {!isMaximized ? (\n <svg width=\"6\" height=\"6\" viewBox=\"0 0 6 6\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M5.83333 4.00359L5.81488 0.216779C5.81479 0.190851 5.80958 0.165146 5.79956 0.141137C5.78953 0.117128 5.77489 0.0952874 5.75647 0.0768641C5.73805 0.0584409 5.7162 0.0437981 5.6922 0.0337743C5.66819 0.0237505 5.64248 0.0185422 5.61655 0.0184487L1.82974 3.7135e-06C1.79071 -0.000235863 1.75259 0.0111217 1.72022 0.0326356C1.68786 0.0541495 1.66271 0.084851 1.64795 0.120849C1.6332 0.156846 1.62951 0.196518 1.63735 0.234836C1.64519 0.273153 1.66421 0.30839 1.692 0.33608L5.49725 4.14133C5.52494 4.16912 5.56018 4.18814 5.5985 4.19598C5.63681 4.20382 5.67649 4.20013 5.71248 4.18538C5.74848 4.17063 5.77918 4.14547 5.8007 4.11311C5.82221 4.08074 5.83357 4.04262 5.83333 4.00359Z\" fill=\"white\" />\n <path d=\"M3.7137e-06 1.82975L0.0184478 5.61655C0.0185413 5.64248 0.0237495 5.66819 0.0337733 5.69219C0.0437971 5.7162 0.058439 5.73805 0.0768622 5.75647C0.0952855 5.77489 0.117127 5.78954 0.141136 5.79956C0.165145 5.80958 0.19085 5.81479 0.216778 5.81489L4.00359 5.83333C4.04263 5.83357 4.08074 5.82221 4.11311 5.8007C4.14547 5.77918 4.17062 5.74848 4.18538 5.71249C4.20013 5.67649 4.20382 5.63682 4.19598 5.5985C4.18814 5.56018 4.16912 5.52494 4.14133 5.49725L0.336079 1.692C0.308389 1.66421 0.273154 1.64519 0.234836 1.63735C0.196519 1.62951 0.156845 1.6332 0.120848 1.64795C0.08485 1.66271 0.0541485 1.68786 0.0326346 1.72023C0.0111208 1.75259 -0.000235859 1.79071 3.7137e-06 1.82975Z\" fill=\"white\" />\n </svg>\n ) : (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4.66674 0.190959L4.68467 3.87263C4.68476 3.89784 4.68983 3.92283 4.69957 3.94618C4.70932 3.96952 4.72355 3.99075 4.74146 4.00866C4.75938 4.02658 4.78061 4.04081 4.80395 4.05056C4.8273 4.0603 4.85229 4.06537 4.8775 4.06546L8.55917 4.08339C8.59712 4.08362 8.63418 4.07258 8.66565 4.05166C8.69711 4.03075 8.72157 4.0009 8.73591 3.9659C8.75026 3.9309 8.75385 3.89233 8.74622 3.85508C8.7386 3.81783 8.72011 3.78357 8.69309 3.75665L4.99348 0.0570389C4.96656 0.0300228 4.9323 0.0115306 4.89505 0.00390665C4.8578 -0.00371727 4.81923 -0.000129693 4.78423 0.0142147C4.74923 0.0285592 4.71938 0.0530145 4.69846 0.0844801C4.67755 0.115946 4.66651 0.153005 4.66674 0.190959Z\" fill=\"white\" />\n <path d=\"M4.08339 8.55917L4.06546 4.8775C4.06537 4.85229 4.0603 4.8273 4.05056 4.80396C4.04081 4.78061 4.02658 4.75938 4.00866 4.74147C3.99075 4.72356 3.96952 4.70932 3.94618 4.69957C3.92283 4.68983 3.89784 4.68476 3.87263 4.68467L0.190959 4.66674C0.153005 4.66651 0.115946 4.67755 0.08448 4.69847C0.0530143 4.71938 0.0285591 4.74923 0.0142146 4.78423C-0.000129815 4.81923 -0.00371769 4.8578 0.00390623 4.89505C0.0115301 4.93231 0.0300225 4.96657 0.0570385 4.99349L3.75665 8.69309C3.78357 8.72011 3.81782 8.7386 3.85508 8.74622C3.89233 8.75385 3.9309 8.75026 3.9659 8.73592C4.0009 8.72157 4.03075 8.69712 4.05166 8.66565C4.07258 8.63419 4.08362 8.59713 4.08339 8.55917Z\" fill=\"white\" />\n </svg>\n\n )}\n </button>\n <button className=\"f-pricing-modal__dot is-min\" aria-hidden=\"true\" title={__('Minimize', 'jeg-elementor-kit')}></button>\n <button className=\"f-pricing-modal__dot is-close\" id=\"pricing-close\" aria-label={__('Close', 'jeg-elementor-kit')} title={__('Close', 'jeg-elementor-kit')} onClick={onClose}>\n <svg width=\"6\" height=\"6\" viewBox=\"0 0 6 6\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M3.52792 2.85633L5.57356 0.815446C5.66315 0.725864 5.71347 0.604365 5.71347 0.477677C5.71347 0.350989 5.66315 0.22949 5.57356 0.139908C5.48398 0.0503265 5.36248 0 5.2358 0C5.10911 0 4.98761 0.0503265 4.89803 0.139908L2.85714 2.18555L0.816257 0.139908C0.726676 0.0503265 0.605177 -9.43898e-10 0.478489 0C0.351801 9.43899e-10 0.230302 0.0503265 0.14072 0.139908C0.0511385 0.22949 0.000812055 0.350989 0.000812054 0.477677C0.000812053 0.604365 0.0511385 0.725864 0.14072 0.815446L2.18636 2.85633L0.14072 4.89722C0.0961309 4.94144 0.0607395 4.99406 0.0365872 5.05203C0.012435 5.11 0 5.17218 0 5.23499C0 5.29779 0.012435 5.35997 0.0365872 5.41794C0.0607395 5.47591 0.0961309 5.52853 0.14072 5.57275C0.184946 5.61734 0.237562 5.65273 0.295534 5.67689C0.353506 5.70104 0.415687 5.71347 0.478489 5.71347C0.541291 5.71347 0.603472 5.70104 0.661444 5.67689C0.719416 5.65273 0.772032 5.61734 0.816257 5.57275L2.85714 3.52711L4.89803 5.57275C4.94225 5.61734 4.99487 5.65273 5.05284 5.67689C5.11081 5.70104 5.17299 5.71347 5.2358 5.71347C5.2986 5.71347 5.36078 5.70104 5.41875 5.67689C5.47672 5.65273 5.52934 5.61734 5.57356 5.57275C5.61815 5.52853 5.65355 5.47591 5.6777 5.41794C5.70185 5.35997 5.71429 5.29779 5.71429 5.23499C5.71429 5.17218 5.70185 5.11 5.6777 5.05203C5.65355 4.99406 5.61815 4.94144 5.57356 4.89722L3.52792 2.85633Z\" fill=\"white\" />\n </svg>\n </button>\n </div>\n </div>\n\n <div className=\"f-pricing-modal f-pricing\">\n {loading && <p>{__('Loading pricing...', 'jeg-elementor-kit')}</p>}\n {error && <p>{error}</p>}\n {!loading && !error && (\n <>\n <Hero isEventActive={isEventActive} eventExpired={pricingPlan?.event_expired} />\n <PlanCards\n isEventActive={isEventActive}\n availableCycles={availableCycles}\n billingCycle={billingCycle}\n onCycleChange={setBillingCycle}\n visiblePlans={visiblePlans}\n currency={currency}\n activePlan={activePlan}\n checkingOut={checkingOut}\n onCheckout={handleCheckout}\n />\n </>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport default PricingModal;\n","import { __ } from '@wordpress/i18n';\n\nexport const CYCLE_LABEL = {\n annual: __('Annual', 'jeg-elementor-kit'),\n monthly: __('Monthly', 'jeg-elementor-kit'),\n lifetime: __('Lifetime', 'jeg-elementor-kit'),\n};\n\nexport const PLAN_CARD_LABELS = {\n basic: __('Basic', 'jeg-elementor-kit'),\n professional: __('Professional', 'jeg-elementor-kit'),\n agency: __('Agency', 'jeg-elementor-kit'),\n};\n\nexport const FEATURE_BASE = [\n __('100+ Prebuilt Demo', 'jeg-elementor-kit'),\n __('Priority Support', 'jeg-elementor-kit'),\n __('Lifetime Update', 'jeg-elementor-kit'),\n __('Multi Language & Translation Support', 'jeg-elementor-kit'),\n];\n\nexport const FEATURE_GROUPS = [\n {\n label: __('Advance Multipurpose Widget', 'jeg-elementor-kit'),\n items: [\n __('Interactive Widgets', 'jeg-elementor-kit'),\n __('Content Widgets', 'jeg-elementor-kit'),\n __('Multimedia Widgets', 'jeg-elementor-kit'),\n __('Chart Widgets', 'jeg-elementor-kit'),\n __('Marketing Widgets', 'jeg-elementor-kit'),\n __('Social Widgets', 'jeg-elementor-kit'),\n __('Navigation Widgets', 'jeg-elementor-kit'),\n __('Post Widget', 'jeg-elementor-kit'),\n __('Social Widget', 'jeg-elementor-kit'),\n ],\n },\n {\n label: __('Woocommerce Integration', 'jeg-elementor-kit'),\n items: [\n __('Product Grid Widget', 'jeg-elementor-kit'),\n __('Product Carousel Widget', 'jeg-elementor-kit'),\n __('Single Product Widgets', 'jeg-elementor-kit'),\n __('Cart Widgets', 'jeg-elementor-kit'),\n __('Checkout Widgets', 'jeg-elementor-kit'),\n __('Account Page Widgets', 'jeg-elementor-kit'),\n __('Product Archive Widgets', 'jeg-elementor-kit'),\n __('Product Filter', 'jeg-elementor-kit'),\n ],\n },\n {\n label: __('Advance Builder', 'jeg-elementor-kit'),\n items: [\n __('Megamenu Builder', 'jeg-elementor-kit'),\n __('Popup Builder', 'jeg-elementor-kit'),\n ],\n },\n {\n label: __('Custom Templates', 'jeg-elementor-kit'),\n items: [\n __('Custom Header', 'jeg-elementor-kit'),\n __('Custom Footer', 'jeg-elementor-kit'),\n __('Custom 404 Page', 'jeg-elementor-kit'),\n __('Custom Single Post', 'jeg-elementor-kit'),\n __('Custom Single Product', 'jeg-elementor-kit'),\n __('Custom Archive', 'jeg-elementor-kit'),\n ],\n },\n {\n label: __('Advance Animations & Styling', 'jeg-elementor-kit'),\n items: [\n __('Background Motion Effects', 'jeg-elementor-kit'),\n __('Mouse Effects', 'jeg-elementor-kit'),\n __('Parallax', 'jeg-elementor-kit'),\n __('Blend Mode', 'jeg-elementor-kit'),\n __('Custom Cursor', 'jeg-elementor-kit'),\n ],\n },\n];\n\nexport const FAQ_DATA = [\n {\n q: __('Can I cancel my account at any time?', 'jeg-elementor-kit'),\n a: __(\"Yes, if you ever decide that Jeg Kit isn't the best plugin for your business, simply cancel your account from your Account panel.\", 'jeg-elementor-kit'),\n },\n {\n q: __('Do you offer refunds?', 'jeg-elementor-kit'),\n a: __(\"We offer a 100% satisfaction guarantee, no questions asked. If you're not satisfied within 14 days, we'll promptly issue a full refund.\", 'jeg-elementor-kit'),\n },\n {\n q: __(\"What's the time span for your contracts?\", 'jeg-elementor-kit'),\n a: __('All plans are annual subscriptions. There are no long-term lock-ins — you can cancel at any time.', 'jeg-elementor-kit'),\n },\n {\n q: __('Do you offer support if I need help?', 'jeg-elementor-kit'),\n a: __('Yes! All plans include priority support from our team.', 'jeg-elementor-kit'),\n },\n {\n q: __('Can I change my plan later on?', 'jeg-elementor-kit'),\n a: __('Absolutely. You can upgrade or switch plans at any time from your account dashboard.', 'jeg-elementor-kit'),\n },\n {\n q: __('What payment methods are accepted?', 'jeg-elementor-kit'),\n a: __('We accept Visa, Mastercard, American Express, JCB, and PayPal.', 'jeg-elementor-kit'),\n },\n {\n q: __('I have other pre-sale questions, can you help?', 'jeg-elementor-kit'),\n a: __(\"Of course! Reach out to our support team and we'll be happy to help.\", 'jeg-elementor-kit'),\n },\n];\n","import { __, sprintf } from '@wordpress/i18n';\n\nexport const loadCheckoutScript = (isProduction) => {\n return new Promise((resolve) => {\n if (window.FS && window.FS.Checkout) {\n resolve();\n return;\n }\n const script = document.createElement('script');\n script.src = (isProduction !== false\n ? 'https://checkout.freemius.com'\n : 'http://checkout.freemius-local.com:8080'\n ) + '/checkout.js';\n script.async = true;\n script.onload = resolve;\n document.body.appendChild(script);\n });\n};\n\nexport const fetchPricingData = (config) => {\n const {\n request_handler_url,\n sandbox,\n s_ctx_type,\n s_ctx_id,\n s_ctx_ts,\n s_ctx_secure,\n } = config;\n\n const params = { pricing_action: 'fetch_pricing_data', trial: 'false' };\n if (sandbox) params.sandbox = sandbox;\n if (s_ctx_type) params.s_ctx_type = s_ctx_type;\n if (s_ctx_id) params.s_ctx_id = s_ctx_id;\n if (s_ctx_ts) params.s_ctx_ts = s_ctx_ts;\n if (s_ctx_secure) params.s_ctx_secure = s_ctx_secure;\n\n const url = `${request_handler_url}&${new URLSearchParams(params).toString()}`;\n\n return fetch(url, { method: 'GET' })\n .then((res) => res.json())\n .then((data) => (data.data ? data.data : data));\n};\n\nexport const formatPrice = (price, currency) => {\n if (price == null) return null;\n const symbol = { usd: '$', eur: '€', gbp: '£' }[currency] || '$';\n return `${symbol}${parseFloat(price).toFixed(2)}`;\n};\n\nexport const getLicensesLabel = (licenses) => {\n if (!licenses) return __('Unlimited Sites', 'jeg-elementor-kit');\n if (licenses === 1) return __('1 Site', 'jeg-elementor-kit');\n return sprintf(__('%d Sites', 'jeg-elementor-kit'), licenses);\n};\n\nexport const getAvailableCycles = (plans) => {\n const cycles = new Set();\n for (const plan of plans) {\n for (const p of (plan.pricing || [])) {\n if (p.monthly_price != null) cycles.add('monthly');\n if (p.annual_price != null) cycles.add('annual');\n if (p.lifetime_price != null) cycles.add('lifetime');\n }\n }\n const order = ['annual', 'monthly', 'lifetime'];\n return order.filter((c) => cycles.has(c));\n};\n","import { __, sprintf } from '@wordpress/i18n';\nimport { getPricingPlan } from '../../helpers';\n\nconst Hero = ({ isEventActive, eventExpired }) => {\n let maxPct = 0;\n try {\n const pricingPlan = getPricingPlan();\n if (pricingPlan) {\n ['basic', 'professional', 'agency'].forEach((k) => {\n const p = pricingPlan[k];\n if (!p) return;\n const val = Number(p.discount) || 0;\n if (val > 0 && (p.discount_type === 'percentage' || !p.discount_type)) {\n if (val > maxPct) maxPct = val;\n }\n });\n }\n } catch (e) {\n // ignore\n }\n\n const title = isEventActive && maxPct > 0\n ? sprintf(__('Upgrade to Pro and Save Up to %s%%', 'jeg-elementor-kit'), maxPct)\n : __('Affordable Pricing Plan', 'jeg-elementor-kit');\n\n const subtitle = isEventActive && maxPct > 0\n ? sprintf(__('Maximize your website’s potential with advanced widgets and demos. Upgrade today and unlock all premium features with up to %s%% off', 'jeg-elementor-kit'), maxPct)\n : __('Maximize your website\\'s potential with advanced widgets and demos. Upgrade to PRO and go further.', 'jeg-elementor-kit');\n\n return (\n <div className=\"f-pricing__hero\">\n <h2 className=\"f-pricing__title\">{title}</h2>\n <p className=\"f-pricing__subtitle\">{subtitle}</p>\n </div>\n );\n};\n\nexport default Hero;\n","import { __ } from '@wordpress/i18n';\nimport { getImgDir } from '../../helpers';\n\nexport const CheckIcon = () => (\n <svg width=\"10\" height=\"7\" viewBox=\"0 0 10 7\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M8.75 0.75L3.25 6.25L0.75 3.75\" stroke=\"#9C4DFF\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nexport const StarIcon = () => (\n <svg width=\"9\" height=\"11\" viewBox=\"0 0 9 11\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.39215 4.78333C7.25798 4.60833 7.09465 4.45667 6.94298 4.305C6.55215 3.955 6.10882 3.70417 5.73548 3.33667C4.86632 2.485 4.67382 1.07917 5.22798 0C4.67382 0.134167 4.18965 0.4375 3.77548 0.77C2.26465 1.98333 1.66965 4.12417 2.38132 5.96167C2.40465 6.02 2.42798 6.07833 2.42798 6.15417C2.42798 6.2825 2.34048 6.39917 2.22382 6.44583C2.08965 6.50417 1.94965 6.46917 1.83882 6.37583C1.80571 6.3481 1.77802 6.31448 1.75715 6.27667C1.09798 5.4425 0.992983 4.24667 1.43632 3.29C0.46215 4.08333 -0.0686836 5.425 0.00714976 6.69083C0.0421498 6.9825 0.0771497 7.27417 0.176316 7.56583C0.257983 7.91583 0.415483 8.26583 0.590483 8.575C1.22048 9.58417 2.31132 10.3075 3.48382 10.4533C4.73215 10.6108 6.06798 10.3833 7.02465 9.52C8.09215 8.55167 8.46548 7 7.91715 5.67L7.84132 5.51833C7.71882 5.25 7.39215 4.78333 7.39215 4.78333ZM5.54882 8.45833C5.38548 8.59833 5.11715 8.75 4.90715 8.80833C4.25382 9.04167 3.60048 8.715 3.21548 8.33C3.90965 8.16667 4.32382 7.65333 4.44632 7.13417C4.54548 6.6675 4.35882 6.2825 4.28298 5.83333C4.21298 5.40167 4.22465 5.03417 4.38215 4.63167C4.49298 4.85333 4.60965 5.075 4.74965 5.25C5.19882 5.83333 5.90465 6.09 6.05632 6.88333C6.07965 6.965 6.09132 7.04667 6.09132 7.13417C6.10882 7.6125 5.89882 8.1375 5.54882 8.45833Z\" fill=\"#9C4DFF\" />\n </svg>\n);\n\nexport const MoneyBackBadge = () => (\n <img\n src={(getImgDir() || '') + 'pricing/money-back.svg'}\n alt={__('Money Back Guarantee', 'jeg-elementor-kit')}\n className=\"f-pricing__money-back-badge\"\n />\n);\n","import { useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { CheckIcon, StarIcon } from './icons';\nimport { formatPrice, getLicensesLabel } from './helpers';\nimport {\n CYCLE_LABEL,\n PLAN_CARD_LABELS,\n FEATURE_BASE,\n FEATURE_GROUPS,\n} from './constants';\n\nexport const PlanCard = ({\n cardLabel,\n isFeatured,\n hasDiscount,\n discountVal,\n discountType,\n displayPrice,\n discountedDisplayPrice,\n discountedAnnualPrice,\n entry,\n billingCycle,\n currency,\n isEventActive,\n isCheckingOut,\n onCheckout,\n openGroups,\n onToggleGroup,\n}) => (\n <div className={`f-pricing__plan${isFeatured ? ' is-featured' : ''}${isEventActive ? ' is-event-sales' : ''}`}>\n {isFeatured && (\n <div className=\"f-pricing__badge\">\n <StarIcon /> {__('Most Popular', 'jeg-elementor-kit')}\n </div>\n )}\n {hasDiscount && !isEventActive && (\n <div className=\"f-pricing__discount-badge\">\n <div className=\"f-pricing__discount-main\">\n <span className=\"f-pricing__discount-num\">\n {discountType === 'fixed' ? formatPrice(discountVal, currency) : discountVal}\n </span>\n {discountType !== 'fixed' && (\n <div className=\"f-pricing__discount-right\">\n <span className=\"f-pricing__discount-pct\">%</span>\n <span className=\"f-pricing__discount-off\">{__('OFF', 'jeg-elementor-kit')}</span>\n </div>\n )}\n </div>\n <span className=\"f-pricing__discount-label\">{__('Limited Offer', 'jeg-elementor-kit')}</span>\n </div>\n )}\n <div className=\"f-pricing__plan-inner\">\n <h3 className=\"f-pricing__plan-name\">{cardLabel}</h3>\n\n <div className={`f-pricing__price-block${isEventActive ? ' f-pricing__price-block--event' : ''}`}>\n {isEventActive ? (\n <>\n <div className=\"f-pricing__event-price-row\">\n {discountedDisplayPrice && (\n <span className=\"f-pricing__original-price\">{formatPrice(displayPrice, currency)}</span>\n )}\n {hasDiscount && (\n <div className=\"f-pricing__save-badge\">\n {discountType === 'fixed'\n ? sprintf(__('Save %s', 'jeg-elementor-kit'), formatPrice(discountVal, currency))\n : sprintf(__('Save %s%%', 'jeg-elementor-kit'), discountVal)\n }\n </div>\n )}\n <div className=\"f-pricing__amount-row\">\n <span className=\"f-pricing__amount\">{formatPrice(discountedDisplayPrice ?? displayPrice, currency)}</span>\n <span className=\"f-pricing__period\">\n {billingCycle === 'lifetime' ? __(' one-time', 'jeg-elementor-kit') : __('/mo', 'jeg-elementor-kit')}\n </span>\n </div>\n </div>\n </>\n ) : (\n <>\n {discountedDisplayPrice && (\n <span className=\"f-pricing__original-price\">{formatPrice(displayPrice, currency)}</span>\n )}\n <div className=\"f-pricing__amount-row\">\n <span className=\"f-pricing__amount\">{formatPrice(discountedDisplayPrice ?? displayPrice, currency)}</span>\n <span className=\"f-pricing__period\">\n {billingCycle === 'lifetime' ? __(' one-time', 'jeg-elementor-kit') : __('/month', 'jeg-elementor-kit')}\n </span>\n </div>\n </>\n )}\n {billingCycle === 'annual' && entry.annual_price && (\n <p className={`f-pricing__billing-note${discountedAnnualPrice ? ' has-renew' : ''}`}>\n <span className=\"f-pricing__billing-note-label\">{__('Billed annually.', 'jeg-elementor-kit')}</span>{' '}\n {sprintf(\n __('Pay %s/year today.', 'jeg-elementor-kit'),\n formatPrice(discountedAnnualPrice ?? entry.annual_price, currency)\n )}\n {discountedAnnualPrice && (\n <>\n <br />\n {sprintf(__('Renew at regular rate %s/year.', 'jeg-elementor-kit'), formatPrice(entry.annual_price, currency))}\n </>\n )}\n </p>\n )}\n </div>\n\n <a href=\"#\" className=\"f-pricing__cta\" onClick={onCheckout}>\n {isCheckingOut ? __('Loading...', 'jeg-elementor-kit') : __('Upgrade Now', 'jeg-elementor-kit')}\n <span className=\"f-pricing__cta-arrow\">›</span>\n </a>\n\n <ul className=\"f-pricing__features\">\n <li>\n <div className=\"f-pricing__feature-icon\"><CheckIcon /></div>\n {(() => {\n const label = sprintf(__('%s Licenses', 'jeg-elementor-kit'), getLicensesLabel(entry.licenses));\n const m = label.match(/^(\\d+\\+?)(.*)/);\n if (m) return <span className=\"f-pricing__feature-text\" data-num={m[1]}>{m[2]}</span>;\n return <span className=\"f-pricing__feature-text\">{label}</span>;\n })()}\n </li>\n {FEATURE_BASE.map((feat) => (\n <li key={feat}>\n <div className=\"f-pricing__feature-icon\"><CheckIcon /></div>\n {(() => {\n const m = feat.match(/^(\\d+\\+?)(\\s*)(.*)/);\n if (m) return <span className=\"f-pricing__feature-text\" data-num={m[1]}>{m[3]}</span>;\n return <span className=\"f-pricing__feature-text\">{feat}</span>;\n })()}\n </li>\n ))}\n </ul>\n\n {FEATURE_GROUPS.map((group) => {\n const isOpen = !!openGroups[group.label];\n return (\n <div key={group.label} className=\"f-pricing__group\">\n <button\n className={`f-pricing__group-toggle${isOpen ? ' is-open' : ''}`}\n onClick={() => onToggleGroup(group.label)}\n >\n <span>{group.label}</span>\n {isOpen ? (\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13.5 11.25L9 6.75L4.5 11.25\" stroke=\"#011627\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n ) : (\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4.5 6.75L9 11.25L13.5 6.75\" stroke=\"#011627\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )}\n </button>\n {isOpen && group.items.length > 0 && (\n <ul className=\"f-pricing__group-items\">\n {group.items.map((item) => (\n <li key={item}>\n <div className=\"f-pricing__feature-icon\"><CheckIcon /></div>\n {item}\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n })}\n </div>\n </div>\n);\n\nconst SERVER_PLAN_KEYS = ['basic', 'professional', 'agency'];\n\nconst NormalPlanCards = ({\n visiblePlans,\n billingCycle,\n currency,\n activePlan,\n checkingOut,\n onCheckout,\n openGroups,\n onToggleGroup,\n}) => {\n const cards = SERVER_PLAN_KEYS.map((key) => {\n const serverPlan = activePlan?.[key];\n if (!serverPlan?.plan_id) return null;\n\n const fsPlan = visiblePlans.find((p) => String(p.id) === String(serverPlan.plan_id));\n if (!fsPlan) return null;\n\n const entry = fsPlan.pricing?.find((p) => String(p.id) === String(serverPlan.pricing_id) && p.currency === currency);\n if (!entry) return null;\n\n const rawPrice = billingCycle === 'annual' ? entry.annual_price\n : billingCycle === 'monthly' ? entry.monthly_price\n : entry.lifetime_price;\n if (rawPrice == null) return null;\n\n const displayPrice = billingCycle === 'annual' ? rawPrice / 12 : rawPrice;\n const isFeatured = key === 'professional';\n const discountVal = Number(serverPlan.discount) || 0;\n const discountType = serverPlan.discount_type || 'percentage';\n const hasDiscount = discountVal > 0;\n const applyDiscount = (price) => {\n if (!hasDiscount) return null;\n return discountType === 'fixed'\n ? Math.max(0, price - discountVal)\n : price * (1 - discountVal / 100);\n };\n\n return (\n <PlanCard\n key={entry.id}\n cardLabel={PLAN_CARD_LABELS[key]}\n isFeatured={isFeatured}\n hasDiscount={hasDiscount}\n discountVal={discountVal}\n discountType={discountType}\n displayPrice={displayPrice}\n discountedDisplayPrice={applyDiscount(displayPrice)}\n discountedAnnualPrice={entry.annual_price ? applyDiscount(entry.annual_price) : null}\n entry={entry}\n billingCycle={billingCycle}\n currency={currency}\n isCheckingOut={checkingOut === entry.id}\n onCheckout={(e) => { e.preventDefault(); onCheckout(fsPlan, entry); }}\n isEventActive={false}\n openGroups={openGroups}\n onToggleGroup={onToggleGroup}\n />\n );\n }).filter(Boolean);\n\n return <div className=\"f-pricing__plans\">{cards}</div>;\n};\n\nconst EventSalesPlanCards = ({\n visiblePlans,\n billingCycle,\n currency,\n activePlan,\n checkingOut,\n onCheckout,\n openGroups,\n onToggleGroup,\n}) => {\n const cards = SERVER_PLAN_KEYS.map((key) => {\n const serverPlan = activePlan?.[key];\n if (!serverPlan?.plan_id) return null;\n\n const fsPlan = visiblePlans.find((p) => String(p.id) === String(serverPlan.plan_id));\n if (!fsPlan) return null;\n\n const entry = fsPlan.pricing?.find((p) => String(p.id) === String(serverPlan.pricing_id) && p.currency === currency);\n if (!entry) return null;\n\n const rawPrice = billingCycle === 'annual' ? entry.annual_price\n : billingCycle === 'monthly' ? entry.monthly_price\n : entry.lifetime_price;\n if (rawPrice == null) return null;\n\n const displayPrice = billingCycle === 'annual' ? rawPrice / 12 : rawPrice;\n const isFeatured = key === 'professional';\n const discountVal = Number(serverPlan.discount) || 0;\n const discountType = serverPlan.discount_type || 'percentage';\n const hasDiscount = discountVal > 0;\n const applyDiscount = (price) => {\n if (!hasDiscount) return null;\n return discountType === 'fixed'\n ? Math.max(0, price - discountVal)\n : price * (1 - discountVal / 100);\n };\n\n return (\n <PlanCard\n key={entry.id}\n cardLabel={PLAN_CARD_LABELS[key]}\n isFeatured={isFeatured}\n hasDiscount={hasDiscount}\n discountVal={discountVal}\n discountType={discountType}\n displayPrice={displayPrice}\n discountedDisplayPrice={applyDiscount(displayPrice)}\n discountedAnnualPrice={entry.annual_price ? applyDiscount(entry.annual_price) : null}\n entry={entry}\n billingCycle={billingCycle}\n currency={currency}\n isCheckingOut={checkingOut === entry.id}\n onCheckout={(e) => { e.preventDefault(); onCheckout(fsPlan, entry); }}\n isEventActive={true}\n openGroups={openGroups}\n onToggleGroup={onToggleGroup}\n />\n );\n }).filter(Boolean);\n\n return <div className=\"f-pricing__plans f-pricing__plans--event\">{cards}</div>;\n};\n\nconst PlanCards = ({\n isEventActive,\n availableCycles,\n billingCycle,\n onCycleChange,\n visiblePlans,\n currency,\n activePlan,\n checkingOut,\n onCheckout,\n}) => {\n const [openGroups, setOpenGroups] = useState({ 'Advance Multipurpose Widget': true });\n\n const onToggleGroup = (label) =>\n setOpenGroups((prev) => ({ ...prev, [label]: !prev[label] }));\n\n const sharedProps = {\n visiblePlans,\n billingCycle,\n currency,\n activePlan,\n checkingOut,\n onCheckout,\n openGroups,\n onToggleGroup,\n };\n\n return (\n <>\n {availableCycles.length > 1 && (\n <div className=\"f-pricing__cycles\">\n {availableCycles.map((cycle) => (\n <button\n key={cycle}\n onClick={() => onCycleChange(cycle)}\n className={`f-pricing__cycle-btn${billingCycle === cycle ? ' is-active' : ''}`}\n >\n {CYCLE_LABEL[cycle]}\n </button>\n ))}\n </div>\n )}\n\n {isEventActive\n ? <EventSalesPlanCards {...sharedProps} />\n : <NormalPlanCards {...sharedProps} />\n }\n </>\n );\n};\n\nexport default PlanCards;\n","/**\n * Small helpers to read Jkit dashboard options from the page.\n * Prefer `window.JkitDashboardOption` when present, otherwise fall back to `window.jkit`.\n */\nexport function getFreemiusPricing() {\n return (\n (typeof window !== 'undefined' && window['JkitDashboardOption'] && window['JkitDashboardOption'].freemius && window['JkitDashboardOption'].freemius.pricing)\n || (typeof window !== 'undefined' && window.jkit && window.jkit.options && window.jkit.options.freemius && window.jkit.options.freemius.pricing)\n || null\n );\n}\n\nexport function getPricingPlan() {\n return (\n (typeof window !== 'undefined' && window['JkitDashboardOption'] && window['JkitDashboardOption'].pricingPlan)\n || (typeof window !== 'undefined' && window.jkit && window.jkit.pricingPlan)\n || null\n );\n}\n\nexport function getImgDir() {\n\treturn (\n\t\t(typeof window !== 'undefined' && window['JkitDashboardOption'] && window['JkitDashboardOption'].imgDir)\n\t\t|| (typeof window !== 'undefined' && window.jkit && window.jkit.imgDir)\n\t\t|| ''\n\t);\n}\n\nfunction assignPricingModalData(data) {\n\tif (typeof window === 'undefined' || !data) return data;\n\n\twindow.jkit = window.jkit || {};\n\twindow.jkit.options = window.jkit.options || {};\n\twindow.jkit.options.freemius = data.freemius || {};\n\twindow.jkit.pricingPlan = data.pricingPlan || null;\n\twindow.jkit.imgDir = data.imgDir || '';\n\n\tif (data.wpRestNonce) {\n\t\twindow.jkit.wpRestNonce = data.wpRestNonce;\n\t}\n\n\twindow.JkitDashboardOption = window.JkitDashboardOption || {};\n\twindow.JkitDashboardOption.freemius = data.freemius || {};\n\twindow.JkitDashboardOption.pricingPlan = data.pricingPlan || null;\n\twindow.JkitDashboardOption.imgDir = data.imgDir || '';\n\n\tif (data.wpRestNonce) {\n\t\twindow.JkitDashboardOption.wpRestNonce = data.wpRestNonce;\n\t}\n\n\treturn data;\n}\n\nexport function loadPricingModalData() {\n\tif (typeof window === 'undefined') return Promise.resolve(null);\n\n\tif (getFreemiusPricing() && getPricingPlan()) {\n\t\treturn Promise.resolve({\n\t\t\tfreemius: { pricing: getFreemiusPricing() },\n\t\t\tpricingPlan: getPricingPlan(),\n\t\t\timgDir: getImgDir(),\n\t\t});\n\t}\n\n\tif (window.JkitPricingModalDataPromise) {\n\t\treturn window.JkitPricingModalDataPromise;\n\t}\n\n if (window.JkitDashboardOption?.pricingData || window.jkit?.pricingData) {\n return Promise.resolve(\n assignPricingModalData({\n freemius: { pricing: getFreemiusPricing() },\n pricingPlan: getPricingPlan(),\n imgDir: getImgDir(),\n })\n );\n }\n\n return Promise.resolve(null);\n}\n\n/**\n * Call `cb(config)` when pricing config is available.\n * Returns `true` if callback was invoked, otherwise `false`.\n */\nexport function withPricingConfig(cb) {\n const cfg = getFreemiusPricing();\n if (cfg) {\n try { cb(cfg); } catch (e) { /* swallow callback errors */ }\n return true;\n }\n return false;\n}\n\n\n// --- UTM tracker helpers (migrated here so consumers import a single helper file)\n\nfunction generateUUID() {\n if (typeof crypto !== 'undefined' && crypto.randomUUID) {\n return crypto.randomUUID();\n }\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nfunction getCookie(name) {\n const match = document.cookie.match(new RegExp('(?:^|;\\\\s*)' + name.replace(/[.*+?^${}()|[\\\\]\\\\]/g, '\\\\$&') + '=([^;]*)'));\n return match ? decodeURIComponent(match[1]) : '';\n}\n\nexport function trackBeforeCheckout() {\n const trackerId = generateUUID();\n\n const urlParams = new URLSearchParams(window.location.search);\n const utm = {\n utm_source: urlParams.get('utm_source') || '',\n utm_medium: urlParams.get('utm_medium') || '',\n utm_campaign: urlParams.get('utm_campaign') || '',\n };\n\n const fbp = getCookie('_fbp');\n const fbc = getCookie('_fbc');\n const freemiusConfig = getFreemiusPricing();\n\n const proxyEndpoint = '/wp-json/jkit/v1/utm-proxy/';\n const nonce = (typeof window !== 'undefined' && (window.jkit?.wpRestNonce || window['JkitDashboardOption']?.wpRestNonce)) || '';\n\n fetch(proxyEndpoint, {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'Content-Type': 'application/json', 'X-WP-Nonce': nonce },\n body: JSON.stringify({\n tracker_id: trackerId,\n utm_source: utm.utm_source,\n utm_medium: utm.utm_medium,\n utm_campaign: utm.utm_campaign,\n utm_client_site: freemiusConfig?.client_site || window.location.hostname,\n utm_client_theme: freemiusConfig?.client_theme || '',\n _fbp: fbp,\n _fbc: fbc,\n }),\n }).catch(() => { /* ignore errors */ });\n\n return trackerId;\n}\n","import ReactDOM from 'react-dom';\nimport { useState, useEffect } from '@wordpress/element';\nimport PricingModal from './components/pricing-modal';\n\nconst mountNodeId = 'jkit-global-pricing-modal-root';\n\nconst ModalHost = () => {\n const [isOpen, setIsOpen] = useState(false);\n\n useEffect(() => {\n // expose open/close to window for non-React callers\n window.JkitOpenPricingModal = () => setIsOpen(true);\n window.JkitClosePricingModal = () => setIsOpen(false);\n return () => {\n try { delete window.JkitOpenPricingModal; } catch (e) {}\n try { delete window.JkitClosePricingModal; } catch (e) {}\n };\n }, []);\n\n return <PricingModal isOpen={isOpen} onClose={() => setIsOpen(false)} />;\n};\n\nconst mount = () => {\n if (typeof document === 'undefined') return;\n let root = document.getElementById(mountNodeId);\n if (!root) {\n root = document.createElement('div');\n root.id = mountNodeId;\n document.body.appendChild(root);\n }\n\n // Use createRoot when available (React 18+), fall back to legacy render.\n // Prefer React 18 createRoot if it's available on the ReactDOM global.\n try {\n if (ReactDOM && typeof ReactDOM.createRoot === 'function') {\n // Reuse existing root if previously created to avoid React warning\n // about calling createRoot on the same container multiple times.\n if (root.__jkit_react_root) {\n try {\n root.__jkit_react_root.render(<ModalHost />);\n return;\n } catch (e) {\n // fall through to recreate\n }\n }\n\n const r = ReactDOM.createRoot(root);\n // store the root for future reuse\n try { root.__jkit_react_root = r; } catch (e) { /* ignore */ }\n r.render(<ModalHost />);\n return;\n } else {\n ReactDOM.render(<ModalHost />, root);\n }\n } catch (e) {\n ReactDOM.render(<ModalHost />, root);\n }\n};\n\nif (typeof window !== 'undefined') {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n mount();\n } else {\n window.addEventListener('load', mount);\n }\n}\n\nexport default {};\n","module.exports = window[\"regeneratorRuntime\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactDOM\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import ReactDOM from 'react-dom';\nimport { useEffect } from '@wordpress/element';\n\n// Ensure shared modal host is mounted and window.JkitOpenPricingModal is available\nimport '../shared/modal-host';\n\nconst SELECTOR = 'a.upgrade, .button-upgrade-pro, .button-upgrade, .upgrade-pro-btn, .jkit-upgrade-to-pro-menu a, #wp-admin-bar-jeg-kit-pro, .jkit-upgrade-banner .jkit-banner-cta-button-wrapper .jkit-banner-cta-button, .f-button-upgrade, #jkit-onboard-wizard .upgrade-pro-button, #jkit-onboard-wizard .f-button-upgrade, a.upgrade-to-pro.jeg-kit-pro, a.jkit-meta-upgrade-to-pro';\n\nconst AdminHost = () => {\n useEffect(() => {\n const onClick = (e) => {\n const el = e.target.closest && e.target.closest(SELECTOR);\n if (!el) return;\n\n try {\n e.preventDefault();\n e.stopPropagation();\n if (typeof e.stopImmediatePropagation === 'function') e.stopImmediatePropagation();\n } catch (err) {\n // ignore\n }\n\n\t\t\tif (typeof window.JkitOpenPricingModal === 'function') {\n window.JkitOpenPricingModal();\n\t\t\t\treturn;\n\t\t\t}\n\n const href = (el.getAttribute && el.getAttribute('href')) || (window.location.origin + '/wp-admin/admin.php?page=jkit');\n window.open(href, '_blank');\n };\n\n document.addEventListener('click', onClick, true);\n document.addEventListener('auxclick', onClick, true);\n return () => {\n document.removeEventListener('click', onClick, true);\n document.removeEventListener('auxclick', onClick, true);\n };\n }, []);\n\n return null;\n};\n\nconst mount = () => {\n if (typeof document === 'undefined') return;\n let root = document.getElementById('jkit-admin-host-root');\n if (!root) {\n root = document.createElement('div');\n root.id = 'jkit-admin-host-root';\n document.body.appendChild(root);\n }\n try {\n if (ReactDOM && typeof ReactDOM.createRoot === 'function') {\n ReactDOM.createRoot(root).render(<AdminHost />);\n } else {\n ReactDOM.render(<AdminHost />, root);\n }\n } catch (e) {\n ReactDOM.render(<AdminHost />, root);\n }\n};\n\nif (document.readyState === 'complete' || document.readyState === 'interactive') {\n mount();\n} else {\n window.addEventListener('load', mount);\n}\n\nexport default {};\n"],"names":[],"ignoreList":[],"sourceRoot":""}