Uname:Windows NT WIN-HN0MTSF2AF1 6.1 build 7601 (Windows Server 2008 R2 Enterprise Edition Service Pack 1) AMD64

403WebShell
403Webshell
Server IP : 172.67.191.88  /  Your IP : 104.23.243.205
Web Server : Microsoft-IIS/7.5
System : Windows NT WIN-HN0MTSF2AF1 6.1 build 7601 (Windows Server 2008 R2 Enterprise Edition Service Pack 1) AMD64
User : IWPD_11(bayt-altogg) ( 0)
PHP Version : 8.2.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Inetpub/vhosts/bayt-altoggar.com/httpdocs/wp-content/plugins/advanced-ads/assets/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Inetpub/vhosts/bayt-altoggar.com/httpdocs/wp-content/plugins/advanced-ads/assets/dist/app.js
(()=>{"use strict";var e={n:a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},d:(a,t)=>{for(var n in t)e.o(t,n)&&!e.o(a,n)&&Object.defineProperty(a,n,{enumerable:!0,get:t[n]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a)};const a=window.wp.domReady;var t=e.n(a);const n=window.wp.element,s=window.wp.i18n,r=window.React,i=(...e)=>e.filter((e,a,t)=>Boolean(e)&&""!==e.trim()&&t.indexOf(e)===a).join(" ").trim(),o=e=>{const a=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,a,t)=>t?t.toUpperCase():a.toLowerCase()))(e);return a.charAt(0).toUpperCase()+a.slice(1)};var d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const l=e=>{for(const a in e)if(a.startsWith("aria-")||"role"===a||"title"===a)return!0;return!1},c=(0,r.createContext)({}),u=(0,r.forwardRef)(({color:e,size:a,strokeWidth:t,absoluteStrokeWidth:n,className:s="",children:o,iconNode:u,...m},p)=>{const{size:g=24,strokeWidth:h=2,absoluteStrokeWidth:f=!1,color:v="currentColor",className:b=""}=(0,r.useContext)(c)??{},x=n??f?24*Number(t??h)/Number(a??g):t??h;return(0,r.createElement)("svg",{ref:p,...d,width:a??g??d.width,height:a??g??d.height,stroke:e??v,strokeWidth:x,className:i("lucide",b,s),...!o&&!l(m)&&{"aria-hidden":"true"},...m},[...u.map(([e,a])=>(0,r.createElement)(e,a)),...Array.isArray(o)?o:[o]])}),m=(e,a)=>{const t=(0,r.forwardRef)(({className:t,...n},s)=>{return(0,r.createElement)(u,{ref:s,iconNode:a,className:i(`lucide-${d=o(e),d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,t),...n});var d});return t.displayName=o(e),t},p=m("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),g=m("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),h=advancedAds;var f,v;function b(){return b=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},b.apply(null,arguments)}const x=function(e){return r.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 351.7 352"},e),f||(f=r.createElement("path",{fill:"#1C1B3A",d:"M252.2 149.6v125.1H77.3V99.8h125.1c-5.2-11.8-8-24.7-8-38.5s3-26.7 8-38.5H0v267.9l8.8 8.8-8.8-8.8C0 324.5 27.5 352 61.3 352h267.9V149.3c-11.8 5.2-25 8.3-38.8 8.3-13.5 0-26.4-3-38.2-8"})),v||(v=r.createElement("circle",{cx:290.4,cy:61.3,r:61.3,fill:"#0E75A4"})))};function _(e=!1){const[a,t]=(0,n.useState)(e);return{isOpen:a,open:(0,n.useCallback)(()=>{t(!0)},[]),close:(0,n.useCallback)(()=>{t(!1)},[]),toggle:(0,n.useCallback)(()=>{t(e=>!e)},[])}}const y={pro:{title:(0,s.__)("Advanced Ads Pro","advanced-ads"),description:(0,s.__)("Take the monetization of your website to the next level.","advanced-ads"),learnMore:"https://wpadvancedads.com/add-ons/advanced-ads-pro/?utm_source=advancedads&utm_medium=in-plugin&utm_campaign=a2-in_plugin-licenses_addons-pro_addon_learn_more",manualUrl:"https://wpadvancedads.com/manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons-manual",iconId:"pro"},responsive:{title:(0,s.__)("AMP Ads","advanced-ads"),description:(0,s.__)("Integrate your ads on AMP (Accelerated Mobile Pages) and auto-convert your Google AdSense ad units for enhanced mobile performance.","advanced-ads"),learnMore:"https://wpadvancedads.com/add-ons/responsive-ads/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons",manualUrl:"https://wpadvancedads.com/manual/ads-on-amp-pages/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons-manual",iconId:"ampads"},gam:{title:(0,s.__)("Google Ad Manager Integration","advanced-ads"),description:(0,s.__)("Simplify the process of implementing ad units from Google Ad Manager swiftly and without errors.","advanced-ads"),learnMore:"https://wpadvancedads.com/add-ons/google-ad-manager/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons",manualUrl:"https://wpadvancedads.com/manual/google-ad-manager-integration-manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons-manual",iconId:"gam"},layer:{title:(0,s.__)("PopUp and Layer Ads","advanced-ads"),description:(0,s.__)("Capture attention with customizable pop-ups that ensure your ads and messages get noticed.","advanced-ads"),learnMore:"https://wpadvancedads.com/add-ons/popup-and-layer-ads/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons",manualUrl:"https://wpadvancedads.com/manual/popup-and-layer-ads-documentation/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons-manual",iconId:"popuplayer"},selling:{title:(0,s.__)("Selling Ads","advanced-ads"),description:(0,s.__)("Earn more money by enabling advertisers to buy ad space directly on your site's frontend.","advanced-ads"),learnMore:"https://wpadvancedads.com/add-ons/selling-ads/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons",manualUrl:"https://wpadvancedads.com/manual/selling-ads/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons-manual",iconId:"sellingads"},sticky:{title:(0,s.__)("Sticky Ads","advanced-ads"),description:(0,s.__)("Increase click rates by anchoring ads in sticky positions above, alongside, or below your website.","advanced-ads"),learnMore:"https://wpadvancedads.com/add-ons/sticky-ads/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons",manualUrl:"https://wpadvancedads.com/manual/sticky-ads-documentation/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons-manual",iconId:"stickyads"},tracking:{title:(0,s.__)("Tracking","advanced-ads"),description:(0,s.__)("Monitor your ad performance to maximize your revenue.","advanced-ads"),learnMore:"https://wpadvancedads.com/add-ons/tracking/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons",manualUrl:"https://wpadvancedads.com/manual/tracking-documentation/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons-manual",iconId:"tracking"}},w="https://wpadvancedads.com/manual/how-to-install-an-add-on/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-manual-install";const k=["pro","responsive","gam","layer","selling","sticky","tracking"];function j(e){const a=y[e],t=a?.iconId??e;return`${advancedAds?.endpoints?.assetsUrl??""}assets/img/add-ons/aa-addons-icons-${t}.svg`}const N="/license",S=864e5,A=[["pro",["pro"]],["tracking",["tracking"]],["responsive",["responsive","amp ads"]],["gam",["gam","google ad manager integration"]],["layer",["layer","popup and layer ads"]],["selling",["selling","selling ads"]],["sticky",["sticky","sticky ads"]]];function I(e,a){return e===a||e===`advanced ads ${a}`||e.endsWith(` ${a}`)}function L(e){return String(e??"").toLowerCase()}function C(e){return String(e??"")}function M(e){return C(e?.licenseKey)}function z(e,a){return String(e?.[a]??"")}function E(e){const a=$(e);return null!==a&&a.getTime()>Date.now()}function T(e,a,t){return{aaOnSite:ee(e,a),aaGoverns:Z(t,e)}}function P(e){if(!e||"string"!=typeof e)return"";try{return new URL(e).hostname}catch{return e.replace(/^https?:\/\//i,"").replace(/\/.*$/,"").replace(/\/$/,"")}}function U(e){const a=L(e);return"active"===a||"valid"===a}function $(e){if(!e)return null;const a=String(e).trim(),t=/^(\d{1,2})-(\d{1,2})-(\d{4})$/.exec(a);if(t){const e=new Date(Number(t[3]),Number(t[2])-1,Number(t[1]));return Number.isNaN(e.getTime())?null:e}const n=new Date(a);return Number.isNaN(n.getTime())?null:n}function O(e){const a=$(e);return a?a.getTime():0}function D(e,a){return!!function(e){return"expired"===L(e)}(e)||function(e){const a=O(e);return a>0&&a<=Date.now()}(a)}function F(e,a=30){const t=O(e),n=Date.now();return!(!t||t<=n)&&t-n<=a*S}function K(e,a){if(U(e))return!0;const t=L(e);return"inactive"===t?!a||E(a):("expired"===t||"invalid"===t||"disabled"===t)&&!!a&&E(a)}function H(e,a){return!!a&&(e??[]).some(e=>String(e?.domain??"").includes(a))}function R(e,a){return!!K(e?.status,e?.expiryDate)&&H(e?.sitesActivated,a)}function W(e){if(!e)return"—";const a=$(e);return a?a.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):e}function q(e,a=0){return e=e??(0,s.__)("License","advanced-ads"),a>1?`${e} / ${a} ${(0,s.__)("sites","advanced-ads")}`:e}function B(e){return String(e??"").toLowerCase().trim().replace(/\s+/g," ")}function G(e){const a=B(e);return""!==a&&a.startsWith("all access")}function V(e){let a=B(e);if(""===a||a.startsWith("all access"))return null;a=function(e){return String(e??"").replace(/\s*\/\s*\d+\s*sites?.*$/i,"").replace(/\s*\(\s*\d+\s*sites?\s*\).*$/i,"").trim()}(a);for(const[e,t]of A)for(const n of t)if(I(a,n))return e;return null}function Y(e,a={}){return V(e?.name)??function(e,a){const t=C(e);if(!t)return null;for(const[e,n]of Object.entries(a??{}))if(String(n)===t)return e;return null}(e?.licenseKey,a)}function J(e){let a=null;for(const t of e??[]){if(!G(t?.name))continue;if(!K(t?.status,t?.expiryDate))continue;if(!a){a=t;continue}const e=U(a?.status);U(t?.status)&&!e&&(a=t)}return a}function Q(e){const a=new Set;for(const t of Object.values(e??{}))t&&a.add(String(t));return a}function Z(e,a){const t=[...Q(e)];if(t.length<2)return!1;if(1!==new Set(t).size)return!1;const n=J(a);return!!n&&String(n.licenseKey??"")===t[0]}function X(e,a){const t=C(e);return!!t&&Q(a).has(t)}function ee(e,a){const t=J(e);return!!t&&R(t,a)}function ae(e,a){const t=a?.[e];return{installed:Boolean(t?.installed),active:Boolean(t?.active)}}function te(e,a,t){const n=C(e);if(!n)return!1;for(const[e,s]of Object.entries(a??{}))if(String(s)===n&&ae(e,t).active)return!0;return!1}function ne(e,a,t,n={},s={}){const r=M(e);if(!r||!K(e?.status,e?.expiryDate))return!1;if(G(e?.name))return 0!==Q(n).size&&!!X(r,n)&&(!!R(e,t)||te(r,n,s));const{aaOnSite:i,aaGoverns:o}=T(a,t,n),d=Y(e,n);if(!d)return!i&&!o&&R(e,t);const l=se(d,r,n),c=ae(d,s).active;return l?c&&R(e,t):!i&&!o&&R(e,t)&&c}function se(e,a,t){return!(!e||!a)&&z(t,e)===C(a)}function re(e,a){const t=C(e);if(!t)return"";const n=(a??[]).find(e=>M(e)===t);return String(n?.name??"")}function ie(e,a,t){const{installed:n,active:s}=ae(e,a);return s&&t?"installed":s?"running":n?"ready":"needs_install"}function oe(e,a){const t=e||"main";return"on"===a?.[t]}function de(e){return G(e)?[...k]:[V(e)||"main"]}function le(e,a){const t=(a??[]).find(a=>a.id===e);return t?.downloadId?"all-access-five"===t.id&&2!==t.pricingId?null:{downloadId:Number(t.downloadId),pricingId:Number(t.pricingId)||0}:null}function ce(e){const a=e?.name??"";return G(a)?(e?.availableSites??0)>1?(0,s.__)("All Access (5 sites)","advanced-ads"):(0,s.__)("All Access","advanced-ads"):a||(0,s.__)("License","advanced-ads")}function ue(e){var a,t,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(a=0;a<s;a++)e[a]&&(t=ue(e[a]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}const me=(e=new Map,a=null,t)=>({nextPart:e,validators:a,classGroupId:t}),pe="-",ge=[],he=e=>{const a=be(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return ve(e);const t=e.split(pe),n=""===t[0]&&t.length>1?1:0;return fe(t,n,a)},getConflictingClassGroupIds:(e,a)=>{if(a){const a=n[e],s=t[e];return a?s?((e,a)=>{const t=new Array(e.length+a.length);for(let a=0;a<e.length;a++)t[a]=e[a];for(let n=0;n<a.length;n++)t[e.length+n]=a[n];return t})(s,a):a:s||ge}return t[e]||ge}}},fe=(e,a,t)=>{if(0===e.length-a)return t.classGroupId;const n=e[a],s=t.nextPart.get(n);if(s){const t=fe(e,a+1,s);if(t)return t}const r=t.validators;if(null===r)return;const i=0===a?e.join(pe):e.slice(a).join(pe),o=r.length;for(let e=0;e<o;e++){const a=r[e];if(a.validator(i))return a.classGroupId}},ve=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const a=e.slice(1,-1),t=a.indexOf(":"),n=a.slice(0,t);return n?"arbitrary.."+n:void 0})(),be=e=>{const{theme:a,classGroups:t}=e;return xe(t,a)},xe=(e,a)=>{const t=me();for(const n in e){const s=e[n];_e(s,t,n,a)}return t},_e=(e,a,t,n)=>{const s=e.length;for(let r=0;r<s;r++){const s=e[r];ye(s,a,t,n)}},ye=(e,a,t,n)=>{"string"!=typeof e?"function"!=typeof e?je(e,a,t,n):ke(e,a,t,n):we(e,a,t)},we=(e,a,t)=>{(""===e?a:Ne(a,e)).classGroupId=t},ke=(e,a,t,n)=>{Se(e)?_e(e(n),a,t,n):(null===a.validators&&(a.validators=[]),a.validators.push(((e,a)=>({classGroupId:e,validator:a}))(t,e)))},je=(e,a,t,n)=>{const s=Object.entries(e),r=s.length;for(let e=0;e<r;e++){const[r,i]=s[e];_e(i,Ne(a,r),t,n)}},Ne=(e,a)=>{let t=e;const n=a.split(pe),s=n.length;for(let e=0;e<s;e++){const a=n[e];let s=t.nextPart.get(a);s||(s=me(),t.nextPart.set(a,s)),t=s}return t},Se=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Ae=e=>{if(e<1)return{get:()=>{},set:()=>{}};let a=0,t=Object.create(null),n=Object.create(null);const s=(s,r)=>{t[s]=r,a++,a>e&&(a=0,n=t,t=Object.create(null))};return{get(e){let a=t[e];return void 0!==a?a:void 0!==(a=n[e])?(s(e,a),a):void 0},set(e,a){e in t?t[e]=a:s(e,a)}}},Ie=[],Le=(e,a,t,n,s)=>({modifiers:e,hasImportantModifier:a,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),Ce=e=>{const{prefix:a,experimentalParseClassName:t}=e;let n=e=>{const a=[];let t,n=0,s=0,r=0;const i=e.length;for(let o=0;o<i;o++){const i=e[o];if(0===n&&0===s){if(":"===i){a.push(e.slice(r,o)),r=o+1;continue}if("/"===i){t=o;continue}}"["===i?n++:"]"===i?n--:"("===i?s++:")"===i&&s--}const o=0===a.length?e:e.slice(r);let d=o,l=!1;return o.endsWith("!")?(d=o.slice(0,-1),l=!0):o.startsWith("!")&&(d=o.slice(1),l=!0),Le(a,l,d,t&&t>r?t-r:void 0)};if(a){const e=a+":",t=n;n=a=>a.startsWith(e)?t(a.slice(e.length)):Le(Ie,!1,a,void 0,!0)}if(t){const e=n;n=a=>t({className:a,parseClassName:e})}return n},Me=e=>{const a=new Map;return e.orderSensitiveModifiers.forEach((e,t)=>{a.set(e,1e6+t)}),e=>{const t=[];let n=[];for(let s=0;s<e.length;s++){const r=e[s],i="["===r[0],o=a.has(r);i||o?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(r)):n.push(r)}return n.length>0&&(n.sort(),t.push(...n)),t}},ze=/\s+/,Ee=e=>{if("string"==typeof e)return e;let a,t="";for(let n=0;n<e.length;n++)e[n]&&(a=Ee(e[n]))&&(t&&(t+=" "),t+=a);return t},Te=[],Pe=e=>{const a=a=>a[e]||Te;return a.isThemeGetter=!0,a},Ue=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$e=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Oe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,De=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ke=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,He=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Re=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,We=e=>Oe.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Be=e=>!!e&&Number.isInteger(Number(e)),Ge=e=>e.endsWith("%")&&qe(e.slice(0,-1)),Ve=e=>De.test(e),Ye=()=>!0,Je=e=>Fe.test(e)&&!Ke.test(e),Qe=()=>!1,Ze=e=>He.test(e),Xe=e=>Re.test(e),ea=e=>!ta(e)&&!ca(e),aa=e=>ba(e,wa,Qe),ta=e=>Ue.test(e),na=e=>ba(e,ka,Je),sa=e=>ba(e,ja,qe),ra=e=>ba(e,Sa,Ye),ia=e=>ba(e,Na,Qe),oa=e=>ba(e,_a,Qe),da=e=>ba(e,ya,Xe),la=e=>ba(e,Aa,Ze),ca=e=>$e.test(e),ua=e=>xa(e,ka),ma=e=>xa(e,Na),pa=e=>xa(e,_a),ga=e=>xa(e,wa),ha=e=>xa(e,ya),fa=e=>xa(e,Aa,!0),va=e=>xa(e,Sa,!0),ba=(e,a,t)=>{const n=Ue.exec(e);return!!n&&(n[1]?a(n[1]):t(n[2]))},xa=(e,a,t=!1)=>{const n=$e.exec(e);return!!n&&(n[1]?a(n[1]):t)},_a=e=>"position"===e||"percentage"===e,ya=e=>"image"===e||"url"===e,wa=e=>"length"===e||"size"===e||"bg-size"===e,ka=e=>"length"===e,ja=e=>"number"===e,Na=e=>"family-name"===e,Sa=e=>"number"===e||"weight"===e,Aa=e=>"shadow"===e,Ia=((e,...a)=>{let t,n,s,r;const i=e=>{const a=n(e);if(a)return a;const r=((e,a)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:r}=a,i=[],o=e.trim().split(ze);let d="";for(let e=o.length-1;e>=0;e-=1){const a=o[e],{isExternal:l,modifiers:c,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:p}=t(a);if(l){d=a+(d.length>0?" "+d:d);continue}let g=!!p,h=n(g?m.substring(0,p):m);if(!h){if(!g){d=a+(d.length>0?" "+d:d);continue}if(h=n(m),!h){d=a+(d.length>0?" "+d:d);continue}g=!1}const f=0===c.length?"":1===c.length?c[0]:r(c).join(":"),v=u?f+"!":f,b=v+h;if(i.indexOf(b)>-1)continue;i.push(b);const x=s(h,g);for(let e=0;e<x.length;++e){const a=x[e];i.push(v+a)}d=a+(d.length>0?" "+d:d)}return d})(e,t);return s(e,r),r};return r=o=>{const d=a.reduce((e,a)=>a(e),e());return t=(e=>({cache:Ae(e.cacheSize),parseClassName:Ce(e),sortModifiers:Me(e),...he(e)}))(d),n=t.cache.get,s=t.cache.set,r=i,i(o)},(...e)=>r(((...e)=>{let a,t,n=0,s="";for(;n<e.length;)(a=e[n++])&&(t=Ee(a))&&(s&&(s+=" "),s+=t);return s})(...e))})((Symbol.toStringTag,()=>{const e=Pe("color"),a=Pe("font"),t=Pe("text"),n=Pe("font-weight"),s=Pe("tracking"),r=Pe("leading"),i=Pe("breakpoint"),o=Pe("container"),d=Pe("spacing"),l=Pe("radius"),c=Pe("shadow"),u=Pe("inset-shadow"),m=Pe("text-shadow"),p=Pe("drop-shadow"),g=Pe("blur"),h=Pe("perspective"),f=Pe("aspect"),v=Pe("ease"),b=Pe("animate"),x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ca,ta],_=()=>[ca,ta,d],y=()=>[We,"full","auto",..._()],w=()=>[Be,"none","subgrid",ca,ta],k=()=>["auto",{span:["full",Be,ca,ta]},Be,ca,ta],j=()=>[Be,"auto",ca,ta],N=()=>["auto","min","max","fr",ca,ta],S=()=>["auto",..._()],A=()=>[We,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],I=()=>[We,"screen","full","dvw","lvw","svw","min","max","fit",..._()],L=()=>[We,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],C=()=>[e,ca,ta],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",pa,oa,{position:[ca,ta]}],z=()=>["auto","cover","contain",ga,aa,{size:[ca,ta]}],E=()=>[Ge,ua,na],T=()=>["","none","full",l,ca,ta],P=()=>["",qe,ua,na],U=()=>[qe,Ge,pa,oa],$=()=>["","none",g,ca,ta],O=()=>["none",qe,ca,ta],D=()=>["none",qe,ca,ta],F=()=>[qe,ca,ta],K=()=>[We,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ve],breakpoint:[Ve],color:[Ye],container:[Ve],"drop-shadow":[Ve],ease:["in","out","in-out"],font:[ea],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ve],shadow:[Ve],spacing:["px",qe],text:[Ve],"text-shadow":[Ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",We,ta,ca,f]}],container:["container"],columns:[{columns:[qe,ta,ca,o]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:y()}],"inset-x":[{"inset-x":y()}],"inset-y":[{"inset-y":y()}],start:[{"inset-s":y(),start:y()}],end:[{"inset-e":y(),end:y()}],"inset-bs":[{"inset-bs":y()}],"inset-be":[{"inset-be":y()}],top:[{top:y()}],right:[{right:y()}],bottom:[{bottom:y()}],left:[{left:y()}],visibility:["visible","invisible","collapse"],z:[{z:[Be,"auto",ca,ta]}],basis:[{basis:[We,"full","auto",o,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,We,"auto","initial","none",ta]}],grow:[{grow:["",qe,ca,ta]}],shrink:[{shrink:["",qe,ca,ta]}],order:[{order:[Be,"first","last","none",ca,ta]}],"grid-cols":[{"grid-cols":w()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":w()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mbs:[{mbs:S()}],mbe:[{mbe:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],w:[{w:[o,"screen",...A()]}],"min-w":[{"min-w":[o,"screen","none",...A()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",t,ua,na]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,va,ra]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ge,ta]}],"font-family":[{font:[ma,ia,a]}],"font-features":[{"font-features":[ta]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ca,ta]}],"line-clamp":[{"line-clamp":[qe,"none",ca,sa]}],leading:[{leading:[r,..._()]}],"list-image":[{"list-image":["none",ca,ta]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ca,ta]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",ca,na]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[qe,"auto",ca,ta]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ca,ta]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ca,ta]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Be,ca,ta],radial:["",ca,ta],conic:[Be,ca,ta]},ha,da]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-bs":[{"border-bs":P()}],"border-w-be":[{"border-be":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[qe,ca,ta]}],"outline-w":[{outline:["",qe,ua,na]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",c,fa,la]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",u,fa,la]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[qe,na]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",m,fa,la]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[qe,ca,ta]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[ca,ta]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ca,ta]}],filter:[{filter:["","none",ca,ta]}],blur:[{blur:$()}],brightness:[{brightness:[qe,ca,ta]}],contrast:[{contrast:[qe,ca,ta]}],"drop-shadow":[{"drop-shadow":["","none",p,fa,la]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",qe,ca,ta]}],"hue-rotate":[{"hue-rotate":[qe,ca,ta]}],invert:[{invert:["",qe,ca,ta]}],saturate:[{saturate:[qe,ca,ta]}],sepia:[{sepia:["",qe,ca,ta]}],"backdrop-filter":[{"backdrop-filter":["","none",ca,ta]}],"backdrop-blur":[{"backdrop-blur":$()}],"backdrop-brightness":[{"backdrop-brightness":[qe,ca,ta]}],"backdrop-contrast":[{"backdrop-contrast":[qe,ca,ta]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,ca,ta]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,ca,ta]}],"backdrop-invert":[{"backdrop-invert":["",qe,ca,ta]}],"backdrop-opacity":[{"backdrop-opacity":[qe,ca,ta]}],"backdrop-saturate":[{"backdrop-saturate":[qe,ca,ta]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,ca,ta]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ca,ta]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",ca,ta]}],ease:[{ease:["linear","initial",v,ca,ta]}],delay:[{delay:[qe,ca,ta]}],animate:[{animate:["none",b,ca,ta]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ca,ta]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:O()}],"rotate-x":[{"rotate-x":O()}],"rotate-y":[{"rotate-y":O()}],"rotate-z":[{"rotate-z":O()}],scale:[{scale:D()}],"scale-x":[{"scale-x":D()}],"scale-y":[{"scale-y":D()}],"scale-z":[{"scale-z":D()}],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[ca,ta,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ca,ta]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ca,ta]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[qe,ua,na,sa]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}));function La(...e){return Ia(function(){for(var e,a,t=0,n="",s=arguments.length;t<s;t++)(e=arguments[t])&&(a=ue(e))&&(n&&(n+=" "),n+=a);return n}(e))}const Ca=m("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ma=window.ReactJSXRuntime;function za({features:e,className:a=""}){return(0,Ma.jsx)("ul",{className:`flex flex-col gap-3 ${a}`.trim(),children:e.map(e=>(0,Ma.jsxs)("li",{className:"flex items-start gap-3 text-sm leading-snug text-gray-800",children:[(0,Ma.jsx)("span",{className:"mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full border-2 border-gray-400 text-gray-800","aria-hidden":!0,children:(0,Ma.jsx)(Ca,{className:"size-3",strokeWidth:2.5})}),(0,Ma.jsx)("span",{children:e})]},e))})}function Ea({title:e,subtitle:a,price:t,priceSuffix:n=(0,s.__)("/ year","advanced-ads"),description:r,ctaLabel:i,features:o,popular:d=!1,ctaDisabled:l=!1,onCtaClick:c}){return(0,Ma.jsxs)("article",{className:"relative flex h-full flex-col rounded-xl border border-gray-200 bg-white px-8 py-6 shadow-sm md:grid md:h-auto md:grid-rows-subgrid md:row-span-5",children:[d?(0,Ma.jsx)("span",{className:"absolute right-8 top-8 rounded-md bg-gray-900 px-2.5 py-1 text-xs font-semibold text-white",children:(0,s.__)("Popular","advanced-ads")}):null,(0,Ma.jsxs)("div",{className:d?"pr-20":"",children:[(0,Ma.jsx)("h3",{className:"text-xl font-bold text-black m-0",children:e}),(0,Ma.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:a})]}),(0,Ma.jsxs)("div",{className:"mt-6 flex flex-wrap items-baseline gap-1.5 md:mt-0",children:[(0,Ma.jsx)("span",{className:"text-4xl font-bold tracking-tight text-black md:text-5xl",children:t}),(0,Ma.jsx)("span",{className:"text-sm text-gray-500",children:n})]}),(0,Ma.jsx)("p",{className:"mt-4 text-sm leading-relaxed text-gray-600 md:mt-0",children:r}),(0,Ma.jsx)("button",{type:"button",className:La("mt-8 w-full shrink-0 rounded-lg px-4 py-3 text-center text-sm font-semibold transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 md:mt-0",l||!c?"cursor-not-allowed bg-gray-200 text-gray-500":"bg-zinc-800 text-white hover:bg-zinc-900 focus-visible:outline-zinc-900"),onClick:c,disabled:l||!c,children:i}),(0,Ma.jsx)("div",{className:"mt-8 border-t border-gray-100 pt-8 md:mt-0",children:(0,Ma.jsx)(za,{features:o})})]})}const Ta=[{id:"pro",title:(0,s.__)("Pro","advanced-ads"),subtitle:(0,s.__)("Single site","advanced-ads"),price:"$59",description:(0,s.__)("For small businesses and bloggers who want to increase ad revenue","advanced-ads"),ctaLabel:(0,s.__)("Upgrade to Pro","advanced-ads"),popular:!1,downloadId:1742,pricingId:0,utmCampaign:"a2-in_plugin-pricing_table-pro_plan",features:[(0,s.__)("1 site","advanced-ads"),(0,s.__)("1 year of support and updates","advanced-ads"),(0,s.__)("30-day money-back guarantee","advanced-ads"),(0,s.__)("Free activation on test sites","advanced-ads"),(0,s.__)("Advanced Ads Pro","advanced-ads")]},{id:"all-access-single",title:(0,s.__)("All Access","advanced-ads"),subtitle:(0,s.__)("Single site","advanced-ads"),price:"$89",description:(0,s.__)("For professional publishers to increase revenue and save development time","advanced-ads"),ctaLabel:(0,s.__)("Get All Access","advanced-ads"),popular:!0,downloadId:95170,pricingId:1,upgradeId:3,utmCampaign:"a2-in_plugin-pricing_table-all_access_plan",features:[(0,s.__)("1 site","advanced-ads"),(0,s.__)("1 year of support and updates","advanced-ads"),(0,s.__)("30-day money-back guarantee","advanced-ads"),(0,s.__)("Free activation on test sites","advanced-ads"),(0,s.__)("Including all add-ons","advanced-ads"),(0,s.__)("Advanced Ads Pro","advanced-ads"),(0,s.__)("Tracking","advanced-ads")]},{id:"all-access-five",title:(0,s.__)("All Access","advanced-ads"),subtitle:(0,s.__)("5 sites","advanced-ads"),price:"$129",description:(0,s.__)("For large publishing companies and agencies managing multiple sites","advanced-ads"),ctaLabel:(0,s.__)("Scale to multiple sites","advanced-ads"),popular:!1,downloadId:95170,pricingId:2,upgradeId:1,utmCampaign:"a2-in_plugin-pricing_table-all_access_5_sites_plan",features:[(0,s.__)("5 sites","advanced-ads"),(0,s.__)("1 year of support and updates","advanced-ads"),(0,s.__)("30-day money-back guarantee","advanced-ads"),(0,s.__)("Free activation on test sites","advanced-ads"),(0,s.__)("Including all add-ons","advanced-ads"),(0,s.__)("Advanced Ads Pro","advanced-ads"),(0,s.__)("Tracking","advanced-ads")]}];function Pa({currentPlanId:e=null,onSelectPlan:a}){return(0,Ma.jsx)("section",{className:"w-full",children:(0,Ma.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-3 md:grid-rows-[auto_auto_auto_auto_auto] md:gap-x-6 md:gap-y-6 lg:gap-x-8",children:Ta.map(t=>{const n=("all-access-single"!==t.id||1===t.pricingId)&&null!==le(t.id,Ta),s=t.id===e,r=!n||s;return(0,Ma.jsx)(Ea,{title:t.title,subtitle:t.subtitle,price:t.price,description:t.description,ctaLabel:t.ctaLabel,features:t.features,popular:t.popular,ctaDisabled:r,onCtaClick:a&&!r?()=>a(t.id):void 0},t.id)})})})}const Ua=m("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),$a=window.wp.components;function Oa({onClose:e,currentPlanLabel:a=(0,s.__)("Free","advanced-ads"),currentPlanId:t=null,onSelectPlan:n,currentActionLabel:r=(0,s.__)("Upgrade plan","advanced-ads")}){return(0,Ma.jsx)($a.Modal,{title:r,__experimentalHideHeader:!0,onRequestClose:e,shouldCloseOnEscape:!0,shouldCloseOnClickOutside:!1,className:"advads-modal bg-gray-100 max-h-screen! max-w-screen! h-screen! w-screen! rounded-none! m-0! translate-x-0! translate-y-0! overflow-y-auto",overlayClassName:"bg-black/50 backdrop-blur-[1px]",children:(0,Ma.jsxs)("div",{className:"mx-auto w-full max-w-7xl",children:[(0,Ma.jsxs)("header",{className:"flex items-center mb-10 text-left",children:[(0,Ma.jsxs)("div",{children:[(0,Ma.jsx)("h2",{className:"text-3xl font-bold text-black md:text-4xl mb-4",children:r}),(0,Ma.jsx)("p",{className:"m-0 text-base text-gray-600",children:(0,s.sprintf)(/* translators: %s: Current plan name (e.g. Free). */ /* translators: %s: Current plan name (e.g. Free). */
(0,s.__)("Current plan: %s","advanced-ads"),a)})]}),(0,Ma.jsx)("button",{type:"button",className:"button is-ghost ml-auto",onClick:e,children:(0,Ma.jsx)(Ua,{className:"size-8 text-gray-400",strokeWidth:1.4})})]}),(0,Ma.jsx)(Pa,{currentPlanId:t,onSelectPlan:n})]})})}function Da(){const{isOpen:e,open:a,close:t}=_();return(0,Ma.jsxs)("div",{className:"flex items-center justify-center w-full h-[calc(70vh)]",children:[(0,Ma.jsxs)("div",{className:"text-center",children:[(0,Ma.jsx)("h1",{className:"text-3xl font-semibold m-0",children:(0,s.__)("No active licenses there yet","advanced-ads")}),(0,Ma.jsxs)("p",{className:"m-0 mt-3 mb-8 text-gray-500 text-base",children:[(0,s.__)("Purchase a license to unlock premium features.","advanced-ads"),(0,Ma.jsx)("br",{}),(0,s.__)("Free plugins don’t require a license and won’t appear here.","advanced-ads")]}),(0,Ma.jsxs)("div",{className:"flex items-center justify-center gap-x-4",children:[(0,Ma.jsx)("a",{href:`${advancedAds.endpoints.shopUrl}/sso-login?site=${advancedAds.endpoints.siteUrl}&utm_source=advancedads&utm_medium=in-plugin&utm_campaign=a2-in_plugin-licenses_addons-connect-no_licenses`,className:"button advads-button-neutral is-big",children:(0,s.__)("Connect license","advanced-ads")}),(0,Ma.jsx)("button",{type:"button",className:"button advads-button-secondary is-big",onClick:()=>{const e=`${advancedAds.endpoints.shopUrl}/?utm_source=advancedads&utm_medium=in-plugin&utm_campaign=a2-in_plugin-licenses_addons-buy-no_licenses`;fetch(e,{mode:"no-cors",keepalive:!0}),a()},children:(0,s.__)("Buy license","advanced-ads")})]})]}),e&&(0,Ma.jsx)(Oa,{onClose:t,currentActionLabel:(0,s.__)("Buy plan","advanced-ads"),onSelectPlan:e=>{!function(e,a){const t=le(e,a);if(!t)return!1;const n=(a??[]).find(a=>a.id===e);globalThis.location.href=function({downloadId:e,pricingId:a,utmCampaign:t}){const n=new URL(`${h.endpoints.shopUrl}/checkout/`);return n.searchParams.set("edd_action","add_to_cart"),n.searchParams.set("download_id",String(e)),Number(a)>0&&n.searchParams.set("edd_options[price_id]",String(a)),n.searchParams.set("site",h.endpoints.siteUrl),t&&(n.searchParams.set("utm_source","advancedads"),n.searchParams.set("utm_medium","in-plugin"),n.searchParams.set("utm_campaign",t)),n.toString()}({...t,utmCampaign:n?.utmCampaign??""})}(e,Ta)}})]})}function Fa(){return(0,Ma.jsx)("div",{className:"relative min-h-[220px]",children:(0,Ma.jsx)("div",{className:"absolute inset-0 flex justify-center items-center z-10 bg-white bg-opacity-70",children:(0,Ma.jsx)("img",{src:`${advancedAds.endpoints.adminUrl}images/spinner-2x.gif`})})})}const Ka=m("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ha=window.wp.data,Ra="advanced-ads/store",Wa={licenses:[],appliedAddonKeyMap:{},autoUpdateStates:{},addonInstallStates:{},lastSyncAt:0,expiryNoticeFlags:{}},qa=(0,Ha.createReduxStore)(Ra,{reducer:function(e=Wa,a){switch(a.type){case"SET_LICENSES":return{...e,licenses:a.licenses,appliedAddonKeyMap:a.appliedAddonKeyMap??e.appliedAddonKeyMap,autoUpdateStates:a.autoUpdateStates??e.autoUpdateStates,addonInstallStates:a.addonInstallStates??e.addonInstallStates,lastSyncAt:a.lastSyncAt??e.lastSyncAt,expiryNoticeFlags:a.expiryNoticeFlags??e.expiryNoticeFlags};case"SET_AUTO_UPDATE_STATES":return{...e,autoUpdateStates:a.autoUpdateStates??{}};case"ADD_LICENSE":return{...e,licenses:[...e.licenses,a.license]};case"REMOVE_LICENSE":return{...e,licenses:e.licenses.filter(e=>e.licenseId!==a.licenseId)};default:return e}},actions:{setLicenses:(e,a={},t={},n={},s=0,r={})=>({type:"SET_LICENSES",licenses:e,appliedAddonKeyMap:a,autoUpdateStates:t,addonInstallStates:n,lastSyncAt:s,expiryNoticeFlags:r}),setAutoUpdateStates:e=>({type:"SET_AUTO_UPDATE_STATES",autoUpdateStates:e}),addLicense:e=>({type:"ADD_LICENSE",license:e}),removeLicense:e=>({type:"REMOVE_LICENSE",licenseId:e})},selectors:{getLicenses:e=>e.licenses,getAppliedAddonKeyMap:e=>e.appliedAddonKeyMap,hasLicenses:e=>e.licenses.length>0,getAutoUpdateStates:e=>e.autoUpdateStates??{},getAddonInstallStates:e=>e.addonInstallStates??{},getLastSyncAt:e=>e.lastSyncAt??0,getExpiryNoticeFlags:e=>e.expiryNoticeFlags??{},getLicenseById:(e,a)=>e.licenses.find(e=>e.licenseId===a)}});(0,Ha.register)(qa);const Ba=window.wp.apiFetch;var Ga=e.n(Ba);const Va=`${advancedAds.endpoints.siteUrl}/wp-json/advanced-ads/v1/licenses`;function Ya(e){return e&&"object"==typeof e?e:{}}function Ja(e){const{licenses:a,appliedAddonKeyMap:t,autoUpdateStates:n,addonInstallStates:s,lastSyncAt:r,expiryNoticeFlags:i}=function(e){return Array.isArray(e)?{licenses:e,appliedAddonKeyMap:{},autoUpdateStates:{},addonInstallStates:{},lastSyncAt:0,expiryNoticeFlags:{}}:{licenses:Array.isArray(e?.licenses)?e.licenses:[],appliedAddonKeyMap:Ya(e?.appliedAddonKeyMap),autoUpdateStates:Ya(e?.autoUpdateStates),addonInstallStates:Ya(e?.addonInstallStates),lastSyncAt:e?.lastSyncAt??0,expiryNoticeFlags:Ya(e?.expiryNoticeFlags)}}(e);return(0,Ha.dispatch)(Ra).setLicenses(a,t,n,s,r,i),a}function Qa(e,{activate:a=!1,activatingLicenseKey:t="",activatingAddonId:n="",installOnly:s=!1,deactivatingAddonId:r="",deactivatingLicenseKey:i="",signal:o}={}){return Ga()({url:Va,method:"POST",signal:o,data:{licenses:Array.isArray(e)?e:[],activate:a,activatingLicenseKey:t||"",activatingAddonId:n||"",installOnly:s,deactivatingAddonId:r||"",deactivatingLicenseKey:i||""}})}async function Za(e,a,t){const n=await Qa(t,{activatingLicenseKey:e,activatingAddonId:a});return Ja(n),n}const Xa=window.wp.notices,et=m("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),at=m("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),tt=m("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),nt=m("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),st="advanced-ads/licenses",rt="advanced-ads/post-checkout-success",it={token:null,purchase_id:null,checkout_intent:null,license_id:null},ot=new Map;function dt(e,a){e&&ot.set(e,a)}function lt(e){ot.delete(e)}function ct(e,{id:a,context:t,title:n,message:s,icon:r="none",messageContent:i}){dt(a,{title:n,message:s,icon:r,variant:"success",messageContent:i}),e([n,s].filter(Boolean).join(" "),{id:a,type:"default",context:t,isDismissible:!0})}function ut(e,{id:a,context:t,title:n,message:s,messageContent:r}){dt(a,{title:n,message:s,icon:"warning",variant:"warning",messageContent:r}),e([n,s].filter(Boolean).join(" "),{id:a,type:"default",context:t,isDismissible:!0})}const mt=new Set;function pt({className:e}){return(0,Ma.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":"true",children:(0,Ma.jsx)("path",{d:"M10.0003 1.66699V5.00033M10.0003 15.0003V18.3337M4.10866 4.10866L6.46699 6.46699M13.5337 13.5337L15.892 15.892M1.66699 10.0003H5.00033M15.0003 10.0003H18.3337M4.10866 15.892L6.46699 13.5337M13.5337 6.46699L15.892 4.10866",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const gt=[{param:"advads_upgrade_error",value:"unavailable",id:"advanced-ads/upgrade-unavailable",message:(0,s.__)("This license could not be upgraded to the selected plan. Ensure upgrade paths are configured in the shop (Pro → All Access), then try again.","advanced-ads")},{param:"advads_renew_error",value:"unavailable",id:"advanced-ads/renew-unavailable",message:(0,s.__)("This license could not be renewed. It may not be expired, renewals may be disabled on the shop, or the license may be lifetime.","advanced-ads")},{param:"advads_exchange_error",value:"invalid_token",id:"advanced-ads/exchange-invalid-token",message:(0,s.__)("License connection failed. The link may have expired — try connecting again from the license screen.","advanced-ads")},{param:"advads_exchange_error",value:"network",id:"advanced-ads/exchange-network",message:(0,s.__)("Could not reach the license server. Check your connection and try again.","advanced-ads")},{param:"advads_exchange_error",value:"no_licenses",id:"advanced-ads/exchange-no-licenses",message:(0,s.__)("This account has no licenses. Please connect with another account or buy a license.","advanced-ads")}];function ht({notice:e,onDismiss:a}){const t=function(e){const a=ot.get(e.id)??{};return{title:a.title??e.title,message:a.message??e.message??(a.title||e.title?"":e.content),messageContent:a.messageContent??e.messageContent,icon:a.icon??e.icon,variant:a.variant??e.variant}}(e),n=function(e,a){return"success"===a.variant||"warning"===a.variant?a.variant:"error"===e.status?"warning":"success"}(e,t),r=function(e,a){return"success"===a.icon||"warning"===a.icon||"loading"===a.icon||"none"===a.icon?a.icon:"error"===e.status?"warning":"none"}(e,t),i=t.title,o=t.message??e.content,d=t.messageContent,l="warning"===n?"border-orange-200 bg-orange-50":"border-green-200 bg-green-50",c="warning"===n?"text-orange-950":"text-gray-900",u="warning"===n?"text-orange-900":"text-gray-700";return(0,Ma.jsxs)("div",{role:"status",className:La("advads-license-notice relative mb-6 flex items-start gap-3 rounded-lg border px-4 py-4 pr-12",l),children:["loading"===r?(0,Ma.jsx)(pt,{className:"size-5 shrink-0 text-gray-900"}):"success"===r?(0,Ma.jsx)(tt,{className:"size-5 shrink-0 text-gray-900","aria-hidden":"true"}):"warning"===r?(0,Ma.jsx)(nt,{className:"size-5 shrink-0 text-orange-950","aria-hidden":"true"}):null,(0,Ma.jsxs)("div",{className:"min-w-0 flex-1",children:[i&&(0,Ma.jsx)("p",{className:La("m-0 text-sm font-semibold leading-snug",c),children:i}),d?(0,Ma.jsx)("div",{className:La("m-0 text-sm leading-snug",u,i&&"mt-0.5"),children:d}):o&&(0,Ma.jsx)("p",{className:La("m-0 text-sm leading-snug",u,i&&"mt-0.5"),children:o})]}),(0,Ma.jsx)("button",{type:"button",className:"absolute top-4 right-4 m-0 flex size-4 items-center justify-center border-0 bg-transparent p-0 text-gray-500 shadow-none hover:text-gray-900","aria-label":(0,s.__)("Dismiss notice","advanced-ads"),onClick:a,children:(0,Ma.jsx)(Ua,{className:"size-4",strokeWidth:1.5,"aria-hidden":"true"})})]})}function ft({context:e=st,isLoading:a}){!function({isLoading:e}){const{query:a}=Nn(),t=jn(),r=a?.purchase_id?String(a.purchase_id):"",{createSuccessNotice:i,createErrorNotice:o,removeNotice:d}=(0,Ha.useDispatch)(Xa.store),{licenses:l,hasLicenses:c,expiryNoticeFlags:u,appliedAddonKeyMap:m,addonInstallStates:p}=(0,Ha.useSelect)(e=>{const a=e(Ra);return{licenses:a.getLicenses(),hasLicenses:a.hasLicenses(),expiryNoticeFlags:a.getExpiryNoticeFlags(),appliedAddonKeyMap:a.getAppliedAddonKeyMap(),addonInstallStates:a.getAddonInstallStates()}},[]);(0,n.useEffect)(()=>{t===N&&(function({query:e,createErrorNotice:a,removeNotice:t}){for(const n of gt)if(e?.[n.param]===n.value){bt(a,t,n.id,n.message),vt(e,{[n.param]:null});break}}({query:a,createErrorNotice:o,removeNotice:d}),function({query:e,createErrorNotice:a,removeNotice:t}){const n=e?.advads_activation_error;if(!n)return;const r=e?.advads_activation_message;let i;switch(n){case"network":i=(0,s.__)("Could not reach the license server. Check your connection and try again.","advanced-ads");break;case"activate_failed":i=r||(0,s.__)("Failed to activate license on the shop.","advanced-ads");break;default:i=r||(0,s.__)("Failed to activate license.","advanced-ads")}bt(a,t,"advanced-ads/activation-error",i),vt(e,{advads_activation_error:null,advads_activation_message:null})}({query:a,createErrorNotice:o,removeNotice:d}),function({purchaseId:e,isLoading:a,query:t,licenses:n,appliedAddonKeyMap:r,addonInstallStates:i,createSuccessNotice:o,removeNotice:d}){if(!e||a)return;if(mt.has(e))return void vt(t,it);mt.add(e);const l=P(globalThis.advancedAds?.endpoints?.siteUrl),{title:c,message:u}=function({checkoutIntent:e,licenses:a,licenseId:t,hostname:n,appliedAddonKeyMap:r={},addonInstallStates:i={}}){const o=function(e){const a=String(e??"").toLowerCase();return"upgrade"===a||"renew"===a?a:"buy"}(e),d={buy:(0,s.__)("License purchased successfully","advanced-ads"),upgrade:(0,s.__)("License upgraded successfully","advanced-ads"),renew:(0,s.__)("License renewed successfully","advanced-ads")},l={ready:(0,s.__)("Your license is ready.","advanced-ads"),activate:(0,s.__)("Your license is ready. Use 'activate' to set it up on this site.","advanced-ads"),download:(0,s.__)("Your license is ready. Use 'Download and activate' to set it up on this site.","advanced-ads")},c=function(e,a){const t=e??[],n=parseInt(String(a??""),10);if(n>0){const e=t.find(e=>Number(e?.licenseId)===n);if(e)return e}const s=J(t);if(s)return s;let r=null,i=-1;for(const e of t){if(G(e?.name))continue;if(!K(e?.status,e?.expiryDate))continue;const a=Number(e?.licenseId??0);a>i&&(i=a,r=e)}return r}(a,t),u=c?function(e,a,t,n={},s={}){if(!e||!t)return"download";if(G(e?.name))return ee(a,t)?"ready":"download";if(R(e,t))return"ready";const r=Y(e,n);if(r){const{installed:e,active:a}=ae(r,s);if(e&&!a)return"activate"}return"download"}(c,a,n,r,i):"download";return{title:d[o]??d.buy,message:l[u]??l.download}}({checkoutIntent:t?.checkout_intent,licenses:n,licenseId:t?.license_id,hostname:l,appliedAddonKeyMap:r,addonInstallStates:i});d(rt,st),lt(rt),ct(o,{id:rt,context:st,title:c,message:u,icon:"loading"}),vt(t,it)}({purchaseId:r,isLoading:e,query:a,licenses:l,appliedAddonKeyMap:m,addonInstallStates:p,createSuccessNotice:i,removeNotice:d}),function({isLoading:e,hasLicenses:a,licenses:t,expiryNoticeFlags:n,createErrorNotice:s,removeNotice:r}){if(!e&&a)for(const e of t){const a=e.licenseId??e.licenseKey;if(!a||!e.licenseKey)continue;const t=`advanced-ads/license-expiry-${a}`,i=xt(e,n[e.licenseKey]);r(t,st),i&&bt(s,r,t,i)}}({isLoading:e,hasLicenses:c,licenses:l,expiryNoticeFlags:u,createErrorNotice:o,removeNotice:d}))},[t,a,r,e,c,l,u,m,p,o,i,d])}({isLoading:a});const t=(0,Ha.useSelect)(a=>a(Xa.store).getNotices(e),[e]),{removeNotice:r}=(0,Ha.useDispatch)(Xa.store),i=t.filter(({isDismissible:e,type:a})=>e&&"default"===a);return 0===i.length?null:i.map(a=>(0,Ma.jsx)(ht,{notice:a,onDismiss:()=>{lt(a.id),r(a.id,e)}},a.id))}function vt(e,a){const t=An(N,{...e,...a});globalThis.history.replaceState({},"",t),globalThis.dispatchEvent(new Event("popstate"))}function bt(e,a,t,n){a(t,st),lt(t),ut(e,{id:t,context:st,message:n})}function xt(e,a){const{status:t,expiryDate:n,name:r,availableSites:i}=e,o=q(r,i);return D(t,n)?(0,s.sprintf)(/* translators: %s: license product name */ /* translators: %s: license product name */
(0,s.__)("%s has expired. Renew to restore updates and support.","advanced-ads"),o):"month"===a||"ten_days"===a||F(n,30)?(0,s.sprintf)(/* translators: 1: license name, 2: days remaining */ /* translators: 1: license name, 2: days remaining */
(0,s.__)("%1$s expires in %2$s days. Renew to avoid interruption.","advanced-ads"),o,String(function(e){const a=O(e),t=Date.now();return!a||a<=t?0:Math.ceil((a-t)/S)}(n))):null}function _t({addonId:e,licenseKey:a,licenses:t,downloadUrl:r="",isApplied:i=!1,disabled:o=!1,managedByOtherLicense:d=!1,addonInstallStates:l={},noticesContext:c,isInstalling:u=!1,installFailed:m=!1,onInstallStart:p,onInstallEnd:g}){const[h,f]=(0,n.useState)(!1),[v,b]=(0,n.useState)(!1),{createErrorNotice:x,removeNotice:_}=(0,Ha.useDispatch)(Xa.store),y=(0,Ha.useSelect)(e=>e(Ra).getLicenses(),[]),k=y.length>0?y:t,j=ie(e,l,i),{installed:N}=ae(e,l),S="installed"===j,A=u||h||v,I=o,L=d&&!i&&N;function C(a){const t=`advanced-ads/addon-error-${e}`;_(t,c),ut(x,{id:t,context:c,message:a})}async function M(){if(!A&&a&&e){f(!0);try{await Za(a,e,k)}catch(e){C(e instanceof Error?e.message:(0,s.__)("Activation failed.","advanced-ads"))}finally{f(!1)}}}return v?(0,Ma.jsxs)("span",{className:"inline-flex items-center gap-2 text-sm text-gray-600",children:[(0,Ma.jsx)(et,{className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":!0}),(0,s.__)("Deactivating…","advanced-ads")]}):S?(0,Ma.jsxs)("div",{className:"inline-flex flex-wrap items-center gap-3",children:[(0,Ma.jsxs)("span",{className:"inline-flex items-center gap-2 text-sm text-green-700",children:[(0,Ma.jsx)(Ca,{className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":!0}),(0,s.__)("Active","advanced-ads")]}),(0,Ma.jsx)("button",{type:"button",className:"button advads-button-secondary is-small",onClick:async function(){if(!A&&e){b(!0);try{await async function(e,a){const t=await Qa(a,{deactivatingAddonId:e});return Ja(t),t}(e,k)}catch(e){C(e instanceof Error?e.message:(0,s.__)("Deactivation failed.","advanced-ads"))}finally{b(!1)}}},disabled:A,"aria-busy":v,children:(0,s.__)("Deactivate","advanced-ads")})]}):u||h?(0,Ma.jsxs)("span",{className:"inline-flex items-center gap-2 text-sm text-gray-600",children:[(0,Ma.jsx)(et,{className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":!0}),h&&L?(0,s.__)("Activating…","advanced-ads"):(0,s.__)("Installing…","advanced-ads")]}):L?(0,Ma.jsx)("div",{className:"inline-flex flex-wrap items-center gap-3",children:(0,Ma.jsx)("button",{type:"button",className:"button advads-button-neutral is-small",onClick:M,disabled:A,"aria-busy":h,children:(0,s.__)("Activate","advanced-ads")})}):"running"===j?(0,Ma.jsxs)("div",{className:"inline-flex flex-wrap items-center gap-3",children:[(0,Ma.jsxs)("span",{className:"inline-flex items-center gap-2 text-sm text-gray-600",children:[(0,Ma.jsx)(Ca,{className:"size-4 shrink-0 text-green-700",strokeWidth:2,"aria-hidden":!0}),(0,s.__)("Plugin active","advanced-ads")]}),(0,Ma.jsx)("button",{type:"button",className:"button advads-button-neutral is-small",onClick:M,disabled:A,"aria-busy":h,children:(0,s.__)("Activate","advanced-ads")})]}):"ready"===j?(0,Ma.jsx)("button",{type:"button",className:"button advads-button-neutral is-small",onClick:M,disabled:A,"aria-busy":h,children:(0,s.__)("Activate","advanced-ads")}):(0,Ma.jsxs)("div",{className:"inline-flex flex-wrap items-center gap-3",children:[m?(0,Ma.jsxs)("span",{className:"inline-flex items-center gap-2 text-sm text-red-700",children:[(0,Ma.jsx)(at,{className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":!0}),(0,s.__)("Installation failed","advanced-ads")]}):null,(0,Ma.jsx)("button",{type:"button",className:"button advads-button-neutral is-small whitespace-nowrap",onClick:async function(){if(!A&&!I&&a&&e){p?.(e),f(!0);try{await Za(a,e,k),g?.(e,!1)}catch(a){C(a instanceof Error?a.message:(0,s.__)("Installation failed.","advanced-ads")),g?.(e,!0)}finally{f(!1)}}},disabled:I||A,"aria-busy":A,children:(0,s.__)("Download and install","advanced-ads")}),m?(0,Ma.jsx)("button",{type:"button",className:"button advads-button-secondary is-small",onClick:function(){const a=String(r??"").trim(),t=function(e=""){if(!e)return w;const a=new URL(w);return a.searchParams.set("addon",e),a.toString()}(e);a&&window.open(a,"_blank","noopener,noreferrer"),window.open(t,"_blank","noopener,noreferrer")},disabled:I||A,children:(0,s.__)("Manual install","advanced-ads")}):null]})}function yt({addon:e,licenseKey:a,licenses:t,isApplied:n,canUseAddonActions:r,managedByOtherLicense:i,managingLicenseName:o,licenseAppliedOnSite:d,noticesContext:l,addonInstallStates:c,installingAddonId:u,failedAddonIds:m,onInstallStart:p,onInstallEnd:g}){const{id:h,title:f,description:v,icon:b,learnMore:x,manualUrl:_,downloadUrl:y}=e;return(0,Ma.jsxs)("div",{className:"relative border border-border bg-white p-3 rounded-lg flex flex-wrap flex-row gap-3 md:items-center",children:[(0,Ma.jsx)("div",{className:"flex items-center justify-center p-2 size-8 bg-gray-200 rounded-lg grow-0",children:(0,Ma.jsx)("img",{src:b,alt:"",className:"size-4"})}),(0,Ma.jsxs)("div",{className:"shrink-0 flex-1",children:[(0,Ma.jsx)("strong",{children:f}),(0,Ma.jsxs)("p",{className:"flex flex-wrap items-center gap-x-1 m-0 mt-1 text-gray-500",children:[v,(0,Ma.jsx)("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:(0,s.__)("Learn more","advanced-ads")}),(0,Ma.jsx)("span",{children:"|"}),(0,Ma.jsx)("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:(0,s.__)("Manual","advanced-ads")})]})]}),(0,Ma.jsx)("div",{className:"basis-full sm:basis-auto sm:ml-auto",children:(0,Ma.jsx)(_t,{addonId:h,licenseKey:a,licenses:t,downloadUrl:y,isApplied:n,disabled:!r,managedByOtherLicense:i,managingLicenseName:o,licenseAppliedOnSite:d,addonInstallStates:c,noticesContext:l,isInstalling:u===h,installFailed:m.has(h),onInstallStart:p,onInstallEnd:g})})]})}function wt({license:e,allLicenses:a=[],appliedAddonKeyMap:t={},currentHostname:r="",noticesContext:i,canUseAddonActions:o=!1}){const d=(0,n.useId)(),[l,c]=(0,n.useState)(!0),[u,m]=(0,n.useState)(""),[p,g]=(0,n.useState)(()=>new Set),h=(0,Ha.useSelect)(e=>e(Ra).getAddonInstallStates(),[]);if(!G(e?.name))return null;const f=function(e){const a=String(e?.download_url??""),t=Array.isArray(e?.addons)?e.addons:[];return(t.length>0?t.map(e=>({id:String(e?.name??"").trim(),downloadUrl:String(e?.download_url??"").trim()})).filter(e=>e.id):k.map(e=>({id:e,downloadUrl:a}))).map(({id:e,downloadUrl:a})=>{const t=y[e]??{title:e,description:"",learnMore:"https://wpadvancedads.com/add-ons/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons",manualUrl:"https://wpadvancedads.com/manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=licenses-add-ons-manual"};return{id:e,title:t.title,description:t.description,learnMore:t.learnMore,manualUrl:t.manualUrl,icon:j(e),downloadUrl:a}})}(e);if(!f.length)return null;const v=String(e?.licenseKey??""),b=ne(e,a,r,t,h);function x(e){m(e)}function _(e,a){m(""),g(a?a=>new Set(a).add(e):a=>{const t=new Set(a);return t.delete(e),t})}return(0,Ma.jsxs)("div",{className:"mt-6 xl:ml-30",children:[(0,Ma.jsxs)("button",{type:"button",id:d,className:"is-ghost",onClick:()=>c(e=>!e),"aria-expanded":l,children:[(0,s.sprintf)(/* translators: %d: Number of included add-ons. */ /* translators: %d: Number of included add-ons. */
(0,s.__)("Included add-ons (%d)","advanced-ads"),f.length),(0,Ma.jsx)(Ka,{className:"h-4 w-4 shrink-0 transition-transform "+(l?"rotate-180":""),strokeWidth:2,"aria-hidden":!0})]}),l?(0,Ma.jsx)("section",{className:"mt-6 space-y-6","aria-labelledby":d,children:f.map(e=>{const n=se(e.id,v,t),s=function(e,a,t){if(!e||!a)return!1;const n=z(t,e);return""!==n&&n!==C(a)}(e.id,v,t),r=s?String(t?.[e.id]??""):"";return(0,Ma.jsx)(yt,{addon:e,licenseKey:v,licenses:a,isApplied:n,canUseAddonActions:o,managedByOtherLicense:s,managingLicenseName:re(r,a),licenseAppliedOnSite:b,noticesContext:i,addonInstallStates:h,installingAddonId:u,failedAddonIds:p,onInstallStart:x,onInstallEnd:_},e.id)})}):null]})}function kt({addonIds:e,addonInstallStates:a,appliedAddonKeyMap:t,licenseKey:n}){const r=function(e,a,t,n){let s=0,r=0,i=0;for(const o of e){const e=ie(o,a,se(o,n,t));"installed"===e?s++:"ready"===e?r++:i++}const o=e.length;let d="partial";return s===o&&o>0?d="complete":0===s&&0===r&&(d="none"),{total:o,installed:s,ready:r,pending:i,state:d}}(e,a,t,n),i=function(e){const{total:a,installed:t,ready:n,state:r}=e;return"complete"===r?(0,s.__)("All installed","advanced-ads"):"none"===r?(0,s.sprintf)(/* translators: %d: Total number of included add-ons. */ /* translators: %d: Total number of included add-ons. */
(0,s.__)("None installed (%d add-ons)","advanced-ads"),a):n>0?(0,s.sprintf)(/* translators: 1: Number installed, 2: Total add-ons, 3: Number downloaded but not finished. */ /* translators: 1: Number installed, 2: Total add-ons, 3: Number downloaded but not finished. */
(0,s.__)("%1$d of %2$d installed (%3$d ready)","advanced-ads"),t,a,n):(0,s.sprintf)(/* translators: 1: Number installed, 2: Total add-ons. */ /* translators: 1: Number installed, 2: Total add-ons. */
(0,s.__)("%1$d of %2$d installed","advanced-ads"),t,a)}(r);return(0,Ma.jsxs)("span",{className:"inline-flex items-center gap-2 text-sm text-gray-800",children:[(0,Ma.jsx)("span",{className:La("inline-block h-2 w-2 shrink-0 rounded-full","complete"===r.state&&"bg-green-500","partial"===r.state&&"bg-orange-500","none"===r.state&&"bg-gray-400"),"aria-hidden":!0}),(0,Ma.jsx)("span",{children:i})]})}function jt({status:e,showRenew:a=!1,onRenew:t}){const n="active"===e||"valid"===e,r="inactive"===e,i="expired"===e;return(0,Ma.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,Ma.jsx)("span",{className:La("inline-block h-2 w-2 shrink-0 rounded-full",n&&"bg-green-500",i&&"bg-red-500",r&&"bg-orange-500",!n&&!i&&!r&&"bg-orange-500"),"aria-hidden":!0}),(0,Ma.jsx)("span",{className:"capitalize",children:e}),a&&t?(0,Ma.jsx)("button",{type:"button",className:"button button-link underline! underline-offset-3",onClick:t,children:(0,s.__)("Renew","advanced-ads")}):null]})}function Nt({label:e,value:a,className:t}){return(0,Ma.jsxs)("div",{className:La("min-w-0 space-y-1",t),children:[(0,Ma.jsx)("div",{className:"text-sm font-semibold",children:e}),(0,Ma.jsx)("div",{className:"text-sm text-gray-500",children:a})]})}function St({toggles:e,onToggle:a,savingId:t="",onClose:n}){const r=1===e.length;return(0,Ma.jsxs)($a.Modal,{title:(0,s.__)("Plugin auto-updates","advanced-ads"),size:"small",onRequestClose:n,shouldCloseOnEscape:!0,shouldCloseOnClickOutside:!1,className:"advads-modal mt-auto w-lg max-w-lg",overlayClassName:"bg-black/50 backdrop-blur-[1px]",children:[(0,Ma.jsx)("div",{className:"space-y-4",children:e.map(e=>{const{addonId:n,enabled:i}=e,o=e.label??y[n]?.title??("main"===n?(0,s.__)("Advanced Ads","advanced-ads"):n),d=t===n;return(0,Ma.jsx)($a.ToggleControl,{checked:i,disabled:d,label:r?(0,s.__)("Enable plugin auto-updates","advanced-ads"):o,help:r?(0,s.__)("When enabled, updates are automatically installed. When off, you'll be notified when updates are available to install.","advanced-ads"):void 0,onChange:e=>a(n,e)},n)})}),(0,Ma.jsx)("div",{className:"flex justify-end mt-4",children:(0,Ma.jsx)("button",{type:"button",className:"button advads-button-secondary",onClick:n,children:(0,s.__)("Close","advanced-ads")})})]})}function At({title:e,description:a,sites:t,onClose:n}){return(0,Ma.jsxs)($a.Modal,{title:e,size:"small",onRequestClose:n,shouldCloseOnEscape:!0,shouldCloseOnClickOutside:!1,className:"advads-modal mt-auto w-lg max-w-lg",overlayClassName:"bg-black/50 backdrop-blur-[1px]",children:[(0,Ma.jsx)("p",{className:"-mt-2 text-base text-gray-500",children:a}),(0,Ma.jsx)("div",{className:"border border-gray-200 rounded-lg bg-gray-50 divide-y divide-gray-200",children:t.map(e=>(0,Ma.jsxs)("div",{className:"flex justify-between items-center p-3",children:[(0,Ma.jsx)("a",{href:`${e.domain}${String(e.domain).includes("?")?"&":"?"}utm_source=advancedads&utm_medium=in-plugin&utm_campaign=a2-in_plugin-licenses_addons-view_sites`,target:"_blank",rel:"noopener noreferrer",className:"text-base no-underline",children:e.domain.replace("https://","").replace("http://","").trim("/")}),(0,Ma.jsx)("span",{className:"text-sm text-gray-500",children:e.createdAt})]},e.domain))}),(0,Ma.jsx)("div",{className:"flex justify-end mt-4",children:(0,Ma.jsx)("button",{type:"button",className:"button advads-button-secondary",onClick:n,children:(0,s.__)("Close","advanced-ads")})})]})}const It="advanced-ads/license-activation";function Lt({licenseKey:e,isActivated:a=!1,canActivate:t=!0,noticesContext:r,downloadUrl:i="",addonId:o=""}){const[d,l]=(0,n.useState)(!1),[c,u]=(0,n.useState)(!1),m=(0,n.useRef)(null),p=(0,n.useRef)(null),{createSuccessNotice:g,createErrorNotice:h,removeNotice:f}=(0,Ha.useDispatch)(Xa.store),v=(0,Ha.useSelect)(e=>e(Ra).getLicenses(),[]);function b(e){return null!=e&&""!==String(e).trim()}function x(e,a){if(f(It,r),lt(It),"error"===e){const e=(0,s.__)("Automatic setup didn't complete","advanced-ads"),t=b(a)?String(a).trim():(0,s.__)("Failed to activate license.","advanced-ads");ut(h,{id:It,context:r,title:e,message:t})}else{const e=(0,s.__)("All set","advanced-ads"),t=b(a)?String(a).trim():(0,s.__)("Your license and plugin are fully set up and ready to use.","advanced-ads"),n=b(a)?"loading":"success";ct(g,{id:It,context:r,title:e,message:t,icon:n})}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{lt(It),f(It,r)},6500)}if((0,n.useEffect)(()=>()=>{m.current&&m.current.abort(),p.current&&clearTimeout(p.current)},[]),a)return(0,Ma.jsx)("div",{className:"flex flex-col items-end",children:(0,Ma.jsx)("button",{type:"button",className:"button advads-button-secondary whitespace-nowrap px-4 py-2",onClick:async function(){if(!d&&a&&e){l(!0);try{await async function(e,a){const t=await Qa(a,{deactivatingLicenseKey:e});return Ja(t),t}(e,v)}catch(e){const a=e instanceof Error?e.message:(0,s.__)("Deactivation failed.","advanced-ads"),t="advanced-ads/license-deactivation";f(t,r),ut(h,{id:t,context:r,message:a})}finally{l(!1)}}},disabled:d,"aria-busy":d,children:d?(0,s.__)("Deactivating…","advanced-ads"):(0,s.__)("Deactivate","advanced-ads")})});const _=d||!e||!t,y=d?(0,s.__)("Activating…","advanced-ads"):(0,s.__)("Download and activate","advanced-ads");return(0,Ma.jsx)("div",{className:"flex flex-col items-end gap-2",children:(0,Ma.jsx)("button",{type:"button",className:"button advads-button-neutral whitespace-nowrap px-4 py-2",onClick:async function(){if(d||a||!t)return;const n=`${advancedAds.endpoints.shopUrl}/?utm_source=advancedads&utm_medium=in-plugin&utm_campaign=a2-in_plugin-licenses_addons-download_activate`;fetch(n,{mode:"no-cors",keepalive:!0}),m.current&&m.current.abort();const s=new AbortController;m.current=s,l(!0),u(!1);try{const a=await async function(e,a){const t=(0,Ha.select)(Ra).getLicenses(),n=await Qa(t,{activatingLicenseKey:e,signal:a});return Ja(n),n}(e,s.signal);x("success",function(e){if(!e||"object"!=typeof e||Array.isArray(e))return null;const a=e.message??e.data?.message;if(null==a)return null;const t=String(a).trim();return""===t?null:t}(a))}catch(e){if("AbortError"===e?.name)return;const a=function(e){if(!e||"object"!=typeof e)return null;const a=e.data?.message;if(null!=a){const e=String(a).trim();if(""!==e)return e}if(e instanceof Error){const a=String(e.message??"").trim();if(""!==a)return a}const t=e.message;if(null!=t){const e=String(t).trim();if(""!==e)return e}return null}(e);u(!0),x("error",a)}finally{l(!1)}},disabled:_,"aria-busy":d,"aria-disabled":_,children:y})})}function Ct({activationCount:e=0,availableSites:a=0,licenseId:t,licenseKey:r,purchaseDate:i,expiryDate:o,status:d,name:l,autoRenew:c=!1,paymentStatus:u,sitesActivated:m,download_url:p,addons:g,noticesContext:f,allLicenses:v=[],appliedAddonKeyMap:b={}}){const w=Boolean(c),j=(0,Ha.useSelect)(e=>e(Ra).getAutoUpdateStates(),[]),N=(0,Ha.useSelect)(e=>e(Ra).getAddonInstallStates(),[]),[S,A]=(0,n.useState)(""),I=G(l),{isOpen:L,open:C,close:z}=_(),{isOpen:E,open:$,close:O}=_(),{isOpen:B,open:J,close:ee}=_(),re=D(d,o)||F(o,30),ie=()=>{!function(e){!!e&&(globalThis.location.href=function({licenseId:e,utmCampaign:a}){const t=new URL(`${h.endpoints.shopUrl}/checkout/`);return t.searchParams.set("site",h.endpoints.siteUrl),t.searchParams.set("intent","renew"),t.searchParams.set("license_id",String(e)),a&&(t.searchParams.set("utm_source","advancedads"),t.searchParams.set("utm_medium","in-plugin"),t.searchParams.set("utm_campaign",a)),t.toString()}({licenseId:e,utmCampaign:"a2-in_plugin-licenses_addons-renew"}))}(t)},le=q(l,a),ue=P(advancedAds?.endpoints?.siteUrl),me={name:l,status:d,sitesActivated:m,expiryDate:o,licenseKey:r,download_url:p,addons:g,availableSites:a},pe=function(e){if(!e)return null;const a=e.name??"";return G(a)?(e.availableSites??0)>1?"all-access-five":"all-access-single":"pro"===V(a)?"pro":null}(me),ge=function(e){return function(e){switch(e){case"pro":return["all-access-single","all-access-five"];case"all-access-single":return["all-access-five"];default:return[]}}(e).length>0}(pe);let he=function(e,a,t,n={},s={}){const r=function(e,a){const t=e?.status??"";return K(t,e?.expiryDate)?G(e?.name)?H(e?.sitesActivated,a)?"active":t:R(e,a)?"active":"inactive":t}(e,t),i=M(e);if(G(e?.name))return function(e,a,t,n,s={},r={}){return K(e?.status,e?.expiryDate)?0===Q(s).size?"inactive":X(a,s)&&(H(e?.sitesActivated,n)||te(a,s,r))?"active":"inactive":t}(e,i,r,t,n,s);const o=Q(n),{aaOnSite:d}=T(a,t,n);return 0===o.size?K(e?.status,e?.expiryDate)&&d&&!G(e?.name)?"inactive":r:o.size>0?function(e,a,t,n,s,r,i){const o=Y(e,s),d=o&&se(o,a,s);return K(e?.status,e?.expiryDate)?!d&&U(t)||d&&o&&!ae(o,r).active?"inactive":d&&o&&ae(o,r).active&&"active"===t?"active":i||Z(s,n)?"inactive":t:t}(e,i,r,a,n,s,d):function(e,a,t,n,s,r){if(r&&!G(e?.name))return"inactive";const i=Y(e,n);return i&&R(e,t)&&U(a)&&!ae(i,s).active?"inactive":a}(e,r,t,n,s,d)}(me,v,ue,b,N);he="failed"===u?"Payment Failed":he;const fe=ne(me,v,ue,b,N),ve=K(d,o),be=Y(me,b),xe=be?String(b?.[be]??""):"",_e=!be||ae(be,N).active,ye=be&&r&&xe===String(r),we=ve&&(!ye||!_e),ke=function(e,a){const t=(e??[]).length,n="number"==typeof a&&a>0?a:0;return Math.max(t,n)}(m,e),je=I&&K(d,o),Ne=de(l),Se=function(e,a){if(G(e)){const e=k.map(e=>a?.[e]??"off"),t=e.every(e=>"on"===e),n=e.every(e=>"off"===e);return t?(0,s.__)("On","advanced-ads"):n?(0,s.__)("Off","advanced-ads"):(0,s.__)("Mixed","advanced-ads")}return oe(V(e)||"main",a)?(0,s.__)("On","advanced-ads"):(0,s.__)("Off","advanced-ads")}(l,j),Ae=G(Ie=l)?(0,s.__)("All add-ons","advanced-ads"):de(Ie).map(e=>"main"===e?(0,s.__)("Advanced Ads","advanced-ads"):y[e]?.title??e).join(", ");var Ie;const Le=de(l).map(e=>({addonId:e,label:y[e]?.title??("main"===e?(0,s.__)("Advanced Ads","advanced-ads"):e),enabled:oe(e,j)}));return(0,Ma.jsxs)("div",{className:"rounded-lg p-6 border border-gray-300 bg-gray-100",children:[(0,Ma.jsxs)("div",{className:"grid grid-cols-3 gap-8 xl:grid-cols-[88px_minmax(0,1fr)_300px]",children:[(0,Ma.jsx)("div",{className:"order-1 xl:col-span-1",children:(0,Ma.jsx)("div",{className:"inline-flex grow-0 bg-gray-200 p-6 items-center justify-center rounded-lg",children:(0,Ma.jsx)(x,{className:"size-10"})})}),(0,Ma.jsx)("div",{className:"space-y-5 col-span-3 order-3 xl:order-2 xl:col-span-1",children:(0,Ma.jsxs)("div",{className:"grid grid-cols-1 gap-x-8 gap-y-5 sm:grid-cols-2 xl:grid-cols-4",children:[(0,Ma.jsx)(Nt,{label:(0,s.__)("License type:","advanced-ads"),value:le}),(0,Ma.jsx)(Nt,{label:(0,s.__)("License status:","advanced-ads"),value:(0,Ma.jsx)(jt,{status:he,showRenew:re,onRenew:ie})}),(0,Ma.jsx)(Nt,{label:(0,s.__)("Sites:","advanced-ads"),value:(0,Ma.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,Ma.jsx)("span",{children:(0,s.sprintf)(/* translators: 1: Number of sites activated, 2: Number of sites in the license. */ /* translators: 1: Number of sites activated, 2: Number of sites in the license. */
(0,s.__)("%1$s of %2$s used","advanced-ads"),String(ke),String(a))}),(0,Ma.jsx)("button",{type:"button",className:"button button-link underline! underline-offset-3",onClick:()=>{const e=`${advancedAds.endpoints.shopUrl}/account/?utm_source=advancedads&utm_medium=in-plugin&utm_campaign=a2-in_plugin-licenses_addons-view_all_sites`;fetch(e,{mode:"no-cors",keepalive:!0}),$()},children:(0,s.__)("View","advanced-ads")})]})}),(0,Ma.jsx)(Nt,{label:(0,s.__)("License key:","advanced-ads"),value:(0,Ma.jsx)("code",{className:"break-all text-sm font-normal text-gray-800 p-1",children:r})}),(0,Ma.jsx)(Nt,{label:(0,s.__)("Purchase date:","advanced-ads"),value:W(i)}),(0,Ma.jsx)(Nt,{label:w?(0,s.__)("Renews:","advanced-ads"):(0,s.__)("License expiration:","advanced-ads"),value:W(o)}),(0,Ma.jsx)(Nt,{label:(0,s.__)("Auto-updates:","advanced-ads"),value:(0,Ma.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,Ma.jsxs)("span",{children:[Se,(0,Ma.jsxs)("span",{className:"text-gray-500",children:[" · ",Ae]})]}),(0,Ma.jsx)("button",{type:"button",className:"button button-link underline! underline-offset-3",onClick:C,children:(0,s.__)("Edit","advanced-ads")})]})}),I&&fe?(0,Ma.jsx)(Nt,{label:(0,s.__)("Add-ons:","advanced-ads"),value:(0,Ma.jsx)(kt,{addonIds:Ne,addonInstallStates:N,appliedAddonKeyMap:b,licenseKey:r})}):null]})}),(0,Ma.jsxs)("div",{className:"flex flex-col text-right shrink-0 gap-2 col-span-2 order-2 md:flex-row md:justify-end xl:order-3 xl:col-span-1",children:[I?null:(0,Ma.jsx)("div",{children:(0,Ma.jsx)(Lt,{licenseKey:r,isActivated:fe,canActivate:we,noticesContext:f,downloadUrl:p,addonId:be??""})}),(0,Ma.jsx)("div",{children:(0,Ma.jsx)($a.DropdownMenu,{toggleProps:{className:"button advads-button-secondary inline-flex items-center justify-center gap-2 whitespace-nowrap px-4 py-2"},icon:(0,Ma.jsxs)(Ma.Fragment,{children:[(0,s.__)("Manage","advanced-ads"),(0,Ma.jsx)(Ka,{className:"h-4 w-4 shrink-0 opacity-90",strokeWidth:2,"aria-hidden":!0})]}),controls:[...ge?[{title:(0,s.__)("Upgrade plan","advanced-ads"),onClick:J}]:[],...re?[{title:(0,s.__)("Renew license","advanced-ads"),onClick:ie}]:[]]})})]})]}),(0,Ma.jsx)(wt,{license:me,allLicenses:v,appliedAddonKeyMap:b,currentHostname:ue,noticesContext:f,canUseAddonActions:je}),L&&(0,Ma.jsx)(St,{toggles:Le,onToggle:async(e,a)=>{A(e);try{await async function(e,a){const t=await Ga()({path:"/advanced-ads/v1/plugin-autoupdate",method:"POST",data:{addonId:e||"main",state:a}});return t?.autoUpdateStates&&"object"==typeof t.autoUpdateStates&&(0,Ha.dispatch)(Ra).setAutoUpdateStates(t.autoUpdateStates),t}(e,a?"on":"off")}catch{}finally{A("")}},savingId:S,onClose:z}),E&&(0,Ma.jsx)(At,{title:le,description:(0,s.sprintf)(/* translators: 1: Number of sites activated, 2: Number of sites in the license. */ /* translators: 1: Number of sites activated, 2: Number of sites in the license. */
(0,s.__)("Activated on %1$s out of %2$s sites.","advanced-ads"),String(ke),String(a)),sites:m??[],onClose:O}),B&&(0,Ma.jsx)(Oa,{onClose:ee,onSelectPlan:e=>{t&&function(e,a,t){const n=(t??[]).find(a=>a.id===e),s=n?.upgradeId;!s||!a||(globalThis.location.href=function({licenseId:e,upgradeId:a,utmCampaign:t}){const n=new URL(`${h.endpoints.shopUrl}/checkout/`);return n.searchParams.set("edd_action","sl_license_upgrade"),n.searchParams.set("license_id",String(e)),n.searchParams.set("upgrade_id",String(a)),n.searchParams.set("site",h.endpoints.siteUrl),t&&(n.searchParams.set("utm_source","advancedads"),n.searchParams.set("utm_medium","in-plugin"),n.searchParams.set("utm_campaign",t)),n.toString()}({licenseId:a,upgradeId:s,utmCampaign:n?.utmCampaign??""}))}(e,t,Ta)},currentPlanLabel:ce(me),currentPlanId:pe,currentActionLabel:(0,s.__)("Upgrade plan","advanced-ads")})]})}function Mt(){const e=jn(),a=e===N,t=(0,n.useRef)(!0),{licenses:s,appliedAddonKeyMap:r,hasLicenses:i}=(0,Ha.useSelect)(e=>{const a=e(Ra);return{licenses:a.getLicenses(),appliedAddonKeyMap:a.getAppliedAddonKeyMap(),hasLicenses:a.hasLicenses()}},[]),[o,d]=(0,n.useState)(!0),[l]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(a)return function({isInitialLoad:e,setIsLoading:a}){let t=!1;const n=e.current;n&&(e.current=!1,a(!0));const s=()=>async function(){Ja(await Ga()({url:Va,method:"GET"}))}().catch(()=>{}).finally(()=>{!t&&n&&a(!1)});s();const r=()=>{"visible"===document.visibilityState&&s()},i=e=>{(e?.persisted||"visible"===document.visibilityState)&&s()};return document.addEventListener("visibilitychange",r),globalThis.addEventListener("focus",r),globalThis.addEventListener("pageshow",i),globalThis.addEventListener("popstate",s),()=>{t=!0,document.removeEventListener("visibilitychange",r),globalThis.removeEventListener("focus",r),globalThis.removeEventListener("pageshow",i),globalThis.removeEventListener("popstate",s)}}({isInitialLoad:t,setIsLoading:d})},[e,a]),{licenses:s,appliedAddonKeyMap:r,hasLicenses:i,isLoading:o,error:l}}function zt(){const{licenses:e,appliedAddonKeyMap:a,hasLicenses:t,isLoading:n,error:s}=Mt();return n?(0,Ma.jsxs)(Ma.Fragment,{children:[(0,Ma.jsx)(ft,{isLoading:n}),(0,Ma.jsx)(Fa,{})]}):t?(0,Ma.jsxs)(Ma.Fragment,{children:[(0,Ma.jsx)(ft,{isLoading:n}),(0,Ma.jsx)("div",{className:"flex flex-col gap-6",children:e.map(t=>(0,Ma.jsx)(Ct,{...t,allLicenses:e,appliedAddonKeyMap:a,noticesContext:st},t.licenseId??t.licenseKey))})]}):(0,Ma.jsxs)(Ma.Fragment,{children:[(0,Ma.jsx)(ft,{isLoading:n}),s?.message&&(0,Ma.jsx)("div",{className:"mb-6 p-3 border border-red-200 bg-red-50 text-red-700 rounded",role:"alert",children:s.message}),(0,Ma.jsx)(Da,{})]})}const Et={name:"license",path:"/license",link:{label:(0,s.__)("License","advanced-ads"),exact:!0,priority:90},header:{title:(0,s.__)("License","advanced-ads"),breadcrumbTitle:"License",headerActions:null,upgradeUrl:"https://wpadvancedads.com/add-ons/?utm_source=advanced-ads&utm_medium=link&utm_campaign=header-upgrade-license",manualUrl:"https://wpadvancedads.com/manual/?utm_source=advancedads&utm_medium=in-plugin&utm_campaign=a2-in_plugin-licenses_addons-header-manual"},areas:{content:()=>(0,Ma.jsx)(zt,{})}},Tt=m("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),Pt=m("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),Ut=m("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);function $t({className:e,children:a}){return(0,Ma.jsx)("div",{className:La("border border-border rounded p-6 mb-8 bg-white",e),children:a})}$t.Header=function({className:e,children:a}){return(0,Ma.jsx)("div",{className:La(e),children:a})},$t.HeaderTitle=function({className:e,children:a}){return(0,Ma.jsx)("h3",{className:La("text-base font-medium",e),children:a})},$t.HeaderIcon=function({className:e,size:a="size-6",children:t}){return(0,Ma.jsx)("div",{className:La("bg-gray-200 rounded p-3 inline-flex items-center justify-center",e),children:(0,Ma.jsx)("div",{className:La(a),children:t})})};const Ot=m("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Dt=window.wp.compose;function Ft({id:e,placeholder:a="Search…",endpoint:t,formatSuggestion:s,onSelect:r,debounceDelay:i=300}){const{suggestions:o,isOpen:d,activeIndex:l,inputProps:c,listProps:u,handleSelect:m}=function({endpoint:e,onSelect:a,delay:t=300}){const[s,r]=(0,n.useState)([]),[i,o]=(0,n.useState)(!1),[d,l]=(0,n.useState)(-1),c=(0,n.useRef)(null),u=(0,n.useCallback)(async a=>{try{const t=await fetch(e.replace("{{search}}",a)),n=await t.json();r(n),o(n.length>0),l(-1)}catch(e){console.error("useSearchCombobox fetch error:",e),r([])}},[e]),m=(0,Dt.useDebounce)(u,t),p=(0,n.useCallback)(()=>{r([]),o(!1),l(-1)},[]),g=(0,n.useCallback)(e=>{const a=e.target.value;a.trim()?m(a):p()},[m,p]),h=(0,n.useCallback)(e=>{i&&("ArrowDown"===e.key?(e.preventDefault(),l(e=>(e+1)%s.length)):"ArrowUp"===e.key?(e.preventDefault(),l(e=>(e-1+s.length)%s.length)):"Enter"===e.key?(e.preventDefault(),d>-1&&(a(s[d],c),p())):"Escape"===e.key&&(c.current&&(c.current.value=""),p()))},[i,s,d,a,p]),f=(0,n.useCallback)(e=>{a(e,c),p()},[a,p]);return(0,n.useEffect)(()=>{const e=e=>{"Escape"===e.key&&i&&(c.current&&(c.current.value=""),p())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i,p]),{suggestions:s,isOpen:i,activeIndex:d,inputProps:{ref:c,role:"combobox","aria-autocomplete":"list","aria-expanded":i,"aria-activedescendant":d>-1?`suggestion-${d}`:void 0,onChange:g,onKeyDown:h},listProps:{role:"listbox"},handleSelect:f}}({endpoint:t,onSelect:r,delay:i});return(0,Ma.jsxs)("div",{className:"relative w-full",children:[(0,Ma.jsx)(Ot,{className:"absolute top-1/2 right-4 -translate-y-1/2 stroke-gray-600 size-4.5"}),(0,Ma.jsx)("input",{id:e,placeholder:a,className:"border border-border rounded-lg px-4 py-3 w-full leading-0 focus:shadow-none placeholder:text-gray-400",...c}),d&&(0,Ma.jsx)("ul",{className:"absolute w-full bg-white text-left border border-border max-h-60 overflow-y-auto m-0 mt-0.75 rounded-lg shadow-lg py-2 advads-scrollbar",...u,children:0===o.length?(0,Ma.jsx)("li",{className:"p-2.5 text-gray-400 cursor-default",children:"No results found"}):o.map((e,a)=>(0,Ma.jsx)("li",{id:`suggestion-${a}`,children:(0,Ma.jsx)("button",{type:"button",onClick:()=>m(e),className:La("flex w-full bg-transparent border-0! cursor-pointer px-4 py-2 text-sm transition-colors text-left",a===l?"bg-gray-100":""),children:s(e)})},a))})]})}function Kt(){return(0,Ma.jsxs)($t,{className:"text-center",children:[(0,Ma.jsx)("h2",{className:"m-0 text-2xl",children:(0,s.__)("How can we help?","advanced-ads")}),(0,Ma.jsx)("p",{children:(0,s.__)("Search for a topic or browse our documentation.","advanced-ads")}),(0,Ma.jsx)("div",{className:"relative mt-5 w-lg max-w-lg mx-auto",children:(0,Ma.jsx)(Ft,{id:"advads-support-search",placeholder:(0,s.__)("Search help articles, guides and FAQs","advanced-ads"),endpoint:"https://wpadvancedads.com/wp-json/wp/v2/search?subtype=post,bwl_kb&search={{search}}",formatSuggestion:e=>(0,Ma.jsxs)("span",{className:"flex flex-col",children:[(0,Ma.jsx)("span",{className:"font-medium",children:e.title}),(0,Ma.jsx)("span",{className:"text-gray-400 block text-xs italic",children:"post"===e.subtype?"Tutorials":"Knowledge Base"})]}),onSelect:(e,a)=>{window.open(e.url+"?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_searchbox","_blank"),a.current.value=""}})})]})}const Ht=m("circle-arrow-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);function Rt(){return(0,Ma.jsxs)("div",{className:"flex items-center gap-2.5 py-2 border-b border-gray-100 last:border-0",children:[(0,Ma.jsx)("div",{className:"size-4 rounded-full bg-gray-100 animate-pulse shrink-0"}),(0,Ma.jsx)("div",{className:"h-3 bg-gray-100 animate-pulse rounded w-full"})]})}function Wt({rows:e=3}){return(0,Ma.jsxs)("div",{children:[(0,Ma.jsxs)("div",{className:"flex items-center gap-2.5 mb-4",children:[(0,Ma.jsx)("div",{className:"size-6 rounded bg-gray-100 animate-pulse shrink-0"}),(0,Ma.jsx)("div",{className:"h-3.5 bg-gray-100 animate-pulse rounded w-24"})]}),Array.from({length:e}).map((e,a)=>(0,Ma.jsx)(Rt,{},a))]})}function qt({title:e,icon:a,endpoint:t,extraArgs:s,utms:r,viewAll:i=null}){const{data:o,isLoading:d}=function(e,a={}){const[t,s]=(0,n.useState)([]),[r,i]=(0,n.useState)(!0),[o,d]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(!e)return;let t=e.startsWith("http")?{url:e}:{path:e};a&&Object.keys(a).length>0&&(t={...t,method:"POST",data:a}),i(!0),Ga()(t).then(e=>s(e)).catch(e=>d(e)).finally(()=>i(!1))},[e,a]),{data:t,isLoading:r,error:o}}(t,s);return(0,Ma.jsxs)($t,{className:"advads-card flex flex-col",children:[(0,Ma.jsxs)("div",{children:[(0,Ma.jsxs)($t.Header,{children:[(0,Ma.jsx)($t.HeaderIcon,{size:"stroke-gray-700 size-6",children:a}),(0,Ma.jsx)($t.HeaderTitle,{children:e})]}),d?(0,Ma.jsx)(Wt,{}):(0,Ma.jsx)("ul",{children:o.map(e=>(0,Ma.jsx)("li",{children:(0,Ma.jsx)("a",{href:e.link+r,target:"_blank",rel:"noopener noreferrer",children:e.title?.rendered})},`${e.ID}-${e.title?.rendered}`))})]}),i&&(0,Ma.jsx)("footer",{className:"mt-auto",children:(0,Ma.jsxs)("a",{href:i.link,className:"advads-view-all-link",children:[i.label,(0,Ma.jsx)(Ht,{})]})})]})}const Bt=m("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]),Gt=m("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Vt=m("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);function Yt({className:e,children:a}){return(0,Ma.jsx)("div",{className:La("bg-white rounded-md divide-y divide-border",e),children:a})}function Jt(){const e=(0,s.__)("<strong>Using placements for delivery is best practice</strong>, whether you are inserting a single ad or an ad group. Even if you prefer working with shortcodes, you can use a <strong>Manual Placement</strong>, which also provides a shortcode. This gives you the flexibility of shortcode insertion while still keeping centralized control.","advanced-ads"),a=(0,s.__)("<strong>Here’s why that matters:</strong> If you manually insert an ad shortcode into 100 individual posts and later stop working with that advertiser, you would need to edit all 100 posts to remove or replace the shortcode (unless it’s embedded in a template). With placements, you simply replace or disable the ad (or ad group) assigned to that placement, and the change is applied everywhere instantly. This significantly reduces maintenance effort and makes your setup more scalable and future-proof.","advanced-ads");return(0,Ma.jsxs)(Ma.Fragment,{children:[(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}}),(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:a}})]})}function Qt(){const e=(0,s.sprintf)(/* translators: 1: link to purchase licenses page, 2: closing anchor tag */ /* translators: 1: link to purchase licenses page, 2: closing anchor tag */
(0,s.__)("Testing sites do not count towards your Advanced Ads site limit. We automatically detect testing sites based on the URL patterns in %1$sthis list%2$s.","advanced-ads"),'<a href="https://wpadvancedads.com/manual/purchase-licenses/#Test_sites?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_getting_started" target="_blank" rel="noopener noreferrer">',"</a>"),a=(0,s.sprintf)(/* translators: 1: link to purchase licenses page, 2: closing anchor tag */ /* translators: 1: link to purchase licenses page, 2: closing anchor tag */
(0,s.__)("If you are running the plugin on one of those URLs, the activation works even if you hit your limit. You can always manage license activations in %1$syour account%2$s.","advanced-ads"),'<a href="https://wpadvancedads.com/account/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_getting_started" target="_blank" rel="noopener noreferrer">',"</a>");return(0,Ma.jsxs)(Ma.Fragment,{children:[(0,Ma.jsx)("p",{children:(0,s.__)("Many customers maintain a local, non-public site for testing, or troubleshooting purposes. This setup is particularly helpful for staging complex changes and verifying their expected behaviour before releasing it to the public.","advanced-ads")}),(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}}),(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:a}})]})}function Zt(){const e=(0,s.__)("In general, <strong>video ads tend to generate higher engagement rates</strong> compared to static image ads, primarily because motion naturally draws user attention, especially on content-heavy pages where users are scrolling quickly. That moving part will make users stop scrolling and check.","advanced-ads"),a=(0,s.sprintf)(/* translators: 1: link to video ads guide, 2: link to video ads configuration guide, 3: closing anchor tag */ /* translators: 1: link to video ads guide, 2: link to video ads configuration guide, 3: closing anchor tag */
(0,s.__)("%1$sRead more%3$s about video ads, and %2$slearn how to configure them%3$s using Advanced Ads.","advanced-ads"),'<a href="https://wpadvancedads.com/beginners-guide-video-ads/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_video_ads" target="_blank" rel="noopener noreferrer">','<a href="https://wpadvancedads.com/video-ads/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_video_ads" target="_blank" rel="noopener noreferrer">',"</a>");return(0,Ma.jsxs)(Ma.Fragment,{children:[(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}}),(0,Ma.jsx)("p",{children:(0,s.__)("Performance is highly dependent on several factors:","advanced-ads")}),(0,Ma.jsxs)("ul",{className:"list-disc list-inside",children:[(0,Ma.jsx)("li",{children:(0,s.__)("Your audience and niche","advanced-ads")}),(0,Ma.jsx)("li",{children:(0,s.__)("Placement position","advanced-ads")}),(0,Ma.jsx)("li",{children:(0,s.__)("Page load performance","advanced-ads")}),(0,Ma.jsx)("li",{children:(0,s.__)("The quality and relevance of the creative","advanced-ads")}),(0,Ma.jsx)("li",{children:(0,s.__)("How intrusive the format is","advanced-ads")})]}),(0,Ma.jsx)("p",{children:(0,s.__)("While video ads often deliver stronger engagement metrics (CTR, viewability, time on ad), they can also negatively impact user experience and performance if not implemented carefully.","advanced-ads")}),(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:a}})]})}function Xt(){const e=(0,s.sprintf)(/* translators: 1: link to purchase licenses page, 2: closing anchor tag */ /* translators: 1: link to purchase licenses page, 2: closing anchor tag */
(0,s.__)("This is likely because you haven’t installed the additional add-ons. Please log in to your Advanced Ads account, download the necessary add-ons, and upload the downloaded zip files to your WordPress site. Install and activate them as you would any other WordPress plugin. %1$sHow to install an Add-On%2$s","advanced-ads"),'<a href="https://wpadvancedads.com/manual/how-to-install-an-add-on/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_getting_started" target="_blank" rel="noopener noreferrer">',"</a>");return(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}})}function en(){const e=(0,s.sprintf)(/* translators: 1: link to cache busting page, 2: closing anchor tag */ /* translators: 1: link to cache busting page, 2: closing anchor tag */
(0,s.__)("Yes, it does. However, if you plan to deliver ads dynamically based on specific conditions or rotate multiple ads within the same placement, you’ll need to enable %1$sCache Busting%2$s. You can enable this option by going to: Advanced Ads → Settings → Pro → Cache Busting","advanced-ads"),'<a href="https://wpadvancedads.com/manual/cache-busting/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_getting_started" target="_blank" rel="noopener noreferrer">',"</a>");return(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}})}function an(){const e=(0,s.sprintf)(/* translators: 1: link to shareable link page, 2: closing anchor tag */ /* translators: 1: link to shareable link page, 2: closing anchor tag */
(0,s.__)("%1$sAs shown here%2$s, the Tracking add-on allows you to generate non-indexed public statistics pages for each ad. You can share these links directly with your advertisers so they can view performance data, including impressions, clicks, a visual graph, and customizable date range filters.","advanced-ads"),'<a href="https://wpadvancedads.com/manual/tracking-documentation/#Public_Stats/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_getting_started" target="_blank" rel="noopener noreferrer">',"</a>");return(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}})}function tn(){const e=(0,s.sprintf)(/* translators: 1: link to manage ads page, 2: closing anchor tag */ /* translators: 1: link to manage ads page, 2: closing anchor tag */
(0,s.__)("You can do this by using the <strong>Ad Server placement</strong>. It allows you to embed the generated JavaScript code or iframe on your other WordPress installations to deliver ads from your main site. Please review the feature’s limitations before implementation to ensure it fits your needs. %1$sYou can find more details here%2$s.","advanced-ads"),'<a href="https://wpadvancedads.com/ad-server-wordpress/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_getting_started" target="_blank" rel="noopener noreferrer">',"</a>");return(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}})}function nn(){const e=(0,s.sprintf)(/* translators: 1: link to manage ads page, 2: closing anchor tag */ /* translators: 1: link to manage ads page, 2: closing anchor tag */
(0,s.__)("You can protect your ads by using the Click Fraud Protection feature included in Advanced Ads Pro. This feature automatically hides an ad once a defined number of clicks from the same user is reached, helping to prevent repeated or suspicious clicks and reducing the risk of fraudulent activity. %1$sYou can find more details here%2$s.","advanced-ads"),'<a href="https://wpadvancedads.com/manual/click-fraud-protection/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_faqs_getting_started" target="_blank" rel="noopener noreferrer">',"</a>");return(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}})}Yt.Item=function({title:e,content:a,defaultOpen:t=!1}){const s=(0,n.useId)(),[r,i]=(0,n.useState)(t);return(0,Ma.jsxs)("div",{className:"relative transition-all duration-500",children:[(0,Ma.jsx)("input",{type:"checkbox",className:"absolute opacity-0 z-[-1]",id:s,checked:r,onChange:()=>i(!r)}),(0,Ma.jsxs)("label",{htmlFor:s,className:"flex font-medium text-sm justify-between py-4 px-1 cursor-pointer",children:[e,r?(0,Ma.jsx)(Gt,{className:"size-4"}):(0,Ma.jsx)(Vt,{className:"size-4"})]}),r&&(0,Ma.jsx)("div",{className:La("px-1 max-h-0 overflow-hidden [&>:*]:p-0 [&>:*]:m-0 space-y-4",r?"max-h-[600px] pb-4":""),children:a})]})};const sn=[{title:(0,s.__)("What are best practices for getting started with Advanced Ads?","advanced-ads"),content:(0,Ma.jsx)(Jt,{})},{title:(0,s.__)("Are video ads better than image ads?","advanced-ads"),content:(0,Ma.jsx)(Zt,{})},{title:(0,s.__)("How do I activate my license on a test site?","advanced-ads"),content:(0,Ma.jsx)(Qt,{})},{title:(0,s.__)("I purchased a subscription but can’t see the features in the backend of my website. Why?","advanced-ads"),content:(0,Ma.jsx)(Xt,{})},{title:(0,s.__)("Does Advanced Ads work on cached websites?","advanced-ads"),content:(0,Ma.jsx)(en,{})},{title:(0,s.__)("How can I share the statistics of my ads with my clients?","advanced-ads"),content:(0,Ma.jsx)(an,{})},{title:(0,s.__)("Can I manage ads across multiple WordPress installations from one website?","advanced-ads"),content:(0,Ma.jsx)(tn,{})},{title:(0,s.__)("How can I prevent click fraud on my ads?","advanced-ads"),content:(0,Ma.jsx)(nn,{})}];function rn(){return(0,Ma.jsxs)($t,{className:"advads-card grid sm:grid-cols-3 gap-5",children:[(0,Ma.jsxs)("div",{children:[(0,Ma.jsx)($t.HeaderIcon,{children:(0,Ma.jsx)(Bt,{})}),(0,Ma.jsx)($t.HeaderTitle,{children:(0,s.__)("FAQ's","advanced-ads")}),(0,Ma.jsx)("p",{children:(0,s.__)("Everything you need to know about the product.","advanced-ads")}),(0,Ma.jsxs)(Ma.Fragment,{children:[(0,Ma.jsxs)("p",{children:[(0,s.__)("Couldn’t find what you were looking for?","advanced-ads"),(0,Ma.jsx)("br",{}),(0,s.__)("Get help from the community.","advanced-ads")]}),(0,Ma.jsx)("p",{children:(0,Ma.jsxs)("a",{className:"advads-view-all-link",href:"https://wordpress.org/support/plugin/advanced-ads/",target:"_blank",rel:"noreferrer",children:[(0,s.__)("Visit WordPress Forum","advanced-ads"),(0,Ma.jsx)(Ht,{})]})})]})]}),(0,Ma.jsx)(Yt,{className:"col-span-2",children:sn.map(e=>(0,Ma.jsx)(Yt.Item,{...e},e.title))})]})}const on=m("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),dn=["RmH8YiswfIk","EL29HYcCcxY","jWZe020bdJc","Q7QQGvCJh2I","wUBa7Ht52fs","Ywtj0Ui_TaI"];function ln(){return(0,Ma.jsxs)($t,{className:"advads-card",children:[(0,Ma.jsx)($t.HeaderIcon,{children:(0,Ma.jsx)(on,{})}),(0,Ma.jsx)($t.HeaderTitle,{children:(0,s.__)("Video tutorials","advanced-ads")}),(0,Ma.jsx)("div",{className:"grid sm:grid-cols-2 xl:grid-cols-3 gap-8",children:dn.map(e=>(0,Ma.jsx)("div",{children:(0,Ma.jsx)("iframe",{title:`YouTube video ${e}`,src:`https://www.youtube.com/embed/${e}`,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,className:"aspect-video w-full"})},e))}),(0,Ma.jsx)("footer",{className:"mt-6",children:(0,Ma.jsxs)("a",{className:"advads-view-all-link",href:"https://www.youtube.com/channel/UCBBcWLiklJ-mbq9LB6TbkVQ",target:"_blank",rel:"noopener noreferrer",children:[(0,s.__)("View all videos tutorials on YouTube","advanced-ads"),(0,Ma.jsx)(Ht,{})]})})]})}const cn=advancedAds.utils,un=m("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);function mn(e,a=2){if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(Math.max(0,a)))+" "+["Bytes","KB","MB","GB","TB"][t]}function pn({maxFiles:e=5,maxSizeMB:a=5,allowedExt:t=["jpg","jpeg","png","gif","pdf","txt","docx","log"],label:n="Drag & drop files or <strong>click to browse</strong>",uploaderRef:s=null}){const{selectedFiles:i,errors:o,atLimit:d,processFiles:l,deleteFile:c,reset:u,meta:m}=function({maxFiles:e=10,maxSizeMB:a=5,allowedExt:t=["jpg","jpeg","png","gif","svg","pdf","docx","txt"]}={}){const[n,s]=(0,r.useState)([]),[i,o]=(0,r.useState)([]),d=(0,r.useRef)(0),l=e=>{s(a=>{const t="function"==typeof e?e(a):e;return d.current=t.length,t})},c=1024*a*1024,u=(0,r.useCallback)(e=>{const n=[],s=e.name.split(".").pop().toLowerCase();return t.includes(s)||n.push(`".${s}" is not an allowed extension`),e.size>c&&n.push(`exceeds max size of ${a} MB (is ${mn(e.size)})`),n},[t,c,a]),m=(0,r.useCallback)(a=>{const t=e-d.current;if(t<=0)return void o([{name:"Selection blocked",reasons:[`you have already reached the limit of ${e} files`]}]);const n=[];let s=0;for(const r of a){if(s>=t){n.push({name:r.name,reasons:[`max file limit of ${e} reached`]});continue}const a=u(r);if(a.length){n.push({name:r.name,reasons:a});continue}d.current+=1;const i=new FileReader;i.onloadend=()=>{l(e=>{return[...e,{id:Math.random().toString(36).slice(2,9)+Date.now().toString(36),filename:r.name,filetype:r.type,fileimage:i.result,datetime:r.lastModified?new Date(r.lastModified).toLocaleString("en-IN"):"Unknown",filesize:mn(r.size),isImage:(a=r.name,/\.(jpg|jpeg|png|gif|svg)$/i.test(a))}];var a})},i.readAsDataURL(r),s++}o(n)},[e,u]),p=(0,r.useCallback)(e=>{globalThis.confirm("Are you sure you want to delete this file?")&&l(a=>a.filter(a=>a.id!==e))},[]),g=(0,r.useCallback)(()=>{d.current=0,l([]),o([])},[]);return{selectedFiles:n,errors:i,atLimit:n.length>=e,processFiles:m,deleteFile:p,reset:g,meta:{maxFiles:e,maxSizeMB:a,allowedExt:t}}}({maxFiles:e,maxSizeMB:a,allowedExt:t});s&&(s.current={selectedFiles:i,reset:u});const p=i.length,g=m.allowedExt.map(e=>"."+e).join(",");return(0,Ma.jsxs)("div",{id:"attachments-container",className:"advads-field-input advads-file-uploader",children:[(0,Ma.jsxs)("div",{id:"attachments-drop-zone",className:"dropzone"+(d?" limit-reached":""),onDragOver:function(e){e.preventDefault(),d||e.currentTarget.classList.add("dragover")},onDragLeave:function(e){e.currentTarget.classList.remove("dragover")},onDrop:function(e){e.preventDefault(),e.currentTarget.classList.remove("dragover"),l(e.dataTransfer.files)},children:[(0,Ma.jsx)(un,{className:"size-8 mb-4"}),(0,Ma.jsx)("p",{className:"text-sm mt-0 mb-2",dangerouslySetInnerHTML:{__html:n}}),(0,Ma.jsx)("input",{id:"attachments",type:"file",multiple:!0,accept:g,onChange:function(e){l(e.target.files),e.target.value=""}}),(0,Ma.jsxs)("div",{className:"upload-hints",children:[(0,Ma.jsxs)("div",{children:[(0,Ma.jsx)("strong",{children:"Allowed:"})," ",m.allowedExt.map(e=>"."+e).join(", ")]}),(0,Ma.jsxs)("span",{children:[(0,Ma.jsx)("strong",{children:"Max size:"})," ",m.maxSizeMB," MB per file"]}),(0,Ma.jsxs)("span",{children:[(0,Ma.jsx)("strong",{children:"Max files:"})," ",m.maxFiles]})]})]}),p>0&&(0,Ma.jsxs)("div",{className:"file-count-badge"+(d?" at-limit":""),children:[p," / ",m.maxFiles," file",1!==p?"s":""," ","selected"]}),o.length>0&&(0,Ma.jsxs)("div",{className:"error-box",children:[(0,Ma.jsx)("p",{className:"error-box-title",children:"Some files were rejected:"}),(0,Ma.jsx)("ul",{className:"error-list",children:o.map((e,a)=>(0,Ma.jsxs)("li",{children:[(0,Ma.jsx)("strong",{children:e.name}),":"," ",e.reasons.join("; ")]},a))})]}),(0,Ma.jsx)("div",{className:"selected-files-container",children:i.map(e=>(0,Ma.jsxs)("div",{className:"file-item",children:[(0,Ma.jsx)("div",{className:"file-image",children:e.isImage?(0,Ma.jsx)("img",{src:e.fileimage,alt:""}):(0,Ma.jsx)("i",{className:"far fa-file-alt"})}),(0,Ma.jsxs)("div",{className:"file-detail",children:[(0,Ma.jsx)("h6",{children:e.filename}),(0,Ma.jsxs)("p",{children:[(0,Ma.jsxs)("span",{children:["Size: ",e.filesize]}),(0,Ma.jsxs)("span",{style:{marginLeft:10},children:["Modified: ",e.datetime]})]}),(0,Ma.jsx)("div",{className:"file-actions",children:(0,Ma.jsx)("button",{className:"file-action-btn",onClick:()=>c(e.id),children:"Delete"})})]})]},e.id))})]})}const gn=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,63}$/i;function hn({closeModal:e}){const a=(0,n.useRef)(null),[t,r]=(0,n.useState)(h.siteInfo.currentUserEmail??""),[i,o]=(0,n.useState)(""),[d,l]=(0,n.useState)(""),[c,u]=(0,n.useState)(!1),[m,p]=(0,n.useState)({}),[g,f]=(0,n.useState)(!1),v=(0,s.sprintf)(/* translators: 1: opening a tag, 2: opening a tag, 3: closing a tag */ /* translators: 1: opening a tag, 2: opening a tag, 3: closing a tag */
(0,s.__)("By submitting this form, I accept the %1$sTerms%3$s and %2$sPrivacy Policy%3$s and consent that my personal information in this form will be stored and processed for the purposes of providing support.","advanced-ads"),'<a href="https://wpadvancedads.com/terms/" target="_blank">','<a href="https://wpadvancedads.com/privacy-policy/" target="_blank">',"</a>");return(0,Ma.jsxs)($a.Modal,{title:(0,s.__)("Get help from our support team","advanced-ads"),size:"small",onRequestClose:e,shouldCloseOnEscape:!0,shouldCloseOnClickOutside:!1,className:"advads-modal w-lg max-w-lg",overlayClassName:"bg-black/50 backdrop-blur-[1px]",children:[(0,Ma.jsx)("p",{className:"mt-0",children:(0,s.__)("Describe your issue and our support team will review it as soon as possible. You’ll receive a confirmation email after submitting your request.","advanced-ads")}),(0,Ma.jsxs)("form",{onSubmit:async function(n){n.preventDefault();const{next:r,trimmedEmail:o,trimmedSubject:l,trimmedMessage:u}=function(e,a,t,n){const r={},i=e.trim(),o=a.trim(),d=t.trim();return i?gn.test(i)||(r.email=(0,s.__)("Please enter a valid email address.","advanced-ads")):r.email=(0,s.__)("Please enter your email address.","advanced-ads"),o||(r.subject=(0,s.__)("Please enter a subject.","advanced-ads")),d||(r.message=(0,s.__)("Please enter your message.","advanced-ads")),n||(r.terms=(0,s.__)("Please accept the terms and privacy policy to continue.","advanced-ads")),{next:r,trimmedEmail:i,trimmedSubject:o,trimmedMessage:d}}(t,i,d,c);if(p(r),Object.keys(r).length>0)return;const m=a.current,g=m?.selectedFiles??[],v=g.length>0,b={email:o,subject:l,message:u,terms:c?"on":"",domain:h.siteInfo.siteUrl,php_version:h.siteInfo.phpVersion,wp_version:h.siteInfo.wpVersion};let x;f(!0);const _={};if(v){const e=new FormData;for(const[a,t]of Object.entries(b))e.append(a,String(t));g.forEach(a=>{const t=function(e){const[a,t]=e.split(","),n=/:(.*?);/.exec(a),s=n?n[1]:"application/octet-stream",r=atob(t),i=new Uint8Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.codePointAt(e);return new Blob([i],{type:s})}(a.fileimage);e.append("attachments[]",t,a.filename)}),x=e}else x=JSON.stringify(b),_["Content-Type"]="application/json";try{if((await fetch("https://wpadvancedads.com/wp-json/advanced-ads/v1/create-ticket",{method:"POST",body:x,headers:_})).ok)return m?.reset?.(),e(),void(0,cn.createToast)({type:"muted",iconType:"success",title:(0,s.__)("Ticket submitted","advanced-ads"),message:(0,s.__)("Your ticket has been submitted successfully.","advanced-ads")});throw new Error((0,s.__)("Failed to submit form","advanced-ads"))}catch(e){(0,cn.createToast)({type:"error",title:(0,s.__)("Failed to submit form","advanced-ads"),message:e instanceof Error?e.message:(0,s.__)("Something went wrong.","advanced-ads"),inDialog:!0})}finally{f(!1)}},children:[(0,Ma.jsxs)("div",{className:"advads-form",children:[(0,Ma.jsxs)("div",{className:"advads-field"+(m.email?" invalid":""),children:[(0,Ma.jsx)("div",{className:"advads-field-label",children:(0,Ma.jsxs)("label",{htmlFor:"email",children:[(0,s.__)("Email address","advanced-ads")," *"]})}),(0,Ma.jsx)("div",{className:"advads-field-input",children:(0,Ma.jsx)("input",{type:"email",name:"email",id:"email",className:"regular-text",autoComplete:"email",placeholder:(0,s.__)("Enter your email address","advanced-ads"),value:t,onChange:e=>{r(e.target.value),m.email&&p(e=>{const a={...e};return delete a.email,a})},"aria-invalid":m.email?"true":"false","aria-describedby":m.email?"email-error":void 0})}),m.email&&(0,Ma.jsx)("p",{id:"email-error",className:"text-sm text-red-600 mt-2",role:"alert",children:m.email})]}),(0,Ma.jsxs)("div",{className:"advads-field"+(m.subject?" invalid":""),children:[(0,Ma.jsx)("div",{className:"advads-field-label",children:(0,Ma.jsxs)("label",{htmlFor:"subject",children:[(0,s.__)("Subject","advanced-ads")," *"]})}),(0,Ma.jsx)("div",{className:"advads-field-input",children:(0,Ma.jsx)("input",{type:"text",name:"subject",id:"subject",className:"regular-text",placeholder:(0,s.__)("Enter the subject of your issue","advanced-ads"),value:i,onChange:e=>{o(e.target.value),m.subject&&p(e=>{const a={...e};return delete a.subject,a})},"aria-invalid":m.subject?"true":"false","aria-describedby":m.subject?"subject-error":void 0})}),m.subject&&(0,Ma.jsx)("p",{id:"subject-error",className:"text-sm text-red-600 mt-2",role:"alert",children:m.subject})]}),(0,Ma.jsxs)("div",{className:"advads-field"+(m.message?" invalid":""),children:[(0,Ma.jsx)("div",{className:"advads-field-label",children:(0,Ma.jsxs)("label",{htmlFor:"message",children:[(0,s.__)("Your Message","advanced-ads")," *"]})}),(0,Ma.jsx)("div",{className:"advads-field-input",children:(0,Ma.jsx)("textarea",{name:"message",id:"message",className:"large-text"+(m.message?" !border-red-300":""),placeholder:(0,s.__)("Enter the message of your issue","advanced-ads"),rows:"5",value:d,onChange:e=>{l(e.target.value),m.message&&p(e=>{const a={...e};return delete a.message,a})},"aria-invalid":m.message?"true":"false","aria-describedby":m.message?"message-error":void 0})}),m.message&&(0,Ma.jsx)("p",{id:"message-error",className:"text-sm text-red-600 mt-2",role:"alert",children:m.message})]}),(0,Ma.jsx)("div",{className:"advads-field",children:(0,Ma.jsx)(pn,{uploaderRef:a,maxFiles:5,maxSizeMB:5,allowedExt:["jpg","jpeg","png","gif","pdf","txt","docx","log"]})}),(0,Ma.jsxs)("div",{className:"advads-field"+(m.terms?" invalid":""),children:[(0,Ma.jsxs)("div",{className:"flex items-start gap-2",children:[(0,Ma.jsx)("input",{type:"checkbox",name:"terms",id:"terms",className:"mt-0.5",checked:c,onChange:e=>{u(e.target.checked),m.terms&&p(e=>{const a={...e};return delete a.terms,a})},"aria-labelledby":"terms-consent-label","aria-invalid":m.terms?"true":"false","aria-describedby":m.terms?"terms-error":void 0}),(0,Ma.jsx)("label",{htmlFor:"terms",id:"terms-consent-label",dangerouslySetInnerHTML:{__html:v}})]}),m.terms&&(0,Ma.jsx)("p",{id:"terms-error",className:"text-sm text-red-600 mt-2",role:"alert",children:m.terms})]})]}),(0,Ma.jsxs)("div",{className:"pt-12 flex gap-x-4 justify-end -mb-2",children:[(0,Ma.jsx)("button",{type:"button","data-dialog-close":!0,className:"button button-secondary",onClick:e,disabled:g,children:(0,s.__)("Cancel","advanced-ads")}),(0,Ma.jsx)("button",{type:"submit",className:"button button-primary"+(g?" submitting":""),disabled:g,children:(0,s.__)("Submit","advanced-ads")})]})]})]})}function fn(){const[e,a]=(0,n.useState)(!1),t=(0,s.__)("As a paid user, you receive <strong>priority, premium support from our specialists</strong>. Submit a support ticket and get fast, tailored assistance to resolve your request.","advanced-ads");return(0,Ma.jsxs)($t,{className:"advads-card bg-gray-100 flex flex-col",children:[(0,Ma.jsxs)("div",{children:[(0,Ma.jsxs)($t.Header,{children:[(0,Ma.jsx)($t.HeaderIcon,{size:"stroke-gray-700 size-6",children:(0,Ma.jsx)(Ut,{})}),(0,Ma.jsx)($t.HeaderTitle,{children:(0,s.__)("Access Priority Support","advanced-ads")})]}),(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:t}})]}),(0,Ma.jsx)("div",{className:"mt-auto",children:(0,Ma.jsx)("button",{type:"button","data-dialog":"advads-create-ticket",className:"button advads-button-secondary is-block w-full",onClick:()=>{a(!0)},children:(0,s.__)("Submit a ticket","advanced-ads")})}),e&&(0,Ma.jsx)(hn,{closeModal:()=>{a(!1)}})]})}function vn(){const e=(0,s.__)("Upgrade to <strong>A2 Pro</strong> to get:","advanced-ads");return(0,Ma.jsxs)($t,{className:"advads-card bg-gray-100 flex flex-col",children:[(0,Ma.jsxs)("div",{children:[(0,Ma.jsx)("h3",{className:"mt-0 mb-2",children:(0,s.__)("Need more help?","advanced-ads")}),(0,Ma.jsx)("p",{children:(0,s.__)("On the free plan, support is available via guides and community forums.","advanced-ads")}),(0,Ma.jsx)("p",{dangerouslySetInnerHTML:{__html:e}}),(0,Ma.jsxs)("ul",{className:"list-disc list-inside",children:[(0,Ma.jsx)("li",{children:(0,s.__)("Priority support from our team","advanced-ads")}),(0,Ma.jsx)("li",{children:(0,s.__)("Help directly inside the plugin","advanced-ads")}),(0,Ma.jsx)("li",{children:(0,s.__)("Faster issue resolution","advanced-ads")})]})]}),(0,Ma.jsx)("div",{className:"mt-auto",children:(0,Ma.jsx)("a",{href:"https://wpadvancedads.com/checkout/?edd_action=add_to_cart&download_id=95170&utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_need_help_upgrade",className:"button advads-button-secondary is-block mt-6",children:(0,s.__)("Upgrade to Premium","advanced-ads")})})]})}function bn(){const e="/advanced-ads/v1/support-links",{hasAnyValidLicense:a}=h.siteInfo;return(0,Ma.jsxs)("div",{className:"advads-support-wrap",children:[(0,Ma.jsx)(Kt,{}),(0,Ma.jsxs)("div",{className:"grid sm:grid-cols-2 xl:grid-cols-4 gap-5 mt-8",children:[(0,Ma.jsx)(qt,{icon:(0,Ma.jsx)(Tt,{}),endpoint:e,title:(0,s.__)("Getting started","advanced-ads"),utms:"?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_getting_started",viewAll:{label:(0,s.__)("View all articles","advanced-ads"),link:"https://wpadvancedads.com/manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_getting_started_view_all"},extraArgs:{cache_key:"advads_support_getting_started_links"}}),(0,Ma.jsx)(qt,{icon:(0,Ma.jsx)(Pt,{}),endpoint:e,title:(0,s.__)("Latest tutorials","advanced-ads"),utms:"?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_latest_tutorials",viewAll:{label:(0,s.__)("View all tutorials","advanced-ads"),link:"https://wpadvancedads.com/category/tutorials/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_latest_tutorials_view_all"},extraArgs:{cache_key:"advads_support_latest_tutorials_links"}}),(0,Ma.jsx)(qt,{icon:(0,Ma.jsx)(Ut,{}),endpoint:e,title:(0,s.__)("Articles","advanced-ads"),utms:"?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_articles",viewAll:{label:(0,s.__)("View all articles","advanced-ads"),link:"https://wpadvancedads.com/manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_articles_view_all"},extraArgs:{cache_key:"advads_support_articles_links"}}),a?(0,Ma.jsx)(fn,{}):(0,Ma.jsx)(vn,{})]}),(0,Ma.jsx)(rn,{}),(0,Ma.jsx)(ln,{})]})}const xn=[Et,{name:"support",path:"/support",link:{label:(0,s.__)("Support","advanced-ads"),exact:!0,priority:90},header:{title:(0,s.__)("Support","advanced-ads"),breadcrumbTitle:"Support",headerActions:null,upgradeUrl:"https://wpadvancedads.com/add-ons/?utm_source=advanced-ads&utm_medium=link&utm_campaign=header-upgrade-license"},areas:{content:()=>(0,Ma.jsx)(bn,{})}}];function yn(){return globalThis.location.search}function wn(e){return globalThis.addEventListener("popstate",e),()=>globalThis.removeEventListener("popstate",e)}function kn(){const e=(0,n.useSyncExternalStore)(wn,yn);return(0,n.useMemo)(()=>new URLSearchParams(e),[e])}function jn(){return kn().get("path")??"/"}function Nn(){const e=kn(),a=e.get("path")??"/",t=(0,n.useMemo)(()=>Object.fromEntries(e),[e]),s=(0,n.useMemo)(()=>xn.find(e=>e.path===a)??xn.find(e=>"not-found"===e.name),[a]);return{route:s,query:t}}function Sn(e){const{route:a,query:t}=Nn();return e?a?.areas?.[e]?a.areas[e]({query:t}):null:{route:a,query:t}}function An(e,a={}){const t=new URL(globalThis.location.href);t.pathname=function(e){const a="/wp-admin/admin.php",t=e.indexOf(a);if(-1===t)return e;const n=e.indexOf(a,t+1);return-1===n?e:e.slice(0,n)}(t.pathname),t.search="";const n=new URLSearchParams(globalThis.location.search).get("page");return n&&t.searchParams.set("page",n),e&&"/"!==e&&t.searchParams.set("path",e),Object.entries(a).forEach(([e,a])=>{null!==a&&t.searchParams.set(e,String(a))}),t}function In(e,a={}){const t=An(e,a);globalThis.history.pushState({},"",t),globalThis.dispatchEvent(new Event("popstate"))}function Ln({breadcrumbTitle:e=""}){return(0,Ma.jsxs)("div",{className:"px-5 -mt-2 text-[11px] text-gray-500 flex items-center gap-x-2 uppercase font-medium",children:[(0,Ma.jsx)("a",{className:"no-underline text-gray-500 hover:underline",href:h.endpoints.dashboardUrl,children:"Dashboard"}),(0,Ma.jsx)("span",{children:"/"}),(0,Ma.jsx)("span",{children:e})]})}function Cn(){const e=Sn("header"),{route:a}=Nn()||{},{title:t,headerActions:n,upgradeUrl:s="",manualUrl:r="#",breadcrumbTitle:i=""}=a?.header||{};return(0,Ma.jsxs)("div",{id:"advads-header",className:"relative z-10 space-y-6 mb-10",children:[(0,Ma.jsxs)("div",{className:"flex items-center gap-x-4 p-5 bg-white shadow-md",children:[(0,Ma.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,Ma.jsx)(x,{className:"size-8"}),(0,Ma.jsx)("h1",{className:"m-0 font-light",children:t}),n]}),(0,Ma.jsxs)("div",{className:"flex items-center gap-x-4 justify-end ml-auto",children:[!h.siteInfo.proVersion&&(0,Ma.jsxs)("a",{href:s,target:"_blank",rel:"noreferrer",className:"button advads-button-primary px-3 py-1.5",children:[(0,Ma.jsx)("span",{children:"See all Add-ons"}),(0,Ma.jsx)(p,{className:"fill-current size-4"})]}),(0,Ma.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",className:"group text-gray-500 hover:text-primary transition-colors","aria-label":"Open manual",children:(0,Ma.jsx)(g,{className:"size-7 group-hover:stroke-current"})})]})]}),i&&(0,Ma.jsx)(Ln,{breadcrumbTitle:i}),e]})}function Mn(){const e=Sn("content");return(0,Ma.jsx)("main",{className:"px-5",children:e})}function zn(e){return e&&"/"!==e?e.startsWith("/")?e:`/${e}`:"/"}function En(){const e=document.querySelector("#toplevel_page_advanced-ads .wp-submenu");if(!e)return;const a=zn(new URLSearchParams(window.location.search).get("path"));e.querySelectorAll("li.current, a.current").forEach(e=>{e.classList.remove("current")});let t=!1;if(e.querySelectorAll("a.advads-app-link").forEach(e=>{const n=e.getAttribute("href");n&&!n.includes("admin.php")&&zn(n)===a&&(e.classList.add("current"),e.parentElement?.classList.add("current"),t=!0)}),t)return;const n=e.querySelector('a[href*="page=advanced-ads-app"]');n&&(n.classList.add("current"),n.parentElement?.classList.add("current"))}function Tn(){return(0,n.useEffect)(()=>{const e=e=>{const a=e.target.closest("a.advads-app-link");if(!a)return;const t=a.getAttribute("href");t&&(e.preventDefault(),In(t),En())};return En(),document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[In]),null}function Pn(){return(0,Ma.jsxs)("div",{className:"advads-layout",children:[(0,Ma.jsx)(Tn,{}),(0,Ma.jsx)(Cn,{}),(0,Ma.jsx)(Mn,{})]})}t()(()=>{(0,n.createRoot)(document.getElementById("advads-app")).render((0,Ma.jsx)(Pn,{}))})})();

Youez - 2016 - github.com/yon3zu
LinuXploit