var $=require("jquery"),Base=require("basePC"),Dialog=require("./../lib/js/dialogPC.js"),Util=require("./../lib/js/util.js"),UIkit=require("./../uikit/uikit.js"),CommonSelectDialog=require("./../lib/js/commonSelectDialog.js"),Qrcode=require("./../lib/js/qrcode.js"),Lazyload=require("./../lib/js/jqueryLazyload.js"),JqueryTimeago=require("./../lib/js/jqueryTimeago.js"),CommonVerify=require("./../lib/js/commonVerify.js"),JqueryMark=require("./../lib/js/jqueryMark.js"),apiInit=function(){window.api={},window.api.dialog=Dialog,window.api.base=Base,window.api.util=Util,window.api.commonVerify=CommonVerify,window.api.mark=JqueryMark},callbackInit=function(){window.callback={},window.callback.editorUploadImage=function(i){new CommonSelectDialog($.extend({server:"/data/image_select_dialog"},{callback:function(a){i(a)}}),Dialog).show()}},appInit=function(){$(document).on("click","[data-favorite-action] [data-action]",function(){var i=$(this).data("action"),a=$(this).data("category"),e=$(this).data("category-id"),o=$(this);$.post("/member/favorite_submit",{category:a,action:i,categoryId:e},function(a){Base.defaultFormCallback(a,{success:function(a){o.closest("[data-favorite-action]").find("[data-action]").show(),o.closest("[data-favorite-action]").find("[data-action="+i+"]").hide()}})})})};module.exports={init:function(){Base.init(),Qrcode.init(Dialog),$.timeago.settings.allowFuture=!0,$("[datetime]").timeago(),$("[data-src]").lazyload({data_attribute:"src"}),apiInit(),callbackInit(),appInit()},Base:Base,Dialog:Dialog};