<commit_before><div id="ddg-edc-preview">
    <div style="width: 200px; height: auto; float: right">
        <div align="center" style="font-weight: bold; padding: 3px; font-size: 12px;">
            PRODUCT STYLING PREVIEW
        </div>
        <div id="connector_configuration_dynamic_content_style_doc-preview"
             style="width: 200px; height: auto; border: solid 1px black; padding-top: 50px; padding-bottom: 50px;">
            <a href="<?php echo $block->getBaseUrl() ?>" title="Sample Image" target="_blank">
                <img src="<?php echo $block->getImagePlaceholder() ?>"
                     width="85" height="85" alt="Sample Image"
                     style="display: block; margin-left: auto; margin-right: auto; "/>
            </a>
            <div id="connector_configuration_dynamic_content_style_name-preview" align="center">
                Product Name
            </div>
            <div id="connector_configuration_dynamic_content_style_price-preview" align="center">
                <?php echo $block->getCurrencySymbol() . "99.99"; ?>
            </div>
            <div align="center">
                <a id="connector_configuration_dynamic_content_style_link-preview" target="_blank"
                   href="<?php echo $block->getBaseUrl(); ?>">View Now</a>
            </div>
        </div>
        <div align="center" style="margin-top: 20px; font-weight: bold; padding: 3px; font-size: 12px;">
            COUPON STYLING PREVIEW
        </div>
        <div id="connector_configuration_dynamic_content_style_coupon-preview" align="center"
             style="width: 200px; height: auto; border: solid 1px black; padding-top: 10px; padding-bottom: 10px;">
            DOT-XXX-XXX-XXX
        </div>
    </div>
</div>

