Master Addons For Elementor <= 3.1.0 - Authenticated (Author+) Stored Cross-Site Scripting via 'jtlma_custom_js' Page Setting (Custom JS Extension)
Description
The Master Addons For Elementor – Widgets, Extensions, Theme Builder, Popup Builder & Template Kits plugin for WordPress is vulnerable to Stored Cross-Site Scripting via 'jtlma_custom_js' Page Setting (Custom JS Extension) in all versions up to, and including, 3.1.0 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with author-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. The unfiltered_html capability check is only enforced during Elementor control registration (UI rendering) and not during the save process, enabling Author-level users to inject the jtlma_custom_js setting directly via a crafted POST request to admin-ajax.php?action=elementor_ajax, bypassing the UI-level restriction entirely.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:NTechnical Details
What Changed in the Fix
Changes introduced in v3.1.1
Source Code
WordPress.org SVNThis exploitation research plan targets **CVE-2026-9281**, a Stored Cross-Site Scripting (XSS) vulnerability in the **Master Addons For Elementor** plugin. The vulnerability exists because the plugin fails to perform server-side capability checks (specifically `unfiltered_html`) when saving the `jtl…
Show full research plan
This exploitation research plan targets CVE-2026-9281, a Stored Cross-Site Scripting (XSS) vulnerability in the Master Addons For Elementor plugin. The vulnerability exists because the plugin fails to perform server-side capability checks (specifically unfiltered_html) when saving the jtlma_custom_js page setting, despite restricting the UI for users without that capability.
1. Vulnerability Summary
- Vulnerability: Stored Cross-Site Scripting (XSS)
- Vulnerable Setting:
jtlma_custom_js(Custom JS Extension for Elementor Pages) - Affected Plugin: Master Addons For Elementor – Widgets, Extensions, Theme Builder, Popup Builder & Template Kits
- Vulnerable Versions: <= 3.1.0
- Root Cause: The plugin registers a "Custom JS" extension for Elementor pages. While it restricts the visibility of the control in the Elementor Editor UI based on the
unfiltered_htmlcapability, it does not enforce this check during the AJAX save process (elementor_ajax). This allows an Author-level user (who lacksunfiltered_htmlby default) to save arbitrary JavaScript via direct API requests.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php?action=elementor_ajax - Method: POST
- Authentication: Authenticated, Author-level access or higher.
- Preconditions:
- The "Custom JS" extension must be enabled in the Master Addons settings (usually enabled by default).
- The attacker must have permissions to edit a specific post or page (Author role is sufficient for their own posts).
3. Code Flow
- Registration: The plugin registers a custom control/section in Elementor for "Page Settings" called
jtlma_custom_js. - UI Restriction: During registration, it likely uses a condition like
current_user_can( 'unfiltered_html' )to decide whether to show the control in the Elementor panel. - The Flaw: When the user clicks "Update" in Elementor, a request is sent to
admin-ajax.php?action=elementor_ajax. Elementor's core handles thesave_page_settingsaction. - Missing Validation: Master Addons does not hook into the saving mechanism to re-verify that the user providing the
jtlma_custom_jsvalue actually possesses theunfiltered_htmlcapability. - Persistence: The malicious JS is saved into the post metadata (usually
_elementor_page_settings). - Execution: When the page is rendered on the frontend, Master Addons retrieves
jtlma_custom_jsand outputs it, likely within a<script>block in the footer, without sanitization.
4. Nonce Acquisition Strategy
To interact with the Elementor AJAX API, a valid Elementor AJAX nonce is required.
- Identify Trigger: The nonce is used by the Elementor Editor.
- Environment Setup: Create a post as the Author user and open it in the Elementor Editor.
- Extraction:
- Use
browser_navigateto go to the Elementor editor URL for a post:/wp-admin/post.php?post=POST_ID&action=elementor. - Use
browser_evalto extract the nonce from the global JavaScript configuration object. - Variable Name:
window.elementorCommonConfig.ajax.nonce - Secondary Variable:
window.elementorConfig.nonces.save_builder(if the first is unavailable).
- Use
5. Exploitation Strategy
The exploit involves sending a multiplexed AJAX request to Elementor to update the page settings.
Request Details:
- URL:
http://TARGET/wp-admin/admin-ajax.php?action=elementor_ajax - Method: POST
- Headers:
Content-Type: application/x-www-form-urlencoded - Parameters:
_nonce: [Extracted Nonce]actions: A JSON string containing thesave_page_settingscommand.editor_post_id: [The Post ID]
Payload Construction (actions parameter):
{
"save_page_settings": {
"action": "save_page_settings",
"data": {
"post_id": "POST_ID",
"settings": {
"jtlma_custom_js": "alert('CVE-2026-9281_XSS');"
}
}
}
}
Note: Since the field is specifically for "Custom JS", the plugin likely wraps it in <script> tags automatically. Therefore, the payload should be raw JavaScript, not HTML.
6. Test Data Setup
- Users: Create a user with the
authorrole. - Content: As the
authoruser, create a new post and click "Edit with Elementor" to initialize Elementor data for that post. Note thepost_id. - Plugin Config: Ensure "Custom JS" is enabled in Master Addons (Dashboard -> Master Addons -> Extensions).
7. Expected Results
- Response: The AJAX request should return a
200 OKwith a JSON body indicating success (e.g.,{"success":true,"data":{...}}). - Execution: When visiting the frontend URL of the post (
/?p=POST_ID), a JavaScript alert with the stringCVE-2026-9281_XSSshould trigger.
8. Verification Steps
- Check Database: Use WP-CLI to verify the payload is stored in the post meta:
Verify the JSON containswp post meta get [POST_ID] _elementor_page_settings --format=json"jtlma_custom_js":"alert('CVE-2026-9281_XSS');". - Verify Frontend Output:
curl -s http://TARGET/?p=[POST_ID] | grep "jtlma_custom_js"
9. Alternative Approaches
- Payload Variation: If the plugin outputs the content outside of a script tag (unlikely given the setting name), use
<script>alert(1)</script>. - Control Context: If
save_page_settingsis blocked, trysave_builder_datawhich also handles settings updates in some Elementor versions:{ "save_builder_data": { "action": "save_builder_data", "data": { "status": "publish", "settings": { "jtlma_custom_js": "alert(1)" } } } } - Editor Bypass: If the Author cannot access the Elementor UI, try to obtain the nonce from the standard WordPress dashboard if the plugin enqueues Elementor configs there.
Summary
The Master Addons For Elementor plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'jtlma_custom_js' page setting in versions up to 3.1.0. This is due to a failure to enforce the 'unfiltered_html' capability check during the server-side AJAX save process, despite the check being present in the user interface.
Security Fix
@@ -99,7 +99,7 @@ } .jltma-animated-headline.loading-bar .jltma-words-wrapper.is-loading::after { width: 100%; - transition: width 3s; + transition: width var(--jltma-bar-duration, 3s); } .jltma-animated-headline.loading-bar b { top: 0; @@ -1 +1 @@ -.jltma-animated-headline{display:flex;flex-wrap:wrap}.jltma-animated-headline .jltma-words-wrapper{display:inline-block;position:relative;text-align:left}.jltma-animated-headline .jltma-words-wrapper b{display:inline-block;position:absolute;white-space:nowrap;left:0;top:0;padding-left:.2em;padding-right:.2em}.jltma-animated-headline .jltma-words-wrapper b.is-visible{position:relative}.jltma-animated-headline .jltma-words-wrapper.selected{background-color:transparent!important}.jltma-animated-headline .first-heading{padding-left:.25rem;padding-right:.25rem}.jltma-animated-headline.push .first-heading,.jltma-animated-headline.rotate-1 .first-heading,.jltma-animated-headline.rotate-2 .first-heading,.jltma-animated-headline.rotate-3 .first-heading,.jltma-animated-headline.scale .first-heading,.jltma-animated-headline.type .first-heading,.jltma-animated-headline.zoom .first-heading{padding:0 .25em}.jltma-animated-headline.rotate-1 .jltma-words-wrapper,.jltma-animated-headline.rotate-2 .jltma-words-wrapper,.jltma-animated-headline.rotate-3 .jltma-words-wrapper,.jltma-animated-headline.zoom .jltma-words-wrapper{perspective:300px}.jltma-animated-headline.rotate-1 b{opacity:0;transform-origin:50% 100%;transform:rotateX(180deg)}.jltma-animated-headline.rotate-1 b.is-visible{opacity:1;transform:rotateX(0);animation:1.2s jltma-rotate-1-in}.jltma-animated-headline.rotate-1 b.is-hidden{transform:rotateX(180deg);animation:1.2s jltma-rotate-1-out}.jltma-animated-headline.rotate-2 b{opacity:0}.jltma-animated-headline.rotate-2 i{transform-style:preserve-3d;transform:translateZ(-20px) rotateX(90deg);opacity:0}.jltma-animated-headline.rotate-2 i.in{animation:.4s forwards jltma-rotate-2-in}.jltma-animated-headline.rotate-2 i.out{animation:.4s forwards jltma-rotate-2-out}.jltma-animated-headline.rotate-2 em{transform:translateZ(20px)}.jltma-animated-headline.rotate-3 b{opacity:0}.jltma-animated-headline.rotate-3 i{display:inline-block;transform:rotateY(180deg);backface-visibility:hidden}.jltma-animated-headline.rotate-3 i.in{animation:.6s forwards jltma-rotate-3-in}.jltma-animated-headline.rotate-3 i.out{animation:.6s forwards jltma-rotate-3-out}.jltma-animated-headline.loading-bar span{display:inline-block;padding:0 .25em}.jltma-animated-headline.loading-bar .jltma-words-wrapper{vertical-align:top;padding:0}.jltma-animated-headline.loading-bar .jltma-words-wrapper::after{content:"";position:absolute;left:0;bottom:0;height:3px;width:0;background:#0096a7;z-index:2;transition:width .3s -.1s}.jltma-animated-headline.loading-bar .jltma-words-wrapper.is-loading::after{width:100%;transition:width 3s}.jltma-animated-headline.loading-bar b{top:0;opacity:0;transition:opacity .5s ease-in-out}.is-visible .jltma-animated-headline.rotate-2 i,.is-visible .jltma-animated-headline.scale i,.jltma-animated-headline.loading-bar b.is-visible{opacity:1}.is-visible .jltma-animated-headline.rotate-3 i{transform:rotateY(0)}.no-csstransitions .jltma-animated-headline.scale i{transform:scale(1);opacity:0}.no-csstransitions .jltma-animated-headline.scale .is-visible i{opacity:1}.no-csstransitions .jltma-animated-headline.rotate-2 i{transform:rotateX(0);opacity:0}.no-csstransitions .jltma-animated-headline.rotate-2 i em{transform:scale(1)}.no-csstransitions .jltma-animated-headline.rotate-2 i .is-visible i{opacity:1}.no-csstransitions .jltma-animated-headline.rotate-3 i{transform:rotateY(0);opacity:0}.no-csstransitions .jltma-animated-headline.rotate-3 .is-visible i{opacity:1}.no-js .jltma-words-wrapper b{opacity:0}.no-js .jltma-words-wrapper b.is-visible{opacity:1}@keyframes jltma-rotate-1-in{0%{transform:rotateX(180deg);opacity:0}35%{transform:rotateX(120deg);opacity:0}65%{opacity:0}100%{transform:rotateX(360deg);opacity:1}}@keyframes jltma-rotate-1-out{0%{transform:rotateX(0);opacity:1}35%{transform:rotateX(-40deg);opacity:1}65%{opacity:0}100%{transform:rotateX(180deg);opacity:0}}@keyframes jltma-rotate-2-in{0%{opacity:0;transform:translateZ(-20px) rotateX(90deg)}60%{opacity:1;transform:translateZ(-20px) rotateX(-10deg)}100%{opacity:1;transform:translateZ(-20px) rotateX(0)}}@keyframes jltma-rotate-2-out{0%{opacity:1;transform:translateZ(-20px) rotateX(0)}60%{opacity:0;transform:translateZ(-20px) rotateX(-100deg)}100%{opacity:0;transform:translateZ(-20px) rotateX(-90deg)}}@keyframes jltma-rotate-3-in{0%{transform:rotateY(180deg)}100%{transform:rotateY(0)}}@keyframes jltma-rotate-3-out{0%{transform:rotateY(0)}100%{transform:rotateY(-180deg)}} \ No newline at end of file +.jltma-animated-headline{display:flex;flex-wrap:wrap}.jltma-animated-headline .jltma-words-wrapper{display:inline-block;position:relative;text-align:left}.jltma-animated-headline .jltma-words-wrapper b{display:inline-block;position:absolute;white-space:nowrap;left:0;top:0;padding-left:.2em;padding-right:.2em}.jltma-animated-headline .jltma-words-wrapper b.is-visible{position:relative}.jltma-animated-headline .jltma-words-wrapper.selected{background-color:transparent!important}.jltma-animated-headline .first-heading{padding-left:.25rem;padding-right:.25rem}.jltma-animated-headline.push .first-heading,.jltma-animated-headline.rotate-1 .first-heading,.jltma-animated-headline.rotate-2 .first-heading,.jltma-animated-headline.rotate-3 .first-heading,.jltma-animated-headline.scale .first-heading,.jltma-animated-headline.type .first-heading,.jltma-animated-headline.zoom .first-heading{padding:0 .25em}.jltma-animated-headline.rotate-1 .jltma-words-wrapper,.jltma-animated-headline.rotate-2 .jltma-words-wrapper,.jltma-animated-headline.rotate-3 .jltma-words-wrapper,.jltma-animated-headline.zoom .jltma-words-wrapper{perspective:300px}.jltma-animated-headline.rotate-1 b{opacity:0;transform-origin:50% 100%;transform:rotateX(180deg)}.jltma-animated-headline.rotate-1 b.is-visible{opacity:1;transform:rotateX(0);animation:1.2s jltma-rotate-1-in}.jltma-animated-headline.rotate-1 b.is-hidden{transform:rotateX(180deg);animation:1.2s jltma-rotate-1-out}.jltma-animated-headline.rotate-2 b{opacity:0}.jltma-animated-headline.rotate-2 i{transform-style:preserve-3d;transform:translateZ(-20px) rotateX(90deg);opacity:0}.jltma-animated-headline.rotate-2 i.in{animation:.4s forwards jltma-rotate-2-in}.jltma-animated-headline.rotate-2 i.out{animation:.4s forwards jltma-rotate-2-out}.jltma-animated-headline.rotate-2 em{transform:translateZ(20px)}.jltma-animated-headline.rotate-3 b{opacity:0}.jltma-animated-headline.rotate-3 i{display:inline-block;transform:rotateY(180deg);backface-visibility:hidden}.jltma-animated-headline.rotate-3 i.in{animation:.6s forwards jltma-rotate-3-in}.jltma-animated-headline.rotate-3 i.out{animation:.6s forwards jltma-rotate-3-out}.jltma-animated-headline.loading-bar span{display:inline-block;padding:0 .25em}.jltma-animated-headline.loading-bar .jltma-words-wrapper{vertical-align:top;padding:0}.jltma-animated-headline.loading-bar .jltma-words-wrapper::after{content:"";position:absolute;left:0;bottom:0;height:3px;width:0;background:#0096a7;z-index:2;transition:width .3s -.1s}.jltma-animated-headline.loading-bar .jltma-words-wrapper.is-loading::after{width:100%;transition:width var(--jltma-bar-duration, 3s)}.jltma-animated-headline.loading-bar b{top:0;opacity:0;transition:opacity .5s ease-in-out}.is-visible .jltma-animated-headline.rotate-2 i,.is-visible .jltma-animated-headline.scale i,.jltma-animated-headline.loading-bar b.is-visible{opacity:1}.is-visible .jltma-animated-headline.rotate-3 i{transform:rotateY(0)}.no-csstransitions .jltma-animated-headline.scale i{transform:scale(1);opacity:0}.no-csstransitions .jltma-animated-headline.scale .is-visible i{opacity:1}.no-csstransitions .jltma-animated-headline.rotate-2 i{transform:rotateX(0);opacity:0}.no-csstransitions .jltma-animated-headline.rotate-2 i em{transform:scale(1)}.no-csstransitions .jltma-animated-headline.rotate-2 i .is-visible i{opacity:1}.no-csstransitions .jltma-animated-headline.rotate-3 i{transform:rotateY(0);opacity:0}.no-csstransitions .jltma-animated-headline.rotate-3 .is-visible i{opacity:1}.no-js .jltma-words-wrapper b{opacity:0}.no-js .jltma-words-wrapper b.is-visible{opacity:1}@keyframes jltma-rotate-1-in{0%{transform:rotateX(180deg);opacity:0}35%{transform:rotateX(120deg);opacity:0}65%{opacity:0}100%{transform:rotateX(360deg);opacity:1}}@keyframes jltma-rotate-1-out{0%{transform:rotateX(0);opacity:1}35%{transform:rotateX(-40deg);opacity:1}65%{opacity:0}100%{transform:rotateX(180deg);opacity:0}}@keyframes jltma-rotate-2-in{0%{opacity:0;transform:translateZ(-20px) rotateX(90deg)}60%{opacity:1;transform:translateZ(-20px) rotateX(-10deg)}100%{opacity:1;transform:translateZ(-20px) rotateX(0)}}@keyframes jltma-rotate-2-out{0%{opacity:1;transform:translateZ(-20px) rotateX(0)}60%{opacity:0;transform:translateZ(-20px) rotateX(-100deg)}100%{opacity:0;transform:translateZ(-20px) rotateX(-90deg)}}@keyframes jltma-rotate-3-in{0%{transform:rotateY(180deg)}100%{transform:rotateY(0)}}@keyframes jltma-rotate-3-out{0%{transform:rotateY(0)}100%{transform:rotateY(-180deg)}} \ No newline at end of file @@ -99,7 +99,7 @@ } .jltma-animated-headline.loading-bar .jltma-words-wrapper.is-loading::after { width: 100%; - transition: width 3s; + transition: width var(--jltma-bar-duration, 3s); } .jltma-animated-headline.loading-bar b { top: 0; @@ -1 +1 @@ -.jltma-animated-headline{display:flex;flex-wrap:wrap}.jltma-animated-headline .jltma-words-wrapper{display:inline-block;position:relative;text-align:right}.jltma-animated-headline .jltma-words-wrapper b{display:inline-block;position:absolute;white-space:nowrap;right:0;top:0;padding-right:.2em;padding-left:.2em}.jltma-animated-headline .jltma-words-wrapper b.is-visible{position:relative}.jltma-animated-headline .jltma-words-wrapper.selected{background-color:transparent!important}.jltma-animated-headline .first-heading{padding-right:.25rem;padding-left:.25rem}.jltma-animated-headline.push .first-heading,.jltma-animated-headline.rotate-1 .first-heading,.jltma-animated-headline.rotate-2 .first-heading,.jltma-animated-headline.rotate-3 .first-heading,.jltma-animated-headline.scale .first-heading,.jltma-animated-headline.type .first-heading,.jltma-animated-headline.zoom .first-heading{padding:0 .25em}.jltma-animated-headline.rotate-1 .jltma-words-wrapper,.jltma-animated-headline.rotate-2 .jltma-words-wrapper,.jltma-animated-headline.rotate-3 .jltma-words-wrapper,.jltma-animated-headline.zoom .jltma-words-wrapper{perspective:300px}.jltma-animated-headline.rotate-1 b{opacity:0;transform-origin:50% 100%;transform:rotateX(180deg)}.jltma-animated-headline.rotate-1 b.is-visible{opacity:1;transform:rotateX(0);animation:1.2s jltma-rotate-1-in}.jltma-animated-headline.rotate-1 b.is-hidden{transform:rotateX(180deg);animation:1.2s jltma-rotate-1-out}.jltma-animated-headline.rotate-2 b{opacity:0}.jltma-animated-headline.rotate-2 i{transform-style:preserve-3d;transform:translateZ(-20px) rotateX(90deg);opacity:0}.jltma-animated-headline.rotate-2 i.in{animation:.4s forwards jltma-rotate-2-in}.jltma-animated-headline.rotate-2 i.out{animation:.4s forwards jltma-rotate-2-out}.jltma-animated-headline.rotate-2 em{transform:translateZ(20px)}.jltma-animated-headline.rotate-3 b{opacity:0}.jltma-animated-headline.rotate-3 i{display:inline-block;transform:rotateY(-180deg);backface-visibility:hidden}.jltma-animated-headline.rotate-3 i.in{animation:.6s forwards jltma-rotate-3-in}.jltma-animated-headline.rotate-3 i.out{animation:.6s forwards jltma-rotate-3-out}.jltma-animated-headline.loading-bar span{display:inline-block;padding:0 .25em}.jltma-animated-headline.loading-bar .jltma-words-wrapper{vertical-align:top;padding:0}.jltma-animated-headline.loading-bar .jltma-words-wrapper::after{content:"";position:absolute;right:0;bottom:0;height:3px;width:0;background:#0096a7;z-index:2;transition:width .3s -.1s}.jltma-animated-headline.loading-bar .jltma-words-wrapper.is-loading::after{width:100%;transition:width 3s}.jltma-animated-headline.loading-bar b{top:0;opacity:0;transition:opacity .5s ease-in-out}.is-visible .jltma-animated-headline.rotate-2 i,.is-visible .jltma-animated-headline.scale i,.jltma-animated-headline.loading-bar b.is-visible{opacity:1}.is-visible .jltma-animated-headline.rotate-3 i{transform:rotateY(0)}.no-csstransitions .jltma-animated-headline.scale i{transform:scale(1);opacity:0}.no-csstransitions .jltma-animated-headline.scale .is-visible i{opacity:1}.no-csstransitions .jltma-animated-headline.rotate-2 i{transform:rotateX(0);opacity:0}.no-csstransitions .jltma-animated-headline.rotate-2 i em{transform:scale(1)}.no-csstransitions .jltma-animated-headline.rotate-2 i .is-visible i{opacity:1}.no-csstransitions .jltma-animated-headline.rotate-3 i{transform:rotateY(0);opacity:0}.no-csstransitions .jltma-animated-headline.rotate-3 .is-visible i{opacity:1}.no-js .jltma-words-wrapper b{opacity:0}.no-js .jltma-words-wrapper b.is-visible{opacity:1}@keyframes jltma-rotate-1-in{0%{transform:rotateX(180deg);opacity:0}35%{transform:rotateX(120deg);opacity:0}65%{opacity:0}100%{transform:rotateX(360deg);opacity:1}}@keyframes jltma-rotate-1-out{0%{transform:rotateX(0);opacity:1}35%{transform:rotateX(-40deg);opacity:1}65%{opacity:0}100%{transform:rotateX(180deg);opacity:0}}@keyframes jltma-rotate-2-in{0%{opacity:0;transform:translateZ(-20px) rotateX(90deg)}60%{opacity:1;transform:translateZ(-20px) rotateX(-10deg)}100%{opacity:1;transform:translateZ(-20px) rotateX(0)}}@keyframes jltma-rotate-2-out{0%{opacity:1;transform:translateZ(-20px) rotateX(0)}60%{opacity:0;transform:translateZ(-20px) rotateX(-100deg)}100%{opacity:0;transform:translateZ(-20px) rotateX(-90deg)}}@keyframes jltma-rotate-3-in{0%{transform:rotateY(-180deg)}100%{transform:rotateY(0)}}@keyframes jltma-rotate-3-out{0%{transform:rotateY(0)}100%{transform:rotateY(180deg)}} \ No newline at end of file +.jltma-animated-headline{display:flex;flex-wrap:wrap}.jltma-animated-headline .jltma-words-wrapper{display:inline-block;position:relative;text-align:right}.jltma-animated-headline .jltma-words-wrapper b{display:inline-block;position:absolute;white-space:nowrap;right:0;top:0;padding-right:.2em;padding-left:.2em}.jltma-animated-headline .jltma-words-wrapper b.is-visible{position:relative}.jltma-animated-headline .jltma-words-wrapper.selected{background-color:transparent!important}.jltma-animated-headline .first-heading{padding-right:.25rem;padding-left:.25rem}.jltma-animated-headline.push .first-heading,.jltma-animated-headline.rotate-1 .first-heading,.jltma-animated-headline.rotate-2 .first-heading,.jltma-animated-headline.rotate-3 .first-heading,.jltma-animated-headline.scale .first-heading,.jltma-animated-headline.type .first-heading,.jltma-animated-headline.zoom .first-heading{padding:0 .25em}.jltma-animated-headline.rotate-1 .jltma-words-wrapper,.jltma-animated-headline.rotate-2 .jltma-words-wrapper,.jltma-animated-headline.rotate-3 .jltma-words-wrapper,.jltma-animated-headline.zoom .jltma-words-wrapper{perspective:300px}.jltma-animated-headline.rotate-1 b{opacity:0;transform-origin:50% 100%;transform:rotateX(180deg)}.jltma-animated-headline.rotate-1 b.is-visible{opacity:1;transform:rotateX(0);animation:1.2s jltma-rotate-1-in}.jltma-animated-headline.rotate-1 b.is-hidden{transform:rotateX(180deg);animation:1.2s jltma-rotate-1-out}.jltma-animated-headline.rotate-2 b{opacity:0}.jltma-animated-headline.rotate-2 i{transform-style:preserve-3d;transform:translateZ(-20px) rotateX(90deg);opacity:0}.jltma-animated-headline.rotate-2 i.in{animation:.4s forwards jltma-rotate-2-in}.jltma-animated-headline.rotate-2 i.out{animation:.4s forwards jltma-rotate-2-out}.jltma-animated-headline.rotate-2 em{transform:translateZ(20px)}.jltma-animated-headline.rotate-3 b{opacity:0}.jltma-animated-headline.rotate-3 i{display:inline-block;transform:rotateY(-180deg);backface-visibility:hidden}.jltma-animated-headline.rotate-3 i.in{animation:.6s forwards jltma-rotate-3-in}.jltma-animated-headline.rotate-3 i.out{animation:.6s forwards jltma-rotate-3-out}.jltma-animated-headline.loading-bar span{display:inline-block;padding:0 .25em}.jltma-animated-headline.loading-bar .jltma-words-wrapper{vertical-align:top;padding:0}.jltma-animated-headline.loading-bar .jltma-words-wrapper::after{content:"";position:absolute;right:0;bottom:0;height:3px;width:0;background:#0096a7;z-index:2;transition:width .3s -.1s}.jltma-animated-headline.loading-bar .jltma-words-wrapper.is-loading::after{width:100%;transition:width var(--jltma-bar-duration, 3s)}.jltma-animated-headline.loading-bar b{top:0;opacity:0;transition:opacity .5s ease-in-out}.is-visible .jltma-animated-headline.rotate-2 i,.is-visible .jltma-animated-headline.scale i,.jltma-animated-headline.loading-bar b.is-visible{opacity:1}.is-visible .jltma-animated-headline.rotate-3 i{transform:rotateY(0)}.no-csstransitions .jltma-animated-headline.scale i{transform:scale(1);opacity:0}.no-csstransitions .jltma-animated-headline.scale .is-visible i{opacity:1}.no-csstransitions .jltma-animated-headline.rotate-2 i{transform:rotateX(0);opacity:0}.no-csstransitions .jltma-animated-headline.rotate-2 i em{transform:scale(1)}.no-csstransitions .jltma-animated-headline.rotate-2 i .is-visible i{opacity:1}.no-csstransitions .jltma-animated-headline.rotate-3 i{transform:rotateY(0);opacity:0}.no-csstransitions .jltma-animated-headline.rotate-3 .is-visible i{opacity:1}.no-js .jltma-words-wrapper b{opacity:0}.no-js .jltma-words-wrapper b.is-visible{opacity:1}@keyframes jltma-rotate-1-in{0%{transform:rotateX(180deg);opacity:0}35%{transform:rotateX(120deg);opacity:0}65%{opacity:0}100%{transform:rotateX(360deg);opacity:1}}@keyframes jltma-rotate-1-out{0%{transform:rotateX(0);opacity:1}35%{transform:rotateX(-40deg);opacity:1}65%{opacity:0}100%{transform:rotateX(180deg);opacity:0}}@keyframes jltma-rotate-2-in{0%{opacity:0;transform:translateZ(-20px) rotateX(90deg)}60%{opacity:1;transform:translateZ(-20px) rotateX(-10deg)}100%{opacity:1;transform:translateZ(-20px) rotateX(0)}}@keyframes jltma-rotate-2-out{0%{opacity:1;transform:translateZ(-20px) rotateX(0)}60%{opacity:0;transform:translateZ(-20px) rotateX(-100deg)}100%{opacity:0;transform:translateZ(-20px) rotateX(-90deg)}}@keyframes jltma-rotate-3-in{0%{transform:rotateY(-180deg)}100%{transform:rotateY(0)}}@keyframes jltma-rotate-3-out{0%{transform:rotateY(0)}100%{transform:rotateY(180deg)}} \ No newline at end of file @@ -88,11 +88,14 @@ if (!$animatedHeaderContainer.length) { return; } - var animationDelay = elementSettings.anim_delay || 2500, barAnimationDelay = elementSettings.bar_anim_delay || 3800, barWaiting = barAnimationDelay - 3e3, lettersDelay = elementSettings.letters_anim_delay || 50, typeLettersDelay = elementSettings.type_anim_delay || 150, selectionDuration = elementSettings.type_selection_delay || 500, typeAnimationDelay = selectionDuration + 800, revealDuration = elementSettings.clip_reveal_delay || 600, revealAnimationDelay = elementSettings.clip_anim_duration || 1500; + var animationDelay = elementSettings.anim_delay || 2500, barAnimationDelay = elementSettings.bar_anim_delay || 3800, barWaiting = 400, lettersDelay = elementSettings.letters_anim_delay || 50, typeLettersDelay = elementSettings.type_anim_delay || 150, selectionDuration = elementSettings.type_selection_delay || 500, typeAnimationDelay = selectionDuration + 800, revealDuration = elementSettings.clip_reveal_delay || 600, revealAnimationDelay = elementSettings.clip_anim_duration || 1500; function singleLetters($words) { $words.each(function() { var word = $2(this), letters = word.text().trim().split(""), selected = word.hasClass("is-visible"); for (var i = 0; i < letters.length; i++) { + if (letters[i] === " ") { + letters[i] = " "; + } if (word.parents(".rotate-2").length > 0) { letters[i] = "<em>" + letters[i] + "</em>"; } @@ -202,6 +205,9 @@ var headline = $2(this); if (headline.hasClass("loading-bar")) { duration = barAnimationDelay; + headline.find(".jltma-words-wrapper").each(function() { + this.style.setProperty("--jltma-bar-duration", (barAnimationDelay - barWaiting) / 1e3 + "s"); + }); setTimeout(function() { headline.find(".jltma-words-wrapper").addClass("is-loading"); }, barWaiting); @@ -1 +1 @@ -!function(){function e(e,i){var n={},a=e.data("model-cid");if("undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode()&&a){var s=elementorFrontend.config.elements.data[a],l=s.attributes.widgetType||s.attributes.elType,d=elementorFrontend.config.elements.keys[l];d||(d=elementorFrontend.config.elements.keys[l]=[],jQuery.each(s.controls,function(e,t){t.frontend_available&&d.push(e)})),jQuery.each(s.getActiveControls(),function(e){-1!==d.indexOf(e)&&(n[e]=s.attributes[e])})}else n=e.data("settings")||{};return t(n,i)}function t(e,i){if(i){var n=i.split("."),a=n.splice(0,1);if(!n.length)return e[a];if(!e[a])return;return t(e[a],n.join("."))}return e}!function(t){"use strict";var i=function(t,i){var n=e(t);if(t.find(".jltma-animated-headline").eq(0).length){var a,s,l=n.anim_delay||2500,d=n.bar_anim_delay||3800,r=d-3e3,o=n.letters_anim_delay||50,m=n.type_anim_delay||150,c=n.type_selection_delay||500,f=c+800,u=n.clip_reveal_delay||600,h=n.clip_anim_duration||1500;t.find(".jltma-animated-headline.letters b").each(function(){for(var e=i(this),t=e.text().trim().split(""),n=e.hasClass("is-visible"),a=0;a<t.length;a++)e.parents(".rotate-2").length>0&&(t[a]="<em>"+t[a]+"</em>"),t[a]=n?'<i class="in">'+t[a]+"</i>":"<i>"+t[a]+"</i>";var s=t.join("");e.html(s).css("opacity",1)}),a=t.find(".jltma-animated-headline"),s=l,a.each(function(){var e=i(this);if(e.hasClass("loading-bar"))s=d,setTimeout(function(){e.find(".jltma-words-wrapper").addClass("is-loading")},r);else if(e.hasClass("clip")){var t=e.find(".jltma-words-wrapper"),n=t.width()+10;t.css("width",n)}else if(!e.hasClass("type")){var a=e.find(".jltma-words-wrapper b"),l=0;a.each(function(){var e=i(this).width();e>l&&(l=e)}),e.find(".jltma-words-wrapper").css("width",l)}setTimeout(function(){y(e.find(".is-visible").eq(0))},s)})}function p(e){return e.is(":last-child")?e.parent().children().eq(0):e.next()}function v(e,t){e.removeClass("is-visible").addClass("is-hidden"),t.removeClass("is-hidden").addClass("is-visible")}function w(e,t,n,a){if(e.removeClass("in").addClass("out"),e.is(":last-child")?n&&setTimeout(function(){y(p(t))},l):setTimeout(function(){w(e.next(),t,n,a)},a),e.is(":last-child")&&i("html").hasClass("no-csstransitions")){var s=p(t);v(t,s)}}function C(e,t,i,n){e.addClass("in").removeClass("out"),e.is(":last-child")?(t.parents(".jltma-animated-headline").hasClass("type")&&setTimeout(function(){t.parents(".jltma-words-wrapper").addClass("waiting")},200),i||setTimeout(function(){y(t)},l)):setTimeout(function(){C(e.next(),t,i,n)},n)}function j(e,t){e.parents(".jltma-animated-headline").hasClass("type")?(C(e.find("i").eq(0),e,!1,t),e.addClass("is-visible").removeClass("is-hidden")):e.parents(".jltma-animated-headline").hasClass("clip")&&e.parents(".jltma-words-wrapper").animate({width:e.width()+10},u,function(){setTimeout(function(){y(e)},h)})}function y(e){var t=p(e);if(e.parents(".jltma-animated-headline").hasClass("type")){var i=e.parent(".jltma-words-wrapper");i.addClass("selected").removeClass("waiting"),setTimeout(function(){i.removeClass("selected"),e.removeClass("is-visible").addClass("is-hidden").children("i").removeClass("in").addClass("out")},c),setTimeout(function(){j(t,m)},f)}else if(e.parents(".jltma-animated-headline").hasClass("letters")){var n=e.children("i").length>=t.children("i").length;w(e.find("i").eq(0),e,n,o),C(t.find("i").eq(0),t,n,o)}else e.parents(".jltma-animated-headline").hasClass("clip")?e.parents(".jltma-words-wrapper").animate({width:"2px"},u,function(){v(e,t),j(t)}):e.parents(".jltma-animated-headline").hasClass("loading-bar")?(e.parents(".jltma-words-wrapper").removeClass("is-loading"),v(e,t),setTimeout(function(){y(t)},d),setTimeout(function(){e.parents(".jltma-words-wrapper").addClass("is-loading")},r)):(v(e,t),setTimeout(function(){y(t)},l))}};t(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/ma-headlines.default",i)})}(jQuery,window.elementorFrontend)}(); \ No newline at end of file +!function(){function e(e,a){var i={},n=e.data("model-cid");if("undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode()&&n){var s=elementorFrontend.config.elements.data[n],l=s.attributes.widgetType||s.attributes.elType,r=elementorFrontend.config.elements.keys[l];r||(r=elementorFrontend.config.elements.keys[l]=[],jQuery.each(s.controls,function(e,t){t.frontend_available&&r.push(e)})),jQuery.each(s.getActiveControls(),function(e){-1!==r.indexOf(e)&&(i[e]=s.attributes[e])})}else i=e.data("settings")||{};return t(i,a)}function t(e,a){if(a){var i=a.split("."),n=i.splice(0,1);if(!i.length)return e[n];if(!e[n])return;return t(e[n],i.join("."))}return e}!function(t){"use strict";var a=function(t,a){var i=e(t);if(t.find(".jltma-animated-headline").eq(0).length){var n,s,l=i.anim_delay||2500,r=i.bar_anim_delay||3800,d=i.letters_anim_delay||50,o=i.type_anim_delay||150,m=i.type_selection_delay||500,c=m+800,f=i.clip_reveal_delay||600,u=i.clip_anim_duration||1500;t.find(".jltma-animated-headline.letters b").each(function(){for(var e=a(this),t=e.text().trim().split(""),i=e.hasClass("is-visible"),n=0;n<t.length;n++)" "===t[n]&&(t[n]=" "),e.parents(".rotate-2").length>0&&(t[n]="<em>"+t[n]+"</em>"),t[n]=i?'<i class="in">'+t[n]+"</i>":"<i>"+t[n]+"</i>";var s=t.join("");e.html(s).css("opacity",1)}),n=t.find(".jltma-animated-headline"),s=l,n.each(function(){var e=a(this);if(e.hasClass("loading-bar"))s=r,e.find(".jltma-words-wrapper").each(function(){this.style.setProperty("--jltma-bar-duration",(r-400)/1e3+"s")}),setTimeout(function(){e.find(".jltma-words-wrapper").addClass("is-loading")},400);else if(e.hasClass("clip")){var t=e.find(".jltma-words-wrapper"),i=t.width()+10;t.css("width",i)}else if(!e.hasClass("type")){var n=e.find(".jltma-words-wrapper b"),l=0;n.each(function(){var e=a(this).width();e>l&&(l=e)}),e.find(".jltma-words-wrapper").css("width",l)}setTimeout(function(){j(e.find(".is-visible").eq(0))},s)})}function h(e){return e.is(":last-child")?e.parent().children().eq(0):e.next()}function p(e,t){e.removeClass("is-visible").addClass("is-hidden"),t.removeClass("is-hidden").addClass("is-visible")}function w(e,t,i,n){if(e.removeClass("in").addClass("out"),e.is(":last-child")?i&&setTimeout(function(){j(h(t))},l):setTimeout(function(){w(e.next(),t,i,n)},n),e.is(":last-child")&&a("html").hasClass("no-csstransitions")){var s=h(t);p(t,s)}}function v(e,t,a,i){e.addClass("in").removeClass("out"),e.is(":last-child")?(t.parents(".jltma-animated-headline").hasClass("type")&&setTimeout(function(){t.parents(".jltma-words-wrapper").addClass("waiting")},200),a||setTimeout(function(){j(t)},l)):setTimeout(function(){v(e.next(),t,a,i)},i)}function C(e,t){e.parents(".jltma-animated-headline").hasClass("type")?(v(e.find("i").eq(0),e,!1,t),e.addClass("is-visible").removeClass("is-hidden")):e.parents(".jltma-animated-headline").hasClass("clip")&&e.parents(".jltma-words-wrapper").animate({width:e.width()+10},f,function(){setTimeout(function(){j(e)},u)})}function j(e){var t=h(e);if(e.parents(".jltma-animated-headline").hasClass("type")){var a=e.parent(".jltma-words-wrapper");a.addClass("selected").removeClass("waiting"),setTimeout(function(){a.removeClass("selected"),e.removeClass("is-visible").addClass("is-hidden").children("i").removeClass("in").addClass("out")},m),setTimeout(function(){C(t,o)},c)}else if(e.parents(".jltma-animated-headline").hasClass("letters")){var i=e.children("i").length>=t.children("i").length;w(e.find("i").eq(0),e,i,d),v(t.find("i").eq(0),t,i,d)}else e.parents(".jltma-animated-headline").hasClass("clip")?e.parents(".jltma-words-wrapper").animate({width:"2px"},f,function(){p(e,t),C(t)}):e.parents(".jltma-animated-headline").hasClass("loading-bar")?(e.parents(".jltma-words-wrapper").removeClass("is-loading"),p(e,t),setTimeout(function(){j(t)},r),setTimeout(function(){e.parents(".jltma-words-wrapper").addClass("is-loading")},400)):(p(e,t),setTimeout(function(){j(t)},l))}};t(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/ma-headlines.default",a)})}(jQuery,window.elementorFrontend)}(); \ No newline at end of file @@ -2471,6 +2471,7 @@ url: JLTMA_SCRIPTS.ajaxurl, data: { action: "jltma_restrict_content", + nonce: JLTMA_SCRIPTS.nonce, fields: form.serialize(), restrict_type: $restrict_type, error_message: $error_message, @@ -1 +1 @@ -!function(t){"use strict";var a="",n=function(e,t){var a={},n=e.data("model-cid");if(elementorFrontend.isEditMode()&&n){var i=elementorFrontend.config.elements.data[n],r=i.attributes.widgetType||i.attributes.elType,l=elementorFrontend.config.elements.keys[r];l||(l=elementorFrontend.config.elements.keys[r]=[],jQuery.each(i.controls,function(e,t){t.frontend_available&&l.push(e)})),jQuery.each(i.getActiveControls(),function(e){-1!==l.indexOf(e)&&(a[e]=i.attributes[e])})}else a=e.data("settings")||{};return o(a,t)},o=function(e,t){if(t){var a=t.split("."),n=a.splice(0,1);if(!a.length)return e[n];if(!e[n])return;return this.getItems(e[n],a.join("."))}return e},i=function(e){return e.data("jltma-template-widget-id")?e.data("jltma-template-widget-id"):e.data("id")};function r(e,t){new IntersectionObserver(function(e,a){e.forEach(function(e){e.isIntersecting&&t(e)})},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).observe(e)}var l={animatedProgressbar:function(e,a,n,o,i,r,l){var s=".jltma-progress-bar-"+e;"line"==a&&new ldBar(s,{type:"stroke",path:"M0 10L100 10","aspect-ratio":"none",stroke:o,"stroke-trail":i,"stroke-width":r,"stroke-trail-width":l}).set(n),"line-bubble"==a&&(new ldBar(s,{type:"stroke",path:"M0 10L100 10","aspect-ratio":"none",stroke:o,"stroke-trail":i,"stroke-width":r,"stroke-trail-width":l}).set(n),t(t(".jltma-progress-bar-"+e).find(".ldBar-label")).animate({left:n+"%"},1e3,"swing")),"circle"==a&&new ldBar(s,{type:"stroke",path:"M50 10A40 40 0 0 1 50 90A40 40 0 0 1 50 10","stroke-dir":"normal",stroke:o,"stroke-trail":i,"stroke-width":r,"stroke-trail-width":l}).set(n),"fan"==a&&new ldBar(s,{type:"stroke",path:"M10 90A40 40 0 0 1 90 90",stroke:o,"stroke-trail":i,"stroke-width":r,"stroke-trail-width":l}).set(n)},MA_Accordion:function(e,t){var a=n(e),o=e.find(".jltma-accordion-header"),i=a.accordion_type,r=a.toggle_speed?a.toggle_speed:300;o.each(function(){t(this).hasClass("active-default")&&(t(this).addClass("show active"),t(this).next().slideDown(r))}),o.unbind("click"),o.click(function(e){e.preventDefault();var a=t(this);"accordion"===i?a.hasClass("show")?(a.removeClass("show active"),a.next().slideUp(r)):(a.parent().parent().find(".jltma-accordion-header").removeClass("show active"),a.parent().parent().find(".jltma-accordion-tab-content").slideUp(r),a.toggleClass("show active"),a.next().slideDown(r)):a.hasClass("show")?(a.removeClass("show active"),a.next().slideUp(r)):(a.addClass("show active"),a.next().slideDown(r))})},MA_Tabs:function(e,t){try{a=jQuery,n=e.find("[data-tabs]"),o=n.data("tab-effect"),n.each(function(){var e=a(this),t=!1;e.find("[data-tab]").each(function(){a(this).hasClass("active")}),e.find(".jltma--advance-tab-content").each(function(){a(this).hasClass("active")&&(t=!0)}),t||e.find(".jltma--advance-tab-content").eq(0).addClass("active"),"hover"==o?e.find("[data-tab]").hover(function(){var e=a(this).data("tab-id");a(this).siblings().removeClass("active"),a(this).addClass("active"),a(this).closest("[data-tabs]").find(".jltma--advance-tab-content").removeClass("active"),a("#"+e).addClass("active")}):e.find("[data-tab]").click(function(){var e=a(this).data("tab-id");a(this).siblings().removeClass("active"),a(this).addClass("active"),a(this).closest("[data-tabs]").find(".jltma--advance-tab-content").removeClass("active"),a("#"+e).addClass("active")})})}catch(e){}var a,n,o},MA_ProgressBar:function(e,t){var a=e.data("id"),n=e.find(".jltma-progress-bar-"+a),o=n.data("type"),i=n.data("progress-bar-value"),r=n.data("progress-bar-stroke-width"),s=n.data("progress-bar-stroke-trail-width"),d=n.data("stroke-color"),c=n.data("stroke-trail-color");n.find("svg").remove(),n.find(".ldBar-label").remove(),n.removeClass("ldBar"),l.animatedProgressbar(a,o,i,d,c,r,s)},MA_Image_Hotspot:function(e,t){n(e);var a=e.find(".jltma-hotspots-container");if(a.length){var o=a.find("> .jltma-tooltip-item"),i=e.data("id");o.each(function(e){tippy(this,{allowHTML:!1,theme:"jltma-tippy-"+i})})}},MA_Pricing_Table:function(e,t){var a=e.find(".jltma-price-table-details ul");if(a.length){var n=a.find("> .jltma-tooltip-item"),o=e.data("id");n.each(function(e){tippy(this,{allowHTML:!1,theme:"jltma-pricing-table-tippy-"+o,appendTo:document.body})})}},JLTMA_Data_Table:function(t,a){var n=t.find(".jltma-data-table-container"),o=n.data("source"),i=n.data("sourcecsv");if(1==n.data("buttons"))var r="Bfrtip";else r="frtip";if("custom"==o){var l=t.find("table thead tr th").length;t.find("table tbody tr").each(function(){if(e(this).find("td").length<l){var t=l-e(this).find("td").length;e(this).append(new Array(++t).join("<td></td>"))}}),t.find(".jltma-data-table").DataTable({dom:r,paging:n.data("paging"),pagingType:"numbers",pageLength:n.data("pagelength"),info:n.data("info"),scrollX:!0,searching:n.data("searching"),ordering:n.data("ordering"),buttons:[{extend:"csvHtml5",text:JLTMA_DATA_TABLE.csvHtml5},{extend:"excelHtml5",text:JLTMA_DATA_TABLE.excelHtml5},{extend:"pdfHtml5",text:JLTMA_DATA_TABLE.pdfHtml5},{extend:"print",text:JLTMA_DATA_TABLE.print}],language:{lengthMenu:JLTMA_DATA_TABLE.lengthMenu,zeroRecords:JLTMA_DATA_TABLE.zeroRecords,info:JLTMA_DATA_TABLE.info,infoEmpty:JLTMA_DATA_TABLE.infoEmpty,infoFiltered:JLTMA_DATA_TABLE.infoFiltered,search:"",searchPlaceholder:JLTMA_DATA_TABLE.searchPlaceholder,processing:JLTMA_DATA_TABLE.processing}})}else"csv"==o&&function(n){var o=(n=n||{}).csv_path||"",i=t.element||a("#table-container"),r=t.csv_options||{},l=t.datatables_options||{},s=t.custom_formatting||[],d={};a.each(s,function(e,t){var a=t[0],n=t[1];d[a]=n});var c=a('<table class="jltma-data-table cell-border" style="width:100%;visibility:hidden;">');i.empty().append(c),a.when(a.get(o)).then(function(t){for(var n=e.csv.toArrays(t,r),o=a("<thead></thead>"),i=n[0],s=a("<tr></tr>"),m=0;m<i.length;m++)s.append(a("<th></th>").text(i[m]));o.append(s),c.append(o);for(var f=a("<tbody></tbody>"),p=1;p<n.length;p++)for(var u=a("<tr></tr>"),_=0;_<n[p].length;_++){var v=a("<td></td>"),g=d[_];g?v.html(g(n[p][_])):v.text(n[p][_]),u.append(v),f.append(u)}c.append(f),c.DataTable(l)})}({csv_path:i,element:n,datatables_options:{dom:r,paging:n.data("paging"),pagingType:"numbers",pageLength:n.data("pagelength"),info:n.data("info"),scrollX:!0,searching:n.data("searching"),ordering:n.data("ordering"),buttons:[{extend:"csvHtml5",text:JLTMA_DATA_TABLE.csvHtml5},{extend:"excelHtml5",text:JLTMA_DATA_TABLE.excelHtml5},{extend:"pdfHtml5",text:JLTMA_DATA_TABLE.pdfHtml5},{extend:"print",text:JLTMA_DATA_TABLE.print}],language:{lengthMenu:JLTMA_DATA_TABLE.lengthMenu,zeroRecords:JLTMA_DATA_TABLE.zeroRecords,info:JLTMA_DATA_TABLE.info,infoEmpty:JLTMA_DATA_TABLE.infoEmpty,infoFiltered:JLTMA_DATA_TABLE.infoFiltered,search:"",searchPlaceholder:JLTMA_DATA_TABLE.searchPlaceholder,processing:JLTMA_DATA_TABLE.processing}}});t.find(".jltma-data-table").css("visibility","visible")},JLTMA_Dropdown_Button:function(e,t){e.find(".jltma-dropdown").hover(function(){e.find(".jltma-dd-menu").addClass("jltma-dd-menu-opened")},function(){e.find(".jltma-dd-menu").removeClass("jltma-dd-menu-opened")})},JLTMA_WC_Add_To_Cart:function(e,t){t(document).on("click",".ajax_add_to_cart",function(e){t(this).append('<i class="fa fa-spinner animated rotateIn infinite"></i>')}),t(".jltma-wc-add-to-cart-btn-custom-js").each(function(e){var a=t(this).attr("data-jltma-wc-add-to-cart-btn-custom-css");t(a).appendTo("head")})},MA_Offcanvas_Menu:function(e,t){l.MA_Offcanvas_Menu.elementSettings=e.data("settings");var a="jltma-offcanvas-menu",n=e.data("id"),o=e.data("settings"),i=o.esc_close?o.esc_close:"",r={widget:a,triggerButton:"jltma-offcanvas__trigger",offcanvasContent:"jltma-offcanvas__content",offcanvasContentBody:"".concat(a,"__body"),offcanvasContainer:"".concat(a,"__container"),offcanvasContainerOverlay:"".concat(a,"__container__overlay"),offcanvasWrapper:"".concat(a,"__wrapper"),closeButton:"".concat(a,"__close"),menuArrow:"".concat(a,"__arrow"),menuInner:"".concat(a,"__menu-inner"),itemHasChildrenLink:"menu-item-has-children > a",contentClassPart:"jltma-offcanvas-content",contentOpenClass:"jltma-offcanvas-content-open",customContainer:"".concat(a,"__custom-container")},s={widget:".".concat(r.widget),triggerButton:".".concat(r.triggerButton),offcanvasContent:".".concat(r.offcanvasContent),offcanvasContentBody:".".concat(r.offcanvasContentBody),offcanvasContainer:".".concat(r.offcanvasContainer),offcanvasContainerOverlay:".".concat(r.offcanvasContainerOverlay),offcanvasWrapper:".".concat(r.offcanvasWrapper),closeButton:".".concat(r.closeButton),menuArrow:".".concat(r.menuArrow),menuParent:".".concat(r.menuInner," .").concat(r.itemHasChildrenLink),contentClassPart:".".concat(r.contentClassPart),contentOpenClass:".".concat(r.contentOpenClass),customContainer:".".concat(r.customContainer)},d={$document:jQuery(document),$html:jQuery(document).find("html"),$body:jQuery(document).find("body"),$outsideContainer:jQuery(s.offcanvasContainer),$containerOverlay:jQuery(s.offcanvasContainerOverlay),$triggerButton:e.find(s.triggerButton),$offcanvasContent:e.find(s.offcanvasContent),$offcanvasContentBody:e.find(s.offcanvasContentBody),$offcanvasContainer:e.find(s.offcanvasContainer),$offcanvasWrapper:e.find(s.offcanvasWrapper),$closeButton:e.find(s.closeButton),$menuParent:e.find(s.menuParent)};return l.MA_Offcanvas_Menu.resetCanvas=function(){var e=n;d.$html.addClass("".concat(r.offcanvasContent,"-widget")),d.$outsideContainer.length||(d.$body.append('<div class="'.concat(r.offcanvasContainerOverlay,'" />')),d.$body.wrapInner('<div class="'.concat(r.offcanvasContainer,'" />')),d.$offcanvasContent.insertBefore(s.offcanvasContainer));var t=d.$offcanvasWrapper.find(s.offcanvasContent);if(t.length){var a=d.$outsideContainer.find("> .".concat(r.contentClassPart,"-").concat(e));a.length&&a.remove();var o=d.$body.find("> .".concat(r.contentClassPart,"-").concat(e));o.length&&o.remove(),d.$html.hasClass(r.contentOpenClass)&&t.addClass("active"),d.$body.prepend(t)}},l.MA_Offcanvas_Menu.offcanvasClose=function(){var e=d.$html.data("open-id"),t=new RegExp("".concat(r.contentClassPart,"-.*")),a=d.$html.attr("class").split(/\s+/);jQuery("".concat(s.contentClassPart,"-").concat(e)).removeClass("active"),d.$triggerButton.removeClass("trigger-active"),a.forEach(function(e){e.match(t)&&d.$html.removeClass(e)}),d.$html.removeData("open-id")},l.MA_Offcanvas_Menu.containerClick=function(e){var t=d.$html.data("open-id");n===t&&o.overlay_close&&d.$html.hasClass(r.contentOpenClass)&&l.MA_Offcanvas_Menu.offcanvasClose()},l.MA_Offcanvas_Menu.closeESC=function(e){27===e.keyCode&&(l.MA_Offcanvas_Menu.offcanvasClose(),t(d.$triggerButton).removeClass("trigger-active"))},l.MA_Offcanvas_Menu.addLoaderIcon=function(){jQuery(document).find(".jltma-offcanvas__content").addClass("jltma-loading")},l.MA_Offcanvas_Menu.removeLoaderIcon=function(){jQuery(document).find(".jltma-offcanvas__content").removeClass("jltma-loading")},l.MA_Offcanvas_Menu.bindEvents=function(){d.$body.on("click",s.offcanvasContainerOverlay,l.MA_Offcanvas_Menu.containerClick.bind(this)),"yes"===i&&d.$document.on("keydown",l.MA_Offcanvas_Menu.closeESC.bind(this)),d.$triggerButton.on("click",l.MA_Offcanvas_Menu.offcanvasContent.bind(this)),d.$closeButton.on("click",l.MA_Offcanvas_Menu.offcanvasClose.bind(this)),d.$menuParent.on("click",l.MA_Offcanvas_Menu.onParentClick.bind(this)),t(d.$menuParent).on("change",function(){l.MA_Offcanvas_Menu.onParentClick.bind(t(this))}),t("[data-settings=animation_type]").on("click",function(){l.MA_Offcanvas_Menu.changeControl.bind(t(this))})},l.MA_Offcanvas_Menu.perfectScrollInit=function(){l.MA_Offcanvas_Menu.scrollPerfect?l.MA_Offcanvas_Menu.scrollPerfect.update():l.MA_Offcanvas_Menu.scrollPerfect=new PerfectScrollbar(d.$offcanvasContentBody.get(0),{wheelSpeed:.5,suppressScrollX:!0})},l.MA_Offcanvas_Menu.onEdit=function(){l.MA_Offcanvas_Menu.isEdit&&(void 0===$element.data("opened")&&$element.data("opened","false"),elementor.channels.editor.on("section:activated",l.MA_Offcanvas_Menu.sectionActivated.bind(this)))},l.MA_Offcanvas_Menu.sectionActivated=function(e,t){var a=elementorFrontend.config.elements.data[this.getModelCID()],n=t.getOption("editedElementView");if(this.getModelCID()===t.model.cid&&a.get("widgetType")===n.model.get("widgetType"))if(-1!==this.sectionsArray.indexOf(e)){if("true"===$element.data("opened")){var o=t.getOption("model");l.MA_Offcanvas_Menu.offcanvasContent(null,o.get("id"))}$element.data("opened","true")}else l.MA_Offcanvas_Menu.offcanvasClose()},l.MA_Offcanvas_Menu.offcanvasContent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=o.canvas_position,i=o.animation_type,l=n;null!==t&&(l=t),d.$triggerButton.addClass("trigger-active"),jQuery("".concat(s.contentClassPart,"-").concat(l)).addClass("active"),d.$html.addClass("".concat(r.contentOpenClass)).addClass("".concat(r.contentOpenClass,"-").concat(l)).addClass("".concat(r.contentClassPart,"-").concat(a)).addClass("".concat(r.contentClassPart,"-").concat(i)).data("open-id",l)},l.MA_Offcanvas_Menu.onParentClick=function(e){var t=jQuery(e.target),a=t.hasClass(r.menuArrow)?t.parent():t;!t.hasClass(r.menuArrow)&&-1===["","#"].indexOf(t.attr("href"))&&a.hasClass("active")||e.preventDefault();var n=a.next();a.removeClass("active"),n.slideUp("normal"),n.is("ul")&&!n.is(":visible")&&(a.addClass("active"),n.slideDown("normal"))},l.MA_Offcanvas_Menu.changeControl=function(){l.MA_Offcanvas_Menu.offcanvasClose()},l.MA_Offcanvas_Menu.onInit=function(){l.MA_Offcanvas_Menu.resetCanvas(),l.MA_Offcanvas_Menu.bindEvents()},l.MA_Offcanvas_Menu.onInit()},MA_Image_Filter_Gallery:function(e,t){var a=n(e),o=e.find(".jltma-image-filter-gallery-wrapper").eq(0),r=e.find(".jltma-image-filter-gallery"),l=e.find(".jltma-image-filter-nav"),s=e.find(".jltma-image-filter-gallery-wrapper"),d=i(e),c=a.ma_el_image_gallery_max_tilt,m=a.ma_el_image_gallery_perspective,f=a.ma_el_image_gallery_speed,p=a.ma_el_image_gallery_tilt_axis,u=a.ma_el_image_gallery_glare,_=(a.line_location,a.ma_el_image_gallery_tooltip),v=t(".elementor-element-"+d+" .jltma-image-filter-gallery"),g=s.hasClass("jltma-masonry-yes")?"masonry":"fitRows";if(o.length){if("yes"==_){var h=o.find("ul.jltma-tooltip");if(!h.length)return;var y=h.find("> .jltma-tooltip-item"),w=e.data("id");y.each(function(e){tippy(this,{allowHTML:!1,theme:"jltma-image-filter-tippy-"+w})})}var b={filter:"*",itemSelector:".jltma-image-filter-item",percentPosition:!0,animationOptions:{duration:750,easing:"linear",queue:!1}},A=Object.assign({},b);"fitRows"===g&&(b.layoutMode="fitRows"),"masonry"===g&&(A.macolumnWidthsonry=".jltma-image-filter-item",A.horizontalOrder=!0);var j=v.isotope(A);if(j.imagesLoaded().progress(function(){j.isotope("layout"),e.find(".jltma-image-filter-gallery").css({"min-height":"300px"})}),t.isFunction(t.fn.imagesLoaded)&&r.imagesLoaded(function(){t.isFunction(t.fn.isotope)&&r.isotope(b)}),p="x"===p?"y":"y"===p?"x":"both","yes"===u)var C=a.ma_el_image_gallery_max_glare;if(u="yes"===u,e.find(".jltma-tilt-enable")){var M={maxTilt:c,perspective:m,easing:"linear",scale:1,speed:f,disableAxis:p,transition:!0,reset:!0,glare:u,maxGlare:C};e.find(".jltma-tilt").tilt(M)}l.on("click","li",function(){if(l.find(".active").removeClass("active"),t(this).addClass("active"),t.isFunction(t.fn.isotope)){var e=t(this).attr("data-filter");return r.isotope({filter:e}),!1}}),t("jltma-fancybox").fancybox({protect:!0,animationDuration:366,transitionDuration:366,transitionEffect:"fade",animationEffect:"fade",preventCaptionOverlap:!0,infobar:!1,buttons:["zoom","share","slideShow","fullScreen","download","thumbs","close"],afterLoad:function(e,t){var a=window.devicePixelRatio||1;a>1.5&&(t.width=t.width/a,t.height=t.height/a)}})}},MA_Carousel:function(e,a){var n=e.find(".jltma-swiper__slide"),o=elementorFrontend.config.breakpoints,i=e.data("swiper"),r={autoHeight:a.element.autoHeight||!1,direction:a.element.direction||a.default.direction,effect:a.element.effect||a.default.effect,slidesPerView:a.default.slidesPerView,slidesPerColumn:a.default.slidesPerColumn,slidesPerColumnFill:"row",slidesPerGroup:a.default.slidesPerGroup,spaceBetween:a.default.spaceBetween,pagination:{},navigation:{},autoplay:a.element.autoplay||!1,grabCursor:!0,watchSlidesProgress:!0,watchSlidesVisibility:!0};return a.default.breakpoints&&(r.breakpoints={},r.breakpoints[o.md]=a.default.breakpoints.tablet,r.breakpoints[o.lg]=a.default.breakpoints.desktop),elementorFrontend.isEditMode()?(r.observer=!0,r.observeParents=!0,r.observeSlideChildren=!0):a.element.freeMode||(r.observer=!0,r.observeParents=!0,r.observeSlideChildren=!0),l.MA_Carousel.init=function(){if(!i){if(r.breakpoints&&(a.element.breakpoints.desktop.slidesPerView&&(r.breakpoints[o.lg].slidesPerView=a.stretch?Math.min(n.length,+a.element.breakpoints.desktop.slidesPerView||3):+a.element.breakpoints.desktop.slidesPerView||3),a.element.breakpoints.tablet.slidesPerView&&(r.breakpoints[o.md].slidesPerView=a.stretch?Math.min(n.length,+a.element.breakpoints.tablet.slidesPerView||2):+a.element.breakpoints.tablet.slidesPerView||2)),a.element.slidesPerView&&(r.slidesPerView=a.stretch?Math.min(n.length,+a.element.slidesPerView||1):+a.element.slidesPerView||1),r.breakpoints&&(a.element.breakpoints.desktop.slidesPerGroup&&(r.breakpoints[o.lg].slidesPerGroup=Math.min(n.length,+a.element.breakpoints.desktop.slidesPerGroup||3)),a.element.breakpoints.tablet.slidesPerGroup&&(r.breakpoints[o.md].slidesPerGroup=Math.min(n.length,+a.element.breakpoints.tablet.slidesPerGroup||2))),a.element.slidesPerGroup&&(r.slidesPerGroup=Math.min(n.length,+a.element.slidesPerGroup||1)),r.breakpoints&&(a.element.breakpoints.desktop.slidesPerColumn&&(r.breakpoints[o.lg].slidesPerColumn=a.element.breakpoints.desktop.slidesPerColumn),a.element.breakpoints.tablet.slidesPerColumn&&(r.breakpoints[o.md].slidesPerColumn=a.element.breakpoints.tablet.slidesPerColumn)),a.element.slidesPerColumn&&(r.slidesPerColumn=a.element.slidesPerColumn),r.breakpoints&&(r.breakpoints[o.lg].spaceBetween=a.element.breakpoints.desktop.spaceBetween||0,r.breakpoints[o.md].spaceBetween=a.element.breakpoints.tablet.spaceBetween||0),a.element.spaceBetween&&(r.spaceBetween=a.element.spaceBetween||0),a.element.slidesPerColumnFill&&(r.slidesPerColumnFill=a.element.slidesPerColumnFill),a.element.arrows){r.navigation.disabledClass="jltma-swiper__button--disabled";var e=a.scope.find(a.element.arrowPrev),t=a.scope.find(a.element.arrowNext);if(e.length&&t.length){var s=a.element.arrowPrev+"-"+a.id,d=a.element.arrowNext+"-"+a.id;e.addClass(s.replace(".","")),t.addClass(d.replace(".","")),r.navigation.prevEl=s,r.navigation.nextEl=d}}return a.element.pagination&&(r.pagination.el=".jltma-swiper__pagination-"+a.id,r.pagination.type=a.element.paginationType,a.element.paginationClickable&&(r.pagination.clickable=!0)),a.element.loop&&(r.loop=!0),r.autoplay&&(a.element.autoplaySpeed||a.element.disableOnInteraction)&&(r.autoplay={},a.element.autoplaySpeed&&(r.autoplay.delay=a.element.autoplaySpeed),a.element.autoplaySpeed&&(r.autoplay.disableOnInteraction=a.element.disableOnInteraction)),a.element.speed&&(r.speed=a.element.speed),a.element.resistance&&(r.resistanceRatio=1-a.element.resistance),a.element.freeMode&&(r.freeMode=!0,r.freeModeSticky=a.element.freeModeSticky,r.freeModeMomentum=a.element.freeModeMomentum,r.freeModeMomentumBounce=a.element.freeModeMomentumBounce,a.element.freeModeMomentumRatio&&(r.freeModeMomentumRatio=a.element.freeModeMomentumRatio),a.element.freeModeMomentumVelocityRatio&&(r.freeModeMomentumVelocityRatio=a.element.freeModeMomentumVelocityRatio),a.element.freeModeMomentumBounceRatio&&(r.freeModeMomentumBounceRatio=a.element.freeModeMomentumBounceRatio)),r}l.MA_Carousel.destroy()},l.MA_Carousel.onAfterInit=function(e,a,n){void 0!==n&&void 0!==a&&(n.element.stopOnHover&&(e.on("mouseover",function(){a.autoplay.stop()}),e.on("mouseout",function(){a.autoplay.start()})),n.element.slideChangeTriggerResize&&a.on("slideChange",function(){t(window).trigger("resize")}),e.data("swiper",a))},l.MA_Carousel.init()},MA_Gallery_Slider:function(e,t){var a=n(e),o=e.find(".jltma-gallery-slider__slider"),r=e.find(".jltma-gallery-slider__carousel"),s=i(e),d=(e.data("id"),e.find(".jltma-gallery-slider__preview"),e.find(".jltma-swiper__wrapper .jltma-gallery__item"),e.find(".jltma-gallery-slider__gallery .jltma-gallery"),a.jltma_gallery_slider_thumb_type,a.jltma_gallery_slider_preview_position,elementorFrontend.config.is_rtl,elementorFrontend.config.is_rtl,r.length),c=null,m={key:"slider",scope:e,id:s,element:{autoHeight:"yes"===a.jltma_gallery_slider_adaptive_height,autoplay:"yes"===a.jltma_gallery_slider_autoplay,autoplaySpeed:!("yes"!==a.jltma_gallery_slider_autoplay||!a.jltma_gallery_slider_autoplay_speed)&&a.jltma_gallery_slider_autoplay_speed.size,disableOnInteraction:""!==a.autoplay_disable_on_interaction,stopOnHover:"yes"===a.jltma_gallery_slider_pause_on_hover,loop:"yes"===a.jltma_gallery_slider_infinite,arrows:""!==a.jltma_gallery_slider_show_arrows,arrowPrev:".jltma-arrow--prev",arrowNext:".jltma-arrow--next",effect:a.jltma_gallery_slider_effect,speed:a.jltma_gallery_slider_speed?a.jltma_gallery_slider_speed:500,resistance:a.resistance?a.resistance.size:.25,keyboard:{enabled:!0}},default:{effect:"slide",direction:"horizontal",slidesPerView:1,slidesPerGroup:1,slidesPerColumn:1,spaceBetween:0}};if(d)var f={key:"carousel",scope:e,id:s,element:{direction:a.carousel_orientation,arrows:""!==a.jltma_gallery_slider_thumb_show_arrows,arrowPrev:".jltma-arrow--prev",arrowNext:".jltma-arrow--next",autoHeight:!1,loop:"yes"===a.jltma_gallery_slider_thumb_infinite,autoplay:"yes"===a.jltma_gallery_slider_thumb_autoplay,autoplaySpeed:!("yes"!==a.jltma_gallery_slider_thumb_autoplay||!a.jltma_gallery_slider_thumb_autoplay_speed)&&a.jltma_gallery_slider_thumb_autoplay_speed.size,stopOnHover:"yes"===a.jltma_gallery_slider_thumb_pause_on_hover,speed:a.jltma_gallery_slider_thumb_speed?a.jltma_gallery_slider_thumb_speed:500,slidesPerView:a.jltma_gallery_slider_thumb_items_mobile,slidesPerColumn:"vertical"===a.carousel_orientation?1:a.carousel_slides_per_column_mobile,slidesPerGroup:a.carousel_slides_to_scroll_mobile,resistance:a.carousel_resistance?a.carousel_resistance.size:.15,spaceBetween:a.carousel_spacing_mobile?a.carousel_spacing_mobile.size:0,breakpoints:{tablet:{slidesPerView:a.jltma_gallery_slider_thumb_items_tablet,slidesPerColumn:"vertical"===a.carousel_orientation?1:a.carousel_slides_per_column_tablet,slidesPerGroup:a.carousel_slides_to_scroll_tablet,spaceBetween:a.carousel_spacing_tablet?a.carousel_spacing_tablet.size:0},desktop:{slidesPerView:a.jltma_gallery_slider_thumb_items,slidesPerColumn:"vertical"===a.carousel_orientation?1:a.carousel_slides_per_column,slidesPerGroup:a.carousel_slides_to_scroll,spaceBetween:a.carousel_spacing?a.carousel_spacing.size:0}}},default:{effect:"slide",slidesPerView:1,slidesPerGroup:1,slidesPerColumn:1,spaceBetween:6,breakpoints:{tablet:{slidesPerView:2,slidesPerGroup:1,slidesPerColumn:2,spaceBetween:12},desktop:{slidesPerView:3,slidesPerGroup:1,slidesPerColumn:3,spaceBetween:24}}}};l.MA_Gallery_Slider.init=function(){var t=l.MA_Carousel(o,m);if(d)var a=l.MA_Carousel(r,f);if("undefined"==typeof Swiper){const n=elementorFrontend.utils.swiper;new n(o,t).then(function(t){d?new n(r,a).then(function(a){l.MA_Gallery_Slider.initSliders(e,t,a),l.MA_Carousel.onAfterInit(o,t,m),l.MA_Carousel.onAfterInit(r,a,f)}):(l.MA_Gallery_Slider.initSliders(e,t,!1),l.MA_Carousel.onAfterInit(o,t,m))})}else{if(d)var n=new Swiper(o[1],{...a}),i=new Swiper(o[0],{...t,thumbs:{swiper:n}});else i=new Swiper(o[0],{...t});d&&(c=new Swiper(r,a)),l.MA_Gallery_Slider.initSliders(e,i,c),l.MA_Carousel.onAfterInit(o,i,m),d&&l.MA_Carousel.onAfterInit(r,c,f)}},l.MA_Gallery_Slider.getSlider=function(){return e.find(".jltma-gallery-slider__slider")},l.MA_Gallery_Slider.getCarousel=function(){return e.find(".jltma-gallery-slider__carousel")},l.MA_Gallery_Slider.initSliders=function(e,t,a){var n={scope:e,slider:t,carousel:a};l.MA_Gallery_Slider.onSlideChange(n),l.MA_Gallery_Slider.events(n)},l.MA_Gallery_Slider.events=function(e){var a=e.scope.find(".jltma-gallery__item");e.slider.on("slideChange",function(t){l.MA_Gallery_Slider.onSlideChange(e)}),a.on("click",function(){var a=m.element.loop?1:0;event.preventDefault(),e.slider.slideTo(t(this).index()+a)})},l.MA_Gallery_Slider.onSlideChange=function(e){var t=m.element.loop?e.slider.realIndex:e.slider.activeIndex;d&&e.carousel.slideTo(t);var a=e.scope.find(".jltma-gallery__item");a.removeClass("is--active"),a.eq(t).addClass("is--active")},l.MA_Gallery_Slider.onThumbClicked=function(e){var a=m.element.loop?1:0;e.preventDefault(),null.slideTo(t(this).index()+a,500,!0)},l.onElementRemove(e,function(){e.find(".swiper-container").each(function(){t(this).data("swiper")&&t(this).data("swiper").destroy()})}),l.MA_Gallery_Slider.init()},onElementRemove:function(e,t){elementorFrontend.isEditMode()&&elementor.channels.data.on("element:before:remove",function(a){e.data("id")===a.id&&t()})},MA_Timeline:function(e,t){var a=n(e),o=e.find(".jltma-timeline"),r=e.find(".jltma-timeline-slider"),s=a.ma_el_timeline_type||"custom",d=a.ma_el_timeline_design_type||"vertical",c={};if(r.length,i(e),"horizontal"===d){var m=e.find(".jltma-timeline-carousel-slider");if(!m.length)return;var f=e.find(".swiper"),p=m.data("settings"),u=elementorFrontend.utils.swiper;async function _(){await new u(f[0],p),p.pauseOnHover&&f.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}_()}"vertical"!==d&&"post"!==s||(o=e.find(".jltma-timeline"),c={},l.MA_Timeline.init=function(){elementorFrontend.isEditMode()&&(c.scope=window.elementor.$previewContents),void 0!==a.line_location&&a.line_location.size&&(c.lineLocation=a.line_location.size),o.maTimeline(c)},l.MA_Timeline.init())},MA_NewsTicker:function(e,t){try{var a=e.find(".jltma-news-ticker"),n=(a.data("tickertype"),a.data("tickerid"),a.data("feedurl"),a.data("feedanimation"),a.data("limitposts"),a.data("scroll")||"slide-h"),o=a.data("autoplay"),i=a.data("timer")||3e3,r=e.find(".jltma-ticker-content-inner.swiper")[0];if(!r)return;var l={loop:!0,slidesPerView:1,spaceBetween:0,speed:500,navigation:{nextEl:e.find(".jltma-ticker-next")[0],prevEl:e.find(".jltma-ticker-prev")[0]}};"slide-v"===n?l.direction="vertical":"scroll-h"===n?(l.direction="horizontal",l.freeMode={enabled:!0,momentum:!1},l.speed=5e3,l.autoplay={delay:0,disableOnInteraction:!1,pauseOnMouseEnter:!0}):l.direction="horizontal",o&&"scroll-h"!==n&&(l.autoplay={delay:i,disableOnInteraction:!1,pauseOnMouseEnter:!0}),new Swiper(r,l)}catch(e){console.log("News Ticker Error:",e)}},MA_Blog:function(e,t){n(e),i(e),e.data("id"),e.find(".jltma-swiper__container"),e.find(".jltma-grid__item");var a=e.find(".jltma-blog-wrapper"),o=(a.data("col"),a.data("carousel"));a.data("grid"),e.find(".jltma-blog-cats-container li a").click(function(n){n.preventDefault(),e.find(".jltma-blog-cats-container li .active").removeClass("active"),t(this).addClass("active");var o=t(this).attr("data-filter");return a.isotope({filter:o}),!1}),a.hasClass("jltma-blog-masonry")&&!o&&a.imagesLoaded(function(){a.isotope({itemSelector:".jltma-post-outer-container",percentPosition:!0,animationOptions:{duration:750,easing:"linear",queue:!1}})});var r=e.find(".jltma-blog-carousel-slider");if(r.length){var l=e.find(".swiper"),s=r.data("settings"),d=elementorFrontend.utils.swiper;!async function(){await new d(l[0],s),s.pauseOnHover&&l.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}()}},MA_Image_Carousel:function(e,t){var a=e.find(".jltma-image-carousel-slider");if(a.length){var n=e.find(".swiper"),o=a.data("settings"),i=elementorFrontend.utils.swiper;!async function(){await new i(n[0],o),o.pauseOnHover&&n.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}()}},MA_Logo_Slider:function(e,t){var a=e.find(".jltma-logo-carousel-slider");if(a.length){var n=e.find(".swiper"),o=a.data("settings"),i=elementorFrontend.utils.swiper;!async function(){await new i(n[0],o),o.pauseOnHover&&n.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}(),a.find(".jltma-logo-slider-figure").on("click",".item-hover-icon",function(){var e=t(this);e.toggleClass("hide"),e.siblings(".jltma-hover-click").toggleClass("show")}),a.find(".jltma-logo-slider-item").each(function(e){var a=t(this).attr("id");if(a){var n,o=t(this).data("id"),i=t(this).data("tooltip-settings"),r="#"+a;n=1==i.follow_cursor?{followCursor:!0}:{placement:i.placement,followCursor:!1};var l=!1;1==i.arrow&&(l="round"!=i.arrow_type||tippy.roundArrow),tippy(r,{content:i.text,...n,animation:i.animation,arrow:l,duration:i.duration,delay:i.delay,trigger:i.trigger,offset:[i.x_offset,i.y_offset],zIndex:999999,allowHTML:!1,theme:"jltma-tippy-"+o,onShow(e){var a=e.popper;t(a).addClass(o)}})}})}},MA_TeamSlider:function(e,t){if("-content-drawer"==e.find(".jltma-team-carousel-wrapper").eq(0).data("team-preset"))try{jQuery(".gridder").gridderExpander({scroll:!1,scrollOffset:0,scrollTo:"panel",animationSpeed:400,animationEasing:"easeInOutExpo",showNav:!0,nextText:"<span></span>",prevText:"<span></span>",closeText:"",onStart:function(){},onContent:function(){},onClosed:function(){}})}catch(r){}else{var a=e.find(".jltma-team-carousel-slider");if(!a.length)return;var n=e.find(".swiper"),o=a.data("settings"),i=elementorFrontend.utils.swiper;async function l(){await new i(n[0],o),o.pauseOnHover&&n.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}l()}},MA_Advanced_Image:function(e,t){l.MA_Advanced_Image.elementSettings=n(e),e.find(".jltma-img-dynamic-dropshadow").each(function(){var e,t,a;if(this instanceof jQuery){if(!this||!this[0])return;a=this[0]}else a=this;a.classList.contains("jltma-img-has-shadow")||(e=document.createElement("div"),(t=a.cloneNode()).classList.add("jltma-img-dynamic-dropshadow-cloned"),t.classList.remove("jltma-img-dynamic-dropshadow"),a.classList.add("jltma-img-has-shadow"),e.classList.add("jltma-img-dynamic-dropshadow-frame"),a.parentNode.appendChild(e),e.appendChild(a),e.appendChild(t))}),e.find(".jltma-tilt-box").tilt({maxTilt:t(this).data("max-tilt"),easing:"cubic-bezier(0.23, 1, 0.32, 1)",speed:t(this).data("time"),perspective:2e3})},MA_Tooltip:function(e,t){if(e&&e.length&&t)if("undefined"!=typeof tippy){e.removeData("ma-tooltip-retry");var a=n(e),o=e.data("id"),i=null;if(o&&"string"==typeof o){try{if(!(i=document.getElementById("jltma-tooltip-"+o))){var r=e.find("#jltma-tooltip-"+o);if(r&&r.length>0){var s=r[0];s&&1===s.nodeType&&(i=s)}}if(!i||!i.nodeType||1!==i.nodeType)return;if(i.jquery&&(!(i=i[0])||!i.nodeType))return}catch(e){return}var d=function(){try{if(i&&i._maTooltipInitializing)return;if(!a||"object"!=typeof a)return;var t=a.ma_el_tooltip_text;if(!t||"string"!=typeof t)return;i&&(i._maTooltipInitializing=!0);var n=t.replace(/<\/?[^>]+(>|$)/g,""),r=a.ma_el_tooltip_direction||"top",l=a.jltma_tooltip_animation||"shift-away",s=!1!==a.jltma_tooltip_arrow,d=parseInt(a.jltma_tooltip_duration)||300,c=parseInt(a.jltma_tooltip_delay)||300,m=a.jltma_tooltip_arrow_type||"sharp",f=a.jltma_tooltip_trigger||"mouseenter",p=a.jltma_tooltip_custom_trigger,u="fill"===a.jltma_tooltip_animation;d=Math.max(100,Math.min(5e3,d)),c=Math.max(0,Math.min(5e3,c));var _=0,v=0;try{a.jltma_tooltip_x_offset&&void 0!==a.jltma_tooltip_x_offset.size&&(_=parseInt(a.jltma_tooltip_x_offset.size)||0),a.jltma_tooltip_y_offset&&void 0!==a.jltma_tooltip_y_offset.size&&(v=parseInt(a.jltma_tooltip_y_offset.size)||0)}catch(e){_=0,v=0}var g=200;try{a.ma_el_tooltip_text_width&&a.ma_el_tooltip_text_width.size&&(g=parseInt(a.ma_el_tooltip_text_width.size)||200)}catch(e){g=200}if(!i||!i.nodeType||1!==i.nodeType)return;if(!n||!n.trim())return;try{var h=i.parentElement;if(h&&h.classList&&h.classList.contains("jltma-tooltip-element"))return}catch(e){}var y={content:n,animation:l,arrow:s,duration:[d,c],trigger:f,animateFill:u,flipOnUpdate:!0,maxWidth:Math.max(50,Math.min(1e3,g)),zIndex:999,allowHTML:!1,theme:"jltma-tooltip-tippy-"+o,interactive:!0,hideOnClick:!0,offset:[Math.max(-500,Math.min(500,_)),Math.max(-500,Math.min(500,v))],appendTo:function(){try{return"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode()?document.body:"parent"}catch(e){return"parent"}},onShow:function(e){try{e&&e.popper&&"undefined"!=typeof jQuery&&jQuery(e.popper).attr("data-tippy-popper-id",o)}catch(e){}},onCreate:function(e){try{e&&e.reference&&!e.reference.nodeType&&e.reference.jquery&&(e.reference=e.reference[0])}catch(e){}},onDestroy:function(){i&&(i._tippyInstance=null)}};if(s&&"round"===m)try{"undefined"!=typeof tippy&&tippy.roundArrow&&(y.arrow=tippy.roundArrow)}catch(e){y.arrow=!0}if("yes"===a.jltma_tooltip_follow_cursor||!0===a.jltma_tooltip_follow_cursor?y.followCursor=!0:r&&"string"==typeof r&&-1!==["top","bottom","left","right","top-start","top-end","bottom-start","bottom-end","left-start","left-end","right-start","right-end","auto"].indexOf(r)&&(y.placement=r),"manual"===f&&p&&"string"==typeof p)try{var w=p.replace(/[<>'"]/g,""),b=document.querySelector(w);if(b&&1===b.nodeType){y.trigger="manual",y.hideOnClick=!1;var A=function(){var e=i;e&&e.jquery&&(e=e[0]);var t=e?e._tippyInstance:null;t&&t.state&&(t.state.isVisible?t.hide():(t.show(),setTimeout(function(){t&&!t.state.isDestroyed&&t.hide()},1500)))};b.addEventListener("click",A),i._maTooltipCleanup||(i._maTooltipCleanup=[]),i._maTooltipCleanup.push({element:b,event:"click",handler:A})}}catch(e){}try{['[data-tippy-popper-id="'+o+'"]',".tippy-popper[data-tippy-root]",'.tippy-box[data-theme*="'+o+'"]'].forEach(function(e){try{document.querySelectorAll(e).forEach(function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}catch(e){}}),i._tippyInstance&&(i._tippyInstance.destroy(),i._tippyInstance=null),i._tippy&&(i._tippy.destroy(),i._tippy=null),i._maTooltipCleanup&&(i._maTooltipCleanup.forEach(function(e){try{e.element.removeEventListener(e.event,e.handler)}catch(e){}}),i._maTooltipCleanup=[])}catch(e){}if(!i||!i.nodeType||1!==i.nodeType)return;var j={};for(var C in y)y.hasOwnProperty(C)&&(j[C]=y[C]);if("function"==typeof j.appendTo)try{var M=j.appendTo();"parent"===M?j.appendTo="parent":M&&M.nodeType?j.appendTo=M:j.appendTo="parent"}catch(e){j.appendTo="parent"}try{var k=i;if(k&&k.jquery&&(k=k[0]),!k||!k.nodeType||1!==k.nodeType)throw new Error("Invalid DOM element for tooltip");var T=tippy(k,j);T&&Array.isArray(T)&&T.length>0&&(k._tippyInstance=T[0],i._tippyInstance=T[0],e.data("ma-tooltip-active",!0))}catch(e){return}finally{i&&(i._maTooltipInitializing=!1)}}catch(e){return void(i&&(i._maTooltipInitializing=!1))}};if(d(),"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode())try{e.data("ma-tooltip-initialized",!0);var c=null,m=!1;if("undefined"!=typeof elementorModules&&elementorModules.frontend&&elementorModules.frontend.handlers&&elementorModules.frontend.handlers.Base){var f=elementorModules.frontend.handlers.Base.extend({onElementChange:function(t){!t||"string"!=typeof t||0!==t.indexOf("ma_el_tooltip")&&0!==t.indexOf("jltma_tooltip")||m||(c&&clearTimeout(c),c=setTimeout(function(){try{m=!0,a=n(e),document.querySelectorAll(".tippy-popper:not([data-tippy-popper-id])").forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),d(),c=null,setTimeout(function(){m=!1},100)}catch(e){m=!1}},200))},onDestroy:function(){if(c&&clearTimeout(c),i&&i._tippyInstance)try{i._tippyInstance.destroy()}catch(e){}}});try{elementorFrontend.elementsHandler.addHandler(f,{$element:e})}catch(t){e.one("remove",function(){if(c&&clearTimeout(c),i&&i._tippyInstance)try{i._tippyInstance.destroy()}catch(e){}})}}}catch(e){}if("undefined"!=typeof window&&window.addEventListener){var p=function(){if(i){if(i._tippyInstance)try{i._tippyInstance.destroy()}catch(e){}i._maTooltipCleanup&&i._maTooltipCleanup.forEach(function(e){try{e.element.removeEventListener(e.event,e.handler)}catch(e){}})}};window.addEventListener("beforeunload",p),window.addEventListener("pagehide",p)}}}else{var u=(e.data("ma-tooltip-retry")||0)+1;u<=10&&(e.data("ma-tooltip-retry",u),setTimeout(function(){l.MA_Tooltip(e,t)},100))}},MA_Twitter_Slider:function(e,t){var a=e.find(".jltma-twitter-carousel-slider");if(a.length){var n=e.find(".swiper"),o=a.data("settings"),i=elementorFrontend.utils.swiper;!async function(){await new i(n[0],o),o.pauseOnHover&&n.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}()}},MA_ParticlesBG:function(e,t){function a(){return"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode()}if(e.hasClass("jltma-particle-yes")||e.attr("data-jltma-particle")||e.find(".jltma-particle-wrapper").attr("data-jltma-particles-editor")){let t,n=e.data("element_type"),o=encodeURIComponent(e.data("id"));if(t=a()?e.find(".jltma-particle-wrapper").attr("data-jltma-particles-editor"):e.attr("data-jltma-particle"),("section"===n||"column"===n||"container"===n)&&t)if(a())if(e.hasClass("jltma-particle-yes"))try{let a=JSON.parse(t);particlesJS("jltma-particle-"+o,a),e.find(".elementor-column").css("z-index",9),setTimeout(function(){window.dispatchEvent(new Event("resize"))},500),setTimeout(function(){window.dispatchEvent(new Event("resize"))},1500)}catch(e){}else e.find(".jltma-particle-wrapper").remove();else{e.prepend('<div class="jltma-particle-wrapper" id="jltma-particle-'+o+'"></div>');try{let e=JSON.parse(t);particlesJS("jltma-particle-"+o,e),setTimeout(function(){window.dispatchEvent(new Event("resize"))},500),setTimeout(function(){window.dispatchEvent(new Event("resize"))},1500)}catch(e){}}}},MA_BgSlider:function(e,t){function a(){return"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode()}if(a()){if(!e.find(".ma-el-section-bs").length)return}else if(!e.hasClass("has_ma_el_bg_slider"))return;var n,o,i,r,l,s,d,c,m,f,p,u,_=[];(a()?(f=e.find(".ma-el-section-bs-inner")).length&&(m=f.attr("data-ma-el-bg-slider")):m=e.attr("data-ma-el-bg-slider-images"),m)&&(a()?(o=(f=e.find(".ma-el-section-bs-inner")).attr("data-ma-el-bg-slider-transition"),i=f.attr("data-ma-el-bg-slider-animation"),r=f.attr("data-ma-el-bg-custom-overlay"),s=f.attr("data-ma-el-bg-slider-cover"),d=f.attr("data-ma-el-bs-slider-delay"),c=f.attr("data-ma-el-bs-slider-timer"),l="yes"==r?JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/00.png":(p=f.attr("data-ma-el-bg-slider-overlay"))&&"00.png"!==p?JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/"+p:JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/00.png"):(o=e.attr("data-ma-el-bg-slider-transition"),i=e.attr("data-ma-el-bg-slider-animation"),r=e.attr("data-ma-el-bg-custom-overlay"),s=e.attr("data-ma-el-bg-slider-cover"),d=e.attr("data-ma-el-bs-slider-delay"),c=e.attr("data-ma-el-bs-slider-timer"),l="yes"==r?JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/00.png":(p=e.attr("data-ma-el-bg-slider-overlay"))?JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/"+p+".png":JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/00.png"),n=m.split(","),jQuery.each(n,function(e,t){var a=[];a.src=t,_.push(a)}),e.find(".ma-el-section-bs").length||e.prepend('<div class="ma-el-section-bs"><div class="ma-el-section-bs-inner"></div></div>'),(u=e.find(".ma-el-section-bs-inner")).vegas({slides:_,transition:o,animation:i,overlay:l,cover:"true"==s,delay:parseInt(d)||5e3,timer:"true"==c,init:function(){"yes"==r&&u.children(".vegas-overlay").css("background-image","")}}))},MA_AnimatedGradient:function(e,t){if(e.hasClass("ma-el-animated-gradient-yes")){let t=e.data("color")||e.attr("data-color"),a=e.data("angle")||e.attr("data-angle"),n=e.data("duration")||e.attr("data-duration")||"6s",o=parseInt(e.data("smoothness")||e.attr("data-smoothness")||3),i=e.data("easing")||e.attr("data-easing")||"cubic-bezier(0.4, 0.0, 0.2, 1)";if(!t||!a)return;let r=t.split(",");if(r.length<2)return;let l="jltma-animated-gradient-"+Math.random().toString(36).substring(2,11),s=`@keyframes ${l} {`,d=r.length;for(let e=0;e<=d;e++){let t=e/d*100,n=e%r.length,i=(e+1)%r.length;if(s+=`${t.toFixed(2)}% { background: linear-gradient(${a}, ${r[n].trim()}, ${r[i].trim()}); }`,e<d){let e=100/d;for(let n=1;n<=o;n++){let l=t+e*(n/(o+1)),d=i,c=(i+1)%r.length;s+=`${l.toFixed(2)}% { background: linear-gradient(${a}, ${r[d].trim()}, ${r[c].trim()}); }`}}}s+="}";let c=document.createElement("style");if(c.textContent=s,document.head.appendChild(c),e.css({animation:`${l} ${n} ${i} infinite`,"background-size":"400% 400%"}),e.hasClass("elementor-element-edit-mode")){let t=e.find(".animated-gradient");if(t.length>0){let e=t.data("color")||t.attr("data-color"),a=t.data("angle")||t.attr("data-angle"),n=t.data("duration")||t.attr("data-duration")||"6s";if(e&&a){let r=e.split(",");if(r.length>=2){let e="jltma-animated-gradient-editor-"+Math.random().toString(36).substring(2,11),l=`@keyframes ${e} {`,s=r.length;for(let e=0;e<=s;e++){let t=e/s*100,n=e%r.length,i=(e+1)%r.length;if(l+=`${t.toFixed(2)}% { background: linear-gradient(${a}, ${r[n].trim()}, ${r[i].trim()}); }`,e<s){let e=100/s;for(let n=1;n<=o;n++){let s=t+e*(n/(o+1)),d=i,c=(i+1)%r.length;l+=`${s.toFixed(2)}% { background: linear-gradient(${a}, ${r[d].trim()}, ${r[c].trim()}); }`}}}l+="}";let d=document.createElement("style");d.textContent=l,document.head.appendChild(d),t.css({animation:`${e} ${n} ${i} infinite`,"background-size":"400% 400%"})}}}}}},MA_Image_Comparison:function(e,t){var a=e.find(".jltma-image-comparison").eq(0),n=a.data("image-comparison-settings");a.twentytwenty({default_offset_pct:n.visible_ratio,orientation:n.orientation,before_label:n.before_label,after_label:n.after_label,move_slider_on_hover:n.slider_on_hover,move_with_handle_only:n.slider_with_handle,click_to_move:n.slider_with_click,no_overlay:n.no_overlay})},MA_BarCharts:function(e){r(e[0],function(){var t=e.find(".jltma-bar-chart-container"),a=e.find("#jltma-bar-chart"),n=t.data("settings");t.length&&new Chart(a,n)})},MA_PieCharts:function(e,t){r(e[0],function(){e.find(".ma-el-piechart .ma-el-percentage").each(function(){var e=t(this).data("track-color"),a=t(this).data("bar-color");t(this).easyPieChart({animate:2e3,lineWidth:10,barColor:a,trackColor:e,scaleColor:!1,lineCap:"square",size:220})})})},ProgressBars:function(e,t){r(e[0],function(){e.find(".jltma-stats-bar-content").each(function(){var e=t(this).data("perc");t(this).animate({width:e+"%"},20*e)})})},MA_Toggle_Content:function(e,t){l.getElementSettings=n(e);var a=e.find(".jltma-toggle-content"),o={active:l.getElementSettings.jltma_toggle_content_active_index};""!==l.getElementSettings.jltma_toggle_content_indicator_color&&(o.indicatorColor=l.getElementSettings.jltma_toggle_content_indicator_color),l.getElementSettings.jltma_toggle_content_indicator_speed.size&&(o.speed=l.getElementSettings.jltma_toggle_content_indicator_speed.size),elementorFrontend.isEditMode()&&(o.watchControls=!0),a.MA_ToggleElement(o)},MA_Comment_Form_reCaptcha:function(e,t){l.getElementSettings=n(e);var a=e.find(".jltma-comments-wrap");a.data("recaptcha"),a.data("jltma-comment-settings").reCaptchaprotected},MA_Counter_Up:function(e,t){var a=e.find(".jltma-counter-up-number");t.isFunction(t.fn.counterUp)&&a.counterUp({duration:2e3,delay:15})},MA_CountdownTimer:function(e,t){var a=e.find(".jltma-widget-countdown");t.fn.MasterCountDownTimer=function(){var e=t(this).find(".jltma-countdown-wrapper"),a={year:e.data("countdown-year"),month:e.data("countdown-month"),day:e.data("countdown-day"),hour:e.data("countdown-hour"),min:e.data("countdown-min"),sec:e.data("countdown-sec")},n=(e.data("countdown-infinite"),new Date(a.year,a.month,a.day,a.hour,a.min,a.sec)),o=e.find(".jltma-countdown-year"),i=e.find(".jltma-countdown-month"),r=e.find(".jltma-countdown-day"),l=e.find(".jltma-countdown-hour"),s=e.find(".jltma-countdown-min"),d=e.find(".jltma-countdown-sec"),c=setInterval(function(){var e=new Date,t=(Date.parse(n)-Date.parse(e))/1e3;if(t<=0)return o.text(0),i.text(0),r.text(0),l.text(0),s.text(0),d.text(0),void clearInterval(c);var a=t,m=Math.floor(a/31536e3);a%=31536e3;var f=Math.floor(a/2592e3);a%=2592e3;var p=Math.floor(a/86400);a%=86400;var u=Math.floor(a/3600);a%=3600;var _=Math.floor(a/60),v=Math.floor(a%60);o.text(m),i.text(f),r.text(p),l.text(u),s.text(_),d.text(v)},1e3)},a.each(function(){t(this).MasterCountDownTimer()})},MA_Fancybox_Popup:function(e,t){var a;(a=jQuery).isFunction(a.fn.fancybox)&&a("[data-fancybox]").fancybox({})},MA_Reveal:function(e,t){var a;if(l.MA_Reveal.elementSettings=n(e),l.MA_Reveal.revealAction=function(){a=new RevealFx(i,{revealSettings:{bgcolor:l.MA_Reveal.elementSettings.reveal_bgcolor,direction:l.MA_Reveal.elementSettings.reveal_direction,duration:100*Number(l.MA_Reveal.elementSettings.reveal_speed.size),delay:100*Number(l.MA_Reveal.elementSettings.reveal_delay.size),onCover:function(e,t){e.style.opacity=1}}})},l.MA_Reveal.runReveal=function(){a.reveal()},l.MA_Reveal.elementSettings.enabled_reveal){var o="#reveal-"+e.data("id"),i=document.querySelector(o);jQuery(o).hasClass("block-revealer")||l.MA_Reveal.revealAction(),l.MA_Reveal.waypointOptions={offset:"100%",triggerOnce:!0},r(i,l.MA_Reveal.runReveal,l.MA_Reveal.waypointOptions)}},MA_Rellax:function(e,t){var o=n(e),i=null;t(window).on("resize",function(){i&&(i.destroy(),i&&r())});var r=function(){if(o.enabled_rellax){if("undefined"==typeof Rellax)return;var n="speed_rellax",r=0;"desktop"!=(a=elementorFrontend.getCurrentDeviceMode())&&(n="speed_rellax_"+a);var l=o[n];l&&void 0!==l.size&&(r=l.size);var s="#rellax-"+e.data("id");if(t(s).length)try{i=new Rellax(s,{speed:r})}catch(e){}}};r()},MA_Rellax_Final:function(e,t,a){l.getElementSettings=n(o);var o=a.$el;o.find("#scene")},MA_Entrance_Animation:function(e,t){var a=(e=e||t(this)).hasClass("jltma-appear-watch-animation")?e:e.find(".jltma-appear-watch-animation"),n=t("body").hasClass("jltma-page-animation");a.length&&(n?document.body.addEventListener("JltmaPageAnimationDone",function(e){a.appearl({offset:"200px",insetOffset:"0px"}).one("appear",function(e,t){this.classList.add("jltma-animated"),this.classList.add("jltma-animated-once")})}):a.appearl({offset:"200px",insetOffset:"0px"}).one("appear",function(e,t){this.classList.add("jltma-animated"),this.classList.add("jltma-animated-once")}))},MA_Wrapper_Link:function(e,t){t("body").off("click.onWrapperLink","[data-jltma-wrapper-link]"),t("body").on("click.onWrapperLink","[data-jltma-wrapper-link]",function(e){e.preventDefault(),e.stopPropagation();var a=t(this),n=a.data("jltma-wrapper-link"),o=a.data("id"),i=document.createElement("a");i.id="master-addons-wrapper-link-"+o,i.href=n.url,i.target=n.is_external?"_blank":"_self",i.rel=n.nofollow?"nofollow noreferer":"",i.style.display="none",document.body.appendChild(i),document.getElementById(i.id),n&&n.url&&(n.is_external?window.open(n.url,"_blank",n.nofollow?"noopener,noreferrer":"noopener"):window.location.href=n.url)})},MA_Restrict_Content_Ajax:function(e,t){l.getElementSettings=n(e);var a=e.find(".jltma-restrict-content-wrap").eq(0),o=e.data("id"),i=a.data("restrict-layout-type"),r=a.data("restrict-type"),s=a.data("error-message"),d=(a.data("rc-ajaxify"),"ma_el_rc_"+o),c=e.find(".jltma-restrict-form").eq(0).data("form-id"),m=e.find(".jltma-restrict-content-popup-content"),f=a.data("content-pass")?a.data("content-pass"):"",p=m.data("popup-type")?m.data("popup-type"):"",u=e.find(".jltma-restrict-age-wrapper").eq(0),_={min_age:u.data("min-age"),age_type:u.data("age-type"),age_title:u.data("age-title"),age_content:u.data("age-content"),age_submit:t("#"+c).find('button[name="submit"]').val(),checkbox_msg:u.data("checkbox-msg")?u.data("checkbox-msg"):"",empty_bday:u.data("empty-bday")?u.data("empty-bday"):"",non_exist_bday:u.data("non-exist-bday")?u.data("non-exist-bday"):""};if(localStorage.getItem(d))t(".jltma-rc-button").addClass("d-none"),t("#"+c).addClass("d-none"),t("#jltma-restrict-age-"+o).removeClass("card"),t("#jltma-restrict-age-"+o).removeClass("text-center"),t("#restrict-content-"+o).addClass("d-block");else{if("popup"==i)var v="#jltma-rc-modal-"+o;else v="#jltma-restrict-content-"+o;t(v).on("click",".jltma_ra_select",function(){var e=t(this).closest(".jltma_ra_select_wrap");e.find(".jltma_ra_options").hasClass("jltma_ra_active")?e.find(".jltma_ra_options").removeClass("jltma_ra_active"):(t(".jltma_ra_options").removeClass("jltma_ra_active"),e.find(".jltma_ra_options").addClass("jltma_ra_active"),e.find(".jltma_ra_options").find('li:contains("'+e.find(".jltma_ra_select_val").html()+'")').addClass("jltma_ra_active"))}),t(v).on("click",".jltma_ra_options ul li",function(){var e=t(this).closest(".jltma_ra_select_wrap");e.find(".jltma_ra_select_val").html(t(this).html()),e.find("select").val(t(this).attr("data-val")),e.find(".jltma_ra_options").removeClass("jltma_ra_active")}),t(v).on("mouseover",".jltma_ra_options ul li",function(){t(".jltma_ra_options ul li").hasClass("jltma_ra_active")&&t(".jltma_ra_options ul li").removeClass("jltma_ra_active")}),t(document).click(function(e){"jltma_ra_select"==t(e.target).attr("class")||t(".jltma_ra_select").find(t(e.target)).length||t(".jltma_ra_options.jltma_ra_active").length&&t(".jltma_ra_options").removeClass("jltma_ra_active")}),"windowload"==p||"windowloadfullscreen"==p?t("#ma-el-rc-modal-hidden").fancybox().trigger("click"):t("[data-fancybox]").fancybox({}),t(v).on("submit","#"+c,function(e){e.preventDefault();var a=t(this);a.find(".jltma_rc_result").remove(),t.ajax({type:"POST",url:JLTMA_SCRIPTS.ajaxurl,data:{action:"jltma_restrict_content",fields:a.serialize(),restrict_type:r,error_message:s,content_pass:f,restrict_age:_},cache:!1,success:function(e){try{if("success"==(e=jQuery.parseJSON(e)).result)t("#restrict-content-"+o).removeClass("d-none").addClass("d-block"),t("#"+c).addClass("d-none"),t("#jltma-restrict-age-"+o).removeClass("card"),t("#jltma-restrict-age-"+o).removeClass("text-center"),localStorage.setItem(d,!0),t.fancybox.close(),t(".jltma-rc-button").addClass("d-none");else{if("validate"!=e.result)throw 0;t("#"+c+" .jltma_rc_submit").after('<div class="jltma_rc_result"><span class="eicon-info-circle-o"></span> '+e.output+"</div>")}}catch(e){t("#"+c+" .jltma_rc_submit").after('<div class="jltma_rc_result"><span class="eicon-loading"></span> Failed, please try again.</div>')}}})})}},MA_Restrict_Content:function(e,t){try{!function(t){l.getElementSettings=n(e);var a=e.find(".jltma-restrict-content-wrap").eq(0),o=(e.data("id"),a.data("restrict-layout-type"),a.data("restrict-type"),e.find(".jltma-restrict-content-popup-content"),a.data("content-pass"),e.find(".jltma-restrict-age-wrapper").eq(0));o.data("min-age"),o.data("age-type"),o.data("age-title"),o.data("age-content"),o.data("checkbox-msg"),l.MA_Restrict_Content_Ajax(e,t)}(jQuery)}catch(e){}},MA_Nav_Menu:function(e,t){l.getElementSettings=n(e);var a=e.find(".jltma-nav-menu-element"),o=a.data("menu-id"),i=a.data("menu-layout"),r=(a.data("menu-trigger"),a.data("menu-offcanvas")),s=a.data("menu-toggletype"),d=a.data("menu-animation"),c=a.data("menu-container-id"),m=a.data("sticky-type"),f=t("#"+c).outerHeight(),p=t("#"+c);if("onepage"==i)t(document).on("click",".jltma-navbar-nav li a",function(e){if(t(this).attr("href")){var a=t(this),n=a.get(0),o=n.href,i=o.indexOf("#"),r=a.parents(".jltma-navbar-nav-default").hasClass("jltma-one-page-enabled");-1!==i&&o.length>1&&r&&n.pathname==window.location.pathname&&(e.preventDefault(),a.parents(".jltma-menu-container").find(".jltma-close").trigger("click"))}}),t(document).on("click",function(e){t(e.target),!0===t(".navbar-collapse").hasClass("show")&&t(".jltma-one-page-enabled").removeClass("show")});else{var u=t(".jltma-dropdown.jltma-sub-menu");if(t("#"+o+" .jltma-menu-has-children").hover(function(){u.hasClass("fade-up")&&u.removeClass("fade-up"),u.hasClass("fade-down")&&u.removeClass("fade-down"),t(".jltma-dropdown.jltma-sub-menu").addClass(d)}),"fixed-onscroll"==m&&t(window).width()>768&&t(function(){t(window).scroll(function(){t(window).scrollTop()>=10?p.removeClass(""+c).addClass("jltma-on-scroll-fixed"):p.removeClass("jltma-on-scroll-fixed").addClass(""+c)})}),"sticky-top"==m&&t(window).width()>768&&t(function(){t(window).scroll(function(){t(window).scrollTop()>=10?p.removeClass(""+c).addClass("sticky-top"):p.removeClass("sticky-top").addClass(""+c)})}),"smart-scroll"==m&&(t("body").css("padding-top",f+"px"),p.addClass("jltma-smart-scroll"),t(".jltma-smart-scroll").length>0)){var _=0;t(window).on("scroll",function(){var e=t(this).scrollTop();e<_?t(".jltma-smart-scroll").removeClass("scrolled-down").addClass("scrolled-up"):t(".jltma-smart-scroll").removeClass("scrolled-up").addClass("scrolled-down"),_=e})}"nav-fixed-top"==m&&t(window).width()>768&&t(function(){t("body").css("padding-top",f+"px"),p.addClass("jltma-fixed-top")}),"toggle"==s&&t("#"+o+" .navbar-nav.toggle .jltma-menu-dropdown-toggle").click(function(e){t(this).parents(".dropdown").toggleClass("open"),e.stopPropagation()}),"toggle-bar"==r&&t(".jltma-nav-panel .navbar-toggler").on("click",function(e){t(".jltma-burger").toggleClass("jltma-close")}),"offcanvas"!=r&&"overlay"!=r||(t(".jltma-nav-panel .navbar-toggler").on("click",function(e){e.preventDefault(),e.stopPropagation();var a=t(this).attr("data-trigger");t(a).toggleClass("show"),t("body").toggleClass("offcanvas-active"),t(".jltma-nav-panel ").toggleClass("offcanvas-nav"),"overlay"==r&&t(".jltma-nav-panel ").toggleClass("offcanvas-overlay")}),t(document).on("keydown",function(e){27===e.keyCode&&(t(".mobile-offcanvas").removeClass("show"),t(".desktop-offcanvas").removeClass("show"),t("body").removeClass("overlay-active"))}),t(".btn-close, .jltma-nav-panel .offcanvas-nav, .jltma-nav-panel.desktop .jltma-close, .jltma-close").click(function(e){t(".jltma-nav-panel ").removeClass("offcanvas-nav"),t(".mobile-offcanvas").removeClass("show"),t(".desktop-offcanvas").removeClass("show"),t("body").removeClass("offcanvas-active"),"overlay"==r&&t(".jltma-nav-panel ").removeClass("offcanvas-overlay")}))}},initEvents:function(e,t){e.find(".jltma-search-wrapper").eq(0).data("search-type");var a=e.find(".jltma-search-main-wrap"),n=document.getElementById("jltma-btn-search"),o=document.getElementById("jltma-btn-search-close"),i=e.find(".jltma-search"),r=i.find(".jltma-search__input");t(n).on("click",function(){a.addClass("main-wrap--move"),i.addClass("search--open"),setTimeout(function(){r.focus()},600)}),t(o).on("click",function(){a.removeClass("main-wrap--move"),i.removeClass("search--open"),r.blur(),r.value=""}),document.addEventListener("keyup",function(e){27==e.keyCode&&l.closeSearch()})},MA_Header_Search:function(e,t){t("body").addClass("js"),l.initEvents(e,t)}};function s(e){t(e).find(".jltma-fancybox").each(function(){const e=function(e){if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value}(t(this).data("caption")),a=/\son\w+\s*=/i.test(e),n=/<\s*script/i.test(e),o=/javascript:/i.test(e);e&&(a||n||o)&&(t(this).attr("data-caption",""),t(this).closest(".elementor-element").remove())})}t(document).ready(function(){s(document.body),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{1===e.nodeType&&s(e)})})}).observe(document.body,{childList:!0,subtree:!0})}),t(window).on("elementor/frontend/init",function(){elementorFrontend.isEditMode(),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_AnimatedGradient),elementorFrontend.hooks.addAction("frontend/element_ready/container",l.MA_AnimatedGradient),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_BgSlider),elementorFrontend.hooks.addAction("frontend/element_ready/container",l.MA_BgSlider),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_ParticlesBG),elementorFrontend.hooks.addAction("frontend/element_ready/container",l.MA_ParticlesBG),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_Reveal),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_Rellax),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_Wrapper_Link),elementorFrontend.hooks.addAction("frontend/element_ready/ma-headlines.default",l.MA_Animated_Headlines),elementorFrontend.hooks.addAction("frontend/element_ready/ma-advanced-accordion.default",l.MA_Accordion),elementorFrontend.hooks.addAction("frontend/element_ready/ma-tabs.default",l.MA_Tabs),elementorFrontend.hooks.addAction("frontend/element_ready/ma-progressbar.default",l.MA_ProgressBar),elementorFrontend.hooks.addAction("frontend/element_ready/ma-team-members-slider.default",l.MA_TeamSlider),elementorFrontend.hooks.addAction("frontend/element_ready/ma-image-carousel.default",l.MA_Image_Carousel),elementorFrontend.hooks.addAction("frontend/element_ready/ma-blog-post.default",l.MA_Blog),elementorFrontend.hooks.addAction("frontend/element_ready/ma-news-ticker.default",l.MA_NewsTicker),elementorFrontend.hooks.addAction("frontend/element_ready/ma-el-countdown-timer.default",l.MA_CountdownTimer),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-counter-up.default",l.MA_Counter_Up),elementorFrontend.hooks.addAction("frontend/element_ready/ma-piecharts.default",l.MA_PieCharts),elementorFrontend.hooks.addAction("frontend/element_ready/ma-timeline.default",l.MA_Timeline),elementorFrontend.hooks.addAction("frontend/element_ready/ma-image-filter-gallery.default",l.MA_Image_Filter_Gallery),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-gallery-slider.default",l.MA_Gallery_Slider),elementorFrontend.hooks.addAction("frontend/element_ready/ma-el-image-comparison.default",l.MA_Image_Comparison),elementorFrontend.hooks.addAction("frontend/element_ready/ma-el-restrict-content.default",l.MA_Restrict_Content),elementorFrontend.hooks.addAction("frontend/element_ready/ma-search.default",l.MA_Header_Search),elementorFrontend.hooks.addAction("frontend/element_ready/ma-progressbars.default",l.ProgressBars),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-instagram-feed.default",l.MA_Instagram_Feed),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-toggle-content.default",l.MA_Toggle_Content),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-comments.default",l.MA_Comment_Form_reCaptcha),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-logo-slider.default",l.MA_Logo_Slider),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-twitter-slider.default",l.MA_Twitter_Slider),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-advanced-image.default",l.MA_Advanced_Image),elementorFrontend.hooks.addAction("frontend/element_ready/ma-tooltip.default",l.MA_Tooltip),elementorFrontend.hooks.addAction("frontend/element_ready/ma-image-hotspot.default",l.MA_Image_Hotspot),elementorFrontend.hooks.addAction("frontend/element_ready/ma-pricing-table.default",l.MA_Pricing_Table),elementorFrontend.isEditMode()&&(elementorFrontend.hooks.addAction("frontend/element_ready/ma-headlines.default",l.MA_Animated_Headlines),elementorFrontend.hooks.addAction("frontend/element_ready/ma-piecharts.default",l.MA_PieCharts),elementorFrontend.hooks.addAction("frontend/element_ready/ma-progressbars.default",l.ProgressBars),elementorFrontend.hooks.addAction("frontend/element_ready/ma-progressbar.default",l.MA_ProgressBar),elementorFrontend.hooks.addAction("frontend/element_ready/ma-news-ticker.default",l.MA_NewsTicker),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-gallery-slider.default",l.MA_Gallery_Slider),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-counter-up.default",l.MA_Counter_Up),elementorFrontend.hooks.addAction("frontend/element_ready/ma-tooltip.default",l.MA_Tooltip))})}(jQuery); \ No newline at end of file +!function(t){"use strict";var a="",n=function(e,t){var a={},n=e.data("model-cid");if(elementorFrontend.isEditMode()&&n){var i=elementorFrontend.config.elements.data[n],r=i.attributes.widgetType||i.attributes.elType,l=elementorFrontend.config.elements.keys[r];l||(l=elementorFrontend.config.elements.keys[r]=[],jQuery.each(i.controls,function(e,t){t.frontend_available&&l.push(e)})),jQuery.each(i.getActiveControls(),function(e){-1!==l.indexOf(e)&&(a[e]=i.attributes[e])})}else a=e.data("settings")||{};return o(a,t)},o=function(e,t){if(t){var a=t.split("."),n=a.splice(0,1);if(!a.length)return e[n];if(!e[n])return;return this.getItems(e[n],a.join("."))}return e},i=function(e){return e.data("jltma-template-widget-id")?e.data("jltma-template-widget-id"):e.data("id")};function r(e,t){new IntersectionObserver(function(e,a){e.forEach(function(e){e.isIntersecting&&t(e)})},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).observe(e)}var l={animatedProgressbar:function(e,a,n,o,i,r,l){var s=".jltma-progress-bar-"+e;"line"==a&&new ldBar(s,{type:"stroke",path:"M0 10L100 10","aspect-ratio":"none",stroke:o,"stroke-trail":i,"stroke-width":r,"stroke-trail-width":l}).set(n),"line-bubble"==a&&(new ldBar(s,{type:"stroke",path:"M0 10L100 10","aspect-ratio":"none",stroke:o,"stroke-trail":i,"stroke-width":r,"stroke-trail-width":l}).set(n),t(t(".jltma-progress-bar-"+e).find(".ldBar-label")).animate({left:n+"%"},1e3,"swing")),"circle"==a&&new ldBar(s,{type:"stroke",path:"M50 10A40 40 0 0 1 50 90A40 40 0 0 1 50 10","stroke-dir":"normal",stroke:o,"stroke-trail":i,"stroke-width":r,"stroke-trail-width":l}).set(n),"fan"==a&&new ldBar(s,{type:"stroke",path:"M10 90A40 40 0 0 1 90 90",stroke:o,"stroke-trail":i,"stroke-width":r,"stroke-trail-width":l}).set(n)},MA_Accordion:function(e,t){var a=n(e),o=e.find(".jltma-accordion-header"),i=a.accordion_type,r=a.toggle_speed?a.toggle_speed:300;o.each(function(){t(this).hasClass("active-default")&&(t(this).addClass("show active"),t(this).next().slideDown(r))}),o.unbind("click"),o.click(function(e){e.preventDefault();var a=t(this);"accordion"===i?a.hasClass("show")?(a.removeClass("show active"),a.next().slideUp(r)):(a.parent().parent().find(".jltma-accordion-header").removeClass("show active"),a.parent().parent().find(".jltma-accordion-tab-content").slideUp(r),a.toggleClass("show active"),a.next().slideDown(r)):a.hasClass("show")?(a.removeClass("show active"),a.next().slideUp(r)):(a.addClass("show active"),a.next().slideDown(r))})},MA_Tabs:function(e,t){try{a=jQuery,n=e.find("[data-tabs]"),o=n.data("tab-effect"),n.each(function(){var e=a(this),t=!1;e.find("[data-tab]").each(function(){a(this).hasClass("active")}),e.find(".jltma--advance-tab-content").each(function(){a(this).hasClass("active")&&(t=!0)}),t||e.find(".jltma--advance-tab-content").eq(0).addClass("active"),"hover"==o?e.find("[data-tab]").hover(function(){var e=a(this).data("tab-id");a(this).siblings().removeClass("active"),a(this).addClass("active"),a(this).closest("[data-tabs]").find(".jltma--advance-tab-content").removeClass("active"),a("#"+e).addClass("active")}):e.find("[data-tab]").click(function(){var e=a(this).data("tab-id");a(this).siblings().removeClass("active"),a(this).addClass("active"),a(this).closest("[data-tabs]").find(".jltma--advance-tab-content").removeClass("active"),a("#"+e).addClass("active")})})}catch(e){}var a,n,o},MA_ProgressBar:function(e,t){var a=e.data("id"),n=e.find(".jltma-progress-bar-"+a),o=n.data("type"),i=n.data("progress-bar-value"),r=n.data("progress-bar-stroke-width"),s=n.data("progress-bar-stroke-trail-width"),d=n.data("stroke-color"),c=n.data("stroke-trail-color");n.find("svg").remove(),n.find(".ldBar-label").remove(),n.removeClass("ldBar"),l.animatedProgressbar(a,o,i,d,c,r,s)},MA_Image_Hotspot:function(e,t){n(e);var a=e.find(".jltma-hotspots-container");if(a.length){var o=a.find("> .jltma-tooltip-item"),i=e.data("id");o.each(function(e){tippy(this,{allowHTML:!1,theme:"jltma-tippy-"+i})})}},MA_Pricing_Table:function(e,t){var a=e.find(".jltma-price-table-details ul");if(a.length){var n=a.find("> .jltma-tooltip-item"),o=e.data("id");n.each(function(e){tippy(this,{allowHTML:!1,theme:"jltma-pricing-table-tippy-"+o,appendTo:document.body})})}},JLTMA_Data_Table:function(t,a){var n=t.find(".jltma-data-table-container"),o=n.data("source"),i=n.data("sourcecsv");if(1==n.data("buttons"))var r="Bfrtip";else r="frtip";if("custom"==o){var l=t.find("table thead tr th").length;t.find("table tbody tr").each(function(){if(e(this).find("td").length<l){var t=l-e(this).find("td").length;e(this).append(new Array(++t).join("<td></td>"))}}),t.find(".jltma-data-table").DataTable({dom:r,paging:n.data("paging"),pagingType:"numbers",pageLength:n.data("pagelength"),info:n.data("info"),scrollX:!0,searching:n.data("searching"),ordering:n.data("ordering"),buttons:[{extend:"csvHtml5",text:JLTMA_DATA_TABLE.csvHtml5},{extend:"excelHtml5",text:JLTMA_DATA_TABLE.excelHtml5},{extend:"pdfHtml5",text:JLTMA_DATA_TABLE.pdfHtml5},{extend:"print",text:JLTMA_DATA_TABLE.print}],language:{lengthMenu:JLTMA_DATA_TABLE.lengthMenu,zeroRecords:JLTMA_DATA_TABLE.zeroRecords,info:JLTMA_DATA_TABLE.info,infoEmpty:JLTMA_DATA_TABLE.infoEmpty,infoFiltered:JLTMA_DATA_TABLE.infoFiltered,search:"",searchPlaceholder:JLTMA_DATA_TABLE.searchPlaceholder,processing:JLTMA_DATA_TABLE.processing}})}else"csv"==o&&function(n){var o=(n=n||{}).csv_path||"",i=t.element||a("#table-container"),r=t.csv_options||{},l=t.datatables_options||{},s=t.custom_formatting||[],d={};a.each(s,function(e,t){var a=t[0],n=t[1];d[a]=n});var c=a('<table class="jltma-data-table cell-border" style="width:100%;visibility:hidden;">');i.empty().append(c),a.when(a.get(o)).then(function(t){for(var n=e.csv.toArrays(t,r),o=a("<thead></thead>"),i=n[0],s=a("<tr></tr>"),m=0;m<i.length;m++)s.append(a("<th></th>").text(i[m]));o.append(s),c.append(o);for(var f=a("<tbody></tbody>"),p=1;p<n.length;p++)for(var u=a("<tr></tr>"),_=0;_<n[p].length;_++){var v=a("<td></td>"),g=d[_];g?v.html(g(n[p][_])):v.text(n[p][_]),u.append(v),f.append(u)}c.append(f),c.DataTable(l)})}({csv_path:i,element:n,datatables_options:{dom:r,paging:n.data("paging"),pagingType:"numbers",pageLength:n.data("pagelength"),info:n.data("info"),scrollX:!0,searching:n.data("searching"),ordering:n.data("ordering"),buttons:[{extend:"csvHtml5",text:JLTMA_DATA_TABLE.csvHtml5},{extend:"excelHtml5",text:JLTMA_DATA_TABLE.excelHtml5},{extend:"pdfHtml5",text:JLTMA_DATA_TABLE.pdfHtml5},{extend:"print",text:JLTMA_DATA_TABLE.print}],language:{lengthMenu:JLTMA_DATA_TABLE.lengthMenu,zeroRecords:JLTMA_DATA_TABLE.zeroRecords,info:JLTMA_DATA_TABLE.info,infoEmpty:JLTMA_DATA_TABLE.infoEmpty,infoFiltered:JLTMA_DATA_TABLE.infoFiltered,search:"",searchPlaceholder:JLTMA_DATA_TABLE.searchPlaceholder,processing:JLTMA_DATA_TABLE.processing}}});t.find(".jltma-data-table").css("visibility","visible")},JLTMA_Dropdown_Button:function(e,t){e.find(".jltma-dropdown").hover(function(){e.find(".jltma-dd-menu").addClass("jltma-dd-menu-opened")},function(){e.find(".jltma-dd-menu").removeClass("jltma-dd-menu-opened")})},JLTMA_WC_Add_To_Cart:function(e,t){t(document).on("click",".ajax_add_to_cart",function(e){t(this).append('<i class="fa fa-spinner animated rotateIn infinite"></i>')}),t(".jltma-wc-add-to-cart-btn-custom-js").each(function(e){var a=t(this).attr("data-jltma-wc-add-to-cart-btn-custom-css");t(a).appendTo("head")})},MA_Offcanvas_Menu:function(e,t){l.MA_Offcanvas_Menu.elementSettings=e.data("settings");var a="jltma-offcanvas-menu",n=e.data("id"),o=e.data("settings"),i=o.esc_close?o.esc_close:"",r={widget:a,triggerButton:"jltma-offcanvas__trigger",offcanvasContent:"jltma-offcanvas__content",offcanvasContentBody:"".concat(a,"__body"),offcanvasContainer:"".concat(a,"__container"),offcanvasContainerOverlay:"".concat(a,"__container__overlay"),offcanvasWrapper:"".concat(a,"__wrapper"),closeButton:"".concat(a,"__close"),menuArrow:"".concat(a,"__arrow"),menuInner:"".concat(a,"__menu-inner"),itemHasChildrenLink:"menu-item-has-children > a",contentClassPart:"jltma-offcanvas-content",contentOpenClass:"jltma-offcanvas-content-open",customContainer:"".concat(a,"__custom-container")},s={widget:".".concat(r.widget),triggerButton:".".concat(r.triggerButton),offcanvasContent:".".concat(r.offcanvasContent),offcanvasContentBody:".".concat(r.offcanvasContentBody),offcanvasContainer:".".concat(r.offcanvasContainer),offcanvasContainerOverlay:".".concat(r.offcanvasContainerOverlay),offcanvasWrapper:".".concat(r.offcanvasWrapper),closeButton:".".concat(r.closeButton),menuArrow:".".concat(r.menuArrow),menuParent:".".concat(r.menuInner," .").concat(r.itemHasChildrenLink),contentClassPart:".".concat(r.contentClassPart),contentOpenClass:".".concat(r.contentOpenClass),customContainer:".".concat(r.customContainer)},d={$document:jQuery(document),$html:jQuery(document).find("html"),$body:jQuery(document).find("body"),$outsideContainer:jQuery(s.offcanvasContainer),$containerOverlay:jQuery(s.offcanvasContainerOverlay),$triggerButton:e.find(s.triggerButton),$offcanvasContent:e.find(s.offcanvasContent),$offcanvasContentBody:e.find(s.offcanvasContentBody),$offcanvasContainer:e.find(s.offcanvasContainer),$offcanvasWrapper:e.find(s.offcanvasWrapper),$closeButton:e.find(s.closeButton),$menuParent:e.find(s.menuParent)};return l.MA_Offcanvas_Menu.resetCanvas=function(){var e=n;d.$html.addClass("".concat(r.offcanvasContent,"-widget")),d.$outsideContainer.length||(d.$body.append('<div class="'.concat(r.offcanvasContainerOverlay,'" />')),d.$body.wrapInner('<div class="'.concat(r.offcanvasContainer,'" />')),d.$offcanvasContent.insertBefore(s.offcanvasContainer));var t=d.$offcanvasWrapper.find(s.offcanvasContent);if(t.length){var a=d.$outsideContainer.find("> .".concat(r.contentClassPart,"-").concat(e));a.length&&a.remove();var o=d.$body.find("> .".concat(r.contentClassPart,"-").concat(e));o.length&&o.remove(),d.$html.hasClass(r.contentOpenClass)&&t.addClass("active"),d.$body.prepend(t)}},l.MA_Offcanvas_Menu.offcanvasClose=function(){var e=d.$html.data("open-id"),t=new RegExp("".concat(r.contentClassPart,"-.*")),a=d.$html.attr("class").split(/\s+/);jQuery("".concat(s.contentClassPart,"-").concat(e)).removeClass("active"),d.$triggerButton.removeClass("trigger-active"),a.forEach(function(e){e.match(t)&&d.$html.removeClass(e)}),d.$html.removeData("open-id")},l.MA_Offcanvas_Menu.containerClick=function(e){var t=d.$html.data("open-id");n===t&&o.overlay_close&&d.$html.hasClass(r.contentOpenClass)&&l.MA_Offcanvas_Menu.offcanvasClose()},l.MA_Offcanvas_Menu.closeESC=function(e){27===e.keyCode&&(l.MA_Offcanvas_Menu.offcanvasClose(),t(d.$triggerButton).removeClass("trigger-active"))},l.MA_Offcanvas_Menu.addLoaderIcon=function(){jQuery(document).find(".jltma-offcanvas__content").addClass("jltma-loading")},l.MA_Offcanvas_Menu.removeLoaderIcon=function(){jQuery(document).find(".jltma-offcanvas__content").removeClass("jltma-loading")},l.MA_Offcanvas_Menu.bindEvents=function(){d.$body.on("click",s.offcanvasContainerOverlay,l.MA_Offcanvas_Menu.containerClick.bind(this)),"yes"===i&&d.$document.on("keydown",l.MA_Offcanvas_Menu.closeESC.bind(this)),d.$triggerButton.on("click",l.MA_Offcanvas_Menu.offcanvasContent.bind(this)),d.$closeButton.on("click",l.MA_Offcanvas_Menu.offcanvasClose.bind(this)),d.$menuParent.on("click",l.MA_Offcanvas_Menu.onParentClick.bind(this)),t(d.$menuParent).on("change",function(){l.MA_Offcanvas_Menu.onParentClick.bind(t(this))}),t("[data-settings=animation_type]").on("click",function(){l.MA_Offcanvas_Menu.changeControl.bind(t(this))})},l.MA_Offcanvas_Menu.perfectScrollInit=function(){l.MA_Offcanvas_Menu.scrollPerfect?l.MA_Offcanvas_Menu.scrollPerfect.update():l.MA_Offcanvas_Menu.scrollPerfect=new PerfectScrollbar(d.$offcanvasContentBody.get(0),{wheelSpeed:.5,suppressScrollX:!0})},l.MA_Offcanvas_Menu.onEdit=function(){l.MA_Offcanvas_Menu.isEdit&&(void 0===$element.data("opened")&&$element.data("opened","false"),elementor.channels.editor.on("section:activated",l.MA_Offcanvas_Menu.sectionActivated.bind(this)))},l.MA_Offcanvas_Menu.sectionActivated=function(e,t){var a=elementorFrontend.config.elements.data[this.getModelCID()],n=t.getOption("editedElementView");if(this.getModelCID()===t.model.cid&&a.get("widgetType")===n.model.get("widgetType"))if(-1!==this.sectionsArray.indexOf(e)){if("true"===$element.data("opened")){var o=t.getOption("model");l.MA_Offcanvas_Menu.offcanvasContent(null,o.get("id"))}$element.data("opened","true")}else l.MA_Offcanvas_Menu.offcanvasClose()},l.MA_Offcanvas_Menu.offcanvasContent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=o.canvas_position,i=o.animation_type,l=n;null!==t&&(l=t),d.$triggerButton.addClass("trigger-active"),jQuery("".concat(s.contentClassPart,"-").concat(l)).addClass("active"),d.$html.addClass("".concat(r.contentOpenClass)).addClass("".concat(r.contentOpenClass,"-").concat(l)).addClass("".concat(r.contentClassPart,"-").concat(a)).addClass("".concat(r.contentClassPart,"-").concat(i)).data("open-id",l)},l.MA_Offcanvas_Menu.onParentClick=function(e){var t=jQuery(e.target),a=t.hasClass(r.menuArrow)?t.parent():t;!t.hasClass(r.menuArrow)&&-1===["","#"].indexOf(t.attr("href"))&&a.hasClass("active")||e.preventDefault();var n=a.next();a.removeClass("active"),n.slideUp("normal"),n.is("ul")&&!n.is(":visible")&&(a.addClass("active"),n.slideDown("normal"))},l.MA_Offcanvas_Menu.changeControl=function(){l.MA_Offcanvas_Menu.offcanvasClose()},l.MA_Offcanvas_Menu.onInit=function(){l.MA_Offcanvas_Menu.resetCanvas(),l.MA_Offcanvas_Menu.bindEvents()},l.MA_Offcanvas_Menu.onInit()},MA_Image_Filter_Gallery:function(e,t){var a=n(e),o=e.find(".jltma-image-filter-gallery-wrapper").eq(0),r=e.find(".jltma-image-filter-gallery"),l=e.find(".jltma-image-filter-nav"),s=e.find(".jltma-image-filter-gallery-wrapper"),d=i(e),c=a.ma_el_image_gallery_max_tilt,m=a.ma_el_image_gallery_perspective,f=a.ma_el_image_gallery_speed,p=a.ma_el_image_gallery_tilt_axis,u=a.ma_el_image_gallery_glare,_=(a.line_location,a.ma_el_image_gallery_tooltip),v=t(".elementor-element-"+d+" .jltma-image-filter-gallery"),g=s.hasClass("jltma-masonry-yes")?"masonry":"fitRows";if(o.length){if("yes"==_){var h=o.find("ul.jltma-tooltip");if(!h.length)return;var y=h.find("> .jltma-tooltip-item"),w=e.data("id");y.each(function(e){tippy(this,{allowHTML:!1,theme:"jltma-image-filter-tippy-"+w})})}var b={filter:"*",itemSelector:".jltma-image-filter-item",percentPosition:!0,animationOptions:{duration:750,easing:"linear",queue:!1}},A=Object.assign({},b);"fitRows"===g&&(b.layoutMode="fitRows"),"masonry"===g&&(A.macolumnWidthsonry=".jltma-image-filter-item",A.horizontalOrder=!0);var j=v.isotope(A);if(j.imagesLoaded().progress(function(){j.isotope("layout"),e.find(".jltma-image-filter-gallery").css({"min-height":"300px"})}),t.isFunction(t.fn.imagesLoaded)&&r.imagesLoaded(function(){t.isFunction(t.fn.isotope)&&r.isotope(b)}),p="x"===p?"y":"y"===p?"x":"both","yes"===u)var C=a.ma_el_image_gallery_max_glare;if(u="yes"===u,e.find(".jltma-tilt-enable")){var M={maxTilt:c,perspective:m,easing:"linear",scale:1,speed:f,disableAxis:p,transition:!0,reset:!0,glare:u,maxGlare:C};e.find(".jltma-tilt").tilt(M)}l.on("click","li",function(){if(l.find(".active").removeClass("active"),t(this).addClass("active"),t.isFunction(t.fn.isotope)){var e=t(this).attr("data-filter");return r.isotope({filter:e}),!1}}),t("jltma-fancybox").fancybox({protect:!0,animationDuration:366,transitionDuration:366,transitionEffect:"fade",animationEffect:"fade",preventCaptionOverlap:!0,infobar:!1,buttons:["zoom","share","slideShow","fullScreen","download","thumbs","close"],afterLoad:function(e,t){var a=window.devicePixelRatio||1;a>1.5&&(t.width=t.width/a,t.height=t.height/a)}})}},MA_Carousel:function(e,a){var n=e.find(".jltma-swiper__slide"),o=elementorFrontend.config.breakpoints,i=e.data("swiper"),r={autoHeight:a.element.autoHeight||!1,direction:a.element.direction||a.default.direction,effect:a.element.effect||a.default.effect,slidesPerView:a.default.slidesPerView,slidesPerColumn:a.default.slidesPerColumn,slidesPerColumnFill:"row",slidesPerGroup:a.default.slidesPerGroup,spaceBetween:a.default.spaceBetween,pagination:{},navigation:{},autoplay:a.element.autoplay||!1,grabCursor:!0,watchSlidesProgress:!0,watchSlidesVisibility:!0};return a.default.breakpoints&&(r.breakpoints={},r.breakpoints[o.md]=a.default.breakpoints.tablet,r.breakpoints[o.lg]=a.default.breakpoints.desktop),elementorFrontend.isEditMode()?(r.observer=!0,r.observeParents=!0,r.observeSlideChildren=!0):a.element.freeMode||(r.observer=!0,r.observeParents=!0,r.observeSlideChildren=!0),l.MA_Carousel.init=function(){if(!i){if(r.breakpoints&&(a.element.breakpoints.desktop.slidesPerView&&(r.breakpoints[o.lg].slidesPerView=a.stretch?Math.min(n.length,+a.element.breakpoints.desktop.slidesPerView||3):+a.element.breakpoints.desktop.slidesPerView||3),a.element.breakpoints.tablet.slidesPerView&&(r.breakpoints[o.md].slidesPerView=a.stretch?Math.min(n.length,+a.element.breakpoints.tablet.slidesPerView||2):+a.element.breakpoints.tablet.slidesPerView||2)),a.element.slidesPerView&&(r.slidesPerView=a.stretch?Math.min(n.length,+a.element.slidesPerView||1):+a.element.slidesPerView||1),r.breakpoints&&(a.element.breakpoints.desktop.slidesPerGroup&&(r.breakpoints[o.lg].slidesPerGroup=Math.min(n.length,+a.element.breakpoints.desktop.slidesPerGroup||3)),a.element.breakpoints.tablet.slidesPerGroup&&(r.breakpoints[o.md].slidesPerGroup=Math.min(n.length,+a.element.breakpoints.tablet.slidesPerGroup||2))),a.element.slidesPerGroup&&(r.slidesPerGroup=Math.min(n.length,+a.element.slidesPerGroup||1)),r.breakpoints&&(a.element.breakpoints.desktop.slidesPerColumn&&(r.breakpoints[o.lg].slidesPerColumn=a.element.breakpoints.desktop.slidesPerColumn),a.element.breakpoints.tablet.slidesPerColumn&&(r.breakpoints[o.md].slidesPerColumn=a.element.breakpoints.tablet.slidesPerColumn)),a.element.slidesPerColumn&&(r.slidesPerColumn=a.element.slidesPerColumn),r.breakpoints&&(r.breakpoints[o.lg].spaceBetween=a.element.breakpoints.desktop.spaceBetween||0,r.breakpoints[o.md].spaceBetween=a.element.breakpoints.tablet.spaceBetween||0),a.element.spaceBetween&&(r.spaceBetween=a.element.spaceBetween||0),a.element.slidesPerColumnFill&&(r.slidesPerColumnFill=a.element.slidesPerColumnFill),a.element.arrows){r.navigation.disabledClass="jltma-swiper__button--disabled";var e=a.scope.find(a.element.arrowPrev),t=a.scope.find(a.element.arrowNext);if(e.length&&t.length){var s=a.element.arrowPrev+"-"+a.id,d=a.element.arrowNext+"-"+a.id;e.addClass(s.replace(".","")),t.addClass(d.replace(".","")),r.navigation.prevEl=s,r.navigation.nextEl=d}}return a.element.pagination&&(r.pagination.el=".jltma-swiper__pagination-"+a.id,r.pagination.type=a.element.paginationType,a.element.paginationClickable&&(r.pagination.clickable=!0)),a.element.loop&&(r.loop=!0),r.autoplay&&(a.element.autoplaySpeed||a.element.disableOnInteraction)&&(r.autoplay={},a.element.autoplaySpeed&&(r.autoplay.delay=a.element.autoplaySpeed),a.element.autoplaySpeed&&(r.autoplay.disableOnInteraction=a.element.disableOnInteraction)),a.element.speed&&(r.speed=a.element.speed),a.element.resistance&&(r.resistanceRatio=1-a.element.resistance),a.element.freeMode&&(r.freeMode=!0,r.freeModeSticky=a.element.freeModeSticky,r.freeModeMomentum=a.element.freeModeMomentum,r.freeModeMomentumBounce=a.element.freeModeMomentumBounce,a.element.freeModeMomentumRatio&&(r.freeModeMomentumRatio=a.element.freeModeMomentumRatio),a.element.freeModeMomentumVelocityRatio&&(r.freeModeMomentumVelocityRatio=a.element.freeModeMomentumVelocityRatio),a.element.freeModeMomentumBounceRatio&&(r.freeModeMomentumBounceRatio=a.element.freeModeMomentumBounceRatio)),r}l.MA_Carousel.destroy()},l.MA_Carousel.onAfterInit=function(e,a,n){void 0!==n&&void 0!==a&&(n.element.stopOnHover&&(e.on("mouseover",function(){a.autoplay.stop()}),e.on("mouseout",function(){a.autoplay.start()})),n.element.slideChangeTriggerResize&&a.on("slideChange",function(){t(window).trigger("resize")}),e.data("swiper",a))},l.MA_Carousel.init()},MA_Gallery_Slider:function(e,t){var a=n(e),o=e.find(".jltma-gallery-slider__slider"),r=e.find(".jltma-gallery-slider__carousel"),s=i(e),d=(e.data("id"),e.find(".jltma-gallery-slider__preview"),e.find(".jltma-swiper__wrapper .jltma-gallery__item"),e.find(".jltma-gallery-slider__gallery .jltma-gallery"),a.jltma_gallery_slider_thumb_type,a.jltma_gallery_slider_preview_position,elementorFrontend.config.is_rtl,elementorFrontend.config.is_rtl,r.length),c=null,m={key:"slider",scope:e,id:s,element:{autoHeight:"yes"===a.jltma_gallery_slider_adaptive_height,autoplay:"yes"===a.jltma_gallery_slider_autoplay,autoplaySpeed:!("yes"!==a.jltma_gallery_slider_autoplay||!a.jltma_gallery_slider_autoplay_speed)&&a.jltma_gallery_slider_autoplay_speed.size,disableOnInteraction:""!==a.autoplay_disable_on_interaction,stopOnHover:"yes"===a.jltma_gallery_slider_pause_on_hover,loop:"yes"===a.jltma_gallery_slider_infinite,arrows:""!==a.jltma_gallery_slider_show_arrows,arrowPrev:".jltma-arrow--prev",arrowNext:".jltma-arrow--next",effect:a.jltma_gallery_slider_effect,speed:a.jltma_gallery_slider_speed?a.jltma_gallery_slider_speed:500,resistance:a.resistance?a.resistance.size:.25,keyboard:{enabled:!0}},default:{effect:"slide",direction:"horizontal",slidesPerView:1,slidesPerGroup:1,slidesPerColumn:1,spaceBetween:0}};if(d)var f={key:"carousel",scope:e,id:s,element:{direction:a.carousel_orientation,arrows:""!==a.jltma_gallery_slider_thumb_show_arrows,arrowPrev:".jltma-arrow--prev",arrowNext:".jltma-arrow--next",autoHeight:!1,loop:"yes"===a.jltma_gallery_slider_thumb_infinite,autoplay:"yes"===a.jltma_gallery_slider_thumb_autoplay,autoplaySpeed:!("yes"!==a.jltma_gallery_slider_thumb_autoplay||!a.jltma_gallery_slider_thumb_autoplay_speed)&&a.jltma_gallery_slider_thumb_autoplay_speed.size,stopOnHover:"yes"===a.jltma_gallery_slider_thumb_pause_on_hover,speed:a.jltma_gallery_slider_thumb_speed?a.jltma_gallery_slider_thumb_speed:500,slidesPerView:a.jltma_gallery_slider_thumb_items_mobile,slidesPerColumn:"vertical"===a.carousel_orientation?1:a.carousel_slides_per_column_mobile,slidesPerGroup:a.carousel_slides_to_scroll_mobile,resistance:a.carousel_resistance?a.carousel_resistance.size:.15,spaceBetween:a.carousel_spacing_mobile?a.carousel_spacing_mobile.size:0,breakpoints:{tablet:{slidesPerView:a.jltma_gallery_slider_thumb_items_tablet,slidesPerColumn:"vertical"===a.carousel_orientation?1:a.carousel_slides_per_column_tablet,slidesPerGroup:a.carousel_slides_to_scroll_tablet,spaceBetween:a.carousel_spacing_tablet?a.carousel_spacing_tablet.size:0},desktop:{slidesPerView:a.jltma_gallery_slider_thumb_items,slidesPerColumn:"vertical"===a.carousel_orientation?1:a.carousel_slides_per_column,slidesPerGroup:a.carousel_slides_to_scroll,spaceBetween:a.carousel_spacing?a.carousel_spacing.size:0}}},default:{effect:"slide",slidesPerView:1,slidesPerGroup:1,slidesPerColumn:1,spaceBetween:6,breakpoints:{tablet:{slidesPerView:2,slidesPerGroup:1,slidesPerColumn:2,spaceBetween:12},desktop:{slidesPerView:3,slidesPerGroup:1,slidesPerColumn:3,spaceBetween:24}}}};l.MA_Gallery_Slider.init=function(){var t=l.MA_Carousel(o,m);if(d)var a=l.MA_Carousel(r,f);if("undefined"==typeof Swiper){const n=elementorFrontend.utils.swiper;new n(o,t).then(function(t){d?new n(r,a).then(function(a){l.MA_Gallery_Slider.initSliders(e,t,a),l.MA_Carousel.onAfterInit(o,t,m),l.MA_Carousel.onAfterInit(r,a,f)}):(l.MA_Gallery_Slider.initSliders(e,t,!1),l.MA_Carousel.onAfterInit(o,t,m))})}else{if(d)var n=new Swiper(o[1],{...a}),i=new Swiper(o[0],{...t,thumbs:{swiper:n}});else i=new Swiper(o[0],{...t});d&&(c=new Swiper(r,a)),l.MA_Gallery_Slider.initSliders(e,i,c),l.MA_Carousel.onAfterInit(o,i,m),d&&l.MA_Carousel.onAfterInit(r,c,f)}},l.MA_Gallery_Slider.getSlider=function(){return e.find(".jltma-gallery-slider__slider")},l.MA_Gallery_Slider.getCarousel=function(){return e.find(".jltma-gallery-slider__carousel")},l.MA_Gallery_Slider.initSliders=function(e,t,a){var n={scope:e,slider:t,carousel:a};l.MA_Gallery_Slider.onSlideChange(n),l.MA_Gallery_Slider.events(n)},l.MA_Gallery_Slider.events=function(e){var a=e.scope.find(".jltma-gallery__item");e.slider.on("slideChange",function(t){l.MA_Gallery_Slider.onSlideChange(e)}),a.on("click",function(){var a=m.element.loop?1:0;event.preventDefault(),e.slider.slideTo(t(this).index()+a)})},l.MA_Gallery_Slider.onSlideChange=function(e){var t=m.element.loop?e.slider.realIndex:e.slider.activeIndex;d&&e.carousel.slideTo(t);var a=e.scope.find(".jltma-gallery__item");a.removeClass("is--active"),a.eq(t).addClass("is--active")},l.MA_Gallery_Slider.onThumbClicked=function(e){var a=m.element.loop?1:0;e.preventDefault(),null.slideTo(t(this).index()+a,500,!0)},l.onElementRemove(e,function(){e.find(".swiper-container").each(function(){t(this).data("swiper")&&t(this).data("swiper").destroy()})}),l.MA_Gallery_Slider.init()},onElementRemove:function(e,t){elementorFrontend.isEditMode()&&elementor.channels.data.on("element:before:remove",function(a){e.data("id")===a.id&&t()})},MA_Timeline:function(e,t){var a=n(e),o=e.find(".jltma-timeline"),r=e.find(".jltma-timeline-slider"),s=a.ma_el_timeline_type||"custom",d=a.ma_el_timeline_design_type||"vertical",c={};if(r.length,i(e),"horizontal"===d){var m=e.find(".jltma-timeline-carousel-slider");if(!m.length)return;var f=e.find(".swiper"),p=m.data("settings"),u=elementorFrontend.utils.swiper;async function _(){await new u(f[0],p),p.pauseOnHover&&f.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}_()}"vertical"!==d&&"post"!==s||(o=e.find(".jltma-timeline"),c={},l.MA_Timeline.init=function(){elementorFrontend.isEditMode()&&(c.scope=window.elementor.$previewContents),void 0!==a.line_location&&a.line_location.size&&(c.lineLocation=a.line_location.size),o.maTimeline(c)},l.MA_Timeline.init())},MA_NewsTicker:function(e,t){try{var a=e.find(".jltma-news-ticker"),n=(a.data("tickertype"),a.data("tickerid"),a.data("feedurl"),a.data("feedanimation"),a.data("limitposts"),a.data("scroll")||"slide-h"),o=a.data("autoplay"),i=a.data("timer")||3e3,r=e.find(".jltma-ticker-content-inner.swiper")[0];if(!r)return;var l={loop:!0,slidesPerView:1,spaceBetween:0,speed:500,navigation:{nextEl:e.find(".jltma-ticker-next")[0],prevEl:e.find(".jltma-ticker-prev")[0]}};"slide-v"===n?l.direction="vertical":"scroll-h"===n?(l.direction="horizontal",l.freeMode={enabled:!0,momentum:!1},l.speed=5e3,l.autoplay={delay:0,disableOnInteraction:!1,pauseOnMouseEnter:!0}):l.direction="horizontal",o&&"scroll-h"!==n&&(l.autoplay={delay:i,disableOnInteraction:!1,pauseOnMouseEnter:!0}),new Swiper(r,l)}catch(e){console.log("News Ticker Error:",e)}},MA_Blog:function(e,t){n(e),i(e),e.data("id"),e.find(".jltma-swiper__container"),e.find(".jltma-grid__item");var a=e.find(".jltma-blog-wrapper"),o=(a.data("col"),a.data("carousel"));a.data("grid"),e.find(".jltma-blog-cats-container li a").click(function(n){n.preventDefault(),e.find(".jltma-blog-cats-container li .active").removeClass("active"),t(this).addClass("active");var o=t(this).attr("data-filter");return a.isotope({filter:o}),!1}),a.hasClass("jltma-blog-masonry")&&!o&&a.imagesLoaded(function(){a.isotope({itemSelector:".jltma-post-outer-container",percentPosition:!0,animationOptions:{duration:750,easing:"linear",queue:!1}})});var r=e.find(".jltma-blog-carousel-slider");if(r.length){var l=e.find(".swiper"),s=r.data("settings"),d=elementorFrontend.utils.swiper;!async function(){await new d(l[0],s),s.pauseOnHover&&l.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}()}},MA_Image_Carousel:function(e,t){var a=e.find(".jltma-image-carousel-slider");if(a.length){var n=e.find(".swiper"),o=a.data("settings"),i=elementorFrontend.utils.swiper;!async function(){await new i(n[0],o),o.pauseOnHover&&n.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}()}},MA_Logo_Slider:function(e,t){var a=e.find(".jltma-logo-carousel-slider");if(a.length){var n=e.find(".swiper"),o=a.data("settings"),i=elementorFrontend.utils.swiper;!async function(){await new i(n[0],o),o.pauseOnHover&&n.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}(),a.find(".jltma-logo-slider-figure").on("click",".item-hover-icon",function(){var e=t(this);e.toggleClass("hide"),e.siblings(".jltma-hover-click").toggleClass("show")}),a.find(".jltma-logo-slider-item").each(function(e){var a=t(this).attr("id");if(a){var n,o=t(this).data("id"),i=t(this).data("tooltip-settings"),r="#"+a;n=1==i.follow_cursor?{followCursor:!0}:{placement:i.placement,followCursor:!1};var l=!1;1==i.arrow&&(l="round"!=i.arrow_type||tippy.roundArrow),tippy(r,{content:i.text,...n,animation:i.animation,arrow:l,duration:i.duration,delay:i.delay,trigger:i.trigger,offset:[i.x_offset,i.y_offset],zIndex:999999,allowHTML:!1,theme:"jltma-tippy-"+o,onShow(e){var a=e.popper;t(a).addClass(o)}})}})}},MA_TeamSlider:function(e,t){if("-content-drawer"==e.find(".jltma-team-carousel-wrapper").eq(0).data("team-preset"))try{jQuery(".gridder").gridderExpander({scroll:!1,scrollOffset:0,scrollTo:"panel",animationSpeed:400,animationEasing:"easeInOutExpo",showNav:!0,nextText:"<span></span>",prevText:"<span></span>",closeText:"",onStart:function(){},onContent:function(){},onClosed:function(){}})}catch(r){}else{var a=e.find(".jltma-team-carousel-slider");if(!a.length)return;var n=e.find(".swiper"),o=a.data("settings"),i=elementorFrontend.utils.swiper;async function l(){await new i(n[0],o),o.pauseOnHover&&n.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}l()}},MA_Advanced_Image:function(e,t){l.MA_Advanced_Image.elementSettings=n(e),e.find(".jltma-img-dynamic-dropshadow").each(function(){var e,t,a;if(this instanceof jQuery){if(!this||!this[0])return;a=this[0]}else a=this;a.classList.contains("jltma-img-has-shadow")||(e=document.createElement("div"),(t=a.cloneNode()).classList.add("jltma-img-dynamic-dropshadow-cloned"),t.classList.remove("jltma-img-dynamic-dropshadow"),a.classList.add("jltma-img-has-shadow"),e.classList.add("jltma-img-dynamic-dropshadow-frame"),a.parentNode.appendChild(e),e.appendChild(a),e.appendChild(t))}),e.find(".jltma-tilt-box").tilt({maxTilt:t(this).data("max-tilt"),easing:"cubic-bezier(0.23, 1, 0.32, 1)",speed:t(this).data("time"),perspective:2e3})},MA_Tooltip:function(e,t){if(e&&e.length&&t)if("undefined"!=typeof tippy){e.removeData("ma-tooltip-retry");var a=n(e),o=e.data("id"),i=null;if(o&&"string"==typeof o){try{if(!(i=document.getElementById("jltma-tooltip-"+o))){var r=e.find("#jltma-tooltip-"+o);if(r&&r.length>0){var s=r[0];s&&1===s.nodeType&&(i=s)}}if(!i||!i.nodeType||1!==i.nodeType)return;if(i.jquery&&(!(i=i[0])||!i.nodeType))return}catch(e){return}var d=function(){try{if(i&&i._maTooltipInitializing)return;if(!a||"object"!=typeof a)return;var t=a.ma_el_tooltip_text;if(!t||"string"!=typeof t)return;i&&(i._maTooltipInitializing=!0);var n=t.replace(/<\/?[^>]+(>|$)/g,""),r=a.ma_el_tooltip_direction||"top",l=a.jltma_tooltip_animation||"shift-away",s=!1!==a.jltma_tooltip_arrow,d=parseInt(a.jltma_tooltip_duration)||300,c=parseInt(a.jltma_tooltip_delay)||300,m=a.jltma_tooltip_arrow_type||"sharp",f=a.jltma_tooltip_trigger||"mouseenter",p=a.jltma_tooltip_custom_trigger,u="fill"===a.jltma_tooltip_animation;d=Math.max(100,Math.min(5e3,d)),c=Math.max(0,Math.min(5e3,c));var _=0,v=0;try{a.jltma_tooltip_x_offset&&void 0!==a.jltma_tooltip_x_offset.size&&(_=parseInt(a.jltma_tooltip_x_offset.size)||0),a.jltma_tooltip_y_offset&&void 0!==a.jltma_tooltip_y_offset.size&&(v=parseInt(a.jltma_tooltip_y_offset.size)||0)}catch(e){_=0,v=0}var g=200;try{a.ma_el_tooltip_text_width&&a.ma_el_tooltip_text_width.size&&(g=parseInt(a.ma_el_tooltip_text_width.size)||200)}catch(e){g=200}if(!i||!i.nodeType||1!==i.nodeType)return;if(!n||!n.trim())return;try{var h=i.parentElement;if(h&&h.classList&&h.classList.contains("jltma-tooltip-element"))return}catch(e){}var y={content:n,animation:l,arrow:s,duration:[d,c],trigger:f,animateFill:u,flipOnUpdate:!0,maxWidth:Math.max(50,Math.min(1e3,g)),zIndex:999,allowHTML:!1,theme:"jltma-tooltip-tippy-"+o,interactive:!0,hideOnClick:!0,offset:[Math.max(-500,Math.min(500,_)),Math.max(-500,Math.min(500,v))],appendTo:function(){try{return"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode()?document.body:"parent"}catch(e){return"parent"}},onShow:function(e){try{e&&e.popper&&"undefined"!=typeof jQuery&&jQuery(e.popper).attr("data-tippy-popper-id",o)}catch(e){}},onCreate:function(e){try{e&&e.reference&&!e.reference.nodeType&&e.reference.jquery&&(e.reference=e.reference[0])}catch(e){}},onDestroy:function(){i&&(i._tippyInstance=null)}};if(s&&"round"===m)try{"undefined"!=typeof tippy&&tippy.roundArrow&&(y.arrow=tippy.roundArrow)}catch(e){y.arrow=!0}if("yes"===a.jltma_tooltip_follow_cursor||!0===a.jltma_tooltip_follow_cursor?y.followCursor=!0:r&&"string"==typeof r&&-1!==["top","bottom","left","right","top-start","top-end","bottom-start","bottom-end","left-start","left-end","right-start","right-end","auto"].indexOf(r)&&(y.placement=r),"manual"===f&&p&&"string"==typeof p)try{var w=p.replace(/[<>'"]/g,""),b=document.querySelector(w);if(b&&1===b.nodeType){y.trigger="manual",y.hideOnClick=!1;var A=function(){var e=i;e&&e.jquery&&(e=e[0]);var t=e?e._tippyInstance:null;t&&t.state&&(t.state.isVisible?t.hide():(t.show(),setTimeout(function(){t&&!t.state.isDestroyed&&t.hide()},1500)))};b.addEventListener("click",A),i._maTooltipCleanup||(i._maTooltipCleanup=[]),i._maTooltipCleanup.push({element:b,event:"click",handler:A})}}catch(e){}try{['[data-tippy-popper-id="'+o+'"]',".tippy-popper[data-tippy-root]",'.tippy-box[data-theme*="'+o+'"]'].forEach(function(e){try{document.querySelectorAll(e).forEach(function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}catch(e){}}),i._tippyInstance&&(i._tippyInstance.destroy(),i._tippyInstance=null),i._tippy&&(i._tippy.destroy(),i._tippy=null),i._maTooltipCleanup&&(i._maTooltipCleanup.forEach(function(e){try{e.element.removeEventListener(e.event,e.handler)}catch(e){}}),i._maTooltipCleanup=[])}catch(e){}if(!i||!i.nodeType||1!==i.nodeType)return;var j={};for(var C in y)y.hasOwnProperty(C)&&(j[C]=y[C]);if("function"==typeof j.appendTo)try{var M=j.appendTo();"parent"===M?j.appendTo="parent":M&&M.nodeType?j.appendTo=M:j.appendTo="parent"}catch(e){j.appendTo="parent"}try{var k=i;if(k&&k.jquery&&(k=k[0]),!k||!k.nodeType||1!==k.nodeType)throw new Error("Invalid DOM element for tooltip");var T=tippy(k,j);T&&Array.isArray(T)&&T.length>0&&(k._tippyInstance=T[0],i._tippyInstance=T[0],e.data("ma-tooltip-active",!0))}catch(e){return}finally{i&&(i._maTooltipInitializing=!1)}}catch(e){return void(i&&(i._maTooltipInitializing=!1))}};if(d(),"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode())try{e.data("ma-tooltip-initialized",!0);var c=null,m=!1;if("undefined"!=typeof elementorModules&&elementorModules.frontend&&elementorModules.frontend.handlers&&elementorModules.frontend.handlers.Base){var f=elementorModules.frontend.handlers.Base.extend({onElementChange:function(t){!t||"string"!=typeof t||0!==t.indexOf("ma_el_tooltip")&&0!==t.indexOf("jltma_tooltip")||m||(c&&clearTimeout(c),c=setTimeout(function(){try{m=!0,a=n(e),document.querySelectorAll(".tippy-popper:not([data-tippy-popper-id])").forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),d(),c=null,setTimeout(function(){m=!1},100)}catch(e){m=!1}},200))},onDestroy:function(){if(c&&clearTimeout(c),i&&i._tippyInstance)try{i._tippyInstance.destroy()}catch(e){}}});try{elementorFrontend.elementsHandler.addHandler(f,{$element:e})}catch(t){e.one("remove",function(){if(c&&clearTimeout(c),i&&i._tippyInstance)try{i._tippyInstance.destroy()}catch(e){}})}}}catch(e){}if("undefined"!=typeof window&&window.addEventListener){var p=function(){if(i){if(i._tippyInstance)try{i._tippyInstance.destroy()}catch(e){}i._maTooltipCleanup&&i._maTooltipCleanup.forEach(function(e){try{e.element.removeEventListener(e.event,e.handler)}catch(e){}})}};window.addEventListener("beforeunload",p),window.addEventListener("pagehide",p)}}}else{var u=(e.data("ma-tooltip-retry")||0)+1;u<=10&&(e.data("ma-tooltip-retry",u),setTimeout(function(){l.MA_Tooltip(e,t)},100))}},MA_Twitter_Slider:function(e,t){var a=e.find(".jltma-twitter-carousel-slider");if(a.length){var n=e.find(".swiper"),o=a.data("settings"),i=elementorFrontend.utils.swiper;!async function(){await new i(n[0],o),o.pauseOnHover&&n.hover(function(){this.swiper.autoplay.stop()},function(){this.swiper.autoplay.start()})}()}},MA_ParticlesBG:function(e,t){function a(){return"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode()}if(e.hasClass("jltma-particle-yes")||e.attr("data-jltma-particle")||e.find(".jltma-particle-wrapper").attr("data-jltma-particles-editor")){let t,n=e.data("element_type"),o=encodeURIComponent(e.data("id"));if(t=a()?e.find(".jltma-particle-wrapper").attr("data-jltma-particles-editor"):e.attr("data-jltma-particle"),("section"===n||"column"===n||"container"===n)&&t)if(a())if(e.hasClass("jltma-particle-yes"))try{let a=JSON.parse(t);particlesJS("jltma-particle-"+o,a),e.find(".elementor-column").css("z-index",9),setTimeout(function(){window.dispatchEvent(new Event("resize"))},500),setTimeout(function(){window.dispatchEvent(new Event("resize"))},1500)}catch(e){}else e.find(".jltma-particle-wrapper").remove();else{e.prepend('<div class="jltma-particle-wrapper" id="jltma-particle-'+o+'"></div>');try{let e=JSON.parse(t);particlesJS("jltma-particle-"+o,e),setTimeout(function(){window.dispatchEvent(new Event("resize"))},500),setTimeout(function(){window.dispatchEvent(new Event("resize"))},1500)}catch(e){}}}},MA_BgSlider:function(e,t){function a(){return"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode()}if(a()){if(!e.find(".ma-el-section-bs").length)return}else if(!e.hasClass("has_ma_el_bg_slider"))return;var n,o,i,r,l,s,d,c,m,f,p,u,_=[];(a()?(f=e.find(".ma-el-section-bs-inner")).length&&(m=f.attr("data-ma-el-bg-slider")):m=e.attr("data-ma-el-bg-slider-images"),m)&&(a()?(o=(f=e.find(".ma-el-section-bs-inner")).attr("data-ma-el-bg-slider-transition"),i=f.attr("data-ma-el-bg-slider-animation"),r=f.attr("data-ma-el-bg-custom-overlay"),s=f.attr("data-ma-el-bg-slider-cover"),d=f.attr("data-ma-el-bs-slider-delay"),c=f.attr("data-ma-el-bs-slider-timer"),l="yes"==r?JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/00.png":(p=f.attr("data-ma-el-bg-slider-overlay"))&&"00.png"!==p?JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/"+p:JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/00.png"):(o=e.attr("data-ma-el-bg-slider-transition"),i=e.attr("data-ma-el-bg-slider-animation"),r=e.attr("data-ma-el-bg-custom-overlay"),s=e.attr("data-ma-el-bg-slider-cover"),d=e.attr("data-ma-el-bs-slider-delay"),c=e.attr("data-ma-el-bs-slider-timer"),l="yes"==r?JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/00.png":(p=e.attr("data-ma-el-bg-slider-overlay"))?JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/"+p+".png":JLTMA_SCRIPTS.plugin_url+"/assets/vendor/vegas/overlays/00.png"),n=m.split(","),jQuery.each(n,function(e,t){var a=[];a.src=t,_.push(a)}),e.find(".ma-el-section-bs").length||e.prepend('<div class="ma-el-section-bs"><div class="ma-el-section-bs-inner"></div></div>'),(u=e.find(".ma-el-section-bs-inner")).vegas({slides:_,transition:o,animation:i,overlay:l,cover:"true"==s,delay:parseInt(d)||5e3,timer:"true"==c,init:function(){"yes"==r&&u.children(".vegas-overlay").css("background-image","")}}))},MA_AnimatedGradient:function(e,t){if(e.hasClass("ma-el-animated-gradient-yes")){let t=e.data("color")||e.attr("data-color"),a=e.data("angle")||e.attr("data-angle"),n=e.data("duration")||e.attr("data-duration")||"6s",o=parseInt(e.data("smoothness")||e.attr("data-smoothness")||3),i=e.data("easing")||e.attr("data-easing")||"cubic-bezier(0.4, 0.0, 0.2, 1)";if(!t||!a)return;let r=t.split(",");if(r.length<2)return;let l="jltma-animated-gradient-"+Math.random().toString(36).substring(2,11),s=`@keyframes ${l} {`,d=r.length;for(let e=0;e<=d;e++){let t=e/d*100,n=e%r.length,i=(e+1)%r.length;if(s+=`${t.toFixed(2)}% { background: linear-gradient(${a}, ${r[n].trim()}, ${r[i].trim()}); }`,e<d){let e=100/d;for(let n=1;n<=o;n++){let l=t+e*(n/(o+1)),d=i,c=(i+1)%r.length;s+=`${l.toFixed(2)}% { background: linear-gradient(${a}, ${r[d].trim()}, ${r[c].trim()}); }`}}}s+="}";let c=document.createElement("style");if(c.textContent=s,document.head.appendChild(c),e.css({animation:`${l} ${n} ${i} infinite`,"background-size":"400% 400%"}),e.hasClass("elementor-element-edit-mode")){let t=e.find(".animated-gradient");if(t.length>0){let e=t.data("color")||t.attr("data-color"),a=t.data("angle")||t.attr("data-angle"),n=t.data("duration")||t.attr("data-duration")||"6s";if(e&&a){let r=e.split(",");if(r.length>=2){let e="jltma-animated-gradient-editor-"+Math.random().toString(36).substring(2,11),l=`@keyframes ${e} {`,s=r.length;for(let e=0;e<=s;e++){let t=e/s*100,n=e%r.length,i=(e+1)%r.length;if(l+=`${t.toFixed(2)}% { background: linear-gradient(${a}, ${r[n].trim()}, ${r[i].trim()}); }`,e<s){let e=100/s;for(let n=1;n<=o;n++){let s=t+e*(n/(o+1)),d=i,c=(i+1)%r.length;l+=`${s.toFixed(2)}% { background: linear-gradient(${a}, ${r[d].trim()}, ${r[c].trim()}); }`}}}l+="}";let d=document.createElement("style");d.textContent=l,document.head.appendChild(d),t.css({animation:`${e} ${n} ${i} infinite`,"background-size":"400% 400%"})}}}}}},MA_Image_Comparison:function(e,t){var a=e.find(".jltma-image-comparison").eq(0),n=a.data("image-comparison-settings");a.twentytwenty({default_offset_pct:n.visible_ratio,orientation:n.orientation,before_label:n.before_label,after_label:n.after_label,move_slider_on_hover:n.slider_on_hover,move_with_handle_only:n.slider_with_handle,click_to_move:n.slider_with_click,no_overlay:n.no_overlay})},MA_BarCharts:function(e){r(e[0],function(){var t=e.find(".jltma-bar-chart-container"),a=e.find("#jltma-bar-chart"),n=t.data("settings");t.length&&new Chart(a,n)})},MA_PieCharts:function(e,t){r(e[0],function(){e.find(".ma-el-piechart .ma-el-percentage").each(function(){var e=t(this).data("track-color"),a=t(this).data("bar-color");t(this).easyPieChart({animate:2e3,lineWidth:10,barColor:a,trackColor:e,scaleColor:!1,lineCap:"square",size:220})})})},ProgressBars:function(e,t){r(e[0],function(){e.find(".jltma-stats-bar-content").each(function(){var e=t(this).data("perc");t(this).animate({width:e+"%"},20*e)})})},MA_Toggle_Content:function(e,t){l.getElementSettings=n(e);var a=e.find(".jltma-toggle-content"),o={active:l.getElementSettings.jltma_toggle_content_active_index};""!==l.getElementSettings.jltma_toggle_content_indicator_color&&(o.indicatorColor=l.getElementSettings.jltma_toggle_content_indicator_color),l.getElementSettings.jltma_toggle_content_indicator_speed.size&&(o.speed=l.getElementSettings.jltma_toggle_content_indicator_speed.size),elementorFrontend.isEditMode()&&(o.watchControls=!0),a.MA_ToggleElement(o)},MA_Comment_Form_reCaptcha:function(e,t){l.getElementSettings=n(e);var a=e.find(".jltma-comments-wrap");a.data("recaptcha"),a.data("jltma-comment-settings").reCaptchaprotected},MA_Counter_Up:function(e,t){var a=e.find(".jltma-counter-up-number");t.isFunction(t.fn.counterUp)&&a.counterUp({duration:2e3,delay:15})},MA_CountdownTimer:function(e,t){var a=e.find(".jltma-widget-countdown");t.fn.MasterCountDownTimer=function(){var e=t(this).find(".jltma-countdown-wrapper"),a={year:e.data("countdown-year"),month:e.data("countdown-month"),day:e.data("countdown-day"),hour:e.data("countdown-hour"),min:e.data("countdown-min"),sec:e.data("countdown-sec")},n=(e.data("countdown-infinite"),new Date(a.year,a.month,a.day,a.hour,a.min,a.sec)),o=e.find(".jltma-countdown-year"),i=e.find(".jltma-countdown-month"),r=e.find(".jltma-countdown-day"),l=e.find(".jltma-countdown-hour"),s=e.find(".jltma-countdown-min"),d=e.find(".jltma-countdown-sec"),c=setInterval(function(){var e=new Date,t=(Date.parse(n)-Date.parse(e))/1e3;if(t<=0)return o.text(0),i.text(0),r.text(0),l.text(0),s.text(0),d.text(0),void clearInterval(c);var a=t,m=Math.floor(a/31536e3);a%=31536e3;var f=Math.floor(a/2592e3);a%=2592e3;var p=Math.floor(a/86400);a%=86400;var u=Math.floor(a/3600);a%=3600;var _=Math.floor(a/60),v=Math.floor(a%60);o.text(m),i.text(f),r.text(p),l.text(u),s.text(_),d.text(v)},1e3)},a.each(function(){t(this).MasterCountDownTimer()})},MA_Fancybox_Popup:function(e,t){var a;(a=jQuery).isFunction(a.fn.fancybox)&&a("[data-fancybox]").fancybox({})},MA_Reveal:function(e,t){var a;if(l.MA_Reveal.elementSettings=n(e),l.MA_Reveal.revealAction=function(){a=new RevealFx(i,{revealSettings:{bgcolor:l.MA_Reveal.elementSettings.reveal_bgcolor,direction:l.MA_Reveal.elementSettings.reveal_direction,duration:100*Number(l.MA_Reveal.elementSettings.reveal_speed.size),delay:100*Number(l.MA_Reveal.elementSettings.reveal_delay.size),onCover:function(e,t){e.style.opacity=1}}})},l.MA_Reveal.runReveal=function(){a.reveal()},l.MA_Reveal.elementSettings.enabled_reveal){var o="#reveal-"+e.data("id"),i=document.querySelector(o);jQuery(o).hasClass("block-revealer")||l.MA_Reveal.revealAction(),l.MA_Reveal.waypointOptions={offset:"100%",triggerOnce:!0},r(i,l.MA_Reveal.runReveal,l.MA_Reveal.waypointOptions)}},MA_Rellax:function(e,t){var o=n(e),i=null;t(window).on("resize",function(){i&&(i.destroy(),i&&r())});var r=function(){if(o.enabled_rellax){if("undefined"==typeof Rellax)return;var n="speed_rellax",r=0;"desktop"!=(a=elementorFrontend.getCurrentDeviceMode())&&(n="speed_rellax_"+a);var l=o[n];l&&void 0!==l.size&&(r=l.size);var s="#rellax-"+e.data("id");if(t(s).length)try{i=new Rellax(s,{speed:r})}catch(e){}}};r()},MA_Rellax_Final:function(e,t,a){l.getElementSettings=n(o);var o=a.$el;o.find("#scene")},MA_Entrance_Animation:function(e,t){var a=(e=e||t(this)).hasClass("jltma-appear-watch-animation")?e:e.find(".jltma-appear-watch-animation"),n=t("body").hasClass("jltma-page-animation");a.length&&(n?document.body.addEventListener("JltmaPageAnimationDone",function(e){a.appearl({offset:"200px",insetOffset:"0px"}).one("appear",function(e,t){this.classList.add("jltma-animated"),this.classList.add("jltma-animated-once")})}):a.appearl({offset:"200px",insetOffset:"0px"}).one("appear",function(e,t){this.classList.add("jltma-animated"),this.classList.add("jltma-animated-once")}))},MA_Wrapper_Link:function(e,t){t("body").off("click.onWrapperLink","[data-jltma-wrapper-link]"),t("body").on("click.onWrapperLink","[data-jltma-wrapper-link]",function(e){e.preventDefault(),e.stopPropagation();var a=t(this),n=a.data("jltma-wrapper-link"),o=a.data("id"),i=document.createElement("a");i.id="master-addons-wrapper-link-"+o,i.href=n.url,i.target=n.is_external?"_blank":"_self",i.rel=n.nofollow?"nofollow noreferer":"",i.style.display="none",document.body.appendChild(i),document.getElementById(i.id),n&&n.url&&(n.is_external?window.open(n.url,"_blank",n.nofollow?"noopener,noreferrer":"noopener"):window.location.href=n.url)})},MA_Restrict_Content_Ajax:function(e,t){l.getElementSettings=n(e);var a=e.find(".jltma-restrict-content-wrap").eq(0),o=e.data("id"),i=a.data("restrict-layout-type"),r=a.data("restrict-type"),s=a.data("error-message"),d=(a.data("rc-ajaxify"),"ma_el_rc_"+o),c=e.find(".jltma-restrict-form").eq(0).data("form-id"),m=e.find(".jltma-restrict-content-popup-content"),f=a.data("content-pass")?a.data("content-pass"):"",p=m.data("popup-type")?m.data("popup-type"):"",u=e.find(".jltma-restrict-age-wrapper").eq(0),_={min_age:u.data("min-age"),age_type:u.data("age-type"),age_title:u.data("age-title"),age_content:u.data("age-content"),age_submit:t("#"+c).find('button[name="submit"]').val(),checkbox_msg:u.data("checkbox-msg")?u.data("checkbox-msg"):"",empty_bday:u.data("empty-bday")?u.data("empty-bday"):"",non_exist_bday:u.data("non-exist-bday")?u.data("non-exist-bday"):""};if(localStorage.getItem(d))t(".jltma-rc-button").addClass("d-none"),t("#"+c).addClass("d-none"),t("#jltma-restrict-age-"+o).removeClass("card"),t("#jltma-restrict-age-"+o).removeClass("text-center"),t("#restrict-content-"+o).addClass("d-block");else{if("popup"==i)var v="#jltma-rc-modal-"+o;else v="#jltma-restrict-content-"+o;t(v).on("click",".jltma_ra_select",function(){var e=t(this).closest(".jltma_ra_select_wrap");e.find(".jltma_ra_options").hasClass("jltma_ra_active")?e.find(".jltma_ra_options").removeClass("jltma_ra_active"):(t(".jltma_ra_options").removeClass("jltma_ra_active"),e.find(".jltma_ra_options").addClass("jltma_ra_active"),e.find(".jltma_ra_options").find('li:contains("'+e.find(".jltma_ra_select_val").html()+'")').addClass("jltma_ra_active"))}),t(v).on("click",".jltma_ra_options ul li",function(){var e=t(this).closest(".jltma_ra_select_wrap");e.find(".jltma_ra_select_val").html(t(this).html()),e.find("select").val(t(this).attr("data-val")),e.find(".jltma_ra_options").removeClass("jltma_ra_active")}),t(v).on("mouseover",".jltma_ra_options ul li",function(){t(".jltma_ra_options ul li").hasClass("jltma_ra_active")&&t(".jltma_ra_options ul li").removeClass("jltma_ra_active")}),t(document).click(function(e){"jltma_ra_select"==t(e.target).attr("class")||t(".jltma_ra_select").find(t(e.target)).length||t(".jltma_ra_options.jltma_ra_active").length&&t(".jltma_ra_options").removeClass("jltma_ra_active")}),"windowload"==p||"windowloadfullscreen"==p?t("#ma-el-rc-modal-hidden").fancybox().trigger("click"):t("[data-fancybox]").fancybox({}),t(v).on("submit","#"+c,function(e){e.preventDefault();var a=t(this);a.find(".jltma_rc_result").remove(),t.ajax({type:"POST",url:JLTMA_SCRIPTS.ajaxurl,data:{action:"jltma_restrict_content",nonce:JLTMA_SCRIPTS.nonce,fields:a.serialize(),restrict_type:r,error_message:s,content_pass:f,restrict_age:_},cache:!1,success:function(e){try{if("success"==(e=jQuery.parseJSON(e)).result)t("#restrict-content-"+o).removeClass("d-none").addClass("d-block"),t("#"+c).addClass("d-none"),t("#jltma-restrict-age-"+o).removeClass("card"),t("#jltma-restrict-age-"+o).removeClass("text-center"),localStorage.setItem(d,!0),t.fancybox.close(),t(".jltma-rc-button").addClass("d-none");else{if("validate"!=e.result)throw 0;t("#"+c+" .jltma_rc_submit").after('<div class="jltma_rc_result"><span class="eicon-info-circle-o"></span> '+e.output+"</div>")}}catch(e){t("#"+c+" .jltma_rc_submit").after('<div class="jltma_rc_result"><span class="eicon-loading"></span> Failed, please try again.</div>')}}})})}},MA_Restrict_Content:function(e,t){try{!function(t){l.getElementSettings=n(e);var a=e.find(".jltma-restrict-content-wrap").eq(0),o=(e.data("id"),a.data("restrict-layout-type"),a.data("restrict-type"),e.find(".jltma-restrict-content-popup-content"),a.data("content-pass"),e.find(".jltma-restrict-age-wrapper").eq(0));o.data("min-age"),o.data("age-type"),o.data("age-title"),o.data("age-content"),o.data("checkbox-msg"),l.MA_Restrict_Content_Ajax(e,t)}(jQuery)}catch(e){}},MA_Nav_Menu:function(e,t){l.getElementSettings=n(e);var a=e.find(".jltma-nav-menu-element"),o=a.data("menu-id"),i=a.data("menu-layout"),r=(a.data("menu-trigger"),a.data("menu-offcanvas")),s=a.data("menu-toggletype"),d=a.data("menu-animation"),c=a.data("menu-container-id"),m=a.data("sticky-type"),f=t("#"+c).outerHeight(),p=t("#"+c);if("onepage"==i)t(document).on("click",".jltma-navbar-nav li a",function(e){if(t(this).attr("href")){var a=t(this),n=a.get(0),o=n.href,i=o.indexOf("#"),r=a.parents(".jltma-navbar-nav-default").hasClass("jltma-one-page-enabled");-1!==i&&o.length>1&&r&&n.pathname==window.location.pathname&&(e.preventDefault(),a.parents(".jltma-menu-container").find(".jltma-close").trigger("click"))}}),t(document).on("click",function(e){t(e.target),!0===t(".navbar-collapse").hasClass("show")&&t(".jltma-one-page-enabled").removeClass("show")});else{var u=t(".jltma-dropdown.jltma-sub-menu");if(t("#"+o+" .jltma-menu-has-children").hover(function(){u.hasClass("fade-up")&&u.removeClass("fade-up"),u.hasClass("fade-down")&&u.removeClass("fade-down"),t(".jltma-dropdown.jltma-sub-menu").addClass(d)}),"fixed-onscroll"==m&&t(window).width()>768&&t(function(){t(window).scroll(function(){t(window).scrollTop()>=10?p.removeClass(""+c).addClass("jltma-on-scroll-fixed"):p.removeClass("jltma-on-scroll-fixed").addClass(""+c)})}),"sticky-top"==m&&t(window).width()>768&&t(function(){t(window).scroll(function(){t(window).scrollTop()>=10?p.removeClass(""+c).addClass("sticky-top"):p.removeClass("sticky-top").addClass(""+c)})}),"smart-scroll"==m&&(t("body").css("padding-top",f+"px"),p.addClass("jltma-smart-scroll"),t(".jltma-smart-scroll").length>0)){var _=0;t(window).on("scroll",function(){var e=t(this).scrollTop();e<_?t(".jltma-smart-scroll").removeClass("scrolled-down").addClass("scrolled-up"):t(".jltma-smart-scroll").removeClass("scrolled-up").addClass("scrolled-down"),_=e})}"nav-fixed-top"==m&&t(window).width()>768&&t(function(){t("body").css("padding-top",f+"px"),p.addClass("jltma-fixed-top")}),"toggle"==s&&t("#"+o+" .navbar-nav.toggle .jltma-menu-dropdown-toggle").click(function(e){t(this).parents(".dropdown").toggleClass("open"),e.stopPropagation()}),"toggle-bar"==r&&t(".jltma-nav-panel .navbar-toggler").on("click",function(e){t(".jltma-burger").toggleClass("jltma-close")}),"offcanvas"!=r&&"overlay"!=r||(t(".jltma-nav-panel .navbar-toggler").on("click",function(e){e.preventDefault(),e.stopPropagation();var a=t(this).attr("data-trigger");t(a).toggleClass("show"),t("body").toggleClass("offcanvas-active"),t(".jltma-nav-panel ").toggleClass("offcanvas-nav"),"overlay"==r&&t(".jltma-nav-panel ").toggleClass("offcanvas-overlay")}),t(document).on("keydown",function(e){27===e.keyCode&&(t(".mobile-offcanvas").removeClass("show"),t(".desktop-offcanvas").removeClass("show"),t("body").removeClass("overlay-active"))}),t(".btn-close, .jltma-nav-panel .offcanvas-nav, .jltma-nav-panel.desktop .jltma-close, .jltma-close").click(function(e){t(".jltma-nav-panel ").removeClass("offcanvas-nav"),t(".mobile-offcanvas").removeClass("show"),t(".desktop-offcanvas").removeClass("show"),t("body").removeClass("offcanvas-active"),"overlay"==r&&t(".jltma-nav-panel ").removeClass("offcanvas-overlay")}))}},initEvents:function(e,t){e.find(".jltma-search-wrapper").eq(0).data("search-type");var a=e.find(".jltma-search-main-wrap"),n=document.getElementById("jltma-btn-search"),o=document.getElementById("jltma-btn-search-close"),i=e.find(".jltma-search"),r=i.find(".jltma-search__input");t(n).on("click",function(){a.addClass("main-wrap--move"),i.addClass("search--open"),setTimeout(function(){r.focus()},600)}),t(o).on("click",function(){a.removeClass("main-wrap--move"),i.removeClass("search--open"),r.blur(),r.value=""}),document.addEventListener("keyup",function(e){27==e.keyCode&&l.closeSearch()})},MA_Header_Search:function(e,t){t("body").addClass("js"),l.initEvents(e,t)}};function s(e){t(e).find(".jltma-fancybox").each(function(){const e=function(e){if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value}(t(this).data("caption")),a=/\son\w+\s*=/i.test(e),n=/<\s*script/i.test(e),o=/javascript:/i.test(e);e&&(a||n||o)&&(t(this).attr("data-caption",""),t(this).closest(".elementor-element").remove())})}t(document).ready(function(){s(document.body),new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{1===e.nodeType&&s(e)})})}).observe(document.body,{childList:!0,subtree:!0})}),t(window).on("elementor/frontend/init",function(){elementorFrontend.isEditMode(),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_AnimatedGradient),elementorFrontend.hooks.addAction("frontend/element_ready/container",l.MA_AnimatedGradient),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_BgSlider),elementorFrontend.hooks.addAction("frontend/element_ready/container",l.MA_BgSlider),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_ParticlesBG),elementorFrontend.hooks.addAction("frontend/element_ready/container",l.MA_ParticlesBG),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_Reveal),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_Rellax),elementorFrontend.hooks.addAction("frontend/element_ready/global",l.MA_Wrapper_Link),elementorFrontend.hooks.addAction("frontend/element_ready/ma-headlines.default",l.MA_Animated_Headlines),elementorFrontend.hooks.addAction("frontend/element_ready/ma-advanced-accordion.default",l.MA_Accordion),elementorFrontend.hooks.addAction("frontend/element_ready/ma-tabs.default",l.MA_Tabs),elementorFrontend.hooks.addAction("frontend/element_ready/ma-progressbar.default",l.MA_ProgressBar),elementorFrontend.hooks.addAction("frontend/element_ready/ma-team-members-slider.default",l.MA_TeamSlider),elementorFrontend.hooks.addAction("frontend/element_ready/ma-image-carousel.default",l.MA_Image_Carousel),elementorFrontend.hooks.addAction("frontend/element_ready/ma-blog-post.default",l.MA_Blog),elementorFrontend.hooks.addAction("frontend/element_ready/ma-news-ticker.default",l.MA_NewsTicker),elementorFrontend.hooks.addAction("frontend/element_ready/ma-el-countdown-timer.default",l.MA_CountdownTimer),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-counter-up.default",l.MA_Counter_Up),elementorFrontend.hooks.addAction("frontend/element_ready/ma-piecharts.default",l.MA_PieCharts),elementorFrontend.hooks.addAction("frontend/element_ready/ma-timeline.default",l.MA_Timeline),elementorFrontend.hooks.addAction("frontend/element_ready/ma-image-filter-gallery.default",l.MA_Image_Filter_Gallery),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-gallery-slider.default",l.MA_Gallery_Slider),elementorFrontend.hooks.addAction("frontend/element_ready/ma-el-image-comparison.default",l.MA_Image_Comparison),elementorFrontend.hooks.addAction("frontend/element_ready/ma-el-restrict-content.default",l.MA_Restrict_Content),elementorFrontend.hooks.addAction("frontend/element_ready/ma-search.default",l.MA_Header_Search),elementorFrontend.hooks.addAction("frontend/element_ready/ma-progressbars.default",l.ProgressBars),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-instagram-feed.default",l.MA_Instagram_Feed),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-toggle-content.default",l.MA_Toggle_Content),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-comments.default",l.MA_Comment_Form_reCaptcha),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-logo-slider.default",l.MA_Logo_Slider),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-twitter-slider.default",l.MA_Twitter_Slider),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-advanced-image.default",l.MA_Advanced_Image),elementorFrontend.hooks.addAction("frontend/element_ready/ma-tooltip.default",l.MA_Tooltip),elementorFrontend.hooks.addAction("frontend/element_ready/ma-image-hotspot.default",l.MA_Image_Hotspot),elementorFrontend.hooks.addAction("frontend/element_ready/ma-pricing-table.default",l.MA_Pricing_Table),elementorFrontend.isEditMode()&&(elementorFrontend.hooks.addAction("frontend/element_ready/ma-headlines.default",l.MA_Animated_Headlines),elementorFrontend.hooks.addAction("frontend/element_ready/ma-piecharts.default",l.MA_PieCharts),elementorFrontend.hooks.addAction("frontend/element_ready/ma-progressbars.default",l.ProgressBars),elementorFrontend.hooks.addAction("frontend/element_ready/ma-progressbar.default",l.MA_ProgressBar),elementorFrontend.hooks.addAction("frontend/element_ready/ma-news-ticker.default",l.MA_NewsTicker),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-gallery-slider.default",l.MA_Gallery_Slider),elementorFrontend.hooks.addAction("frontend/element_ready/jltma-counter-up.default",l.MA_Counter_Up),elementorFrontend.hooks.addAction("frontend/element_ready/ma-tooltip.default",l.MA_Tooltip))})}(jQuery); \ No newline at end of file @@ -1,5 +1,6 @@ /** - * @popperjs/core v2.9.3 - MIT License + * @popperjs/core v2.11.8 - MIT License */ -"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){function t(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function n(e){return e instanceof t(e).Element||e instanceof Element}function o(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function r(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}function i(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;return o(e)&&t&&(r=n.width/e.offsetWidth||1,i=n.height/e.offsetHeight||1),{width:q(n.width/r),height:q(n.height/i),top:q(n.top/i),right:q(n.right/r),bottom:q(n.bottom/i),left:q(n.left/r),x:q(n.left/r),y:q(n.top/i)}}function a(e){return{scrollLeft:(e=t(e)).pageXOffset,scrollTop:e.pageYOffset}}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return i(f(e)).left+a(e).scrollLeft}function c(e){return t(e).getComputedStyle(e)}function l(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,n,r){void 0===r&&(r=!1);var c,u=o(n);if(c=o(n)){var d=(c=n.getBoundingClientRect()).height/n.offsetHeight||1;c=1!==(c.width/n.offsetWidth||1)||1!==d}d=c,c=f(n),e=i(e,d),d={scrollLeft:0,scrollTop:0};var h={x:0,y:0};return(u||!u&&!r)&&(("body"!==s(n)||l(c))&&(d=n!==t(n)&&o(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:a(n)),o(n)?((h=i(n,!0)).x+=n.clientLeft,h.y+=n.clientTop):c&&(h.x=p(c))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function d(e){var t=i(e),n=e.offsetWidth,o=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-o)&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function h(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(r(e)?e.host:null)||f(e)}function m(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:o(e)&&l(e)?e:m(h(e))}function v(e,n){var o;void 0===n&&(n=[]);var r=m(e);return e=r===(null==(o=e.ownerDocument)?void 0:o.body),o=t(r),r=e?[o].concat(o.visualViewport||[],l(r)?r:[]):r,n=n.concat(r),e?n:n.concat(v(h(r)))}function g(e){return o(e)&&"fixed"!==c(e).position?e.offsetParent:null}function y(e){for(var n=t(e),r=g(e);r&&0<=["table","td","th"].indexOf(s(r))&&"static"===c(r).position;)r=g(r);if(r&&("html"===s(r)||"body"===s(r)&&"static"===c(r).position))return n;if(!r)e:{if(r=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!o(e)||"fixed"!==c(e).position)for(e=h(e);o(e)&&0>["html","body"].indexOf(s(e));){var i=c(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||r&&"filter"===i.willChange||r&&i.filter&&"none"!==i.filter){r=e;break e}e=e.parentNode}r=null}return r||n}function b(e){function t(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){o.has(e)||(e=n.get(e))&&t(e)})),r.push(e)}var n=new Map,o=new Set,r=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||t(e)})),r}function w(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function x(e){return e.split("-")[0]}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&r(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function j(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function E(e,n){if("viewport"===n){n=t(e);var r=f(e);n=n.visualViewport;var s=r.clientWidth;r=r.clientHeight;var l=0,u=0;n&&(s=n.width,r=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=n.offsetLeft,u=n.offsetTop)),e=j(e={width:s,height:r,x:l+p(e),y:u})}else o(n)?((e=i(n)).top+=n.clientTop,e.left+=n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=a(u),n=null==(r=u.ownerDocument)?void 0:r.body,r=U(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),l=U(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-s.scrollLeft+p(u),s=-s.scrollTop,"rtl"===c(n||e).direction&&(u+=U(e.clientWidth,n?n.clientWidth:0)-r),e=j({width:r,height:l,x:u,y:s}));return e}function D(e,t,r){return t="clippingParents"===t?function(e){var t=v(h(e)),r=0<=["absolute","fixed"].indexOf(c(e).position)&&o(e)?y(e):e;return n(r)?t.filter((function(e){return n(e)&&O(e,r)&&"body"!==s(e)})):[]}(e):[].concat(t),(r=(r=[].concat(t,[r])).reduce((function(t,n){return n=E(e,n),t.top=U(n.top,t.top),t.right=z(n.right,t.right),t.bottom=z(n.bottom,t.bottom),t.left=U(n.left,t.left),t}),E(e,r[0]))).width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function L(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function M(e){var t=e.reference,n=e.element,o=(e=e.placement)?x(e):null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?L(o):null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function P(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function k(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function W(e,t){void 0===t&&(t={});var o=t;t=void 0===(t=o.placement)?e.placement:t;var r=o.boundary,a=void 0===r?"clippingParents":r,s=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var p=o.altBoundary,c=void 0!==p&&p;o=P("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:k(o,N));var l=e.elements.reference;p=e.rects.popper,a=D(n(c=e.elements[c?"popper"===r?"reference":"popper":r])?c:c.contextElement||f(e.elements.popper),a,s),c=M({reference:s=i(l),element:p,strategy:"absolute",placement:t}),p=j(Object.assign({},p,c)),s="popper"===r?p:s;var u={top:a.top-s.top+o.top,bottom:s.bottom-a.bottom+o.bottom,left:a.left-s.left+o.left,right:s.right-a.right+o.right};if(e=e.modifiersData.offset,"popper"===r&&e){var d=e[t];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function A(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function B(e){void 0===e&&(e={});var t=e.defaultModifiers,o=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?X:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},X,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],p=!1,c={state:s,setOptions:function(i){return a(),s.options=Object.assign({},r,s.options,i),s.scrollParents={reference:n(e)?v(e):e.contextElement?v(e.contextElement):[],popper:v(t)},i=function(e){var t=b(e);return _.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(o,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:c,options:n}),f.push(t||function(){}))})),c.update()},forceUpdate:function(){if(!p){var e=s.elements,t=e.reference;if(A(t,e=e.popper))for(s.rects={reference:u(t,y(e),"fixed"===s.options.strategy),popper:d(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(s=e({state:s,options:o,name:n,instance:c})||s)}}},update:w((function(){return new Promise((function(e){c.forceUpdate(),e(s)}))})),destroy:function(){a(),p=!0}};return A(e,t)?(c.setOptions(i).then((function(e){!p&&i.onFirstUpdate&&i.onFirstUpdate(e)})),c):c}}function H(e){var n,o=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,s=e.position,p=e.gpuAcceleration,l=e.adaptive;if(!0===(e=e.roundOffsets)){e=a.y;var u=window.devicePixelRatio||1;e={x:F(F(a.x*u)/u)||0,y:F(F(e*u)/u)||0}}else e="function"==typeof e?e(a):a;e=void 0===(e=(u=e).x)?0:e,u=void 0===(u=u.y)?0:u;var d=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var h,m="left",v="top",g=window;if(l){var b=y(o),w="clientHeight",x="clientWidth";b===t(o)&&("static"!==c(b=f(o)).position&&(w="scrollHeight",x="scrollWidth")),"top"===i&&(v="bottom",u-=b[w]-r.height,u*=p?1:-1),"left"===i&&(m="right",e-=b[x]-r.width,e*=p?1:-1)}return o=Object.assign({position:s},l&&K),p?Object.assign({},o,((h={})[v]=a?"0":"",h[m]=d?"0":"",h.transform=2>(g.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",h)):Object.assign({},o,((n={})[v]=a?u+"px":"",n[m]=d?e+"px":"",n.transform="",n))}function T(e){return e.replace(/left|right|bottom|top/g,(function(e){return ee[e]}))}function R(e){return e.replace(/start|end/g,(function(e){return te[e]}))}function S(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function C(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var q=Math.round,N=["top","bottom","right","left"],V=N.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),I=[].concat(N,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),_="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),U=Math.max,z=Math.min,F=Math.round,X={placement:"bottom",modifiers:[],strategy:"absolute"},Y={passive:!0},G={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=t(n.elements.popper),f=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,Y)})),a&&s.addEventListener("resize",o.update,Y),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,Y)})),a&&s.removeEventListener("resize",o.update,Y)}},data:{}},J={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=M({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},K={top:"auto",right:"auto",bottom:"auto",left:"auto"},Q={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:x(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,H(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,H(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Z={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];o(i)&&s(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),o(r)&&s(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},$={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,o=void 0===(e=e.options.offset)?[0,0]:e,r=(e=I.reduce((function(e,n){var r=t.rects,i=x(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof o?o(Object.assign({},r,{placement:n})):o;return r=(r=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:r}:{x:r,y:s},e[n]=i,e}),{}))[t.placement],i=r.x;r=r.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=r),t.modifiersData[n]=e}},ee={left:"right",right:"left",bottom:"top",top:"bottom"},te={start:"end",end:"start"},ne={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var o=n.mainAxis;o=void 0===o||o;var r=n.altAxis;r=void 0===r||r;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,p=n.altBoundary,c=n.flipVariations,l=void 0===c||c,u=n.allowedAutoPlacements;c=x(n=t.options.placement),i=i||(c!==n&&l?function(e){if("auto"===x(e))return[];var t=T(e);return[R(e),t,R(t)]}(n):[T(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===x(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,o=t.rootBoundary,r=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?I:a,f=t.placement.split("-")[1];0===(i=(t=f?i?V:V.filter((function(e){return e.split("-")[1]===f})):N).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var p=i.reduce((function(t,i){return t[i]=W(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[x(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var h=new Map;c=!0;for(var m=d[0],v=0;v<d.length;v++){var g=d[v],y=x(g),b="start"===g.split("-")[1],w=0<=["top","bottom"].indexOf(y),O=w?"width":"height",j=W(t,{placement:g,boundary:s,rootBoundary:f,altBoundary:p,padding:a});if(b=w?b?"right":"left":b?"bottom":"top",n[O]>i[O]&&(b=T(b)),O=T(b),w=[],o&&w.push(0>=j[y]),r&&w.push(0>=j[b],0>=j[O]),w.every((function(e){return e}))){m=g,c=!1;break}h.set(g,w)}if(c)for(o=function(e){var t=d.find((function(t){if(t=h.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return m=t,"break"},r=l?3:1;0<r&&"break"!==o(r);r--);t.placement!==m&&(t.modifiersData[e]._skip=!0,t.placement=m,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},oe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var o=n.mainAxis,r=void 0===o||o,i=void 0!==(o=n.altAxis)&&o;o=void 0===(o=n.tether)||o;var a=n.tetherOffset,s=void 0===a?0:a,f=W(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary});n=x(t.placement);var p=t.placement.split("-")[1],c=!p,l=L(n);n="x"===l?"y":"x",a=t.modifiersData.popperOffsets;var u=t.rects.reference,h=t.rects.popper,m="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},a){if(r||i){var v="y"===l?"top":"left",g="y"===l?"bottom":"right",b="y"===l?"height":"width",w=a[l],O=a[l]+f[v],j=a[l]-f[g],E=o?-h[b]/2:0,D="start"===p?u[b]:h[b];p="start"===p?-h[b]:-u[b],h=t.elements.arrow,h=o&&h?d(h):{width:0,height:0};var M=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=M[v],g=M[g],h=U(0,z(u[b],h[b])),D=c?u[b]/2-E-h-v-m:D-h-v-m,u=c?-u[b]/2+E+h+g+m:p+h+g+m,c=t.elements.arrow&&y(t.elements.arrow),m=t.modifiersData.offset?t.modifiersData.offset[t.placement][l]:0,c=a[l]+D-m-(c?"y"===l?c.clientTop||0:c.clientLeft||0:0),u=a[l]+u-m,r&&(r=o?z(O,c):O,j=o?U(j,u):j,r=U(r,z(w,j)),a[l]=r,s[l]=r-w),i&&(r=(i=a[n])+f["x"===l?"top":"left"],f=i-f["x"===l?"bottom":"right"],r=o?z(r,c):r,o=o?U(f,u):f,o=U(r,z(i,o)),a[n]=o,s[n]=o-i)}t.modifiersData[e]=s}},requiresIfExists:["offset"]},re={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=x(n.placement);if(e=L(s),s=0<=["left","right"].indexOf(s)?"height":"width",i&&a){r=P("number"!=typeof(r="function"==typeof(r=r.padding)?r(Object.assign({},n.rects,{placement:n.placement})):r)?r:k(r,N));var f=d(i),p="y"===e?"top":"left",c="y"===e?"bottom":"right",l=n.rects.reference[s]+n.rects.reference[e]-a[e]-n.rects.popper[s];a=a[e]-n.rects.reference[e],a=(i=(i=y(i))?"y"===e?i.clientHeight||0:i.clientWidth||0:0)/2-f[s]/2+(l/2-a/2),s=U(r[p],z(a,i-f[s]-r[c])),n.modifiersData[o]=((t={})[e]=s,t.centerOffset=s-a,t)}},effect:function(e){var t=e.state;if(null!=(e=void 0===(e=e.options.element)?"[data-popper-arrow]":e)){if("string"==typeof e&&!(e=t.elements.popper.querySelector(e)))return;O(t.elements.popper,e)&&(t.elements.arrow=e)}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},ie={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,i=W(t,{elementContext:"reference"}),a=W(t,{altBoundary:!0});n=S(i,n),o=S(a,o,r),r=C(n),a=C(o),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:o,isReferenceHidden:r,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":r,"data-popper-escaped":a})}},ae=B({defaultModifiers:[G,J,Q,Z]}),se=[G,J,Q,Z,$,ne,oe,re,ie],fe=B({defaultModifiers:se});e.applyStyles=Z,e.arrow=re,e.computeStyles=Q,e.createPopper=fe,e.createPopperLite=ae,e.defaultModifiers=se,e.detectOverflow=W,e.eventListeners=G,e.flip=ne,e.hide=ie,e.offset=$,e.popperGenerator=B,e.popperOffsets=J,e.preventOverflow=oe,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function p(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,p=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function x(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:x(b(e))}function w(e,n){var r;void 0===n&&(n=[]);var o=x(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(w(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function I(e,r,o){return r===H?N(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):N(function(e){var t,n=d(e),r=u(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+h(e),c=-r.scrollTop;return"rtl"===m(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function _(e,t,o,s){var f="clippingParents"===t?function(e){var t=w(b(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?E(e):e;return n(o)?t.filter((function(e){return n(e)&&C(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),p=c[0],u=c.reduce((function(t,n){var r=I(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),I(e,p,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function F(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?F(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case D:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case P:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?z(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case W:t[c]=t[c]-(n[p]/2-r[p]/2);break;case B:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?"clippingParents":f,u=r.rootBoundary,l=void 0===u?H:u,h=r.elementContext,m=void 0===h?T:h,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,x=Y("number"!=typeof b?b:G(b,k)),w=m===T?"reference":T,O=e.rects.popper,j=e.elements[y?w:m],E=_(n(j)?j:j.contextElement||d(e.elements.popper),c,l,s),P=p(e.elements.reference),M=X({reference:P,element:O,strategy:"absolute",placement:i}),W=N(Object.assign({},O,M)),B=m===T?W:P,R={top:E.top-B.top+x.top,bottom:B.bottom-E.bottom+x.bottom,left:E.left-B.left+x.left,right:B.right-E.right+x.right},S=e.modifiersData.offset;if(m===T&&S){var V=S[i];Object.keys(R).forEach((function(e){var t=[L,A].indexOf(e)>=0?1:-1,n=[D,A].indexOf(e)>=0?"y":"x";R[e]+=V[n]*t}))}return R}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Z(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,a=void 0===i?K:i;return function(e,t,r){void 0===r&&(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],p=!1,u={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParents={reference:n(e)?w(e):e.contextElement?w(e.contextElement):[],popper:w(t)};var s,p,d=function(e){var t=q(e);return V.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,f.options.modifiers),p=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(p).map((function(e){return p[e]}))));return f.orderedModifiers=d.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:f,name:t,instance:u,options:r}),a=function(){};c.push(i||a)}})),u.update()},forceUpdate:function(){if(!p){var e=f.elements,t=e.reference,n=e.popper;if(Q(t,n)){f.rects={reference:y(t,E(n),"fixed"===f.options.strategy),popper:g(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,c=o.name;"function"==typeof i&&(f=i({state:f,options:s,name:c,instance:u})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){l(),p=!0}};if(!Q(e,t))return u;function l(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}var $={passive:!0};var ee={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,$)})),f&&c.addEventListener("resize",r.update,$),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,$)})),f&&c.removeEventListener("resize",r.update,$)}},data:{}};var te={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=X({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,c=e.position,p=e.gpuAcceleration,u=e.adaptive,l=e.roundOffsets,h=e.isFixed,v=f.x,y=void 0===v?0:v,g=f.y,b=void 0===g?0:g,x="function"==typeof l?l({x:y,y:b}):{x:y,y:b};y=x.x,b=x.y;var w=f.hasOwnProperty("x"),O=f.hasOwnProperty("y"),j=P,M=D,k=window;if(u){var W=E(r),H="clientHeight",T="clientWidth";if(W===t(r)&&"static"!==m(W=d(r)).position&&"absolute"===c&&(H="scrollHeight",T="scrollWidth"),W=W,i===D||(i===P||i===L)&&a===B)M=A,b-=(h&&W===k&&k.visualViewport?k.visualViewport.height:W[H])-o.height,b*=p?1:-1;if(i===P||(i===D||i===A)&&a===B)j=L,y-=(h&&W===k&&k.visualViewport?k.visualViewport.width:W[T])-o.width,y*=p?1:-1}var R,S=Object.assign({position:c},u&&ne),V=!0===l?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:s(n*o)/o||0,y:s(r*o)/o||0}}({x:y,y:b},t(r)):{x:y,y:b};return y=V.x,b=V.y,p?Object.assign({},S,((R={})[M]=O?"0":"",R[j]=w?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",R)):Object.assign({},S,((n={})[M]=O?b+"px":"",n[j]=w?y+"px":"",n.transform="",n))}var oe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:F(t.placement),variation:U(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var ie={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&l(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&l(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ae={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=S.reduce((function(e,n){return e[n]=function(e,t,n){var r=F(e),o=[P,D].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function fe(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function pe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function ue(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?S:f,p=U(r),u=p?s?R:R.filter((function(e){return U(e)===p})):k,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=J(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[F(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=F(v),g=f||(y===v||!h?[fe(v)]:function(e){if(F(e)===M)return[];var t=fe(e);return[pe(e),t,pe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(F(n)===M?ue(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,O=new Map,j=!0,E=b[0],k=0;k<b.length;k++){var B=b[k],H=F(B),T=U(B)===W,R=[D,A].indexOf(H)>=0,S=R?"width":"height",V=J(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),q=R?T?L:P:T?A:D;x[S]>w[S]&&(q=fe(q));var C=fe(q),N=[];if(i&&N.push(V[H]<=0),s&&N.push(V[q]<=0,V[C]<=0),N.every((function(e){return e}))){E=B,j=!1;break}O.set(B,N)}if(j)for(var I=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},_=h?3:1;_>0;_--){if("break"===I(_))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return i(e,a(t,n))}var he={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,v=n.tetherOffset,y=void 0===v?0:v,b=J(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),x=F(t.placement),w=U(t.placement),O=!w,j=z(x),M="x"===j?"y":"x",k=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(k){if(s){var q,C="y"===j?D:P,N="y"===j?A:L,I="y"===j?"height":"width",_=k[j],X=_+b[C],Y=_-b[N],G=m?-H[I]/2:0,K=w===W?B[I]:H[I],Q=w===W?-H[I]:-B[I],Z=t.elements.arrow,$=m&&Z?g(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[C],ne=ee[N],re=de(0,B[I],$[I]),oe=O?B[I]/2-G-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=O?-B[I]/2+G+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&E(t.elements.arrow),se=ae?"y"===j?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(q=null==S?void 0:S[j])?q:0,ce=_+ie-fe,pe=de(m?a(X,_+oe-fe-se):X,_,m?i(Y,ce):Y);k[j]=pe,V[j]=pe-_}if(c){var ue,le="x"===j?D:P,he="x"===j?A:L,me=k[M],ve="y"===M?"height":"width",ye=me+b[le],ge=me-b[he],be=-1!==[D,P].indexOf(x),xe=null!=(ue=null==S?void 0:S[M])?ue:0,we=be?ye:me-B[ve]-H[ve]-xe+R.altAxis,Oe=be?me+B[ve]+H[ve]-xe-R.altAxis:ge,je=m&&be?function(e,t,n){var r=de(e,t,n);return r>n?n:r}(we,me,Oe):de(m?we:ye,me,m?Oe:ge);k[M]=je,V[M]=je-me}t.modifiersData[r]=V}},requiresIfExists:["offset"]};var me={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=F(n.placement),f=z(s),c=[P,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,k))}(o.padding,n),u=g(i),l="y"===f?D:P,d="y"===f?A:L,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],v=E(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,x=p[l],w=y-u[c]-p[d],O=y/2-u[c]/2+b,j=de(x,O,w),M=f;n.modifiersData[r]=((t={})[M]=j,t.centerOffset=j-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&C(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[D,L,A,P].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=J(t,{elementContext:"reference"}),s=J(t,{altBoundary:!0}),f=ve(a,r),c=ve(s,o,i),p=ye(f),u=ye(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=Z({defaultModifiers:[ee,te,oe,ie]}),xe=[ee,te,oe,ie,ae,le,he,me,ge],we=Z({defaultModifiers:xe});e.applyStyles=ie,e.arrow=me,e.computeStyles=oe,e.createPopper=we,e.createPopperLite=be,e.defaultModifiers=xe,e.detectOverflow=J,e.eventListeners=ee,e.flip=le,e.hide=ge,e.offset=ae,e.popperGenerator=Z,e.popperOffsets=te,e.preventOverflow=he,Object.defineProperty(e,"__esModule",{value:!0})})); +//# sourceMappingURL=popper.min.js.map @@ -470,7 +470,6 @@ 'Shortcode_Manager' => 'class-shortcode-manager.php', 'Control_Manager' => 'class-control-manager.php', 'Icon_Library_Helper' => 'icon-library-helper.php', - 'Widget_Builder' => 'widget-builder.php', 'Control_Base' => 'controls/class-control-base.php', ]; if (isset($wb_file_map[$wb_class])) { @@ -1147,7 +1146,7 @@ \MasterAddons\Inc\Admin\Theme_Builder\Loader::get_instance(); \MasterAddons\Inc\Admin\PopupBuilder\Popup_Builder_Init::get_instance(); - // \MasterAddons\Inc\Admin\WidgetBuilder\Widget_Builder_Init::get_instance(); + \MasterAddons\Inc\Admin\WidgetBuilder\Widget_Builder_Init::get_instance(); REST_API::get_instance(); \MasterAddons\Inc\Admin\Page_Importer::get_instance(); Only in /home/deploy/wp-safety.org/data/plugin-versions/master-addons/3.1.0: components.json @@ -2010,7 +2010,7 @@ 'custom-js' => [ 'title' => 'Custom JS', 'icon' => 'eicon-code-bold', - 'class' => 'MasterAddons\Modules\Utilities\CustomJs', + 'class' => 'MasterAddons\Pro\Modules\Utilities\CustomJs', 'demo_url' => 'https://master-addons.com/extension/custom-js/', 'docs_url' => 'https://master-addons.com/docs/extensions/custom-js/', 'tuts_url' => 'https://www.youtube.com/watch?v=8G4JLw0s8sI', @@ -2020,7 +2020,7 @@ "Runs only on the target element", "No extra plugin or coding setup" ], - 'is_pro' => false, + 'is_pro' => true, ], 'duplicator' => [ 'title' => 'Post/Page Duplicator', @@ -447,6 +447,10 @@ public function get_shortcode_ajax() { check_ajax_referer('jltma_popup_nonce', '_nonce'); + if ( ! current_user_can( 'edit_posts' ) ) { + wp_send_json_error( [ 'message' => __( 'Insufficient permissions', 'master-addons' ) ] ); + } + $post_id = isset( $_POST['post_id'] ) ? absint( $_POST['post_id'] ) : 0; $shortcode = '[jltma_popup id="' . $post_id . '"]'; @@ -541,6 +545,17 @@ return $allcaps; } + // Security: only grant the cap if the user already has a base editing + // capability through their role. Without this guard, any logged-in user + // (incl. subscribers) visiting the Elementor edit URL for a popup would be + // granted edit_post for that request — a privilege escalation. With + // capability_type='post' on the CPT, authors+ already have edit_posts + // natively, so the workaround stays a no-op for them and is fully off for + // lower-privileged users. + if (empty($user->allcaps['edit_posts']) && empty($user->allcaps['edit_pages'])) { + return $allcaps; + } + // Grant edit capability for this specific post type if (isset($caps[0]) && in_array($caps[0], ['edit_post', 'edit_posts'])) { $allcaps[$caps[0]] = true; @@ -504,27 +504,24 @@ if ($expiration > 0) { $max_age = $expiration - time(); - ?> - <script> - const cookieName = '<?php echo esc_js($cookie_name); ?>'; - const value = '<?php echo absint( time() ); ?>'; - const maxAge = <?php echo (int) $max_age; ?>; - const path = '/'; - - document.cookie = `${cookieName}=${value}; max-age=${maxAge}; path=${path};`; - </script> - <?php - // setcookie($cookie_name, time(), $expiration, '/'); + $cookie_js = sprintf( + 'document.cookie = "%1$s=%2$d; max-age=%3$d; path=/;";', + esc_js($cookie_name), + absint(time()), + (int) $max_age + ); + $this->add_popup_inline_script($cookie_js); } if ($frequency === 'once_session') { // Session cookie (no max-age/expires) — cleared automatically when the browser closes. // Avoids PHP sessions, which break full-page caching on the frontend. - ?> - <script> - document.cookie = '<?php echo esc_js($cookie_name); ?>=<?php echo absint(time()); ?>; path=/;'; - </script> - <?php + $session_js = sprintf( + 'document.cookie = "%1$s=%2$d; path=/;";', + esc_js($cookie_name), + absint(time()) + ); + $this->add_popup_inline_script($session_js); } } @@ -539,9 +536,24 @@ if ( is_feed() || is_admin() || isset($_COOKIE['ma_popup_visitor']) || isset($_GET['elementor-preview']) || ( defined('ELEMENTOR_VERSION') && \Elementor\Plugin::$instance->preview->is_preview_mode() ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only existence check, no data processed return; } - echo '<script>if (document.cookie.indexOf("ma_popup_visitor=") === -1) { - document.cookie = "ma_popup_visitor=1; max-age=31536000; path=/;"; - }</script>'; + $this->add_popup_inline_script('if (document.cookie.indexOf("ma_popup_visitor=") === -1) { document.cookie = "ma_popup_visitor=1; max-age=31536000; path=/;"; }'); + } + + /** + * Queue a small inline script through the enqueue API (printed in the footer) + * instead of echoing a hardcoded <script> tag. Multiple calls accumulate on the + * same inline-only handle. + * + * @param string $js + */ + private function add_popup_inline_script($js) { + if (!wp_script_is('jltma-popup-inline', 'registered')) { + wp_register_script('jltma-popup-inline', false, array(), JLTMA_VER, true); + } + if (!wp_script_is('jltma-popup-inline', 'enqueued')) { + wp_enqueue_script('jltma-popup-inline'); + } + wp_add_inline_script('jltma-popup-inline', $js); } private function get_popup_settings($popup_id) { @@ -114,7 +114,7 @@ add_action('current_screen', [$this, 'jltma_set_page_title']); add_action('admin_enqueue_scripts', [$this, 'jltma_admin_settings_scripts'], 99); add_action('admin_body_class', [$this, 'jltma_admin_body_class']); - add_action('admin_head', [$this, 'jltma_global_admin_css']); + add_action('admin_enqueue_scripts', [$this, 'jltma_global_admin_css']); add_action('wp_ajax_jltma_subscribe', [$this, 'handle_subscribe_ajax']); } @@ -151,7 +151,7 @@ */ public function jltma_global_admin_css() { - echo '<style type="text/css"> + $css = ' /* Hide separator below Master Addons menu */ #adminmenu #toplevel_page_master-addons-settings + .wp-menu-separator { display: none !important; @@ -236,10 +236,10 @@ .wrap .jltma-cpt-btn-youtube svg { fill: #ff0000; } - </style>'; + '; // JS to reorder submenu items and add separator/pricing classes - echo '<script type="text/javascript"> + $js = ' document.addEventListener("DOMContentLoaded", function() { var menu = document.getElementById("toplevel_page_master-addons-settings"); if (!menu) return; @@ -286,7 +286,17 @@ } }); }); - </script>'; + '; + + // Load the menu styling and ordering through the core enqueue APIs + // (inline-only handles) instead of hardcoded <style>/<script> tags. + wp_register_style('jltma-admin-menu', false, array(), JLTMA_VER); + wp_enqueue_style('jltma-admin-menu'); + wp_add_inline_style('jltma-admin-menu', $css); + + wp_register_script('jltma-admin-menu', false, array(), JLTMA_VER, true); + wp_enqueue_script('jltma-admin-menu'); + wp_add_inline_script('jltma-admin-menu', $js); } /** @@ -331,9 +341,9 @@ remove_action('admin_notices', 'update_nag', 3); remove_action('admin_notices', 'maintenance_nag', 10); - // Hide any remaining notices via CSS - add_action('admin_head', function () { - echo '<style type="text/css"> + // Hide any remaining admin notices on our settings screen. Attached to the + // settings stylesheet (enqueued below) instead of a hardcoded <style> tag. + $jltma_hide_notices_css = ' .notice, .error, .updated, .update-nag, .admin-notice, .jltma-plugin-update-notice, .fs-notice, .fs-slug-master-addons, #wpbody-content > .notice, #wpbody-content > .error, #wpbody-content > .updated, @@ -345,9 +355,7 @@ } #wpfooter { display: none !important; - } - </style>'; - }); + }'; // Dequeue Spectra (UAG) zipwp-images style to prevent CSS conflicts on settings page add_action('admin_enqueue_scripts', function () { @@ -369,6 +377,8 @@ wp_enqueue_style('jltma-admin-settings'); wp_enqueue_script('jltma-admin-settings'); + wp_add_inline_style('jltma-admin-settings', $jltma_hide_notices_css); + // White Label logo & Hidden Nav Menus $white_label_settings = jltma_settings()->get('jltma_white_label_settings'); $white_label_settings = is_array($white_label_settings) ? $white_label_settings : []; @@ -460,13 +470,9 @@ remove_all_actions('network_admin_notices'); remove_all_actions('user_admin_notices'); - add_action('admin_head', function () { - echo '<style type="text/css"> - #wpfooter { - display: none !important; - } - </style>'; - }); + // Hide the footer for the full-screen wizard (attached to the wizard + // stylesheet below instead of a hardcoded <style> tag). + $jltma_wizard_css = '#wpfooter { display: none !important; }'; // Elementor icons for addon card icons if (wp_style_is('elementor-icons', 'registered')) { @@ -478,6 +484,8 @@ wp_enqueue_style('jltma-setup-wizard'); wp_enqueue_script('jltma-setup-wizard'); + wp_add_inline_style('jltma-setup-wizard', $jltma_wizard_css); + // Build recommended plugins data with pre-computed install status. $recommended_instance = Recommended_Plugins::get_instance(); $raw_plugins = $recommended_instance->plugins_list(); @@ -713,7 +713,20 @@ public function get_template_data() { - $template = $this->get_template_data_array($_REQUEST); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no nonce available for this AJAX handler + // Extract and sanitize only the specific fields we need (never forward the whole superglobal). + $source = isset( $_REQUEST['source'] ) ? wp_unslash( $_REQUEST['source'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only fetch gated by edit_posts capability in get_template_data_array() + if ( is_array( $source ) ) { + $source = array_map( 'sanitize_text_field', $source ); + } else { + $source = sanitize_text_field( $source ); + } + $request_data = array( + 'template_id' => isset( $_REQUEST['template_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['template_id'] ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only fetch gated by edit_posts capability in get_template_data_array() + 'tab' => isset( $_REQUEST['tab'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['tab'] ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only fetch gated by edit_posts capability in get_template_data_array() + 'source' => $source, + ); + + $template = $this->get_template_data_array($request_data); if (!$template) { wp_send_json_error(); @@ -94,7 +94,7 @@ */ public function activate_required_theme() { - $nonce = $_POST['nonce']; + $nonce = isset( $_POST['nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : ''; if (!wp_verify_nonce($nonce, 'jltma-template-kits-js') || !current_user_can('manage_options')) { exit; @@ -130,9 +130,11 @@ public function sanitize_svg_on_upload($file) { if ($file['type'] === 'image/svg+xml') { - $file_content = file_get_contents($file['tmp_name']); + // Direct file ops on the PHP upload temp path, before WordPress moves it. + // WP_Filesystem (ftp/ssh methods) cannot reach the local upload temp file. + $file_content = file_get_contents($file['tmp_name']); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents -- reading the PHP upload temp file for sanitization $sanitized_content = $this->sanitize_svg($file_content); - file_put_contents($file['tmp_name'], $sanitized_content); + file_put_contents($file['tmp_name'], $sanitized_content); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents -- writing back the sanitized SVG to the PHP upload temp file before WordPress moves it } return $file; } @@ -1533,7 +1535,7 @@ $image_data = wp_remote_retrieve_body($response); $tmp = wp_tempnam(); - file_put_contents($tmp, $image_data); + file_put_contents($tmp, $image_data); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents -- writing to a wp_tempnam() temp file that media_handle_sideload() then processes if (!file_exists($tmp) || filesize($tmp) === 0) { wp_delete_file($tmp); @@ -280,6 +280,25 @@ /** * Get cached kit categories */ + /** + * Write a file through the WP_Filesystem API. + * + * @param string $file + * @param string $contents + * @return bool + */ + private function fs_put_contents($file, $contents) { + global $wp_filesystem; + if (empty($wp_filesystem)) { + require_once ABSPATH . 'wp-admin/includes/file.php'; + WP_Filesystem(); + } + if (empty($wp_filesystem)) { + return false; + } + return $wp_filesystem->put_contents($file, $contents, FS_CHMOD_FILE); + } + private function get_cached_kit_categories($force_refresh = false) { $upload_dir = wp_upload_dir(); $categories_file = $upload_dir['basedir'] . '/master_addons/templates_kits/kit-categories.json'; @@ -302,7 +321,7 @@ $cached = $cache_manager->get_cached_kit_categories($force_refresh); if ($cached !== false) { if (!file_exists($categories_file) && !empty($cached)) { - @file_put_contents($categories_file, json_encode($cached)); + $this->fs_put_contents($categories_file, wp_json_encode($cached)); } return $cached; } @@ -331,7 +350,7 @@ set_transient($transient_key, $fresh_categories, $cache_expiry); // Save to local file - @file_put_contents($categories_file, json_encode($fresh_categories)); + $this->fs_put_contents($categories_file, wp_json_encode($fresh_categories)); return $fresh_categories; } @@ -1328,6 +1347,11 @@ return; } + if (!current_user_can('manage_options')) { + wp_send_json_error(['message' => 'Insufficient permissions']); + return; + } + $plugins_with_status = array(); if( isset($_POST['required_plugins']) && !empty( $_POST['required_plugins'])){ @@ -14,10 +14,10 @@ * This is called by WordPress REST API on each request */ public function check_for_permission(){ - // Allow any logged-in user who can read posts - // Using 'read' capability instead of 'edit_posts' to be more permissive - // Individual methods will perform their own capability checks as needed - return current_user_can('read'); + // These endpoints feed editor-only post/page/term pickers, so require + // the same capability needed to edit content. The REST API validates the + // X-WP-Nonce cookie nonce before this callback runs for logged-in users. + return current_user_can('edit_posts'); } @@ -104,18 +104,10 @@ public function get_singular_list(){ - // Only perform security checks if user is logged in - if (is_user_logged_in()) { - // Verify REST API nonce that comes from JavaScript - be more lenient with nonce check - $nonce = $this->request->get_header('X-WP-Nonce'); - if ($nonce && !wp_verify_nonce($nonce, 'wp_rest')) { - // If nonce verification fails, don't block the request - } - - // Check if user can read posts - if (!current_user_can('read')) { - return new \WP_Error( 'rest_forbidden', __( 'Insufficient permissions.', 'master-addons' ), [ 'status' => 403 ] ); - } + // Capability is enforced here (and by check_for_permission()); the REST + // API has already validated the X-WP-Nonce cookie nonce at this point. + if ( ! current_user_can('edit_posts') ) { + return new \WP_Error( 'rest_forbidden', __( 'Insufficient permissions.', 'master-addons' ), [ 'status' => 403 ] ); } $query_args = [ @@ -272,21 +272,21 @@ } } else { // Fallback to post content - echo \do_shortcode( $template_post->post_content ); + echo \wp_kses_post( \do_shortcode( $template_post->post_content ) ); } - + $content = \ob_get_clean(); return $content; - + } catch ( \Exception $e ) { \ob_end_clean(); // Return post content as fallback if Elementor fails - return \do_shortcode( $template_post->post_content ); + return \wp_kses_post( \do_shortcode( $template_post->post_content ) ); } } // Fallback: Return post content if Elementor is not available - return \do_shortcode( $template_post->post_content ); + return \wp_kses_post( \do_shortcode( $template_post->post_content ) ); } public static function instance() @@ -12,7 +12,7 @@ public function __construct() { - add_action('admin_print_scripts', [$this, 'jltma_admin_js']); + add_action('admin_enqueue_scripts', [$this, 'jltma_admin_js']); // enqueue scripts add_action('admin_enqueue_scripts', [$this, 'jltma_header_footer_enqueue_scripts']); @@ -21,9 +21,11 @@ // Declare Variable for Rest API public function jltma_admin_js() { - echo "<script type='text/javascript'>\n"; - echo $this->jltma_common_js(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- outputs safe JS built by jltma_common_js() - echo "\n</script>"; + // Output the REST var through the enqueue API (inline-only handle) instead of a + // hardcoded <script> tag. + wp_register_script('jltma-theme-builder-vars', false, array(), JLTMA_VER, false); + wp_enqueue_script('jltma-theme-builder-vars'); + wp_add_inline_script('jltma-theme-builder-vars', $this->jltma_common_js()); } @@ -130,14 +130,27 @@ private function build_fallback_control($control_key, $field, $type) { $label = !empty($field['label']) ? esc_js($field['label']) : 'Control'; + // Elementor control constants are upper-case (e.g. REPEATER, SELECT). Normalise + // the type to a safe constant name so the generated PHP is always valid. + $type_const = strtoupper(preg_replace('/[^A-Za-z0-9_]/', '', (string) $type)); + if ('' === $type_const) { + $type_const = 'TEXT'; + } + $content = "\t\t\$this->add_control(\n"; $content .= "\t\t\t'{$control_key}',\n"; $content .= "\t\t\t[\n"; $content .= "\t\t\t\t'label' => esc_html__('{$label}', 'master-addons'),\n"; - $content .= "\t\t\t\t'type' => Controls_Manager::{$type},\n"; + $content .= "\t\t\t\t'type' => Controls_Manager::{$type_const},\n"; + + // REPEATER must always carry a 'fields' array, otherwise Elementor's + // sanitize_settings() throws a TypeError when iterating null fields. + if ('REPEATER' === $type_const) { + $content .= "\t\t\t\t'fields' => array(),\n"; + } if (isset($field['default'])) { - $default = is_string($field['default']) ? "'" . esc_js($field['default']) . "'" : $field['default']; + $default = $this->export_default_value($field['default']); $content .= "\t\t\t\t'default' => {$default},\n"; } @@ -146,4 +159,29 @@ return $content; } + + /** + * Convert a control default value into a valid PHP literal for the generated file. + * Arrays (e.g. repeater/group-control defaults) must never be interpolated directly, + * which would emit the literal token "Array" and produce a fatal parse error. + * + * @param mixed $value + * @return string + */ + private function export_default_value($value) { + if (is_array($value)) { + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export -- generating PHP source, not debug output + return var_export($value, true); + } + if (is_bool($value)) { + return $value ? 'true' : 'false'; + } + if (is_int($value) || is_float($value)) { + return (string) $value; + } + if (null === $value) { + return "''"; + } + return "'" . esc_js((string) $value) . "'"; + } } @@ -627,33 +627,25 @@ $css_code = ''; $js_code = ''; - // Sanitize HTML code - allow all HTML/PHP for widget development + // Sanitize HTML code. PHP is NEVER allowed (no arbitrary code execution), + // regardless of capability. Inline <script> is stripped — JavaScript belongs + // in the JS field, which is enqueued separately. Dynamic values use {{placeholders}}. if (isset($data['html_code'])) { - // For admin users with widget building capability, we allow unfiltered HTML - // This is necessary for Elementor widget development - if (current_user_can('unfiltered_html')) { - $html_code = $data['html_code']; - } else { - // For other users, use wp_kses_post which allows safe HTML - $html_code = wp_kses_post($data['html_code']); - } + $html_code = $this->strip_php_tags($data['html_code']); + $html_code = preg_replace('#<script\b[^>]*>.*?</script>#is', '', $html_code); + $html_code = preg_replace('#</?script\b[^>]*>#i', '', $html_code); } - // Sanitize CSS code - allow CSS but strip PHP/JS tags + // Sanitize CSS code - strip PHP/script/style tags and dangerous constructs. if (isset($data['css_code'])) { - // Remove any potential PHP/script tags from CSS $css_code = $this->sanitize_css($data['css_code']); } - // Sanitize JavaScript code - allow JS but validate syntax + // Sanitize JavaScript code. PHP is NEVER allowed; <script> tags are stripped so + // the value cannot break out of the generated/enqueued script context. if (isset($data['js_code'])) { - // For admin users, allow JavaScript for widget development - if (current_user_can('unfiltered_html')) { - $js_code = $data['js_code']; - } else { - // For other users, strip tags - $js_code = wp_strip_all_tags($data['js_code']); - } + $js_code = $this->strip_php_tags($data['js_code']); + $js_code = preg_replace('#</?script\b[^>]*>#i', '', $js_code); } // Also save data in unified format for widget generator @@ -671,6 +663,23 @@ } /** + * Strip every PHP open/close tag (and null bytes) from a string so user input + * can never become executable PHP once written into a generated widget file. + * + * @param string $code + * @return string + */ + private function strip_php_tags($code) { + if (!is_string($code) || '' === $code) { + return ''; + } + $code = str_replace(chr(0), '', $code); + $code = preg_replace('/<\?php/i', '', $code); + $code = str_replace(array('<?=', '<?', '?>'), '', $code); + return $code; + } + + /** * Sanitize CSS code * * @param string $css @@ -678,11 +687,19 @@ */ private function sanitize_css($css) { // Remove any PHP tags - $css = preg_replace('/<\?php.*?\?>/s', '', $css); - $css = preg_replace('/<\?.*?\?>/s', '', $css); + $css = $this->strip_php_tags($css); - // Remove any script tags + // Remove any <style>/<script> tags so the value cannot break out of the + // generated inline <style> block. + $css = preg_replace('#</?style\b[^>]*>#i', '', $css); $css = preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', '', $css); + $css = preg_replace('#</?script\b[^>]*>#i', '', $css); + + // Remove dangerous CSS constructs. + $css = preg_replace('/@import\b/i', '', $css); + $css = preg_replace('/expression\s*\(/i', '', $css); + $css = preg_replace('/(javascript|vbscript)\s*:/i', '', $css); + $css = preg_replace('/behavior\s*:/i', '', $css); // Remove any JavaScript event handlers $css = preg_replace('/on\w+\s*=\s*["\'].*?["\']/i', '', $css); @@ -795,11 +795,13 @@ } /** - * Render widget preview with PHP execution - * Handles AJAX request to render widget HTML with PHP code executed + * Render a static widget preview. + * Handles the AJAX request to render widget HTML with mock control values. + * No user-supplied PHP or JavaScript is ever executed — placeholders are + * replaced with escaped default values and the markup is escaped on output. */ public function render_preview() { - // Capability check: only administrators can execute widget previews (contains eval) + // Capability check: only administrators can request a widget preview. if (!current_user_can('manage_options')) { wp_send_json_error(['message' => 'You do not have permission to perform this action.'], 403); return; @@ -811,13 +813,25 @@ return; } - $html_code = isset($_POST['html_code']) ? wp_kses_post( wp_unslash( $_POST['html_code'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- nonce verified above + $html_code = isset($_POST['html_code']) ? wp_unslash( $_POST['html_code'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- nonce verified above; PHP/script stripped and output escaped below $css_code = isset($_POST['css_code']) ? sanitize_textarea_field( wp_unslash( $_POST['css_code'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- nonce verified above $controls = isset($_POST['controls']) ? json_decode( sanitize_textarea_field( wp_unslash( $_POST['controls'] ) ), true ) : []; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- nonce verified above - // Build mock settings array from controls + // Preview NEVER executes user code: strip PHP tags and inline <script>. + $html_code = str_replace(chr(0), '', $html_code); + $html_code = preg_replace('/<\?php/i', '', $html_code); + $html_code = str_replace(array('<?=', '<?', '?>'), '', $html_code); + $html_code = preg_replace('#<script\b[^>]*>.*?</script>#is', '', $html_code); + $html_code = preg_replace('#</?script\b[^>]*>#i', '', $html_code); + + // Strip </style> and PHP from preview CSS so it cannot break out of <style>. + $css_code = preg_replace('#</?style\b[^>]*>#i', '', $css_code); + $css_code = preg_replace('/<\?php/i', '', $css_code); + $css_code = str_replace(array('<?=', '<?', '?>'), '', $css_code); + + // Build mock settings array from control defaults. $settings = []; - if (!empty($controls)) { + if (!empty($controls) && is_array($controls)) { foreach ($controls as $control) { if (isset($control['name']) && isset($control['default'])) { $settings[$control['name']] = $control['default']; @@ -825,86 +839,25 @@ } } - // Replace placeholders with PHP variables using regex to handle dot notation - // Handles: {{field}}, {{field.property}}, {{field.property.subproperty}} - if (!empty($controls)) { - foreach ($controls as $control) { - if (isset($control['name'])) { - $control_name = $control['name']; - - // Regex to match {{control_name}} or {{control_name.property}} or {{control_name.property.subproperty}} - // Pattern: {{control_name}} followed by optional .property.property... - $pattern = '/\{\{' . preg_quote($control_name, '/') . '((?:\.[a-zA-Z0-9_]+)*)\}\}/'; - - $html_code = preg_replace_callback($pattern, function($matches) use ($control_name) { - $properties = $matches[1]; // e.g., "" or ".tabs" or ".property.subproperty" - - if (empty($properties)) { - // No properties, just {{control_name}} - // Return: $settings['control_name'] - return "\$settings['" . $control_name . "']"; - } else { - // Has properties like .tabs or .property.subproperty - // Convert to: $settings['control_name']['tabs'] or $settings['control_name']['property']['subproperty'] - $props = explode('.', ltrim($properties, '.')); - $result = "\$settings['" . $control_name . "']"; - foreach ($props as $prop) { - if (!empty($prop)) { - $result .= "['" . $prop . "']"; - } - } - return $result; - } - }, $html_code); + // Substitute {{field}} / {{field.prop}} placeholders with the mock default + // VALUE (escaped). This is a static render — no PHP is evaluated. + $html_code = preg_replace_callback('/\{\{([^}]+)\}\}/', function($matches) use ($settings) { + $path = array_filter(array_map('trim', explode('.', trim($matches[1]))), 'strlen'); + $value = $settings; + foreach ($path as $key) { + if (is_array($value) && isset($value[$key])) { + $value = $value[$key]; + } else { + return ''; } } - } - - // Execute PHP code in the HTML - ob_start(); - - // Make settings available in the PHP context - extract($settings, EXTR_SKIP); - - // Render the code - if (strpos($html_code, '<?php') === false && strpos($html_code, '<?=') === false) { - // No PHP code, just output as is - echo wp_kses_post( $html_code ); - } else { - // Has PHP code: write it to a temporary file in the uploads directory - // and include it. include is used instead of eval(), which is not - // permitted in WordPress.org hosted plugins. - $upload_dir = wp_upload_dir(); - $tmp_dir = trailingslashit($upload_dir['basedir']) . 'master-addons/widget-builder/tmp/'; - - if (!file_exists($tmp_dir)) { - wp_mkdir_p($tmp_dir); - file_put_contents($tmp_dir . 'index.php', "<?php\n// Silence is golden.\n"); - } - - $tmp_file = $tmp_dir . 'preview-' . wp_generate_password(20, false) . '.php'; - - if (false !== file_put_contents($tmp_file, $html_code)) { - try { - include $tmp_file; - } catch (ParseError $e) { - echo '<div style="color:red;padding:20px;background:#fff3cd;border:1px solid #ffc107;">'; - echo '<h3>PHP Parse Error in Preview:</h3>'; - echo '<pre>' . esc_html($e->getMessage()) . '</pre>'; - echo '<h4>Line ' . absint( $e->getLine() ) . '</h4>'; - echo '</div>'; - } catch (Exception $e) { - echo '<div style="color:red;padding:20px;background:#fff3cd;border:1px solid #ffc107;">'; - echo '<h3>PHP Error in Preview:</h3>'; - echo '<pre>' . esc_html($e->getMessage()) . '</pre>'; - echo '</div>'; - } finally { - wp_delete_file($tmp_file); - } + if (is_array($value)) { + $value = isset($value['url']) ? $value['url'] : ''; } - } + return esc_html((string) $value); + }, $html_code); - $rendered_html = ob_get_clean(); + $rendered_html = wp_kses_post($html_code); // Build full HTML document with CSS $output = '<!DOCTYPE html> @@ -26,6 +26,7 @@ private function __construct() { add_action('init', [$this, 'initialize'], 1); add_action('admin_init', [$this, 'admin_redirects']); + add_action('admin_init', [$this, 'maybe_migrate']); } public function initialize() { @@ -146,4 +147,135 @@ } // phpcs:enable WordPress.Security.NonceVerification.Recommended } + + /** + * One-time migration. Re-sanitizes stored widget code (strips any PHP/script that + * older versions may have persisted), purges stale generated files from current and + * legacy locations, and regenerates every widget from the now-clean data. Existing + * widget posts are never deleted — only their data is scrubbed and files rebuilt. + * Runs once per version (gated by an option) inside an authorised admin request. + */ + public function maybe_migrate() { + $option_key = 'jltma_widget_builder_migrated'; + $version = '3.1.1'; + + if (get_option($option_key) === $version) { + return; + } + + if (!current_user_can('manage_options')) { + return; + } + + // 1) Remove stale generated trees (current + legacy locations). + $upload = wp_upload_dir(); + $base = trailingslashit($upload['basedir']); + $this->delete_directory($base . 'master_addons/widgets'); + $this->delete_directory($base . 'master-addons/widget-builder/generated'); + $this->delete_directory($base . 'master-addons/widget-builder/tmp'); + + // 2) Scrub persisted widget data, then regenerate files from clean data. + $widget_ids = get_posts([ + 'post_type' => 'jltma_widget', + 'post_status' => 'any', + 'posts_per_page' => -1, + 'fields' => 'ids', + ]); + + foreach ($widget_ids as $widget_id) { + $data = get_post_meta($widget_id, '_jltma_widget_data', true); + if (is_array($data)) { + if (isset($data['html_code'])) { + $data['html_code'] = $this->scrub_html($data['html_code']); + } + if (isset($data['css_code'])) { + $data['css_code'] = $this->scrub_css($data['css_code']); + } + if (isset($data['js_code'])) { + $data['js_code'] = $this->scrub_js($data['js_code']); + } + update_post_meta($widget_id, '_jltma_widget_data', $data); + } + + $generator = new Widget_Generator($widget_id); + $generator->generate(); + } + + // 3) Drop the orphaned option left by the old option-based builder. + delete_option('jltma_custom_widgets'); + + update_option($option_key, $version); + } + + /** + * Strip PHP tags and inline <script> from widget HTML. + * + * @param string $code + * @return string + */ + private function scrub_html($code) { + if (!is_string($code) || '' === $code) { + return ''; + } + $code = str_replace(chr(0), '', $code); + $code = preg_replace('/<\?php/i', '', $code); + $code = str_replace(['<?=', '<?', '?>'], '', $code); + $code = preg_replace('#<script\b[^>]*>.*?</script>#is', '', $code); + $code = preg_replace('#</?script\b[^>]*>#i', '', $code); + return $code; + } + + /** + * Strip PHP tags and <style>/<script> tags from widget CSS. + * + * @param string $code + * @return string + */ + private function scrub_css($code) { + if (!is_string($code) || '' === $code) { + return ''; + } + $code = str_replace(chr(0), '', $code); + $code = preg_replace('/<\?php/i', '', $code); + $code = str_replace(['<?=', '<?', '?>'], '', $code); + $code = preg_replace('#</?style\b[^>]*>#i', '', $code); + $code = preg_replace('#</?script\b[^>]*>#i', '', $code); + return $code; + } + + /** + * Strip PHP tags and <script> tags from widget JS. + * + * @param string $code + * @return string + */ + private function scrub_js($code) { + if (!is_string($code) || '' === $code) { + return ''; + } + $code = str_replace(chr(0), '', $code); + $code = preg_replace('/<\?php/i', '', $code); + $code = str_replace(['<?=', '<?', '?>'], '', $code); + $code = preg_replace('#</?script\b[^>]*>#i', '', $code); + return $code; + } + + /** + * Recursively delete a directory via WP_Filesystem. + * + * @param string $dir + */ + private function delete_directory($dir) { + if (empty($dir) || !is_dir($dir)) { + return; + } + global $wp_filesystem; + if (empty($wp_filesystem)) { + require_once ABSPATH . 'wp-admin/includes/file.php'; + WP_Filesystem(); + } + if (!empty($wp_filesystem)) { + $wp_filesystem->delete($dir, true); + } + } } @@ -154,12 +154,43 @@ */ private function create_directory() { if (!file_exists($this->widget_dir)) { - return wp_mkdir_p($this->widget_dir); + if (!wp_mkdir_p($this->widget_dir)) { + return false; + } } + + // Defense in depth: drop a silence index.php into the base and per-widget + // directories so generated files cannot be listed/browsed directly. Generated + // PHP is plugin-authored and ABSPATH-guarded, so it is inert over the web. + $this->harden_directory($this->upload_dir); + $this->harden_directory($this->widget_dir); + return true; } /** + * Write a silence index.php into a generated directory. + * + * @param string $dir + */ + private function harden_directory($dir) { + if (empty($dir)) { + return; + } + + global $wp_filesystem; + if (empty($wp_filesystem)) { + require_once(ABSPATH . '/wp-admin/includes/file.php'); + WP_Filesystem(); + } + + $index = trailingslashit($dir) . 'index.php'; + if (!file_exists($index)) { + $wp_filesystem->put_contents($index, "<?php\n// Silence is golden.\n", FS_CHMOD_FILE); + } + } + + /** * Generate PHP widget file * * @return bool|WP_Error @@ -397,6 +428,8 @@ */ private function build_get_icon() { $icon = !empty($this->widget_data['icon']) ? $this->widget_data['icon'] : 'eicon-code'; + // Escape for safe interpolation into a single-quoted PHP string literal. + $icon = addslashes(sanitize_text_field($icon)); $content = "\tpublic function get_icon() {\n"; $content .= "\t\treturn '{$icon}';\n"; @@ -412,6 +445,8 @@ */ private function build_get_categories() { $category = !empty($this->widget_data['category']) ? $this->widget_data['category'] : 'master-addons'; + // Escape for safe interpolation into a single-quoted PHP string literal. + $category = addslashes(sanitize_text_field($category)); $content = "\tpublic function get_categories() {\n"; $content .= "\t\treturn ['{$category}'];\n"; @@ -1020,7 +1055,7 @@ // For simple variable references, wrap in echo with appropriate escaping if (in_array(strtolower($control_type), ['wysiwyg', 'code'])) { - return '<' . '?php echo ' . $var_ref . '; ?' . '>'; + return '<' . '?php echo wp_kses_post(' . $var_ref . '); ?' . '>'; } else { return '<' . '?php echo esc_html(' . $var_ref . '); ?' . '>'; } @@ -1251,12 +1286,13 @@ return ''; } - // Ensure the HTML doesn't contain closing PHP tags that would break the context - // This is a security measure to prevent breaking out of the render method - // We replace any standalone PHP tag boundaries - $html = str_replace('?' . '><' . '?php', '<!-- php-boundary -->', $html); - - // Ensure the html does not contain {{ }} template string + // Security: strip every PHP open/close tag so user-supplied markup can never + // execute as PHP once written into the generated widget file. Generated files + // contain only plugin-authored PHP; user HTML is treated as inert markup whose + // {{placeholders}} are converted to escaped echo statements elsewhere. + $html = str_replace(chr(0), '', $html); + $html = preg_replace('/<\?php/i', '', $html); + $html = str_replace(array('<?=', '<?', '?>'), '', $html); return $html; } @@ -1419,9 +1455,9 @@ $css = trim($css); - // Remove any PHP tags - $css = preg_replace('/<\?php.*?\?>/s', '', $css); - $css = preg_replace('/<\?.*?\?>/s', '', $css); + // Remove any PHP tags (balanced and bare) so nothing executes as PHP. + $css = preg_replace('/<\?php/i', '', $css); + $css = str_replace(array('<?=', '<?', '?>'), '', $css); // Remove any HTML script tags $css = preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', '', $css); @@ -1452,16 +1488,17 @@ $js = trim($js); - // Remove any PHP tags - $js = preg_replace('/<\?php.*?\?>/s', '', $js); - $js = preg_replace('/<\?.*?\?>/s', '', $js); + // Remove any PHP tags (balanced and bare) so nothing executes as PHP. + $js = preg_replace('/<\?php/i', '', $js); + $js = str_replace(array('<?=', '<?', '?>'), '', $js); + + // Strip <script> tags so the value cannot break out of the enqueued/inline + // <script> context. JS string literals should not contain literal script tags. + $js = preg_replace('#</?script\b[^>]*>#i', '', $js); // Remove null bytes $js = str_replace(chr(0), '', $js); - // Note: We don't strip HTML tags from JS as they might be part of string literals - // The responsibility is on the admin user to write secure code - return $js; } Only in /home/deploy/wp-safety.org/data/plugin-versions/master-addons/3.1.0/inc/admin/widget-builder: widget-builder.php @@ -237,10 +237,14 @@ // Restrict Content public function jltma_restrict_content() { + // Verify nonce first (localized to the frontend script as JLTMA_SCRIPTS.nonce). + if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'master-addons-elementor' ) ) { + wp_send_json_error( __( 'Security check failed.', 'master-addons' ) ); + } - parse_str( isset( $_POST['fields'] ) ? sanitize_text_field( wp_unslash( $_POST['fields'] ) ) : '', $output ); // phpcs:ignore WordPress.Security.NonceVerification.Missing -- no nonce available for this AJAX handler + parse_str( isset( $_POST['fields'] ) ? sanitize_text_field( wp_unslash( $_POST['fields'] ) ) : '', $output ); // phpcs:ignore WordPress.Security.NonceVerification.Missing -- nonce verified above - if (!empty($_POST['fields'])) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- no nonce available for this AJAX handler + if (!empty($_POST['fields'])) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- nonce verified above // Math Captcha if ( isset( $_POST['restrict_type'] ) && $_POST['restrict_type'] == 'math_captcha' ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- no nonce available for this AJAX handler @@ -63,6 +63,10 @@ { check_ajax_referer('jltma_deactivation_nonce'); + if ( ! current_user_can( 'deactivate_plugins' ) ) { + wp_send_json_error( [ 'message' => __( 'Insufficient permissions', 'master-addons' ) ] ); + } + $deactivation_reason = !empty($_POST['deactivation_reason']) ? sanitize_text_field(wp_unslash($_POST['deactivation_reason'])) : ''; if (empty($deactivation_reason)) { @@ -1183,12 +1183,23 @@ 'category' => '', 'orderby' => '', 'posts_per_page' => 1, - 'paged' => $paged, - 'offset' => $new_offset, 'ignore_sticky_posts' => 1, ); $query_args = wp_parse_args( $args, $defaults ); + + // WordPress ignores 'paged' whenever 'offset' is set, and mixing the two breaks + // pagination (it can silently skip to older posts). $new_offset already encodes + // the current page, so use exactly one pagination source: offset when there is + // an offset to apply, otherwise paged. + if ( $new_offset > 0 ) { + $query_args['offset'] = $new_offset; + unset( $query_args['paged'] ); + } else { + $query_args['paged'] = max( 1, (int) $paged ); + unset( $query_args['offset'] ); + } + $posts = get_posts( $query_args ); wp_reset_postdata(); @@ -52,6 +52,10 @@ { check_ajax_referer('jltma_notification_nonce'); + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( [ 'message' => __( 'Insufficient permissions', 'master-addons' ) ] ); + } + $action_type = !empty($_REQUEST['action_type']) ? sanitize_key($_REQUEST['action_type']) : ''; $notification_type = !empty($_REQUEST['notification_type']) ? sanitize_key($_REQUEST['notification_type']) : ''; $trigger_time = !empty($_REQUEST['trigger_time']) ? sanitize_text_field(wp_unslash($_REQUEST['trigger_time'])) : ''; @@ -42,6 +42,10 @@ { check_ajax_referer('jltma_subscribe_nonce'); + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( [ 'message' => __( 'Insufficient permissions', 'master-addons' ) ] ); + } + $name = !empty($_POST['name']) ? sanitize_text_field(wp_unslash($_POST['name'])) : ''; $email = !empty($_POST['email']) ? sanitize_email(wp_unslash($_POST['email'])) : ''; @@ -43,6 +43,10 @@ { check_ajax_referer('jltma_allow_collect_nonce'); + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( [ 'message' => __( 'Insufficient permissions', 'master-addons' ) ] ); + } + $this->jltma_collect_ajax_data(); } @@ -98,14 +98,14 @@ // Create .htaccess for security $htaccess_content = "Options -Indexes\n<Files \"*.json\">\nOrder allow,deny\nAllow from all\n</Files>"; - file_put_contents($this->cache_dir . '.htaccess', $htaccess_content); + $this->fs_put_contents($this->cache_dir . '.htaccess', $htaccess_content); // Create index.php files $index_content = "<?php\n// Silence is golden.\n"; - file_put_contents($this->cache_dir . 'index.php', $index_content); + $this->fs_put_contents($this->cache_dir . 'index.php', $index_content); foreach ($subdirs as $subdir) { - file_put_contents($this->cache_dir . $subdir . '/index.php', $index_content); + $this->fs_put_contents($this->cache_dir . $subdir . '/index.php', $index_content); } } @@ -504,7 +504,7 @@ $image_data = wp_remote_retrieve_body($response); - if (file_put_contents($local_file, $image_data)) { + if ($this->fs_put_contents($local_file, $image_data)) { return $local_file; } @@ -580,6 +580,26 @@ } /** + * Write a file through the WP_Filesystem API. + * + * @param string $file + * @param string $contents + * @return bool + */ + private function fs_put_contents($file, $contents) + { + global $wp_filesystem; + if (empty($wp_filesystem)) { + require_once ABSPATH . 'wp-admin/includes/file.php'; + WP_Filesystem(); + } + if (empty($wp_filesystem)) { + return false; + } + return $wp_filesystem->put_contents($file, $contents, FS_CHMOD_FILE); + } + + /** * Write cache file */ private function write_cache_file($file_path, $data) @@ -590,7 +610,7 @@ } $json = wp_json_encode($data, JSON_PRETTY_PRINT); - return file_put_contents($file_path, $json) !== false; + return $this->fs_put_contents($file_path, $json) !== false; } /** @@ -604,7 +624,7 @@ 'expiry' => $this->cache_expiry ]; - return file_put_contents($meta_file, wp_json_encode($meta)) !== false; + return $this->fs_put_contents($meta_file, wp_json_encode($meta)) !== false; } /** @@ -14,7 +14,7 @@ add_action('admin_enqueue_scripts', [$this, 'admin_enqueue_scripts']); add_action('wp_enqueue_scripts', [$this, 'frontend_js']); - add_action('admin_print_scripts', [$this, 'admin_js']); + add_action('admin_enqueue_scripts', [$this, 'admin_js']); } public function common_js() @@ -90,9 +90,11 @@ // Admin Rest API Variable public function admin_js() { - echo "<script type='text/javascript'>\n"; - echo $this->common_js(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- common_js returns safe JS script content - echo "\n</script>"; + // Output the REST var through the enqueue API (inline-only handle) instead of a + // hardcoded <script> tag. + wp_register_script('jltma-megamenu-vars', false, array(), JLTMA_VER, false); + wp_enqueue_script('jltma-megamenu-vars'); + wp_add_inline_script('jltma-megamenu-vars', $this->common_js()); } @@ -30,6 +30,87 @@ // Render the custom CSS add_action('elementor/element/parse_css', array($this, 'jltma_add_post_css'), 10, 2); + + // Security: sanitize Custom CSS on save. The control is registered only for + // edit_posts users, but Elementor saves can be crafted directly via admin-ajax + // (elementor_ajax), so the stored value must be cleaned of tag-breakout vectors + // (e.g. "</style><script>") before it is persisted and later added to the + // (possibly inline) stylesheet. + add_filter('elementor/document/save/data', array($this, 'jltma_sanitize_custom_css_on_save'), 10, 2); + } + + /** + * Sanitize the 'custom_css' element settings in the data being saved. + * + * @param array $data Document data ('settings' + 'elements'). + * @param mixed $document Elementor document instance. + * @return array + */ + public function jltma_sanitize_custom_css_on_save($data, $document) + { + if (isset($data['settings']['custom_css'])) { + $data['settings']['custom_css'] = $this->jltma_sanitize_css($data['settings']['custom_css']); + } + + if (!empty($data['elements']) && is_array($data['elements'])) { + $data['elements'] = $this->jltma_sanitize_element_custom_css($data['elements']); + } + + return $data; + } + + /** + * Recursively sanitize the 'custom_css' setting in element data. + * + * @param array $elements + * @return array + */ + private function jltma_sanitize_element_custom_css($elements) + { + foreach ($elements as &$element) { + if (isset($element['settings']['custom_css'])) { + $element['settings']['custom_css'] = $this->jltma_sanitize_css($element['settings']['custom_css']); + } + if (!empty($element['elements']) && is_array($element['elements'])) { + $element['elements'] = $this->jltma_sanitize_element_custom_css($element['elements']); + } + } + unset($element); + + return $elements; + } + + /** + * Strip tag-breakout and active vectors from a CSS string. Valid CSS never needs + * HTML tags, PHP tags, expression(), @import or javascript:/behavior: — removing + * them prevents breaking out of an inline <style> block (XSS) while leaving normal + * declarations intact. + * + * @param string $css + * @return string + */ + private function jltma_sanitize_css($css) + { + if (!is_string($css) || '' === $css) { + return ''; + } + + $css = str_replace(chr(0), '', $css); + + // PHP tags. + $css = preg_replace('/<\?php/i', '', $css); + $css = str_replace(array('<?=', '<?', '?>'), '', $css); + + // Any HTML tag (kills </style>/<script> breakout). + $css = preg_replace('#</?[a-z!][^>]*>#i', '', $css); + + // Dangerous CSS constructs. + $css = preg_replace('/expression\s*\(/i', '', $css); + $css = preg_replace('/(javascript|vbscript)\s*:/i', '', $css); + $css = preg_replace('/behavior\s*:/i', '', $css); + $css = preg_replace('/@import\b/i', '', $css); + + return $css; } @@ -108,6 +189,10 @@ $css = trim($element_settings['custom_css']); + // Defense in depth: strip tag-breakout/active vectors before adding the CSS to + // the (possibly inline) stylesheet — covers values saved before this fix. + $css = $this->jltma_sanitize_css($css); + if (empty($css)) { return; } Only in /home/deploy/wp-safety.org/data/plugin-versions/master-addons/3.1.0/inc/modules/utilities: custom-js @@ -217,7 +217,10 @@ $jltma_r_p_b_custom_css .= '.ma-el-page-scroll-indicator{top:inherit !important; bottom:0;}'; } } - echo '<style>' . wp_strip_all_tags( $jltma_r_p_b_custom_css ) . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CSS value, tags stripped + // Inline CSS through the enqueue API (late-printed in the footer) instead of a hardcoded <style> tag. + wp_register_style('jltma-reading-progress-bar', false, array(), JLTMA_VER); + wp_enqueue_style('jltma-reading-progress-bar'); + wp_add_inline_style('jltma-reading-progress-bar', wp_strip_all_tags($jltma_r_p_b_custom_css)); } } @@ -243,7 +246,7 @@ if ($page_settings_model->get_settings('jltma_enable_reading_progress_bar') == 'yes') { - echo '<script> + $jltma_rpb_js = ' (function() { "use strict"; function initProgressBar() { @@ -277,7 +280,11 @@ initProgressBar(); } })(); - </script>'; + '; + // Output through the enqueue API (footer) instead of a hardcoded <script> tag. + wp_register_script('jltma-reading-progress-bar', false, array(), JLTMA_VER, true); + wp_enqueue_script('jltma-reading-progress-bar'); + wp_add_inline_script('jltma-reading-progress-bar', $jltma_rpb_js); } // Enable Progress Bar @@ -309,7 +316,10 @@ $jltma_r_p_b_custom_css .= '.logged-in.admin-bar .ma-el-page-scroll-indicator{top:32px;}'; } - echo '<style>' . wp_strip_all_tags( $jltma_r_p_b_custom_css ) . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CSS value, tags stripped + // Inline CSS through the enqueue API (late-printed in the footer) instead of a hardcoded <style> tag. + wp_register_style('jltma-reading-progress-bar', false, array(), JLTMA_VER); + wp_enqueue_style('jltma-reading-progress-bar'); + wp_add_inline_style('jltma-reading-progress-bar', wp_strip_all_tags($jltma_r_p_b_custom_css)); } } @@ -46,73 +46,12 @@ } -if (isset($wp_version)) { - # More details about how it works here: - # <http://michelf.ca/weblog/2005/wordpress-text-flow-vs-markdown/> - - # Post content and excerpts - # - Remove WordPress paragraph generator. - # - Run Markdown on excerpt, then remove all tags. - # - Add paragraph tag around the excerpt, but remove it for the excerpt rss. - if (MARKDOWN_WP_POSTS) { - remove_filter('the_content', 'wpautop'); - remove_filter('the_content_rss', 'wpautop'); - remove_filter('the_excerpt', 'wpautop'); - add_filter('the_content', 'Markdown', 6); - add_filter('the_content_rss', 'Markdown', 6); - add_filter('get_the_excerpt', 'Markdown', 6); - add_filter('get_the_excerpt', 'trim', 7); - add_filter('the_excerpt', 'mdwp_add_p'); - add_filter('the_excerpt_rss', 'mdwp_strip_p'); - - remove_filter('content_save_pre', 'balanceTags', 50); - remove_filter('excerpt_save_pre', 'balanceTags', 50); - add_filter('the_content', 'balanceTags', 50); - add_filter('get_the_excerpt', 'balanceTags', 9); - } - - # Comments - # - Remove WordPress paragraph generator. - # - Remove WordPress auto-link generator. - # - Scramble important tags before passing them to the kses filter. - # - Run Markdown on excerpt then remove paragraph tags. - if (MARKDOWN_WP_COMMENTS) { - remove_filter('comment_text', 'wpautop', 30); - remove_filter('comment_text', 'make_clickable'); - add_filter('pre_comment_content', 'Markdown', 6); - add_filter('pre_comment_content', 'mdwp_hide_tags', 8); - add_filter('pre_comment_content', 'mdwp_show_tags', 12); - add_filter('get_comment_text', 'Markdown', 6); - add_filter('get_comment_excerpt', 'Markdown', 6); - add_filter('get_comment_excerpt', 'mdwp_strip_p', 7); - - global $mdwp_hidden_tags, $mdwp_placeholders; - $mdwp_hidden_tags = explode(' ', - '<p> </p> <pre> </pre> <ol> </ol> <ul> </ul> <li> </li>'); - $mdwp_placeholders = explode(' ', - 'cRw07MooOM H1xdtu4j4c cer2mzrA6X DGv31g9cer by0ZC1wmWE '. - 'ZY5VwzoEby hyNAv1AfTL W7mEYWdChy yvN8pgy16G X9aubbHUyv'); - } - - function mdwp_add_p($text) { - if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) { - $text = '<p>'.$text.'</p>'; - $text = preg_replace('{\n{2,}}', "</p>\n\n<p>", $text); - } - return $text; - } - - function mdwp_strip_p($t) { return preg_replace('{</?p>}i', '', $t); } - - function mdwp_hide_tags($text) { - global $mdwp_hidden_tags, $mdwp_placeholders; - return str_replace($mdwp_hidden_tags, $mdwp_placeholders, $text); - } - function mdwp_show_tags($text) { - global $mdwp_hidden_tags, $mdwp_placeholders; - return str_replace($mdwp_placeholders, $mdwp_hidden_tags, $text); - } -} +# NOTE (Master Addons): The upstream PHP-Markdown WordPress auto-integration block +# was removed. It hooked Markdown() onto the_content/the_excerpt/comment_text for +# the whole site, which (a) is not how this plugin uses the parser — we only call +# Markdown( $string ) directly to render bundled readme/changelog text in admin — +# and (b) would output parser-generated HTML through the_content without escaping. +# The Markdown() function and parser class above are retained for that direct use. ### bBlog Plugin Info ### @@ -10,7 +10,7 @@ * Domain Path: /languages * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html - * Version: 3.1.0 + * Version: 3.1.1 * Elementor tested up to: 4.0.4 * Elementor Pro tested up to: 4.0.4 * Wordfence Vendor Key: qgxtflvqaabgarz4gu9nozmceloswzrg @@ -4,7 +4,7 @@ Requires at least: 5.0 Tested up to: 6.9 Requires PHP: 7.0 -Stable tag: 3.1.0 +Stable tag: 3.1.1 License: GPLv2 License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -385,6 +385,16 @@ == Changelog == += Master Elementor Addons 3.1.1 (23-05-2026) = +* Security: Widget Builder no longer accepts or executes arbitrary PHP. PHP tags are stripped from all widget HTML/CSS/JS on save and during generation, so generated widget files contain only plugin-authored code. Dynamic values use {{placeholders}} that are escaped on output. +* Security: Removed the Widget Builder preview path that wrote user code to a temporary PHP file and included it. Previews now render statically with escaped mock values — no user PHP or JavaScript is executed. +* Security: Fixed an authenticated (author+) Stored XSS via the 'jtlma_custom_js' page setting / 'custom_js' element setting of the Custom JS extension (reported in versions up to 3.1.0). The extension is removed from the free plugin entirely (no render path remains); in Master Addons Pro the unfiltered_html capability is now enforced on save (the value is stripped for unprivileged users via the elementor/document/save filter) and at render (output gated by the post author's capability), not only during control registration. +* Security: Hardened the Custom CSS extension against tag-breakout XSS. The 'custom_css' element setting is now sanitized on save (via the elementor/document/save filter) and again on render before it is added to the stylesheet, stripping HTML/PHP tags (e.g. a "</style><script>" breakout), expression(), @import and javascript:/behavior: — closing the same direct-AJAX save bypass. +* Security: Added a nonce check to the Content Restriction AJAX handler and a capability check to the popup shortcode and template plugin-status AJAX handlers. +* Security: Sanitized the Select2 REST nonce flow (fail-closed) and tightened its capability to edit_posts; sanitized the template-data request and template-kit theme-activation nonce. +* Security: The bundled Markdown library no longer hooks the_content/comment filters globally; the jltma_template shortcode now escapes its returned markup. +* Maintenance: Updated @popperjs/core from 2.9.3 to 2.11.8. Removed the legacy option-based Widget Builder. Existing custom widgets are migrated automatically (data scrubbed and files regenerated; no widgets are deleted). + = Master Elementor Addons 3.1.0 (19-05-2026) = * Compliance: Documented every external service the plugin contacts (Master Addons template API, Pixar Labs API, Google reCAPTCHA, Twitter/X, WhatsApp, Freemius) with terms and privacy links. * Compliance: Removed the Template Kit "fix compatibility" routine that rewrote the active_plugins option. Only in /home/deploy/wp-safety.org/data/plugin-versions/master-addons/3.1.0: tsconfig.json Only in /home/deploy/wp-safety.org/data/plugin-versions/master-addons/3.1.0: tsconfig.node.json Only in /home/deploy/wp-safety.org/data/plugin-versions/master-addons/3.1.0: vite.config.assets.js Only in /home/deploy/wp-safety.org/data/plugin-versions/master-addons/3.1.0: vite.config.js
Exploit Outline
An attacker with at least Author-level permissions can exploit this vulnerability by bypassing the Elementor Editor UI and interacting directly with the AJAX API. First, the attacker creates or edits a post and extracts a valid Elementor AJAX nonce from the editor environment (typically found in 'window.elementorCommonConfig.ajax.nonce'). They then send a POST request to '/wp-admin/admin-ajax.php?action=elementor_ajax' containing a 'save_page_settings' action payload. This payload includes the 'jtlma_custom_js' parameter set to a malicious JavaScript string. Since the plugin does not verify the user's 'unfiltered_html' capability during the save process, the script is persisted in post metadata and will execute whenever a user views the affected page.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.