<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">$(function () {
    OMNInsight.init()
})

//checkImage
$('img').on('error', function () {
    let dataDefault = $(this).attr('data-default')
    switch (dataDefault) {
        case '1':
            defaultImg = '�亙熒99蝬脤��鍂_260_350.svg'
            break
        case '2':
            defaultImg = '�亙熒99蝬脤��鍂_320_160.svg'
            break
        case '3':
            defaultImg = '�亙熒99蝬脤��鍂_640_250.svg'
            break
        case '4':
            defaultImg = '�亙熒99蝬脤��鍂_667_150.svg'
            break
        default:
            defaultImg = 'Q.svg'
    }
    $(this).attr('data-src', $(this).attr('src'))
    $(this).attr('src', $(location).attr('protocol') + '//' + $(location).attr('hostname') + '/img/' + defaultImg)
})
// �㟲�讠雯蝡䠷�𡁶鍂��隞�
var OMNInsight = {
    /**
     *  �誯�� ajax �嚉鞈��坔�朞�閧�
     *
     *  @param {string} type POST or GET
     *  @param {Boolean} loading �糓�炏��閬� loading
     *  @param {Boolean} async �糓�炏��閬� async
     *  @param {string} url 蝬脣�
     *  @param {string} data ���枂鞈���
     *  @param {string} callback 鞈��坔�硋�堒嘑銵�
     *  @param {string} parameter �嘑銵峕������彍
     */
    ajaxTask: function (type, loading, async, url, data, callback, parameter) {
        if (loading == 'undefined') {
            loading = false
        }
        if (async == 'undefined') {
            async = true
        }

        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content'),
            },
        })

        $.ajax({
            url: url,
            data: data,
            type: type,
            dataType: 'json',
            cache: false,
            global: true,
            async: async,
            beforeSend: function () {
                if (loading == true) {
                    $.fancybox.showLoading()
                }
            },
            complete: function () {
                if (loading == true) {
                    $.fancybox.hideLoading()
                }
            },
            success: function (response) {
                if (loading == true) {
                    $.fancybox.hideLoading()
                }
                console.log(response)
                if (typeof callback === 'function') {
                    callback(response, parameter)
                } else {
                    OMNInsight.showAlert(true, 'error', '�䔄��罸𥲤隤�', 'error')
                }
            },
            error: function (xhr, ajaxOptions, thrownError) {
                $('#dataform-btn').removeAttr('disabled')
                console.log(ajaxOptions, thrownError)
                // OMNInsight.showAlert(true, "error", '�䔄��罸𥲤隤�', 'error');
            },
        })
    },

    /**
     *  ��硋�𦯀�蠘�睲����彍���聢撘�
     *
     *  @param {any} obj
     *  @returns {string}
     */
    getType: function (obj) {
        return {}.toString
            .call(obj)
            .match(/\s([a-zA-Z]+)/)[1]
            .toLowerCase()
    },

    /**
     *  �𥲤隤日＊蝷� fancybox
     *
     *  @param {Boolean} block true嚗𡁻�墧�𦠜�憭硋虾隞仿�𣈯�㚁�靕alse嚗饝ock
     *  @param {string} type (success | info | warning | error)
     *  @param {string} title �𥲤隤斗�䠷��
     *  @param {string} str �𥲤隤方�𦠜��
     *  @param {obj || string} obj 憒���𨀣糓��隞塚�稪lose 銋见�� focus嚗����𨀣糓 string嚗����閧��㮾撠齿�劐�𧢲��
     *  @param {string} url
     */
    showAlert: function (block, type, title, str, obj, url) {
        // console.log("OMNInsight : showAlert", arguments);

        if (type === 'warning') {
            color = '#c29d0b'
        } else if (type === 'success') {
            color = '#27A4AC'
        } else if (type === 'info') {
            color = '#327ad5'
        } else if (type === 'error') {
            color = '#e73d4a'
        }

        box =
            '&lt;div class="modal-dialog" style="margin:0px auto;"&gt;&lt;div class="modal-content"&gt;&lt;div class="modal-header"&gt;&lt;button type="button" class="close" aria-hidden="true" onclick="$.fancybox.close(true);"&gt;&lt;/button&gt;&lt;h4 class="modal-title"&gt;' +
            title +
            '&lt;/h4&gt;&lt;/div&gt;&lt;div class="modal-body" style="color:' +
            color +
            ';"&gt;' +
            str +
            '&lt;/div&gt;&lt;div class="modal-footer"&gt;&lt;button type="button" class="btn dark btn-outline" onclick="$.fancybox.close(true);"&gt;��𣈯��&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'
        // box = '&lt;div class="error_box" style="color:#ff0000;text-align:center;font-size:14px;font-family:敺株��迤暺煾��;margin:35px auto;width:' + width + 'px;"&gt;' + str + '&lt;/div&gt;';
        $.fancybox(box, {
            closeBtn: false,
            beforeShow: function () {
                $('.fancybox-skin').css({
                    backgroundColor: 'transparent',
                    'box-shadow': 'none',
                })
                $.fancybox.update()
            },
            helpers: {
                overlay: { closeClick: block },
            },
            afterClose: function () {
                // ToDo
                if (OMNInsight.getType(obj) === 'object') {
                    obj.focus()
                } else if (OMNInsight.getType(obj) === 'string') {
                    if (obj === 'success') {
                        top.location.href = url
                    } else if (obj === 'reload') {
                        location.reload()
                    }
                }
            },
        })
    },

    setMenuActive: function () {
        pathArray = window.location.pathname.split('/')
        pathArray.forEach(function (item, index) {
            if (item != '') {
                tagA = $('#' + item)
                tagA.addClass('active')
            }
        })
    },

    /**
     * ��嘥�见�硋��鍂
     */
    init: function () {
        this.setMenuActive()
    },
}

