/** * Kakao SDK for JavaScript - v1.43.6 * * Copyright 2017 Kakao Corp. * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * OSS Notice | KakaoSDK-Javascript * * This application is Copyright © Kakao Corp. All rights reserved. * The following sets forth attribution notices for third party software that may be contained in this application. * If you have any questions or concerns, please contact us at opensource@kakaocorp.com * * * crypto-js * * https://github.com/brix/cypto-js * * Copyright 2009-2013 Jeff Mott * Copyright 2013-2016 Evan Vosberg * * MIT License * * * easyXDM * * https://github.com/oyvindkinsey/easyXDM/ * * Copyright 2009-2011 Øyvind Sean Kinsey, oyvind@kinsey.no * * MIT License * * * ES6-Promise * * https://github.com/stefanpenner/es6-promise * * Copyright 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors * * MIT License * * * Kakao Web2App Library * * https://github.com/kakao/web2app * * Copyright 2015 Kakao Corp. http://www.kakaocorp.com * * MIT License * * * lodash * * https://github.com/lodash/lodash * * Copyright JS Foundation and other contributors * * MIT License * * * ua_parser * * https://github.com/html5crew/ua_parser * * Copyright HTML5 Tech. Team in Daum Communications Corp. * * MIT License * * * `````````` * MIT License * * Copyright (c) * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * 'Software'), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * `````````` */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Kakao=t.Kakao||{})}(this,(function(t){"use strict";var e="object"==typeof global&&global&&global.Object===Object&&global,n="object"==typeof self&&self&&self.Object===Object&&self,r=e||n||Function("return this")(),o=r.Symbol,a=Object.prototype,i=a.hasOwnProperty,c=a.toString,u=o?o.toStringTag:void 0;var l=Object.prototype.toString;var s=o?o.toStringTag:void 0;function p(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=c.call(t);return r&&(e?t[u]=n:delete t[u]),o}(t):function(t){return l.call(t)}(t)}function f(t){return null!=t&&"object"==typeof t}var d=Array.isArray;function h(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function b(t){return t}function v(t){if(!h(t))return!1;var e=p(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var y,m=r["__core-js_shared__"],g=(y=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"";var w=Function.prototype.toString;var k=/^\[object .+?Constructor\]$/,j=Function.prototype,O=Object.prototype,_=j.toString,A=O.hasOwnProperty,P=RegExp("^"+_.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function x(t){return!(!h(t)||(e=t,g&&g in e))&&(v(t)?P:k).test(function(t){if(null!=t){try{return w.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function S(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var C=Date.now;var I,F,z,D=function(){try{var t=x(e=function(t,e){return null==t?void 0:t[e]}(Object,"defineProperty"))?e:void 0;return t({},"",{}),t}catch(t){}var e}(),B=D,E=B?function(t,e){return B(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:b,q=(I=E,F=0,z=0,function(){var t=C(),e=16-(t-z);if(z=t,e>0){if(++F>=800)return arguments[0]}else F=0;return I.apply(void 0,arguments)}),M=q;function T(t,e){for(var n=-1,r=null==t?0:t.length;++n-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}function X(t){return null!=t&&V(t.length)&&!v(t)}function G(t,e,n){if(!h(n))return!1;var r=typeof e;return!!("number"==r?X(n)&&L(e,n.length):"string"==r&&e in n)&&$(n[e],t)}var H=Object.prototype;function Q(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||H)}function Y(t){return f(t)&&"[object Arguments]"==p(t)}var Z=Object.prototype,tt=Z.hasOwnProperty,et=Z.propertyIsEnumerable,nt=Y(function(){return arguments}())?Y:function(t){return f(t)&&tt.call(t,"callee")&&!et.call(t,"callee")},rt=nt;var ot="object"==typeof t&&t&&!t.nodeType&&t,at=ot&&"object"==typeof module&&module&&!module.nodeType&&module,it=at&&at.exports===ot?r.Buffer:void 0,ct=(it?it.isBuffer:void 0)||function(){return!1},ut={};ut["[object Float32Array]"]=ut["[object Float64Array]"]=ut["[object Int8Array]"]=ut["[object Int16Array]"]=ut["[object Int32Array]"]=ut["[object Uint8Array]"]=ut["[object Uint8ClampedArray]"]=ut["[object Uint16Array]"]=ut["[object Uint32Array]"]=!0,ut["[object Arguments]"]=ut["[object Array]"]=ut["[object ArrayBuffer]"]=ut["[object Boolean]"]=ut["[object DataView]"]=ut["[object Date]"]=ut["[object Error]"]=ut["[object Function]"]=ut["[object Map]"]=ut["[object Number]"]=ut["[object Object]"]=ut["[object RegExp]"]=ut["[object Set]"]=ut["[object String]"]=ut["[object WeakMap]"]=!1;var lt="object"==typeof t&&t&&!t.nodeType&&t,st=lt&&"object"==typeof module&&module&&!module.nodeType&&module,pt=st&&st.exports===lt&&e.process,ft=function(){try{var t=st&&st.require&&st.require("util").types;return t||pt&&pt.binding&&pt.binding("util")}catch(t){}}(),dt=ft&&ft.isTypedArray,ht=dt?function(t){return function(e){return t(e)}}(dt):function(t){return f(t)&&V(t.length)&&!!ut[p(t)]},bt=ht,vt=Object.prototype.hasOwnProperty;function yt(t,e){var n=d(t),r=!n&&rt(t),o=!n&&!r&&ct(t),a=!n&&!r&&!o&&bt(t),i=n||r||o||a,c=i?function(t,e){for(var n=-1,r=Array(t);++n1?e[r-1]:void 0,a=r>2?e[2]:void 0;for(o=At.length>3&&"function"==typeof o?(r--,o):void 0,a&&G(e[0],e[1],a)&&(o=r<3?void 0:o,r=1),t=Object(t);++n2?e[2]:void 0;for(o&&G(e[0],e[1],o)&&(r=1);++n-1}}function Qt(t){if(!d(t))throw new Error("validators should be an Array");return function(e){return t.some((function(t){return t(e)}))}}function Yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Zt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function te(t){return function(t){if(Array.isArray(t))return ee(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ee(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1)return!0;return!1}(t)?"tablet":function(t){if(t.match(/linux|windows (nt|98)|macintosh|cros/)&&!t.match(/android|mobile|polaris|lgtelecom|uzard|natebrowser|ktf;|skt;/))return!0;return!1}(t)?"pc":function(t){return!!t.match(/ip(hone|od)|android.+mobile|windows (ce|phone)|blackberry|bb10|symbian|webos|firefox.+fennec|opera m(ob|in)i|tizen.+mobile|polaris|iemobile|lgtelecom|nokia|sonyericsson|dolfin|uzard|natebrowser|ktf;|skt;/)}(t)?"mobile":""}function r(t){var n={},r=/(iphone|ipad|ipod)[\S\s]*os ([\w._\-]+) like/.exec(t)||!!/polaris|natebrowser|([010|011|016|017|018|019]{3}\d{3,4}\d{4}$)/.test(t)&&["","polaris","0.0.0"]||/(windows)(?: nt | phone(?: os){0,1} | )([\w._\-]+)/.exec(t)||/(android)[ \/]([\w._\-]+);/.exec(t)||!!/android/.test(t)&&["","android","0.0.0"]||!!/(windows)/.test(t)&&["","windows","0.0.0"]||/(mac) os x ([\w._\-]+)/.exec(t)||/(tizen)[ \/]([\w._\-]+);/.exec(t)||!!/(linux)/.test(t)&&["","linux","0.0.0"]||!!/webos/.test(t)&&["","webos","0.0.0"]||/(cros)(?:\s[\w]+\s)([\d._\-]+)/.exec(t)||/(bada)[ \/]([\w._\-]+)/.exec(t)||!!/bada/.test(t)&&["","bada","0.0.0"]||!!/(rim|blackberry|bb10)/.test(t)&&["","blackberry","0.0.0"]||["","unknown","0.0.0"];return"iphone"===r[1]||"ipad"===r[1]||"ipod"===r[1]?r[1]="ios":"windows"===r[1]&&"98"===r[2]&&(r[2]="0.98.0"),"mac"===r[1]&&"undefined"!=typeof window&&window.navigator.maxTouchPoints>1&&(r[1]="ios"),"cros"===r[1]&&(r[1]="chrome"),n[r[1]]=!0,n.name=r[1],n.version=e(r[2]),n}Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var o=["crios","fxios","daumapps"];function a(t,n){var r={},a=null,i=o;Array.isArray(n)?i=o.concat(n):"string"==typeof n&&(i=o.concat([n]));for(var c=0,u=i.length;c0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(!f(t))throw new Error("params should be an Object");v(e.before)&&e.before(t),v(e.defaults)?Kt(t,e.defaults(t)):Kt(t,e.defaults);var r=e.required,o=void 0===r?{}:r,a=e.optional,i=void 0===a?{}:a,c=Wt(Jt(o),Jt(t));if(c.length>0)throw new ke("Missing required keys: ".concat(c.join(",")," at ").concat(n));var u=Pt({},o,i),l=Wt(Jt(t),Jt(u));if(l.length>0)throw new ke("Invalid parameter keys: ".concat(l.join(",")," at ").concat(n));return Lt(t,(function(t,e){_e(t,u[e],'"'.concat(e,'" in ').concat(n))})),v(e.after)&&e.after(t),t}ke.prototype=new Error;var Pe={};function xe(t,e,n){var r=Pe[e];return r&&r.close&&!r.closed&&r.close(),Pe[e]=window.open(t,e,n),Pe[e]}function Se(t,e,n){Lt(n,(function(n,r){var o=e.getAttribute(n);null!==o&&(t[r]="true"===o||"false"===o?"true"===o:o)}))}var Ce="width=350, height=510";function Ie(t,e,n){var r=document.createElement("a");r.setAttribute("href","#");var o=document.createElement("img");return o.setAttribute("src",e),o.setAttribute("title",n),o.setAttribute("alt",n),t.supportMultipleDensities&&o.setAttribute("srcset",[e.replace(".png","_2X.png 2x"),e.replace(".png","_3X.png 3x")].join(", ")),r.appendChild(o),r}function Fe(t,e){return function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e?encodeURIComponent:function(t){return t};return Nt(Jt(t),(function(e){var r=t[e];return n(e)+"="+n(f(r)?JSON.stringify(r):r)})).join("&")}(function(t){for(var e=1;e