(function (w, d) { const GUIDE_TYPES = { MENU_HP: 'menu_hp', PAYMENT: 'payment', SEND_GEN_TMS: 'send_gen_tms', SEND_GEN_MMS: 'send_gen_mms', SEND_ADDR_TMS: 'send_addr_tms', SEND_ADDR_MMS: 'send_addr_mms', }; const GUIDE_STEPS = { [GUIDE_TYPES.MENU_HP]: [ { element: '#scale_hp', intro: 'ÇÚµåÆùÀÔ·ÂâÀÇ Å©±â¸¦ Å©°Ô ÇÏ¿© ÆíÁýÀ» ¿ëÀÌÇÏ°Ô ÇÕ´Ï´Ù.', position: 'bottom', }, { element: '#icon_mms_area', intro: 'À̹ÌÁö¿µ¿ªÀ» À̹ÌÁö°¡ ¾ø´Â °æ¿ì, ¾È³ªÅ¸³ª°Ô ÇÕ´Ï´Ù.', position: 'bottom', }, { element: '#make_letter_btn', intro: '°£´ÜÇÏ°Ô ¹è°æÀ̹ÌÁö, ±ÛÅ©±â, »ö»óµîÀ» ²Ù¸ç¼­ Àü¼ÛÇÕ´Ï´Ù.', position: 'bottom', }, { element: '#btn_cap_text', intro: 'ÀÔ·ÂÇÑ ÅØ½ºÆ®¸¦ À̹ÌÁö·Î º¸³»¾ßÇÏ´Â °æ¿ì »ç¿ëµË´Ï´Ù.', position: 'bottom', }, { element: '#btn_copy_text', intro: 'ÀÔ·ÂÇÑ ÅØ½ºÆ®¸¦ º¹»ç(CTRL-C) ÇÕ´Ï´Ù..', position: 'bottom', }, { element: '#btn_special_char', intro: 'Àü¼Û ³»¿ë¿¡ Ư¼ö¹®ÀÚ¸¦ »ðÀÔ´Ï´Ù.', position: 'bottom', }, { element: '#mms_div', intro: 'Àü¼Û ÁغñµÈ À̹ÌÁö¿µ¿ªÀÔ´Ï´Ù.', position: 'bottom', }, { element: '#msgbox', intro: '¸Þ½ÃÁö¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.', position: 'bottom', }, { element: '#btn_ai_tms', intro: 'AI°¡ ÀûÀýÇÑ ¸Þ½ÃÁö¸¦ ÀÚµ¿À¸·Î »ý¼ºÇØÁÝ´Ï´Ù.', position: 'bottom', }, { element: '#btn_ai_text', intro: 'AI°¡ ÀÔ·ÂÇÑ ¸Þ½ÃÁöÀÇ ¿ÀŸ ¹× ¿©¹éµîÀ» ÀûÀýÇÏ°Ô ¼öÁ¤ÇØÁÝ´Ï´Ù.', position: 'bottom', }, { element: '#number_list', intro: '¸Þ½ÃÁö ¼ö½ÅÀÚ¿¡°Ô Ç¥½ÃµÇ´Â ¹ß½ÅÀÚÀÇ ¹øÈ£ÀÔ´Ï´Ù.', position: 'bottom', }, { element: '#btn_callback_list', intro: '¹ß½Å¹øÈ£¸¦ Ãß°¡/¼öÁ¤/»èÁ¦ÇÒ ¼ö ÀÖ½À´Ï´Ù.', position: 'bottom', }, { element: '#hp_btn_msgsave', intro: 'ÇöÀç ¼³Á¤µÈ À̹ÌÁö/³»¿ëÀ» ÀúÀåÇÕ´Ï´Ù.', position: 'bottom', }, { element: '#hp_btn_save_list', intro: 'ÀúÀåµÈ À̹ÌÁö/³»¿ë ¸ñ·ÏÀ» ¿±´Ï´Ù.', position: 'bottom', }, { element: '#hp_btn_load', intro: '³»PC¿¡¼­ À̹ÌÁö(»çÁø)À» ºÒ·¯¿É´Ï´Ù.', position: 'bottom', }, /* { element: '#number_list', intro: '¸Þ½ÃÁö ¼ö½ÅÀÚ¿¡°Ô Ç¥½ÃµÇ´Â ¹ß½ÅÀÚÀÇ ¹øÈ£ÀÔ´Ï´Ù.', position: 'bottom', beforeEnter: function () { // menu.js¿¡ ÀÖ´Â ½ÇÁ¦ ÇÔ¼ö¸íÀ¸·Î ¸ÂÃß¼¼¿ä. if (typeof w.openSidebar === 'function') w.openSidebar(); // Ȥ½Ã ¸Þ´º Åä±ÛÀÌ jQuery¶ó¸é ¿©±â¼­ °­Á¦·Î ¿­ ¼öµµ ÀÖÀ½: // $('#gnbMenuBtn').trigger('click'); }, }, { element: '#sidebarSettings', intro: '¼³Á¤Àº ¿©±â¿¡¼­ º¯°æÇÒ ¼ö ÀÖ¾î¿ä.', position: 'right', }, { intro: '¸Þ´º ¾È³»°¡ ³¡³µ½À´Ï´Ù.' }, */ ], [GUIDE_TYPES.RECEIVE_REJECT]: [ { element: '#btn_guide_send_result_reject', intro: 'ÀÌ ¸Þ´º¸¦ ÅëÇØ ¿À·ùÀÇ ¿øÀÎÀ» È®ÀÎÇØº¸¼¼¿ä.', position: 'bottom', }, ], [GUIDE_TYPES.PAYMENT]: [ { element: '#planCards', intro: '¿ä±ÝÁ¦¸¦ ¿©±â¼­ È®ÀÎÇÒ ¼ö ÀÖ¾î¿ä.', position: 'bottom', }, { element: '#payBtn', intro: 'ÀÌ ¹öưÀ¸·Î °áÁ¦¸¦ ÁøÇàÇÕ´Ï´Ù.', position: 'bottom', }, { intro: '°áÁ¦ ¾È³»°¡ ³¡³µ½À´Ï´Ù.' }, ], [GUIDE_TYPES.SEND_GEN_TMS]: [ { element: '#msgbox', intro: '´Ü.Àå¹® ¸Þ½ÃÁö¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä', position: 'bottom', }, { element: '#number_list', intro: '¹ß½Å¹øÈ£°¡ ¸Â´ÂÁö È®ÀÎÇØÁÖ¼¼¿ä.', position: 'bottom', }, { element: '#phoneList', intro: '¸Þ½ÃÁö¸¦ ¹ÞÀ» ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.', position: 'bottom', }, { element: '#reservOpt', intro: 'Àü¼Û½Ã°£À» ÁöÁ¤ÇÏ°í ½ÍÀº °æ¿ì, ¼³Á¤ÇØÁÖ¼¼¿ä.', position: 'bottom', }, { element: '#send_addin_panel', intro: '±âŸ±â´ÉµéÀÔ´Ï´Ù.', position: 'bottom', }, { element: '#okSend', intro: 'ÃÖÁ¾ÀûÀ¸·Î Àü¼ÛÇϱ⠹öưÀÔ´Ï´Ù.', position: 'bottom', }, //{ intro: '¾È³»°¡ ³¡³µ½À´Ï´Ù.' }, ], }; const DEFAULT_OPTIONS = { steps: [], // ´Ü°è ¹è¿­ nextLabel: '´ÙÀ½', // ´ÙÀ½ ¹öư ÅØ½ºÆ® prevLabel: 'ÀÌÀü', // ÀÌÀü ¹öư ÅØ½ºÆ® doneLabel: '¿Ï·á', // ¿Ï·á ¹öư ÅØ½ºÆ® //skipLabel: 'X', // °Ç³Ê¶Ù±â ¹öư ÅØ½ºÆ® showButtons: true, // ¹öư Ç¥½Ã ¿©ºÎ showStepNumbers: false, // ´Ü°è ¹øÈ£ Ç¥½Ã showProgress: false, // ÇÏ´Ü ÁøÇà¹Ù Ç¥½Ã showBullets: true, // Á¡(bullet) Ç¥½Ã exitOnEsc: true, // ESC·Î Á¾·á exitOnOverlayClick: true, // ¿À¹ö·¹ÀÌ Å¬¸¯ Á¾·á keyboardNavigation: true, // Űº¸µå Á¿ì À̵¿ Çã¿ë disableInteraction: false, // °­Á¶ ¿ä¼Ò Ŭ¸¯ ºñȰ¼ºÈ­ overlayOpacity: 0.5, // ¹è°æ ¾îµÓ±â (0~1) overlayPadding: 2, // ÁÙÀ̱â scrollToElement: true, // ÀÚµ¿ ½ºÅ©·Ñ scrollTo: 'element', // 'element' ¶Ç´Â 'tooltip' scrollPadding: 30, // ½ºÅ©·Ñ ¿©¹é tooltipPosition: 'auto', // ±âº» À§Ä¡ (top, bottom, left, right, auto) positionPrecedence: ['bottom', 'top', 'right', 'left'], // autoÀÏ ¶§ ¿ì¼±¼øÀ§ highlightClass: '', // °­Á¶ ¿µ¿ª Ä¿½ºÅÒ Å¬·¡½º tooltipClass: '', // ÅøÆÁ Ä¿½ºÅÒ Å¬·¡½º }; let activeIntro = null; function resolveIntroFactory() { // intro.min.js¸¦ ·Î ¿Ã·ÈÀ¸´Ï º¸Åë window.introJs°¡ Á¸ÀçÇÕ´Ï´Ù. if (typeof w.introJs === 'function') return w.introJs; throw new Error('introJs°¡ ·ÎµåµÇÁö ¾Ê¾Ò½À´Ï´Ù. /js/intro.min.js ·Îµå ¼ø¼­¸¦ È®ÀÎÇϼ¼¿ä.'); } function isElementUsable(selectorOrEl) { const el = typeof selectorOrEl === 'string' ? d.querySelector(selectorOrEl) : selectorOrEl; if (!el) return false; const style = w.getComputedStyle(el); return style && style.display !== 'none' && style.visibility !== 'hidden'; } function normalizeSteps(steps) { return steps.filter((s) => (!s.element ? true : isElementUsable(s.element))); } function storageKey(type) { return 'onboard_guide_' + type; } function shouldSkip(type, once) { if (!once) return false; return w.localStorage.getItem(storageKey(type)) === 'done'; } function markDone(type) { w.localStorage.setItem(storageKey(type), 'done'); } function startOnboardGuide(type, opts) { opts = opts || {}; const once = opts.once !== undefined ? opts.once : true; const options = opts.options || {}; // ÀÌ¹Ì Åõ¾î ÁßÀ̸é Áߺ¹ ½ÃÀÛ ¹æÁö if (activeIntro) return; const stepsRaw = GUIDE_STEPS[type]; if (!stepsRaw) { console.warn('[onboard] unknown guide type:', type); return; } if (shouldSkip(type, once)) return; const steps = normalizeSteps(stepsRaw); if (!steps.length) { console.warn('[onboard] usable steps not found for type:', type); return; } const introFactory = resolveIntroFactory(); const intro = introFactory(); activeIntro = intro; intro.setOptions(Object.assign({}, DEFAULT_OPTIONS, options, { steps: steps })); intro.onbeforechange(function () { const idx = typeof intro._currentStep === 'number' ? intro._currentStep : null; const step = idx != null ? steps[idx] : null; if (step && typeof step.beforeEnter === 'function') { try { step.beforeEnter(); } catch (e) { console.warn(e); } } // ·¹À̾ƿô º¯°æ/Àüüȭ¸é Àüȯ µîÀ¸·Î À§Ä¡°¡ ¾î±ß³ª´Â ¹®Á¦ º¸Á¤ setTimeout(function () { window.dispatchEvent(new Event('resize')); }, 60); }); function cleanup() { activeIntro = null; } intro.oncomplete(function () { markDone(type); cleanup(); }); intro.onexit(function () { markDone(type); cleanup(); }); intro.start(); } function resetOnboardGuide(type) { w.localStorage.removeItem(storageKey(type)); } function resetAllOnboardGuides() { Object.keys(GUIDE_TYPES).forEach(function (k) { resetOnboardGuide(GUIDE_TYPES[k]); }); } // Àü¿ªÀ¸·Î ³ëÃâ (±âÁ¸ ±¸Á¶¿¡¼­ »ç¿ëÇϱâ À§ÇÔ) w.ONBOARD_GUIDE = { GUIDE_TYPES: GUIDE_TYPES, start: startOnboardGuide, reset: resetOnboardGuide, resetAll: resetAllOnboardGuides, }; })(window, document);