function scrollTo(element, move) {
    $('html, body').animate(
        {
            scrollTop: $(element).offset().top + move,
        },
        0
    )
}

function getScrollbarWidth() {
    return window.innerWidth - document.documentElement.clientWidth
}

function sendToLine() {
    var link = 'http://line.naver.jp/R/msg/text/?'
    link +=
        encodeURIComponent(document.getElementById('msg').value) +
        '%0D%0A' +
        encodeURIComponent(document.getElementById('url').value)
    location.href = link
    return false
}

$(function () {
    $(':submit').click(function () {
        if ($(this).attr('check') != 'true') {
            modalLoading.init(true)
        }
    })
})

function checkData(inputItem, type) {
    value = inputItem.val()
    id = inputItem.attr('id')
    text = $('label[for="' + id + '"]').text()

    if (type == 'required') {
        if (value != '') {
            return true
        } else {
            alert('隢贝撓��' + text)
            inputItem.focus()
            return false
        }
    } else if (type == 'number') {
        if (!isNaN(value)) {
            return true
        } else {
            alert(text + '敹�����箸彍摮�')
            inputItem.focus()
            return false
        }
    } else if (type == 'email') {
        var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/
        if (regex.test(value)) {
            return true
        } else {
            alert(text + '�聢撘譍�齿迤蝣綽�')
            inputItem.focus()
            return false
        }
    } else if (type == 'date') {
        var regex = /^\d{4}-\d{1,2}-\d{1,2}$/
        if (regex.test(value)) {
            return true
        } else {
            alert(text + '�聢撘譍�齿迤蝣綽�')
            inputItem.focus()
            return false
        }
    }
}

function len(str) {
    return str.replace(/[^\x00-\xff]/g, 'xx').length
}

function checkSize(inputItem, type, size) {
    value = inputItem.val()
    id = inputItem.attr('id')
    text = $('label[for="' + id + '"]').text()
    if (type == 'string') {
        if (len(value) &lt;= size) {
            return true
        } else {
            alert(text + '摮𦯀葡�𡡞𩑈嚗屸�撠𤩺䲰' + size)
            inputItem.focus()
            return false
        }
    } else if (type == 'int') {
        if (parseInt(value) &lt;= size) {
            return true
        } else {
            alert(text + '頞��枂蝭����')
            inputItem.focus()
            return false
        }
    }
}

function hasAttr(element, attrName) {
    let attr = element.attr(attrName)
    if (typeof attr !== typeof undefined &amp;&amp; attr !== false) {
        return true
    } else {
        return false
    }
}

//�⊿�𦦵�躰䌊��蓥耨甇�
$(function () {
    $('a').each(function (index) {
        if (hasAttr($(this), 'href')) {
            if (!hasAttr($(this), 'title')) {
                $(this).attr('title', $(this).attr('href'))
            }
        }
        if ($(this).html().length == 0) {
            $(this).html('&lt;span class="hide"&gt;.&lt;/span&gt;')
        }
    })
})

function header_search_check(num) {
    if (!checkData($('#header_search' + num), 'required')) {
        console.log('a')
        return false
        console.log('b')
    }
    console.log('c')
    modalLoading.init(true)
    return true
}

function materialClick(type, idx) {
    $.ajax({
        cache: false,
        dataType: 'text',
        type: 'POST',
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content'),
        },
        data: {
            type,
            idx,
        },
        url: '/material/click',
        success: function (t) {
            console.log('click log success')
        },
        error: function (jqXHR, textStatus, errorThrown) {
            console.log('�⊥迨��蹱��')
        },
    })
}

$('.changeFontSize').on('click', function () {
    window.location.href = $(this).attr('data')
})

// $('#select-font').on('click', function() {
//     $('#select-color').removeClass('active')
//     $(this).toggleClass('active')
// })
// $('#select-color').on('click', function() {
//     $('#select-font').removeClass('active')
//     $(this).toggleClass('active')
// })

$(document).mouseup(function (e) {
    var popFont = $('#select-font')
    var popColor = $('#select-color')
    if (!popFont.is(e.target) &amp;&amp; popFont.has(e.target).length === 0) {
        $('#select-font').removeClass('active')
    } else {
        $('#select-font').toggleClass('active')
    }
    if (!popColor.is(e.target) &amp;&amp; popColor.has(e.target).length === 0) {
        $('#select-color').removeClass('active')
    } else {
        $('#select-color').toggleClass('active')
    }
})

$('a.openimg').on('click', function () {
    let href = $(this).children('img').attr('src')
    $(this).attr('href', href)
})

// 2024 擐㚚�靽格㺿

$('[data-tab]').on('click', function () {
    let getTab = $(this).data('tab')
    $('.tab').removeClass('active')
    $('[data-tab]').removeClass('active')
    $('#' + getTab).addClass('active')
    $('[data-tab="' + getTab + '"]').addClass('active')
})
$('#select-font').on('keypress', function (e) {
    if (e.which == 13) {
        $('#select-color').removeClass('active')
        $(this).toggleClass('active')
    }
})
$('#select-color').on('keypress', function (e) {
    if (e.which == 13) {
        $('#select-font').removeClass('active')
        $(this).toggleClass('active')
    }
})
</pre></body></html>