<script>
    require([
        'jquery',
        'domReady!'
    ], function ($j) {
        var left = $j("#connector_configuration_dynamic_content_style_dynamic_styling");
        var top = $j("#connector_configuration_dynamic_content_style");
        $j("#ddg-edc-preview").css({
            position: "absolute",
            left: left.position().left + left.outerWidth() + 20,
            top: top.position().top + 15
        });
        $j(window).resize(function () {
            left = $j("#connector_configuration_dynamic_content_style_dynamic_styling");
            $j("#ddg-edc-preview").css({left: left.position().left + left.outerWidth() + 20});
        });
        var elementsA = [
            $j("#connector_configuration_dynamic_content_style_font_color"),
            $j("#connector_configuration_dynamic_content_style_font_size"),
            $j("#connector_configuration_dynamic_content_style_price_color"),
            $j("#connector_configuration_dynamic_content_style_price_font_size"),
            $j("#connector_configuration_dynamic_content_style_product_link_color"),
            $j("#connector_configuration_dynamic_content_style_product_link_font_size"),
            $j("#connector_configuration_dynamic_content_style_font"),
            $j("#connector_configuration_dynamic_content_style_color"),
            $j("#connector_configuration_dynamic_content_style_coupon_font_color"),
            $j("#connector_configuration_dynamic_content_style_coupon_font_size"),
            $j("#connector_configuration_dynamic_content_style_coupon_font_picker"),
            $j("#connector_configuration_dynamic_content_style_coupon_background_color")
        ];
        var elementsB = [
            $j("#connector_configuration_dynamic_content_style_font_style"),
            $j("#connector_configuration_dynamic_content_style_price_font_style"),
            $j("#connector_configuration_dynamic_content_style_product_link_style"),
            $j("#connector_configuration_dynamic_content_style_coupon_font_style")
        ];<commit_msg>EDC Preview box positioning not working #251<commit_after><div id="ddg-edc-preview">
    <div style="width: 200px; height: auto; float: right">
        <div align="center" style="font-weight: bold; padding: 3px; font-size: 12px;">
            PRODUCT STYLING PREVIEW
        </div>
        <div id="connector_configuration_dynamic_content_style_doc-preview"
             style="width: 200px; height: auto; border: solid 1px black; padding-top: 50px; padding-bottom: 50px;">
            <a href="<?php echo $block->getBaseUrl() ?>" title="Sample Image" target="_blank">
                <img src="<?php echo $block->getImagePlaceholder() ?>"
                     width="85" height="85" alt="Sample Image"
                     style="display: block; margin-left: auto; margin-right: auto; "/>
            </a>
            <div id="connector_configuration_dynamic_content_style_name-preview" align="center">
                Product Name
            </div>
            <div id="connector_configuration_dynamic_content_style_price-preview" align="center">
                <?php echo $block->getCurrencySymbol() . "99.99"; ?>
            </div>
            <div align="center">
                <a id="connector_configuration_dynamic_content_style_link-preview" target="_blank"
                   href="<?php echo $block->getBaseUrl(); ?>">View Now</a>
            </div>
        </div>
        <div align="center" style="margin-top: 20px; font-weight: bold; padding: 3px; font-size: 12px;">
            COUPON STYLING PREVIEW
        </div>
        <div id="connector_configuration_dynamic_content_style_coupon-preview" align="center"
             style="width: 200px; height: auto; border: solid 1px black; padding-top: 10px; padding-bottom: 10px;">
            DOT-XXX-XXX-XXX
        </div>
    </div>
</div>

<script>
    require([
        'jquery',
        'domReady!'
    ], function ($j) {
        var s = $j("#ddg-edc-preview");
        var pos = s.position();
        $j(window).scroll(function () {
            var windowpos = $j(window).scrollTop();
            if (windowpos >= pos.top &&
                windowpos
                    < ($j("#connector_configuration_dynamic_content_style_coupon_font_style").position().top - 350)) {
                s.attr("style", ""); //kill absolute positioning
                s.css({position: "fixed", top: "80px", left: $j(document).innerWidth() - 250});
            } else if (windowpos
                >= ($j("#connector_configuration_dynamic_content_style_coupon_font_style").position().top - 350)) {
                s.css({
                    position: "absolute",
                    top: (
                    $j("#connector_configuration_dynamic_content_style_coupon_font_style").position().top - 350) + "px",
                    left: $j(document).innerWidth() - 250
                });
            } else {
                s.css({
                    position: "absolute",
                    top: pos.top + "px",
                    left: $j(document).innerWidth() - 250
                });
            }
        });

        $j(window).resize(function () {
            $j("#ddg-edc-preview").css({left: $j(document).innerWidth() - 250});
        });

        var elementsA = [
            $j("#connector_configuration_dynamic_content_style_font_color"),
            $j("#connector_configuration_dynamic_content_style_font_size"),
            $j("#connector_configuration_dynamic_content_style_price_color"),
            $j("#connector_configuration_dynamic_content_style_price_font_size"),
            $j("#connector_configuration_dynamic_content_style_product_link_color"),
            $j("#connector_configuration_dynamic_content_style_product_link_font_size"),
            $j("#connector_configuration_dynamic_content_style_font"),
            $j("#connector_configuration_dynamic_content_style_color"),
            $j("#connector_configuration_dynamic_content_style_coupon_font_color"),
            $j("#connector_configuration_dynamic_content_style_coupon_font_size"),
            $j("#connector_configuration_dynamic_content_style_coupon_font_picker"),
            $j("#connector_configuration_dynamic_content_style_coupon_background_color")
        ];
        var elementsB = [
            $j("#connector_configuration_dynamic_content_style_font_style"),
            $j("#connector_configuration_dynamic_content_style_price_font_style"),
            $j("#connector_configuration_dynamic_content_style_product_link_style"),
            $j("#connector_configuration_dynamic_content_style_coupon_font_style")
        ];
{'fraction_non_alphanumeric': 0.12706919137787304, 'fraction_numerical': 0.012147195426938193, 'mean_word_length': 2.665648188563946, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6879683', 'n_tokens_mistral': 2402, 'n_tokens_neox': 2279, 'n_words': 369}