<script src="/nexl_app.js"></script>
YUI.add('lang/ixl_social-sharing-commonjs_js_SocialSharing', function(Y) {
  var intl = require('ixl/util-commonjs/Intl');
  var text = {};
  text['copy_link.link_copied'] = 'Link copied';
  text['copy_link.tooltip_text.skill'] = 'Copy the link to this skill';
  text['basic_config.tweet_description'] = 'Check out @IXLLearning!';
  text['copy_link.tooltip_text.lesson'] = 'Copy the link to this lesson';
  intl.addModule('ixl_social-sharing-commonjs_js_SocialSharing', text);
}, '@VERSION@', {'requires':['ixl_content_util_YLang', 'ixl_util-commonjs_YEscape', 'ixl_util-commonjs_Intl']});
!function(){function e(e,t,i){const n=e("ixl/external/react/react"),o=e("ixl/external/react/reactDom"),s=e("ixl/external/react/prop-types"),l={onClick:s.func.isRequired,infoTooltipContent:s.string.isRequired,clickedTooltipContent:s.string.isRequired};class r extends n.Component{constructor(e){super(e),this.state={isClicked:!1,renderTooltip:!1},this._handleCopyLink=this._handleCopyLink.bind(this),this._handleMouseEnter=this._handleMouseEnter.bind(this),this._handleMouseLeave=this._handleMouseLeave.bind(this),this._handleOutsideClick=this._handleOutsideClick.bind(this),this.ref=n.createRef()}componentDidMount(){document.addEventListener("mousedown",this._handleOutsideClick),document.addEventListener("touchdown",this._handleOutsideClick)}componentWillUnmount(){this._clearTimer(this.linkCopiedTimer),document.removeEventListener("mousedown",this._handleOutsideClick),document.removeEventListener("touchdown",this._handleOutsideClick)}_handleOutsideClick(e){this.ref.current.contains(e.target)||this.setState({renderTooltip:!1,isClicked:!1})}_handleMouseEnter(){this.setState({renderTooltip:!0})}_handleMouseLeave(){this.state.isClicked||this.setState({renderTooltip:!1})}_handleCopyLink(){this._clearTimer(this.linkCopiedTimer),this.props.onClick(),this.setState({isClicked:!0,renderTooltip:!0},()=>{this.linkCopiedTimer=window.setTimeout(()=>{this.setState({isClicked:!1,renderTooltip:!1})},1500)})}_clearTimer(e){e&&window.clearTimeout(e)}render(){const e="social-sharing-tooltip-wrapper "+(this.state.renderTooltip?"show-tooltip":"");return n.createElement("div",{className:e,ref:this.ref},n.createElement("div",{onClick:this._handleCopyLink,onMouseEnter:this._handleMouseEnter,onMouseLeave:this._handleMouseLeave,className:"copy-link share-button",tabIndex:0},n.createElement("span",{className:"social-sharing-tooltip"},this.state.isClicked?this.props.clickedTooltipContent:this.props.infoTooltipContent)))}}r.displayName="CopyLinkButton",r.propTypes=l,i.exports={createCopyLinkButton:function(e,t){o.render(n.createElement(r,t),e)}}}e.moduleId="ixl_social-sharing-commonjs_components_CopyLinkTooltip",define(e)}();
YUI.add('lang/ixl_social-sharing-commonjs_js_ClickTrackingUtils', function(Y) {
  var intl = require('ixl/util-commonjs/Intl');
  var text = {};
  text['google_classroom.name'] = 'Google Classroom';
  text['copy_link.name'] = 'Copy link';
  text['twitter.name'] = 'Twitter';
  text['basic_config.tweet_description'] = 'Check out @IXLLearning!';
  text['fb.name'] = 'Facebook';
  intl.addModule('ixl_social-sharing-commonjs_js_ClickTrackingUtils', text);
}, '@VERSION@', {'requires':['ixl_content_util_YLang', 'ixl_util-commonjs_YEscape', 'ixl_util-commonjs_Intl']});
!function(){function t(t,o,n){var e=t("ixl/util-commonjs/Intl").getModule("ixl_social-sharing-commonjs_js_ClickTrackingUtils");const i=t("ixl/util-commonjs/gaq"),c="SocialSharing",a="fb",s="gc",r="tw";function l(t,o,n){n?i("send","event",c,t,o,n):i("send","event",c,t,o)}n.exports={trackClickback:function(){const t=window.location.hash;function o(t){var[o,n]=window.location.href.split("#"+t);if(n)"&"===n.charAt(0)&&(n=n.substring(1));else{const t=o.length;"&"===o.charAt(t-1)&&(o=o.substring(0,t-1))}window.location.href=o+"#"+n}if(!t)return;const n=window.location.origin+window.location.pathname;t.startsWith(a)&&(l(e.getText("fb.name"),n,2),o(a)),t.startsWith(r)&&(l(e.getText("twitter.name"),n,2),o(r)),t.startsWith(s)&&(l(e.getText("google_classroom.name"),n,2),o(s))},trackCopyLink:function(t){l(e.getText("copy_link.name"),t,1)},trackFacebook:function(t,o){return l(e.getText("fb.name"),t,1),"http://www.facebook.com/sharer.php?u="+(t+(o?"#"+a:""))},trackGoogleClassroom:function(t,o){return l(e.getText("google_classroom.name"),t,1),`https://classroom.google.com/share?url=${t+(o?"%23"+s:"")}`},trackTwitter:function(t,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getText("basic_config.tweet_description");return l(e.getText("twitter.name"),t,1),"https://twitter.com/share?url="+(t+(o?"%23"+r:""))+"&text="+n}}}t.moduleId="ixl_social-sharing-commonjs_js_ClickTrackingUtils",define(t)}();
!function(){function o(o,n,t){var e=o("ixl/util-commonjs/Intl").getModule("ixl_social-sharing-commonjs_js_SocialSharing"),i=o("ixl/email-framework/common/Utils"),a=o("ixl/social-sharing-commonjs/components/CopyLinkTooltip"),{isFeatureEnabled:l}=o("ixl/util-commonjs/FeatureToggle");o("ixl/content/util/is-mobile-device");const{trackClickback:c,trackCopyLink:s,trackFacebook:r,trackGoogleClassroom:m,trackTwitter:u}=o("ixl/social-sharing-commonjs/js/ClickTrackingUtils");var d={link:"http://www.ixl.com",tweetDescription:e.getText("basic_config.tweet_description"),trackClickback:!0,loadOnly:!1,setUpSocialMedia:!0,aType:-1,pageType:"skill"};function k(o,n,t){window.open(o,"_blank","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height="+n+",width="+t)}function p(o,n){k(r(o,n),450,600)}function g(o,n,t){k(u(o,t,n),"400","550")}function f(o){return new Promise(function(n,t){if(!o.loadOnly){document.getElementsByClassName("facebook-share share-button")[0].addEventListener("click",function(n){n.stopPropagation(),p(o.link,!0)})}n()})}function y(o){return new Promise(function(n){if(o.loadOnly)n("load only - do not set up a button");else{var t=document.getElementsByClassName("twitter-share share-button")[0];t.addEventListener("click",function(n){n.stopPropagation(),g(o.tweetLink,o.tweetDescription,!0)}),n(t)}})}function h(o){return new Promise(function(n,t){(void 0===o.aType||parseInt(o.aType,10)<0)&&n("Google Classroom not required"),o.loadOnly&&n("load only - do not set up a button");const e=document.getElementsByClassName("google-classroom share-button")[0];e.classList.remove("none"),e.addEventListener("click",function(n){var t;n.stopPropagation(),t=o.link,k(m(t,!0),"400","640")}),n()})}function b(o){l("SOCIAL_SHARING_COPY_LINK")&&a.createCopyLinkButton(document.getElementById("copy-link-button"),{onClick:function(){var n=o.customDomainUrl?o.link+"?signInRedirect="+encodeURIComponent(o.customDomainUrl):o.link;s(n),i.copyToClipboard(n)},infoTooltipContent:e.getText("copy_link.tooltip_text."+o.pageType),clickedTooltipContent:e.getText("copy_link.link_copied")})}function w(){var o=document.getElementsByClassName("social-share-bar")[0];o.classList.add("loaded")}window.shareReport=function(o){var n=JSON.parse(o.shareData);n.link=n.host+n.link,n.image=n.host+n.image,"fb"===o.channel?p(n.link,!0):"tw"===o.channel&&g(n.link,n.tweet,!0)};t.exports={setUpSocialSharing:function(o){var n={...d,...o};n.trackClickback&&c(),n.setUpSocialMedia&&Promise.all([f(n),y(n),h(n),b(n)]).then(w)}}}o.moduleId="ixl_social-sharing-commonjs_js_SocialSharing",define(o)}();











