(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{FIRST_WP_VERSION_WITH_THUNK_SUPPORT:()=>W,QLWAPP_DEMO_URL:()=>E,QLWAPP_DEVELOPER:()=>g,QLWAPP_DOCUMENTATION_URL:()=>R,QLWAPP_GROUP_URL:()=>A,QLWAPP_MESSAGE_REPLACEMENTS:()=>h,QLWAPP_PLUGIN_DIR:()=>u,QLWAPP_PLUGIN_FILE:()=>_,QLWAPP_PLUGIN_NAME:()=>l,QLWAPP_PLUGIN_URL:()=>U,QLWAPP_PLUGIN_VERSION:()=>L,QLWAPP_PREMIUM_SELL_URL:()=>O,QLWAPP_REVIEW_URL:()=>d,QLWAPP_SUPPORT_URL:()=>w,QLWAPP_TIMEZONE_OPTIONS:()=>f,QLWAPP_WORDPRESS_URL:()=>p,WP_VERSION:()=>i,apiFetch:()=>I,applyThunkMiddleware:()=>k,buildParams:()=>m,capitalizeFirstLetter:()=>T,createNotice:()=>v,decodeEntities:()=>j,decodeHTMLEntities:()=>S,deepMerge:()=>Q,displayWithLineBreaks:()=>G,getPluginURL:()=>b,handleApiResponse:()=>D,handleBrowserParams:()=>N,isObjectsEqual:()=>M,isVersionLessThan:()=>V,onDocumentLoaded:()=>y});const n=window.wp.element,r=window.lodash,o=window.wp.i18n,a=window.wp.apiFetch;var s=e.n(a);const P=window.wp.notices,c=window.wp.data,{WP_VERSION:i,QLWAPP_PLUGIN_NAME:l,QLWAPP_PLUGIN_VERSION:L,QLWAPP_PLUGIN_FILE:_,QLWAPP_PLUGIN_DIR:u,QLWAPP_WORDPRESS_URL:p,QLWAPP_REVIEW_URL:d,QLWAPP_DEMO_URL:E,QLWAPP_SUPPORT_URL:w,QLWAPP_PREMIUM_SELL_URL:O,QLWAPP_DOCUMENTATION_URL:R,QLWAPP_GROUP_URL:A,QLWAPP_DEVELOPER:g,QLWAPP_PLUGIN_URL:U,QLWAPP_TIMEZONE_OPTIONS:f,QLWAPP_MESSAGE_REPLACEMENTS:h}=qlwappHelpers,W="6.0";function S(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}function y(e){/comp|inter|loaded/.test(document.readyState)?e():document.addEventListener("DOMContentLoaded",e,!1)}const N=()=>{const e=document.location.href,t=new URLSearchParams(e),n=new URL(window.location);return{tabParam:t.get("tab"),setBrowserTabParam:e=>{n.searchParams.set("tab",e),window.history.pushState(null,"",n.toString()),window.dispatchEvent(new Event("popstate"))}}},m=e=>{const t=[];for(const n in e)e.hasOwnProperty(n)&&e[n]&&"all"!==e[n]&&t.push(`${n}=${e[n]}`);return t.length>0?`?${t.join("&")}`:""};async function I(e){return await s()(e).then((e=>{if(e.code)throw e;return e})).catch((t=>(console.log("error: ",t),console.log("args: ",e),{code:t?.code?t.code:"Unknown",message:t?.message?t.message:"Unknown"})))}function b(e){return U+e}function Q(e,t){const n={};return new Set([...Object.keys(e),...Object.keys(t)]).forEach((o=>{e.hasOwnProperty(o)&&t.hasOwnProperty(o)?(0,r.isObject)(e[o])&&!Array.isArray(e[o])?n[o]=Q(e[o],t[o]):n[o]=t[o]:e.hasOwnProperty(o)?n[o]=e[o]:t.hasOwnProperty(o)&&(n[o]=t[o])})),n}function M(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;for(const r of n){const n=e[r],o=t[r];if("object"==typeof n&&null!==n&&"object"==typeof o&&null!==o){if(!M(n,o))return!1}else if(n!==o)return!1}return!0}function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}function j(e){return(e=(e=(e=(e=(e=e.replace(/&quot;/g,'"')).replace(/&amp;/g,"&")).replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/\\u0022/g,'"')).replace(/\\\\"/g,'"')}function G(e){return e.split("\n").map(((e,t,r)=>t===r.length-1?e:(0,n.createElement)(n.Fragment,null,e,(0,n.createElement)("br",null))))}const v=e=>{(0,c.dispatch)(P.store).createSuccessNotice((0,o.sprintf)("%s",e),{type:"snackbar"})},D=e=>e?.code||0===e?.code?(v(`${e.code}: ${e.message}`),!1):e,V=(e,t)=>{const n=e.split(".").map(Number),r=t.split(".").map(Number);for(let e=0;e<r.length;e++){if(n[e]<r[e])return!0;if(n[e]>r[e])return!1}return!1},k=e=>{const t=e.instantiate;return e.instantiate=e=>{const n=t(e);if(!n.store||!n.store.dispatch)throw new Error((0,o.__)("The created instance does not contain a valid store.","insta-gallery"));const r=n.store.dispatch,a=((e,t)=>({registry:t,get dispatch(){return Object.assign((t=>e.store.dispatch(t)),e.getActions())},get select(){return Object.assign((t=>t(e.store.__unstableOriginalGetState())),e.getSelectors())},get resolveSelect(){return e.getResolveSelectors()}}))(n,e);return n.store.dispatch=((e,t)=>n=>"function"==typeof n?n(e):t(n))(a,r),n},e};(window.qlwapp=window.qlwapp||{}).helpers=t})();