<!-- NEXL GLOBAL FIXES V4 -->
<script>
// NEXL STUDY - MASTER APP CONTROLLER
// This script overrides IXL functionality for offline use.

(function initNexlApp() {
    // 1. ANNIHILATE ALL POP-UPS AND MODALS
    const killModals = () => {
        const modals = document.querySelectorAll('.membership-banner, .ixl-modal, .yui3-panel, .ixl-dialog, [role="dialog"], .membership-prompt, .trial-banner, .modal-backdrop, .toast-message');
        modals.forEach(m => m.remove());
        
        // Unblock scrolling if blocked
        document.body.style.overflow = 'auto';
        document.body.classList.remove('modal-open');
    };
    
    // Run modal killer immediately and every 1s (to catch delayed pop-ups)
    killModals();
    setInterval(killModals, 1000);

    // X. GLOBAL CLEANUP FOR CARD-ONLY MODE
    const killExtraUI = () => {
        const clutter = document.querySelectorAll(`
            #hd, .global-header, #header, header, 
            #bd-footer, .page-footer, .global-footer, footer, 
            .practice-stats-container, #stats-ribbon, #practice-stats, 
            .teacher-tools, .scratchpad-tool, #bd-head,
            nav.breadcrumb-nav, nav.sub-navigation, .box-site-nav-content, 
            .share-label, .social-share-bar
        `);
        clutter.forEach(el => el.remove());
        
        // Re-center the practice area if needed
        const practiceRoot = document.querySelector('.practice-views-root');
        if (practiceRoot) {
            practiceRoot.style.margin = '0 auto';
            practiceRoot.style.float = 'none';
            practiceRoot.style.width = '100%';
            practiceRoot.style.maxWidth = '900px';
        }
    };
    killExtraUI();
    setInterval(killExtraUI, 1000);

    // 2. INJECT BEAUTIFUL NEXL LOGO
    const logoContainers = document.querySelectorAll('.ixl-logo, #hd-logo, .global-header-logo, header a[href="/"]');
    logoContainers.forEach(container => {
        container.innerHTML = `
            <div style="display: flex; align-items: center; font-family: 'Inter', sans-serif; font-weight: 900; font-size: 32px; letter-spacing: -1px; text-decoration: none;">
                <span style="color: #0066FF;">N</span>
                <span style="color: #3399FF;">E</span>
                <span style="color: #FF3366;">X</span>
                <span style="color: #9933FF;">L</span>
                <span style="color: #66B2FF; font-style: italic; font-weight: 500; margin-left: 8px; font-size: 24px;">learning</span>
            </div>
        `;
        container.style.textDecoration = 'none';
        container.style.border = 'none';
    });

    // 3. ANNIHILATE ORIGINAL FOOTER AND REPLACE WITH NEXL FOOTER
    const oldFooters = document.querySelectorAll('#bd-footer, .page-footer, .global-footer, footer');
    oldFooters.forEach(f => f.remove());
    
    const customFooter = document.createElement('footer');
    customFooter.innerHTML = `
        <div style="background: linear-gradient(135deg, #1e1e2f, #2a2a40); padding: 40px; text-align: center; color: white; font-family: 'Inter', sans-serif; margin-top: 50px; border-top: 4px solid #3399FF;">
            <div style="font-size: 28px; font-weight: 900; margin-bottom: 10px;">
                <span style="color: #0066FF;">N</span><span style="color: #3399FF;">E</span><span style="color: #FF3366;">X</span><span style="color: #9933FF;">L</span>
                <span style="color: #66B2FF; font-style: italic; font-weight: 500;">learning</span>
            </div>
            <p style="color: #8892b0; font-size: 14px;">The Ultimate Offline Learning Library &bull; Education Without Limits</p>
        </div>
    `;
    document.body.appendChild(customFooter);

    // 4. FIX BROKEN/LIVE LINKS (Skill Plans, Analytics, Videos, Games)
    const allLinks = document.querySelectorAll('a, button, [role="button"]');
    allLinks.forEach(link => {
        const href = link.getAttribute('href') || '';
        const text = link.textContent.toLowerCase();
        
        // Hide broken tabs
        if (
            href.includes('skill-plans') || 
            href.includes('recommendations') || 
            href.includes('analytics') || 
            href.includes('core-curriculum') || 
            href.includes('search?') ||
            text.includes('skill plans') ||
            text.includes('analytics') ||
            text.includes('recommendations')
        ) {
            link.style.display = 'none';
        }

        // Hide videos and games that lead to live site
        if (
            href.includes('showVideoDirectly') || 
            href.includes('videos.html') || 
            href.includes('www.ixl.com') ||
            href.includes('/games/') ||
            text.includes('watch video') ||
            link.classList.contains('video-link') ||
            link.classList.contains('game-link')
        ) {
            link.style.display = 'none';
        }
    });

    // 5. RESTORE CLICK AND SELECT INTERACTIVITY (FOR ALL ELEMENTS)
    
    // Inject massive global styles for selection
    const nexlStyles = document.createElement('style');
    nexlStyles.innerHTML = `
        .nexl-selected {
            border: 3px solid #10b981 !important;
            box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.5), 0 4px 6px rgba(0,0,0,0.1) !important;
            background-color: rgba(16, 185, 129, 0.08) !important;
            border-radius: 8px !important;
            z-index: 9999 !important;
            transition: all 0.2s ease-in-out !important;
        }
        .nexl-pending-drag {
            outline: 4px dashed #ff9800 !important;
            outline-offset: 4px !important;
            box-shadow: 0 0 15px rgba(255, 152, 0, 0.8) !important;
            transform: scale(1.05) !important;
            transition: all 0.2s ease !important;
            z-index: 10000 !important;
            cursor: grabbing !important;
        }
        /* Specific overrides for tables/texts so they don't look weird */
        td.nexl-selected {
            background-color: rgba(16, 185, 129, 0.15) !important;
            color: #065f46 !important;
            font-weight: bold !important;
        }
        /* SVG Group selections */
        g.nexl-selected rect, g.nexl-selected circle, g.nexl-selected path {
            stroke: #10b981 !important;
            stroke-width: 4px !important;
            fill: rgba(16, 185, 129, 0.2) !important;
        }
        g.nexl-selected text, g.nexl-selected tspan {
            fill: #065f46 !important;
            font-weight: bold !important;
        }
        /* Isolated SVG selections */
        text.nexl-selected, tspan.nexl-selected, rect.nexl-selected, circle.nexl-selected, path.nexl-selected, svg.nexl-selected {
            stroke: #10b981 !important;
            stroke-width: 4px !important;
            fill: rgba(16, 185, 129, 0.2) !important;
        }
        /* SCALING & CARD ISOLATION (50% BIGGER, 30% WIDER) */
        /* Nuclear destruction of IXL global green headers */
        #hd, .global-header, #global-nav, .header-container, #bd-header, .site-header {
            display: none !important;
            opacity: 0 !important;
            visibility: hidden !important;
            height: 0 !important;
        }

        /* Scale the practice card */
        .practice-area, #practice-area, .question-container {
            margin: 60px auto !important;
            max-width: 85% !important; /* Increased width significantly */
            background: white !important;
            border-radius: 12px !important;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
            padding: 20px !important;
            display: block !important;
        }
        body {
            overflow-x: hidden !important;
            background-color: #f4f6f8 !important;
            padding-bottom: 300px !important;
        }
    `;
    document.head.appendChild(nexlStyles);

    window.nexlPendingDragElement = null;

    const practiceArea = document.querySelector('.practice-area, #practice-area, .question-container, #practice-crate, .focused-practice-area, #practice-page-container, main');
    const isPracticePage = document.querySelector('.submit-button, button[type="submit"], .submit, button.submit, #submit-button, .crisp-button') !== null;
    
    if (practiceArea && practiceArea !== document.body && isPracticePage) {
        // NUCLEAR METHOD: Hide all siblings of practiceArea and its ancestors
        let curr = practiceArea;
        while (curr && curr !== document.body && curr !== document.documentElement) {
            const siblings = curr.parentElement.children;
            for (let i = 0; i < siblings.length; i++) {
                const s = siblings[i];
                const c = s.getAttribute('class') || '';
                if (s !== curr && s.tagName !== 'SCRIPT' && s.tagName !== 'STYLE' && s.tagName !== 'LINK' && s.id !== 'yui3-css-stamp' && !c.includes('yui3')) {
                    s.style.display = 'none';
                }
            }
            // Strip backgrounds from wrappers so they don't block the screen
            if (curr !== practiceArea) {
                curr.style.background = 'transparent';
                curr.style.boxShadow = 'none';
                curr.style.border = 'none';
                curr.style.padding = '0';
                curr.style.margin = '0';
            }
            curr = curr.parentElement;
        }
    }
    if (practiceArea && isPracticePage) {
        practiceArea.addEventListener('click', (e) => {
            // 1. BYPASS LOGIC: Ignore Submit buttons completely
            if (e.target.closest('button[type="submit"], .submit-button, .submit-btn, .submit, .button-submit, #submit-button')) {
                return;
            }
            // 2. CLICK-TO-MOVE ACCESSIBILITY HANDLER (DRAG-AND-DROP FALLBACK)
            const draggableItem = e.target.closest('.yui3-dd-draggable, .draggable, .drag-item, .draggableElement, .sticker, [draggable="true"]');
            if (draggableItem) {
                // If clicking the same item, deselect it
                if (window.nexlPendingDragElement === draggableItem) {
                    draggableItem.classList.remove('nexl-pending-drag');
                    window.nexlPendingDragElement = null;
                    return;
                }
                
                // If there was another pending item, deselect it
                if (window.nexlPendingDragElement) {
                    window.nexlPendingDragElement.classList.remove('nexl-pending-drag');
                }
                
                window.nexlPendingDragElement = draggableItem;
                draggableItem.classList.add('nexl-pending-drag');
                return; // Stop further selection logic for this element
            }
            
            const dropContainer = e.target.closest('.draggableContainer, .draggableArea, .dropslot, .interactiveArea, .drop-target, .binContentRow, .dragTile, .dropzone, [class*="drop"]');
            if (dropContainer && window.nexlPendingDragElement) {
                // Move the pending element into this drop container physically in the DOM
                dropContainer.appendChild(window.nexlPendingDragElement);
                
                // Reset styling to ensure it sits nicely in the container where they clicked
                const rect = dropContainer.getBoundingClientRect();
                const relativeX = e.clientX - rect.left - (window.nexlPendingDragElement.offsetWidth / 2 || 25);
                const relativeY = e.clientY - rect.top - (window.nexlPendingDragElement.offsetHeight / 2 || 25);

                window.nexlPendingDragElement.style.position = 'absolute';
                window.nexlPendingDragElement.style.left = relativeX + 'px';
                window.nexlPendingDragElement.style.top = relativeY + 'px';
                window.nexlPendingDragElement.style.margin = '0';
                
                // Try simulating a YUI3 drag and drop to trigger internal game state logic
                const dataTransfer = window.DataTransfer ? new DataTransfer() : null;
                const events = ['dragstart', 'dragenter', 'dragover', 'drop', 'dragend'];
                events.forEach(evt => {
                    const targetNode = (evt === 'dragstart' || evt === 'dragend') ? window.nexlPendingDragElement : dropContainer;
                    try {
                        targetNode.dispatchEvent(new DragEvent(evt, { bubbles: true, dataTransfer }));
                    } catch(err) {}
                });
                
                window.nexlPendingDragElement.classList.remove('nexl-pending-drag');
                window.nexlPendingDragElement = null;
                return;
            }

            let target = null;

            // 3. MULTIPLE-CHOICE HANDLER: Prioritize selecting the entire row/line instead of inner spans
            const choiceTarget = e.target.closest('.practice-choice, .q-choice, .answer-choice, li, [role="radio"], .SelectableTile, .selectable-tile');
            if (choiceTarget) {
                target = choiceTarget;
            }

            // 4. UNIVERSAL MANIPULATIVE/TEXT HANDLER: Fallback to substring matching for manipulatives, phrases, tokens
            if (!target) {
                target = e.target.closest(`
                    [class*="choice"], [class*="option"], [class*="answer"], [class*="interactive"], 
                    [class*="button"], [class*="phrase"], 
                    [class*="word"], [class*="sentence"], [class*="cube"], [class*="shape"], 
                    [class*="node"], [class*="click"], [class*="hotspot"], [class*="selectable"], 
                    [class*="item"], [class*="sticker"], [class*="token"], [class*="marker"], [class*="coin"],
                    [role="button"], [role="option"], [role="checkbox"], [role="radio"],
                    td, img
                `);
            }
            
            // 5. SVG GROUPS LOGIC: If it's inside an SVG, try to find a parent group <g> to select the whole button
            if (!target && e.target.closest) {
                let gNode = e.target.closest('g');
                if (gNode && gNode.parentElement) {
                    target = gNode;
                }
            }

            // Fallback for isolated SVG text/shapes if no group
            if (!target && ['text', 'tspan', 'rect', 'circle', 'path', 'svg'].includes(e.target.tagName?.toLowerCase())) {
                target = e.target;
            }

            // Fallback for Hundred Chart <td> cells
            if (!target && e.target.tagName === 'TD') {
                target = e.target;
            }

            if (target) {
                // If it's already selected, just unselect it and stop
                if (target.classList.contains('nexl-selected')) {
                    target.classList.remove('nexl-selected');
                    return; // Stop here!
                }

                // Unselect siblings ONLY if in a known single-select list, otherwise allow multiple selections
                const container = target.closest('.practice-choices, .q-choices, ul, .options, .answers, [role="radiogroup"], .radiogroup');
                if (container && !container.classList.contains('multi-select') && !container.closest('.multi-select')) {
                    const siblings = container.querySelectorAll('.nexl-selected');
                    siblings.forEach(s => {
                        if (s !== target) s.classList.remove('nexl-selected');
                    });
                }

                // Apply massive green selection effect simply by adding the class
                target.classList.add('nexl-selected');
            }
        }, true);
    }

    // 6. ORACLE APEX LOGIN REDIRECT
    const loginButtons = document.querySelectorAll('.sign-in-btn, a[href*="signin"], button.login');
    loginButtons.forEach(btn => {
        btn.addEventListener('click', (e) => {
            e.preventDefault();
            // Redirect to future Oracle APEX domain
            window.location.href = "https://your-oracle-domain.com/ords/nexl_schema/login";
        });
    });
})();

</script>
