1current_notification_number = 0; 2current_notification_number = 0; 3current_messages_number = 0; 4current_follow_requests_number = 0; 5 6current_width = $(window).width(); 7document_title = document.title; 8 9 10$(document).on('click', '.filterby li.filter-by-li', function(event) { 11 $('.filterby li.filter-by-li').each(function(){ 12 $(this).removeClass('avtive'); 13 $(this).find('i').addClass('hidden'); 14 }); 15 $(this).find('i').removeClass('hidden'); 16 $(this).addClass('avtive'); 17}); 18 19$(document).on('click', '.postText', function(event) { 20 textAreaAdjust(this, 70); 21}); 22$(function () { 23 24 $(window).on("dragover",function(e){ 25 e.preventDefault(); 26 },false); 27 28 $(window).on("drop",function(e){ 29 e.preventDefault(); 30 },false); 31 32 //$('.postText').autogrow({vertical: true, horizontal: false, height: 200}); 33 $('#movies-comment').autogrow({vertical: true, horizontal: false, height: 200}); 34 $('#blog-comment').autogrow({vertical: true, horizontal: false, height: 200}); 35 var api = $('#api').val(); 36 var hash = $('.main_session').val(); 37 setTimeout(function (argument) { 38 $.ajaxSetup({ 39 data: { 40 hash: hash 41 }, 42 cache: false 43 }); 44 },100) 45 $(document).on("click",".mfp-arrow",function(event) { 46 Wo_StoryProgress(); 47 }); 48 $(document).on('click', '.messages-recipients-list', function(event) { 49 scrollToTop(); 50 }); 51 $('[data-toggle="tooltip"]').tooltip(); 52 // open last active tab 53 var url = document.location.toString(); 54 if(url.match('#')) { 55 var val_hash = url.split('#')[1]; 56 $('.nav-tabs a[href="#' + val_hash + '"]').tab('show'); 57 } 58 $('.nav-tabs a').on('shown.bs.tab', function (e) { 59 //window.location.hash = e.target.hash; 60 $('body').scrollTop(0); 61 }); 62 63 64 intervalUpdates = setTimeout(Wo_intervalUpdates, 6000); 65 if (node_socket_flow == "0") { 66 //setTimeout(Wo_UpdateLastSeen, 40000); 67 setTimeout(Wo_IsLogged, 30000); 68 } 69 70 71 // dropdown won't close on click 72 $('.dropdown-menu.request-list, .dropdown-menu.post-recipient, .dropdown-menu.post-options').click(function (e) { 73 e.stopPropagation(); 74 }); 75 scrolled = 0; 76 // Stick the home side bar if the screen width is > than 900 77 if(current_width > 900 || api) { 78 $(window).scroll(function () { 79 if($('.footer-wrapper').scrollTop() > 500) { 80 $('.footer-wrapper .dropdown-menu').css('bottom', 'auto'); 81 } else { 82 $('.footer-wrapper .dropdown-menu').css('bottom', '100%'); 83 } 84 if($(document).scrollTop() > 200) { 85 $('.sidebar-sticky').addClass('Stick'); 86 } else { 87 $('.sidebar-sticky').removeClass('Stick'); 88 } 89 var nearToBottom = 100; 90 if($('#posts').length > 0) { 91 if ($(window).scrollTop() + $(window).height() > $(document).height() - nearToBottom) { 92 if (scrolled == 0) { 93 scrolled = 1; 94 Wo_GetMorePosts(); 95 } 96 } 97 } 98 }); 99 } 100}); 101 102 103function Wo_CloseModels() { 104 $('.modal').modal('hide'); 105} 106// update user last seen 107function Wo_UpdateLastSeen() { 108 $.get(Wo_Ajax_Requests_File(), { 109 f: 'update_lastseen' 110 }, function () { 111 setTimeout(Wo_UpdateLastSeen, 40000); 112 }); 113} 114// js function 115function Wo_CheckUsername(username) { 116 var check_container = $('.checking'); 117 var check_input = $('#username').val(); 118 if(check_input == '') { 119 check_container.empty(); 120 return false; 121 } 122 check_container.removeClass('unavailable').removeClass('available').html('<i class="fa fa-clock-o"></i><span id="loading"> Checking <span>.</span><span>.</span><span>.</span></span>'); 123 $.get(Wo_Ajax_Requests_File(), { 124 f: 'check_username', 125 username: username 126 }, function (data) { 127 if(data.status == 200) { 128 check_container.html('<i class="fa fa-check"></i> ' + data.message).removeClass('unavailable').addClass('available'); 129 } else if(data.status == 300) { 130 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 131 } else if(data.status == 400) { 132 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 133 } else if(data.status == 500) { 134 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 135 } else if(data.status == 600) { 136 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 137 } 138 }); 139} 140 141function Wo_CheckPagename(pagename, page_id) { 142 var check_container = $('.checking'); 143 var check_input = $('#page_name').val(); 144 if(check_input == '') { 145 check_container.empty(); 146 return false; 147 } 148 check_container.removeClass('unavailable').removeClass('available').html('<i class="fa fa-clock-o"></i><span id="loading">
148 Checking <span>.</span><span>.</span><span>.</span></span>'); 149 $.get(Wo_Ajax_Requests_File(), { 150 f: 'check_pagename', 151 pagename: pagename, 152 page_id: page_id 153 }, function (data) { 154 if(data.status == 200) { 155 check_container.html('<i class="fa fa-check"></i> ' + data.message).removeClass('unavailable').addClass('available'); 156 } else if(data.status == 300) { 157 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 158 } else if(data.status == 400) { 159 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 160 } else if(data.status == 500) { 161 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 162 } else if(data.status == 600) { 163 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 164 } 165 }); 166} 167 168function Wo_CheckGroupname(groupname, group_id) { 169 var check_container = $('.checking'); 170 var check_input = $('#group_name').val(); 171 if(check_input == '') { 172 check_container.empty(); 173 return false; 174 } 175 check_container.removeClass('unavailable').removeClass('available').html('<i class="fa fa-clock-o"></i><span id="loading"> Checking <span>.</span><span>.</span><span>.</span></span>'); 176 $.get(Wo_Ajax_Requests_File(), { 177 f: 'check_groupname', 178 groupname: groupname, 179 group_id:group_id 180 }, function (data) { 181 if(data.status == 200) { 182 check_container.html('<i class="fa fa-check"></i> ' + data.message).removeClass('unavailable').addClass('available'); 183 } else if(data.status == 300) { 184 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 185 } else if(data.status == 400) { 186 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 187 } else if(data.status == 500) { 188 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 189 } else if(data.status == 600) { 190 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 191 } 192 }); 193} 194 195// scroll to top function 196function scrollToTop() { 197 verticalOffset = typeof (verticalOffset) != 'undefined' ? verticalOffset : 0; 198 element = $('html'); 199 offset = element.offset(); 200 offsetTop = offset.top; 201 $('html, body').animate({ 202 scrollTop: offsetTop 203 }, 300, 'linear'); 204} 205 206// check if user is logged in function 207function Wo_IsLogged() { 208 $.post(Wo_Ajax_Requests_File() + '?f=session_status', function (data) { 209 setTimeout(Wo_UpdateLastSeen, 30000); 210 if(data.status == 200) { 211 $('#logged-out-modal').modal({ 212 show: true 213 }); 214 } 215 }); 216} 217 218// side bar users 219function Wo_ReloadSideBarUsers() { 220 Wo_progressIconLoader($('#sidebar-user-list-container').find('.refresh')); 221 $.get(Wo_Ajax_Requests_File(), { 222 f: 'update_sidebar_users' 223 }, function (data) { 224 if(data.status == 200) { 225 $('.sidebar-users-may-know-container').html(data.html); 226 } 227 Wo_progressIconLoader($('#sidebar-user-list-container').find('.refresh')); 228 }); 229} 230function Wo_ReloadSideBarServices() { 231 Wo_progressIconLoader($('#sidebar-user-service-container').find('.refresh')); 232 $.get(Wo_Ajax_Requests_File(), { 233 f: 'update_sidebar_services' 234 }, function (data) { 235 if(data.status == 200) { 236 $('.sidebar-users-may-service-container').html(data.html); 237 } 238 Wo_progressIconLoader($('#sidebar-user-service-container').find('.refresh')); 239 }); 240} 241 242function Wo_ReloadSideBarGroups() { 243 Wo_progressIconLoader($('#sidebar-group-list-container').find('.refresh')); 244 $.get(Wo_Ajax_Requests_File(), { 245 f: 'update_sidebar_groups' 246 }, function (data) { 247 if(data.status == 200) { 248 $('.sidebar-group-may-know-container').html(data.html); 249 } 250 Wo_progressIconLoader($('#sidebar-group-list-container').find('.refresh')); 251 }); 252} 253 254// side bar pages 255function Wo_ReloadSideBarPages() { 256 Wo_progressIconLoader($('#sidebar-page-list-container').find('.refresh')); 257 var page_id = $('.sidebar-pages-may-know-container').find('.sidebar-page-data').attr('data-page-id'); 258 if (page_id == 'undefined') { 259 page_id = ''; 260 } 261 $.get(Wo_Ajax_Requests_File(), { 262 f: 'pages', 263 s: 'get_next_page', 264 page_id: page_id 265 }, function (data) { 266 if(data.status == 200) { 267 if (data.html.length == 0) { 268 $('.sidebar-pages-may-know-container').html('<h2><div class="no-more-pages text-center">No more pages to like</div></h2>'); 269 } else { 270 $('.sidebar-pages-may-know-container').hide().html(data.html).fadeIn(300); 271 } 272 } 273 Wo_progressIconLoader($('#sidebar-page-list-container').find('.refresh')); 274 }); 275} 276 277// get new notifications 278function Wo_OpenNotificationsMenu() { 279 notification_container = $('.notification-container'); 280 notification_list = $('#notification-list'); 281 notification_container.find('.new-update-alert').addClass('hidden').text('0'); 282 Wo_progressIconLoader(notification_container.find('.notification-loading-progress')); 283 $.get(Wo_Ajax_Requests_File(), { 284 f: 'get_notifications' 285 }, function (data) { 286 if(data.status == 200) { 287 if(data.html.length == 0) { 288 notification_list.html('<div class="empty_state single"><svg height="511pt" viewBox="-21 1 511 511.99998" width="511pt" xmlns="http://www.w3.org/2000/svg"><path d="m311.628906 435.773438c0 35.046874-23.644531 64.554687-55.839844 73.46875-6.488281 1.796874-13.320312 2.757812-20.375 2.757812-42.097656 0-76.226562-34.125-76.226562-76.226562l76.347656-39.234376zm0 0" fill="#e58e13"/><path d="m307.941406 459.285156c-7.847656 24.21875-27.492187 43.132813-52.152344 49.957032-15.503906-4.289063-29.023437-13.351563-38.875-25.503907-7.941406-9.800781-.777343-24.453125 11.835938-24.453125zm0 0" fill="#f7d360"/><path d="m432.210938 359.558594-163.761719 35.414062-229.84375-35.414062c18.035156 0 28.234375-9.433594 34.023437-25.078125 28.003906-75.523438-46.582031-295.632813 162.785156-295.632813 209.367188 0 134.769532 220.109375 162.773438 295.632813 5.800781 15.644531 15.996094 25.078125 34.023438 25.078125zm0 0" fill="#f7d360"/><path d="m470.316406 397.667969c0 21.042969-17.0625 38.105469-38.105468 38.105469h-393.605469c-10.519531 0-20.050781-4.261719-26.945313-11.160157-6.898437-6.894531-11.160156-16.425781-11.160156-26.945312 0-21.046875 17.0625-38.109375 38.105469-38.109375h393.605469c10.519531 0 20.050781 4.265625 26.945312 11.160156 6.898438 6.898438 11.160156 16.425781 11.
288160156 26.949219zm0 0" fill="#e58e13"/><path d="m398.1875 334.480469h-204.574219c-22.054687 0-39.691406-18.253907-39.007812-40.300781 2.882812-93.265626-11.992188-253.558594 79.277343-255.320313-250.535156 1.296875-90.382812 320.699219-195.269531 320.699219h393.597657c-18.027344 0-28.222657-9.433594-34.023438-25.078125zm0 0" fill="#e58e13"/><path d="m470.316406 397.667969c0 21.042969-17.0625 38.105469-38.105468 38.105469h-283.480469c-10.523438 0-20.054688-4.261719-26.949219-11.160157-6.894531-6.894531-11.160156-16.425781-11.160156-26.945312 0-21.046875 17.0625-38.109375 38.109375-38.109375h283.480469c10.519531 0 20.050781 4.265625 26.945312 11.160156 6.898438 6.898438 11.160156 16.425781 11.160156 26.949219zm0 0" fill="#f7d360"/><path d="m274.148438 41.765625c.082031-.960937.113281-1.933594.113281-2.917969 0-21.449218-17.394531-38.847656-38.847657-38.847656-21.460937 0-38.847656 17.398438-38.847656 38.847656 0 .984375.03125 1.957032.113282 2.917969" fill="#e58e13"/><g fill="#e6e6e6"><path d="m424.613281 167.71875c-4.328125 0-7.835937-3.511719-7.835937-7.835938 0-36.269531-9.324219-67.222656-27.710938-92-13.726562-18.496093-27.683594-26.457031-27.820312-26.539062-3.765625-2.113281-5.121094-6.878906-3.019532-10.652344 2.101563-3.769531 6.84375-5.136718 10.621094-3.050781.667969.371094 16.535156 9.277344 32.25 30.160156 14.304688 19.007813 31.355469 52.148438 31.355469 102.082031 0 4.324219-3.511719 7.835938-7.839844 7.835938zm0 0"/><path d="m459.09375 122.789062c-4.328125 0-7.835938-3.507812-7.835938-7.835937 0-50.023437-29.625-69.910156-30.886718-70.730469-3.613282-2.355468-4.660156-7.195312-2.328125-10.820312 2.335937-3.625 7.140625-4.695313 10.777343-2.378906 1.558594.988281 38.109376 24.929687 38.109376 83.929687 0 4.328125-3.507813 7.835937-7.835938 7.835937zm0 0"/><path d="m46.203125 167.71875c-4.328125 0-7.835937-3.511719-7.835937-7.835938 0-49.933593 17.050781-83.074218 31.351562-102.082031 15.71875-20.882812 31.582031-29.792969 32.25-30.160156 3.789062-2.09375 8.558594-.71875 10.652344 3.070313 2.089844 3.78125.722656 8.539062-3.050782 10.636718-.308593.175782-14.171874 8.15625-27.816406 26.535156-18.390625 24.777344-27.710937 55.730469-27.710937 92-.003907 4.324219-3.511719 7.835938-7.839844 7.835938zm0 0"/><path d="m11.722656 122.789062c-4.328125 0-7.835937-3.507812-7.835937-7.835937 0-59 36.554687-82.941406 38.109375-83.929687 3.652344-2.324219 8.496094-1.246094 10.820312 2.402343 2.316406 3.640625 1.253906 8.46875-2.375 10.796875-1.300781.851563-30.882812 20.746094-30.882812 70.730469 0 4.328125-3.507813 7.835937-7.835938 7.835937zm0 0"/></g></svg>' + data.message + '</div>'); 289 } else { 290 document.getElementById('notification-list').innerHTML = data.html; 291 Wo_intervalUpdates(); 292 } 293 } 294 Wo_progressIconLoader(notification_container.find('.notification-loading-progress')); 295 }); 296} 297function Wo_OpenMessagesMenu() { 298 messages_container = $('.messages-notification-container'); 299 messages_list = $('#messages-list'); 300 Wo_progressIconLoader(messages_container.find('.notification-loading-progress')); 301 $.get(Wo_Ajax_Requests_File(), { 302 f: 'get_messages' 303 }, function (data) { 304 if(data.status == 200) { 305 if(data.html.length == 0) { 306 messages_list.html('<div class="empty_state single"><svg height="512pt" viewBox="0 -16 512.00002 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m408.96875 86.230469c0-39.242188 0-70.875 0-72.9375 0-7.3125-5.882812-13.292969-13.078125-13.292969h-342.695313c-7.195312 0-13.082031 5.980469-13.082031 13.292969v72.9375zm0 0" fill="#f4b537"/><path d="m84.101562 0h-30.90625c-7.195312 0-13.082031 5.980469-13.082031 13.292969v72.9375h30.910157c0-39.242188 0-70.875 0-72.9375 0-7.3125 5.882812-13.292969 13.078124-13.292969zm0 0" fill="#eaa01c"/><path d="m334.917969 86.230469 74.050781-72.9375c0-7.3125-5.882812-13.292969-13.078125-13.292969h-342.695313c-7.195312 0-13.082031 5.980469-13.082031 13.292969l74.050781 72.9375zm0 0" fill="#feca57"/><path d="m40.113281 13.292969 30.910157 30.445312c0-17.527343 0-29.214843 0-30.445312 0-7.3125 5.882812-13.292969 13.078124-13.292969h-30.90625c-7.195312 0-13.082031 5.980469-13.082031 13.292969zm0 0" fill="#f4b537"/><path d="m326.84375 387.878906c0-51.132812 41.449219-92.578125 92.578125-92.578125 10.375 0 20.351563 1.707031 29.664063 4.851563 0-80.453125 0-195.015625 0-199.378906 0-8.757813-7.167969-15.921876-15.925782-15.921876h-417.234375c-8.761719 0-15.925781 7.164063-15.925781 15.921876v277.148437c0 8.757813 7.
306164062 15.921875 15.925781 15.921875h311.113281c-.125-1.972656-.195312-3.960938-.195312-5.964844zm0 0" fill="#feca57"/><path d="m30.90625 377.921875c0-2.886719 0-270.433594 0-277.148437 0-8.757813 7.167969-15.921876 15.925781-15.921876h-30.90625c-8.761719 0-15.925781 7.164063-15.925781 15.921876v277.148437c0 8.757813 7.164062 15.921875 15.925781 15.921875h30.90625c-8.757812 0-15.925781-7.164062-15.925781-15.921875zm0 0" fill="#f4b537"/><path d="m326.84375 387.878906c0-35.171875 19.609375-65.761718 48.496094-81.433594l-69.230469-67.097656-33.820313 32.773438c-26.605468 25.792968-68.886718 25.792968-95.496093 0l-33.816407-32.773438-142.976562 138.574219c0 8.757813 7.164062 15.921875 15.925781 15.921875h311.113281c-.125-1.972656-.195312-3.960938-.195312-5.964844zm0 0" fill="#f4b537"/><path d="m164.503906 260.210938-21.527344-20.863282-142.976562 138.574219c0 8.757813 7.164062 15.921875 15.925781 15.921875h10.695313zm0 0" fill="#eaa01c"/><path d="m433.160156 84.851562h-417.234375c-8.761719 0-15.925781 7.164063-15.925781 15.921876l176.792969 173.410156c26.609375 25.789062 68.890625 25.789062 95.496093 0l176.796876-173.410156c0-8.757813-7.167969-15.921876-15.925782-15.921876zm0 0" fill="#fcd486"/><path d="m0 100.773438 30.90625 30.316406c0-17.546875 0-28.992188 0-30.316406 0-8.757813 7.167969-15.921876 15.925781-15.921876h-30.90625c-8.761719 0-15.925781 7.164063-15.925781 15.921876zm0 0" fill="#feca57"/><path d="m512 387.324219c0 51.433593-41.695312 93.128906-93.132812 93.128906-51.433594 0-93.132813-41.695313-93.132813-93.128906 0-51.4375 41.699219-93.132813 93.132813-93.132813 51.4375 0 93.132812 41.695313 93.132812 93.132813zm0 0" fill="#ff6b6b"/><path d="m356.644531 387.324219c0-46.171875 33.597657-84.488281 77.675781-91.851563-5.023437-.839844-10.1875-1.28125-15.453124-1.28125-51.433594 0-93.132813 41.695313-93.132813 93.128906 0 51.4375 41.699219 93.132813 93.132813 93.132813 5.265624 0 10.429687-.441406 15.453124-1.28125-44.078124-7.363281-77.675781-45.679687-77.675781-91.847656zm0 0" fill="#ee5253"/><path d="m430.347656 387.878906 27.199219-27.199218c3.019531-3.019532 3.019531-7.910157 0-10.929688-3.015625-3.015625-7.910156-3.015625-10.925781 0l-27.199219 27.199219-27.199219-27.199219c-3.015625-3.015625-7.910156-3.015625-10.925781 0-3.019531 3.019531-3.019531 7.910156 0 10.929688l27.199219 27.199218-27.199219 27.195313c-3.019531 3.019531-3.019531 7.910156 0 10.929687 1.507813 1.507813 3.484375 2.261719 5.464844 2.261719 1.976562 0 3.953125-.753906 5.460937-2.261719l27.199219-27.199218 27.199219 27.199218c1.511718 1.507813 3.488281 2.261719 5.464844 2.261719 1.976562 0 3.953124-.753906 5.464843-2.261719 3.015625-3.019531 3.015625-7.910156 0-10.929687zm0 0" fill="#e4eaf8"/></svg>' + data.message + '</div>'); 307 } else { 308 //messages_list.html(data.html); 309 document.getElementById('messages-list').innerHTML = data.html; 310 messages_list.append('<div class="show-message-link-container"><a href="' + data.messages_url + '" class="show-message-link" target="_blank">' + data.messages_text + '</a></div>'); 311 //Wo_intervalUpdates(); 312 } 313 } 314 Wo_progressIconLoader(messages_container.find('.notification-loading-progress')); 315 }); 316} 317// get new friend requests 318function Wo_OpenRequestsMenu() { 319 requests_container = $('.requests-container'); 320 requests_List = $('#requests-list'); 321 Wo_progressIconLoader(requests_container.find('.requests-loading')); 322 $.get(Wo_Ajax_Requests_File(), { 323 f: 'get_follow_requests' 324 }, function (data) { 325 if(data.status == 200) { 326 requests_container.find('.new-update-alert').addClass('hidden'); 327 requests_container.find('.new-update-alert').addClass('hidden').text('0').hide(); 328 if(data.html.length == 0) { 329 requests_List.html('<div class="empty_state single"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="512" height="512" x="0" y="0" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g> <path xmlns="http://www.w3.org/2000/svg" style="" d="M296.932,314.08c-9.531-1.916-16.387-10.287-16.387-20.009v-46.004h-45.143l0,0h-45.143v46.004 c0,9.721-6.857,18.093-16.387,20.009l-11,2.211v73.876h72.53l0,0h72.53v-73.876L296.932,314.08z" fill="#fce0a2" data-original="#fce0a2" class=""/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M236.594,248.068v63c0,9.721,6.857,18.093,16.387,20.009l11.782,2.877l43.168,12.454v-30.117 l-11-2.211c-9.531-1.916-16.387-10.287-16.387-20.009v-46.004L236.594,248.068L236.594,248.068z" fill="#f2ca91" data-original="#f2ca91" class=""/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M390.924,338.885l-91.681-28.586c-2.138-0.66
3297-4.468-0.231-6.22,1.164l-57.622,45.859l-57.622-45.859 c-1.753-1.395-4.082-1.831-6.22-1.164l-91.681,28.586c-40.145,11.82-67.708,48.669-67.708,90.518v60.322 c0,4.802,3.893,8.695,8.695,8.695h429.072c4.802,0,8.695-3.893,8.695-8.695v-60.322 C458.633,387.554,431.069,350.705,390.924,338.885z" fill="#f7d360" data-original="#4cbad8" class=""/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M390.924,338.885l-91.681-28.586c-2.138-0.667-4.468-0.231-6.221,1.164l-28.259,22.491l82.825,23.895 c39.162,11.108,66.725,47.957,66.725,89.806v50.765h35.624c4.802,0,8.695-3.893,8.695-8.695v-60.322 C458.633,387.554,431.069,350.705,390.924,338.885z" fill="#f39e26" data-original="#37a6c4" class=""/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M70.084,412.721c-4.267,0-7.726,3.459-7.726,7.726v77.974H77.81v-77.974 C77.81,416.18,74.352,412.721,70.084,412.721z" fill="#e58e13" data-original="#2195bd" class=""/> <g xmlns="http://www.w3.org/2000/svg"> <path style="" d="M350.258,200.069h-18.342v-53.192h18.342c9.452,0,17.114,7.662,17.114,17.114v18.965 C367.371,192.407,359.709,200.069,350.258,200.069z" fill="#f2ca8f" data-original="#f2ca8f"/> <path style="" d="M120.546,200.069h18.342v-53.192h-18.342c-9.452,0-17.114,7.662-17.114,17.114v18.965 C103.432,192.407,111.094,200.069,120.546,200.069z" fill="#f2ca8f" data-original="#f2ca8f"/> </g> <path xmlns="http://www.w3.org/2000/svg" style="" d="M235.402,284.124L235.402,284.124c-59.144,0-107.089-47.945-107.089-107.089v-30.096 c0-59.144,47.945-107.089,107.089-107.089l0,0c59.144,0,107.089,47.945,107.089,107.089v30.096 C342.491,236.178,294.546,284.124,235.402,284.124z" fill="#fce0a2" data-original="#fce0a2" class=""/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M235.402,39.85L235.402,39.85c-7.575,0-14.964,0.791-22.094,2.287 c48.543,10.182,84.996,53.233,84.996,104.802v30.096c0,51.569-36.453,94.62-84.996,104.802c7.13,1.496,14.519,2.287,22.093,2.287 l0,0c59.144,0,107.089-47.945,107.089-107.089v-30.096C342.491,87.796,294.546,39.85,235.402,39.85z" fill="#f2ca91" data-original="#f2ca91" class=""/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M253.624,0h-36.445c-61.611,0-111.556,49.945-111.556,111.556v44.07 c2.932-5.218,8.511-8.749,14.922-8.749h7.767c0.008-13.028,2.344-25.511,6.611-37.057c47.353-13.416,95.48,23.199,147.819,23.199 c26.141,0,43.985-5.85,56.053-13.004l0.279-0.003c2.224,8.585,3.41,17.587,3.415,26.866h7.768c6.411,0,11.991,3.531,14.922,8.749 v-44.07C365.18,49.945,315.234,0,253.624,0z" fill="#f9a058" data-original="#f9a058"/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M253.624,0h-36.445c-1.296,0-2.585,0.03-3.871,0.074c59.817,2.041,107.685,51.167,107.685,111.482 v16.232c6.999-2.174,12.89-4.861,17.803-7.774l0.279-0.003c2.223,8.585,3.41,17.587,3.415,26.866h7.767 c6.411,0,11.991,3.531,14.922,8.749v-44.07C365.18,49.945,315.234,0,253.624,0z" fill="#ef8d43" data-original="#ef8d43"/> <circle xmlns="http://www.w3.org/2000/svg" style="" cx="408.28" cy="420.45" r="91.55" fill="#e9f6ff" data-original="#e9f6ff" class=""/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M408.276,328.893c-7.667,0-15.112,0.948-22.23,2.723c39.82,9.933,69.323,45.934,69.323,88.83 s-29.503,78.896-69.323,88.83c7.117,1.775,14.562,2.724,22.23,2.724c50.564,0,91.553-40.99,91.553-91.553 S458.839,328.893,408.276,328.893z" fill="#ccdfed" data-original="#ccdfed" class=""/> <path xmlns="http://www.w3.org/2000/svg" style="" d="M455.346,414.354h-39.344V375.01c0-4.267-3.458-7.726-7.726-7.726c-4.267,0-7.726,3.459-7.726,7.726 v39.344h-39.344c-4.267,0-7.726,3.459-7.726,7.726s3.458,7.726,7.726,7.726h39.344v39.344c0,4.267,3.458,7.726,7.726,7.726 c4.267,0,7.726-3.459,7.726-7.726v-39.344h39.344c4.267,0,7.726-3.459,7.726-7.726S459.613,414.354,455.346,414.354z" fill="#fc6060" data-original="#fc6060" class=""/> <g xmlns="http://www.w3.org/2000/svg"> <path style="" d="M235.402,357.323l-23.358,20.429c-3.868,3.383-9.696,3.189-13.331-0.443l-57.572-57.525 l30.419-9.485c2.138-0.667,4.468-0.231,6.22,1.164L235.402,357.323z" fill="#e58e13" data-original="#2195bd" class=""/> <path style="" d="M235.402,357.323l23.358,20.429c3.868,3.383,9.696,3.189,13.331-0.443l57.572-57.525l-30.419-9.485 c-2.138-0.66
3297-4.468-0.231-6.22,1.164L235.402,357.323z" fill="#e58e13" data-original="#2195bd" class=""/> </g> </g></svg>' + data.message + '</div>'); 330 } else { 331 requests_List.html(data.html); 332 Wo_intervalUpdates(); 333 } 334 } 335 Wo_progressIconLoader(requests_container.find('.requests-loading')); 336 }); 337} 338function Wo_CheckForCallAnswerTabs(id) { 339 $.get(Wo_Ajax_Requests_File(), {f:'check_for_answer', id:id}, function (data1) { 340 if (data1.status == 400 || data1.status == 200) { 341 clearTimeout(checkcalls); 342 setTimeout(function () { 343 $( '#re-calling-modal' ).remove(); 344 $( '.modal-backdrop' ).remove(); 345 $( 'body' ).removeClass( "modal-open" ); 346 document.title = document_title; 347 }, 3000); 348 } 349 }); 350 checkcalls = setTimeout(function () { 351 Wo_CheckForCallAnswerTabs(id); 352 }, 2000); 353} 354function Wo_CheckForAudioCallAnswerTabs(id) { 355 $.get(Wo_Ajax_Requests_File(), {f:'check_for_audio_answer', id:id}, function (data1) { 356 if (data1.status == 400 || data1.status == 200) { 357 clearTimeout(checkcalls); 358 setTimeout(function () { 359 $( '#re-calling-modal' ).remove(); 360 $( '.modal-backdrop' ).remove(); 361 $( 'body' ).removeClass( "modal-open" ); 362 document.title = document_title; 363 }, 3000); 364 if (data1.status == 400) { 365 Wo_PlayVideoCall('stop'); 366 Wo_PlayAudioCall('stop'); 367 } 368 } 369 }); 370 checkcalls = setTimeout(function () { 371 Wo_CheckForAudioCallAnswerTabs(id); 372 }, 2000); 373} 374// Notifications & follow requests updates 375function Wo_intervalUpdates(force_update = 0, loop = 0) { 376 if (node_socket_flow == "0" || force_update == 1) { 377 var check_posts = true; 378 var hash_posts = true; 379 if ($('.posts-hashtag-count').length == 0) { 380 hash_posts = false; 381 } 382 var api = $('#api').val(); 383 if (api) { 384 return false; 385 } 386 if ($('.posts-count').length == 0 || hash_posts == true) { 387 check_posts = false; 388 } 389 if(typeof ($('#posts').attr('data-story-user')) == "string") { 390 user_id = $('#posts').attr('data-story-user'); 391 } else { 392 user_id = 0; 393 } 394 before_post_id = 0; 395 if($('.post-container').length > 0) { 396 var before_post_id = $('.post-container > .post:not(.boosted)').attr('data-post-id'); 397 } 398 var notification_container = $('.notification-container'); 399 var messages_notification_container = $('.messages-notification-container'); 400 var follow_requests_container = $('.requests-container'); 401 var ajax_request = { 402 f: 'update_data', 403 user_id: user_id, 404 before_post_id: before_post_id, 405 check_posts:check_posts, 406 hash_posts:hash_posts 407 }; 408 if (hash_posts == true) { 409 ajax_request['hashtagName'] = $('#hashtagName').val(); 410 } 411 $.get(Wo_Ajax_Requests_File(), ajax_request, function (data) { 412 if (node_socket_flow == "0" || force_update == 0 || loop == 1) { 413 clearTimeout(intervalUpdates); 414 intervalUpdates = setTimeout(function () { 415 Wo_intervalUpdates(force_update); 416 } , 5000); 417 } 418 if (hash_posts == true) { 419 if (data.count_num > 0) { 420 $('.posts-count').html(data.count); 421 } 422 } else { 423 if (data.count_num > 0 && $('.filter-by-more').attr('data-filter-by') == 'all') { 424 $('.posts-count').html(data.count); 425 } 426 } 427 if(typeof (data.notifications) != "undefined" && data.notifications > 0) { 428 notification_container.find('.new-update-alert').removeClass('hidden'); 429 notification_container.find('.sixteen-font-size').addClass('unread-update'); 430 notification_container.find('.new-update-alert').text(data.notifications).show(); 431 if(current_width > 800 && data.pop == 200) { 432 Wo_NotifyMe(data.icon, decodeHtml(data.title), decodeHtml(data.notification_text), data.url); 433 } 434 if(data.notifications != current_notification_number) { 435 if (data.notifications_sound == 0 && current_notification_number) { 436 document.getElementById('notification-sound').play(); 437 } 438 current_notification_number = data.notifications; 439 } 440 } else { 441 notification_container.find('.new-update-alert').hide(); 442 notification_container.find('.sixteen-font-size').removeClass('unread-update'); 443 current_notification_number = 0; 444 } 445 if(typeof (data.messages) != "undefined" && data.messages > 0) { 446 messages_notification_container.find('.new-update-alert').removeClass('hidden'); 447 messages_notification_container.find('.sixteen-font-size').addClass('unread-update'); 448 messages_notification_container.find('.new-update-alert').text(data.messages).show(); 449 //if(data.messages != current_messages_number) { 450 if(data.messages != $("[data_messsages_count]").attr('data_messsages_count')) { 451 if (data.notifications_sound == 0 && $("[data_messsages_count]").attr('data_messsages_count') < data.messages) { 452 document.getElementById('message-sound').play(); 453 } 454 $("[data_messsages_count]").attr('data_messsages_count', data.messages); 455 current_messages_number = data.messages; 456 } 457 } else { 458 messages_notification_container.find('.new-update-alert').hide(); 459 messages_notification_container.find('.sixteen-font-size').removeClass('unread-update'); 460 current_messages_number = 0; 461 } 462 if(typeof (data.followRequests) != "undefined" && data.followRequests > 0) { 463 follow_requests_container.find('.new-update-alert').removeClass('hidden'); 464 follow_requests_container.find('.sixteen-font-size').addClass('unread-update'); 465 follow_requests_container.find('.new-update-alert').text(data.followRequests).show(); 466 if(data.followRequests != current_follow_requests_number) { 467 current_follow_requests_number = data.followRequests; 468 } 469 } else { 470 follow_requests_container.find('.new-update-alert').hide(); 471 follow_requests_container.find('.sixteen-font-size').removeClass('unread-update'); 472 current_follow_requests_number = 0; 473 } 474 475 if(typeof (data.messages) != "undefined" && data.messages > 0 || typeof (data.notifications) != "undefined" && data.notifications > 0 || typeof (data.followRequests) != "undefined" && data.followRequests > 0) { 476 title = Number(data.notifications) + Number(data.messages) + Number(data.followRequests); 477 document.title = '(' + title + ') ' + document_title; 478 } else { 479 document.title = document_title; 480 } 481 if (data.calls == 200 && $('#re-calling-modal').length == 0 && $('#re-talking-modal').length == 0) { 482 if (node_socket_flow != "1") { 483 Wo_CheckForCallAnswerTabs(data.call_id); 484 } 485 if ($('#calling-modal').length == 0) { 486 $('body').append(data.calls_html); 487 if (!$('#re-calling-modal').hasClass('calling')) { 488 $('#re-calling-modal').modal({ 489 show: true 490 }); 491 Wo_PlayVideoCall('play'); 492 } 493 document.title = 'New video call..'; 494 setTimeout(function () { 495 Wo_CloseModels(); 496 $('#re-calling-modal').addClass('calling'); 497 Wo_PlayVideoCall('stop'); 498 document.title = document_title; 499 setTimeout(function () { 500 $( '#re-calling-modal' ).remove(); 501 $( '.modal-backdrop' ).remove(); 502 $( 'body' ).removeClass( "modal-open" ); 503 }, 3000); 504 $( '#re-calling-modal' ).remove(); 505 $('.modal-backdrop.in').hide(); 506 }, 40000); 507 } 508 } else if (data.audio_calls == 200 && $('#re-calling-modal').length == 0 && $('#re-talking-modal').length == 0) { 509 if (node_socket_flow != "1") { 510 Wo_CheckForAudioCallAnswerTabs(data.call_id); 511 } 512 if ($('#calling-modal').length == 0) { 513 $('body').append(data.audio_calls_html); 514 if (!$('#re-calling-modal').hasClass('calling')) { 515 $('#re-calling-modal').modal({ 516 show: true 517 }); 518 Wo_PlayVideoCall('play'); 519 } 520 document.title = 'New audio call..'; 521 setTimeout(function () { 522 if ($('#re-talking-modal').length == 0) { 523 Wo_CloseModels(); 524 $('#re-calling-modal').addClass('calling'); 525 Wo_PlayVideoCall('stop'); 526 document.title = document_title; 527 setTimeout(function () { 528 $( '#re-calling-modal' ).remove(); 529 $( '.modal-backdrop' ).remove(); 530 $( 'body' ).removeClass( "modal-open" ); 531 }, 3000) 532 } 533 }, 40000); 534 } 535 } else if (data.is_audio_call == 0 && data.is_call == 0 && ($('#re-calling-modal').length > 0 || $('#re-talking-modal').length > 0)) { 536 Wo_PlayVideoCall('stop'); 537 $( '#re-calling-modal' ).remove(); 538 $( '.modal-backdrop' ).remove(); 539 $( 'body' ).removeClass( "modal-open" ); 540 } 541 }).fail(function() { 542 clearTimeout(intervalUpdates); 543 if (force_update == 0) { 544 intervalUpdates = setTimeout(function () { 545 Wo_intervalUpdates(force_update); 546 } , 5000); 547 } 548 });
549 } 550 // } 551} 552 553 554function RemoveNotification(obj) { 555 current_notifications = $('.notification-container').find('.new-update-alert').text(); 556 $('.notification-container').find('.new-update-alert').removeClass('hidden'); 557 if (Number(current_notifications) > 0) { 558 if ((Number(current_notifications) - 1) == 0) { 559 $('.notification-container').find('.new-update-alert').addClass('hidden'); 560 $('.notification-container').find('.new-update-alert').addClass('hidden').text('0').hide(); 561 } else { 562 $('.notification-container').find('.sixteen-font-size').addClass('unread-update'); 563 $('.notification-container').find('.new-update-alert').text(Number(current_notifications) - 1).show(); 564 } 565 } else if (Number(current_notifications) == 0) { 566 $('.notification-container').find('.new-update-alert').addClass('hidden'); 567 $('.notification-container').find('.new-update-alert').addClass('hidden').text('0').hide(); 568 } 569 $(obj).fadeOut(1000, function () { 570 $(this).remove(); 571 }); 572} 573 574function Wo_GetLastNotification() { 575 if(current_width > 800) { 576 $.get(Wo_Ajax_Requests_File(), { f: 'get_last_notification', }, function (data) { 577 Wo_NotifyMe(data.icon, decodeHtml(data.title), decodeHtml(data.notification_text), data.url); 578 $('#notification-popup').append(data.html); 579 setTimeout(function () { 580 $('#notification-popup').find("[data-id='" + data.id + "']").fadeOut(2000, function () { 581 $(this).remove(); 582 }); 583 }, 3000) 584 }); 585 } 586} 587function Wo_GetNewHashTagPosts() { 588 before_post_id = 0; 589 if($('.post-container').length > 0) { 590 var before_post_id = $('.post-container > .post:not(.boosted)').attr('data-post-id'); 591 } 592 var hashtagName = $('#hashtagName').val(); 593 if (!hashtagName) { 594 return false; 595 } 596 var api = $('#api').val(); 597 var api_ = 0; 598 if (api) { 599 api_ = 1; 600 } 601 $.get(Wo_Ajax_Requests_File(), { 602 f: 'posts', 603 s: 'get_new_hashtag_posts', 604 before_post_id: before_post_id, 605 hashtagName: hashtagName, 606 api: api_ 607 }, function (data) { 608 if(data.length > 0) { 609 $('#posts_hashtag').find('.posts-container').remove(); 610 $('#posts_hashtag').prepend(data); 611 Wo_InjectPostFeedAds(); 612 } 613 $('.posts-count').empty(); 614 }); 615} 616// intervel new posts 617function Wo_GetNewPosts() { 618 var filter_by_more = $('#load-more-filter').find('.filter-by-more').attr('data-filter-by'); 619 if(filter_by_more != 'all') { 620 return false; 621 } 622 if(typeof ($('#posts').attr('data-story-user')) == "string") { 623 user_id = $('#posts').attr('data-story-user'); 624 } else { 625 user_id = 0; 626 } 627 var api = $('#api').val(); 628 var api_ = 0; 629 if (api) { 630 api_ = 1; 631 } 632 before_post_id = 0; 633 if($('.post-container').length > 0) { 634 var before_post_id = $('.post-container > .post:not(.boosted)').attr('data-post-id'); 635 } 636 $('body,html').animate({ 637 scrollTop : 0 // Scroll to top of body 638 }, 500); 639 $.get(Wo_Ajax_Requests_File(), { 640 f: 'posts', 641 s: 'get_new_posts', 642 before_post_id: before_post_id, 643 user_id: user_id, 644 api: api_ 645 }, function (data) { 646 if(data.length > 0) { 647 $('#posts').find('.posts-container').remove(); 648 $('#posts').prepend(data); 649 Wo_InjectPostFeedAds(); 650 } 651 $('.posts-count').empty(); 652 }); 653} 654 655// Post feed ads: inject ad after posts at 3,5,7,10,13,15,17,20... (pattern repeats every 10) 656var Wo_PostFeedAds = { 657 timer: null, 658 feedSelector: '#posts, #posts_hashtag, #posts-hashtag, #mlposts, .hashtag-posts', 659 getSlot: function (n) { 660 if (n < 3) return null; 661 var r = (n - 3) % 10; 662 if (r === 0) return 'post-first'; 663 if (r === 2) return 'post-second'; 664 if (r === 4) return 'post-third'; 665 if (r === 7) return 'post-fourth'; 666 return null; 667 }, 668 getCode: function (slot) { 669 var $src = $('#post-feed-ads-source'); 670 if (!$src.length) return ''; 671 return $src.attr('data-' + slot) || ''; 672 }, 673 injectInto: function ($feed) { 674 if (!$feed || !$feed.length) return; 675 $feed.find('.post-feed-ad').remove(); 676 var posts = $feed.find('.post').not('.user-ad-container .post').get(); 677 for (var i = 0; i < posts.length; i++) {
678 var slot = this.getSlot(i + 1); 679 if (!slot) continue; 680 var code = this.getCode(slot); 681 if (!code) continue; 682 var $ad = $('<div class="post-feed-ad" data-ad-slot="' + slot + '"></div>'); 683 $ad.html(code); 684 var $anchor = $(posts[i]).closest('.post-container'); 685 if (!$anchor.length) $anchor = $(posts[i]); 686 $anchor.after($ad); 687 } 688 }, 689 inject: function () { 690 var $src = $('#post-feed-ads-source'); 691 if (!$src.length) return; 692 var self = this; 693 var feeds = []; 694 $(this.feedSelector).each(function () { 695 var el = this; 696 var nested = false; 697 $(self.feedSelector).each(function () { 698 if (this !== el && $.contains(this, el)) { nested = true; return false; } 699 }); 700 if (!nested) feeds.push(el); 701 }); 702 if (feeds.length) { 703 for (var j = 0; j < feeds.length; j++) { 704 self.injectInto($(feeds[j])); 705 } 706 return; 707 } 708 $('body').find('.post-feed-ad').remove(); 709 var posts = $('body').find('.post').not('.post-feed-ad .post').get(); 710 var seen = {}; 711 var unique = []; 712 for (var k = 0; k < posts.length; k++) { 713 var pid = posts[k].id || posts[k]; 714 if (seen[pid]) continue; 715 seen[pid] = true; 716 unique.push(posts[k]); 717 } 718 for (var m = 0; m < unique.length; m++) { 719 var slot = self.getSlot(m + 1); 720 if (!slot) continue; 721 var code = self.getCode(slot); 722 if (!code) continue; 723 var $ad = $('<div class="post-feed-ad" data-ad-slot="' + slot + '"></div>'); 724 $ad.html(code); 725 var $anchor = $(unique[m]).closest('.post-container'); 726 if (!$anchor.length) $anchor = $(unique[m]); 727 $anchor.after($ad); 728 } 729 }, 730 schedule: function () { 731 var self = this; 732 clearTimeout(self.timer); 733 self.timer = setTimeout(function () { 734 self.inject(); 735 }, 80); 736 } 737}; 738 739function Wo_InjectPostFeedAds() { 740 Wo_PostFeedAds.schedule(); 741} 742 743$(function () { 744 Wo_PostFeedAds.inject(); 745 if (window.MutationObserver && document.body) { 746 var postFeedAdObserver = new MutationObserver(function (mutations) { 747 for (var i = 0; i < mutations.length; i++) { 748 var nodes = mutations[i].addedNodes; 749 for (var j = 0; j < nodes.length; j++) { 750 var node = nodes[j]; 751 if (node.nodeType !== 1) continue; 752 if ((node.classList && node.classList.contains('post')) || (node.querySelector && node.querySelector('.post'))) { 753 Wo_InjectPostFeedAds(); 754 return; 755 } 756 } 757 } 758 }); 759 postFeedAdObserver.observe(document.body, { childList: true, subtree: true }); 760 } 761}); 762 763// load more posts 764 765function Wo_GetMorePosts() { 766 var more_posts = $('#load-more-posts'); 767 var filter_by_more = $('#load-more-filter').find('.filter-by-more').attr('data-filter-by'); 768 var after_post_id = $('div.post:last').attr('data-post-id'); 769 var page_id = 0; 770 var user_id = 0; 771 var group_id = 0; 772 var event_id = 0; 773 var is_api = 0; 774 var ad_id = 0; 775 var story_id = 0; 776 var api = $('#api').val(); 777 if (api) { 778 is_api = 1; 779 } 780 if(after_post_id != null) { 781 more_posts.show(); 782 } 783 if(typeof ($('#posts').attr('data-story-user')) == "string") { 784 user_id = $('#posts').attr('data-story-user'); 785 } else if(typeof ($('#posts').attr('data-story-page')) == "string") { 786 page_id = $('#posts').attr('data-story-page'); 787 } else if(typeof ($('#posts').attr('data-story-group')) == "string") { 788 group_id = $('#posts').attr('data-story-group'); 789 } else if(typeof ($('#posts').attr('data-story-event')) == "string") { 790 event_id = $('#posts').attr('data-story-event'); 791 } 792 $('#posts').append('<div class="hidden loading-status loading-single"></div>'); 793 $('#load-more-posts').hide(); 794 $('.loading-status').hide().html('<div class="wo_loading_post"><div class="lightui1-shimmer"> <div class="_2iwr"></div> <div class="_2iws"></div> <div class="_2iwt"></div> <div class="_2iwu"></div> <div class="_2iwv"></div> <div class="_2iww"></div> <div class="_2iwx"></div> <div class="_2iwy"></div> <div class="_2iwz"></div> <div class="_2iw-"></div> <div class="_2iw_"></div> <div class="_2ix0"></div> </div></div>').removeClass('hidden').show(); 795 Wo_progressIconLoader($('#load-more-posts')); 796 posts_count = 0; 797 if ($('.post').length > 0) { 798 posts_count = $('.post').length; 799 } 800 801 if ($(".user-ad-container").length > 0) { 802 ad_id = $(".user-ad-container").last().attr('id'); 803 } 804 805 if ($(".user-story-container").length > 0) { 806 story_id = $(".user-story-container").last().attr('id'); 807 } 808 809 if ($('body').attr('no-more-posts')) { 810 $('#load-more-posts').html('<div class="white-loading list-group"><div class="cs-loader"><div class="no-more-posts-to-show">' + $('#get_no_posts_name').val() + '</div></div>'); 811 // $.get(Wo_Ajax_Requests_File(), {f: 'get_no_posts_name'}, function (data3) { 812 // $('#load-more-posts').html('<div class="white-loading list-group"><div class="cs-loader"><div class="no-more-posts-to-show">' + data3.name + '</div></div>'); 813 // }); 814 $('#load-more-posts').show(); 815 $('.loading-status').remove(); 816 scrolled = 0; 817 return false; 818 } 819 if ($('#page_post_jobs_filter').length > 0) { 820 filter_by_more = 'job'; 821 } 822 if ($('#page_post_offer_filter').length > 0) { 823 filter_by_more = 'offer'; 824 } 825 $.get(Wo_Ajax_Requests_File(), { 826 f: 'posts', 827 s: 'load_more_posts', 828 filter_by_more: filter_by_more, 829 after_post_id: after_post_id, 830 user_id: user_id, 831 page_id: page_id, 832 group_id: group_id, 833 event_id: event_id, 834 posts_count: posts_count,
835 is_api: is_api, 836 ad_id: ad_id, 837 story_id:story_id 838 }, function (data) { 839 if (data.length == 0) { 840 $('body').attr('no-more-posts', "true"); 841 $('#load-more-posts').html('<div class="white-loading list-group"><div class="cs-loader"><div class="no-more-posts-to-show">' + $('#get_no_posts_name').val() + '</div></div>'); 842 // $.get(Wo_Ajax_Requests_File(), {f: 'get_no_posts_name'}, function (data3) { 843 // $('#load-more-posts').html('<div class="white-loading list-group"><div class="cs-loader"><div class="no-more-posts-to-show">' + data3.name + '</div></div>'); 844 // }); 845 } else { 846 if (data != 'Please login or signup to continue.') { 847 $('body').removeAttr('no-more-posts'); 848 $('#posts').append(data); 849 Wo_InjectPostFeedAds(); 850 } else { 851 $('body').attr('no-more-posts', "true"); 852 } 853 } 854 $('#load-more-posts').show(); 855 $('.loading-status').remove(); 856 Wo_progressIconLoader($('#load-more-posts')); 857 scrolled = 0; 858 }); 859} 860 861function animateStory(element) { 862 if ($(element).hasClass('opacity')) { 863 $(element).removeClass('opacity'); 864 $(element).addClass('no-opacity'); 865 } else { 866 $(element).removeClass('no-opacity'); 867 $(element).addClass('opacity'); 868 } 869} 870function Wo_LoadStory(type, user_id, element) { 871 872 var filter_by_more = $('#load-more-filter').find('.filter-by-more'); 873 filter_by_more.attr("data-filter-by", 'story'); 874 var filter_by_progress_icon = $('.filter-container').find('.type-story'); 875 Wo_progressIconLoader(filter_by_progress_icon); 876 var story = null; 877 var user = null; 878 if (type == 'all') { 879 story = 'a'; 880 user = 0; 881 } 882 else if(type == 'prof' && user_id){ 883 story = 'p'; 884 user = user_id; 885 } 886 animateStory(element); 887 var animation = setInterval(function () { 888 animateStory(element); 889 }, 500); 890 $.ajax({ 891 url: Wo_Ajax_Requests_File(), 892 type: 'GET', 893 dataType: 'json', 894 data: {f: 'status',s:story,id:user}, 895 }) 896 .done(function(data) { 897 if (data.status == 200) { 898 $('#posts').html(data.html); 899 Wo_InjectPostFeedAds(); 900 } 901 else if(data.status == 404){ 902 $('#posts').html(data.html); 903 Wo_InjectPostFeedAds(); 904 } 905 $(element).removeClass('opacity'); 906 clearInterval(animation); 907 Wo_progressIconLoader(filter_by_progress_icon); 908 }) 909 .fail(function() { 910 console.log("error"); 911 }) 912 913} 914function Wo_ResetStory() { 915 $('.mfp-progress-line span').css('width', '0%'); 916} 917 918// post filteration 919function Wo_FilterPostBy(filter_by) { 920 var more_posts = $('#load-more-posts'); 921 var filter_by_more = $('#load-more-filter').find('.filter-by-more'); 922 filter_by_more.attr("data-filter-by", filter_by); 923 //Wo_progressIconLoader(filter_by_progress_icon); 924 var type = ''; 925 var id = 0; 926 if(typeof ($('#posts').attr('data-story-user')) == "string") { 927 id = $('#posts').attr('data-story-user'); 928 type = 'profile'; 929 } else if(typeof ($('#posts').attr('data-story-page')) == "string") { 930 id = $('#posts').attr('data-story-page'); 931 type = 'page'; 932 } else if (typeof ($('#posts').attr('data-story-group')) == "string") { 933 id = $('#posts').attr('data-story-group'); 934 type = 'group'; 935 } else if (typeof ($('#posts').attr('data-story-event')) == "string") { 936 id = $('#posts').attr('data-story-event'); 937 type = 'event'; 938 } 939 $.get(Wo_Ajax_Requests_File(), { 940 f: 'posts', 941 s: 'filter_posts', 942 filter_by: filter_by, 943 id: id, 944 type: type 945 }, function (data) { 946 if(data) { 947 $('html, body').animate({ 948 scrollTop: $('#scroll_filter_click').offset().top - 100 //#DIV_ID is an example. Use the id of your destination on the page 949 }, 500); 950 $('#posts').html(data); 951 Wo_InjectPostFeedAds(); 952 953 } 954 }); 955} 956// register post share 957function Wo_RegisterShare(post_id) { 958 var post = $('#post-' + post_id); 959 $.get(Wo_Ajax_Requests_File(), { 960 f: 'posts', 961 s: 'register_share', 962 post_id: post_id 963 }, function (data) { 964 if(data.status == 200) { 965 post.find("#share-button").addClass('active'); 966 post.find("[id^=shares]").text(data.shares); 967 } else { 968 post.find("#share-button").removeClass('active'); 969 post.find("[id^=shares]").text(data.shares); 970 } 971 if (data.can_send == 1) { 972 Wo_SendMessages();
973 } 974 }); 975} 976 977// open post share buttons 978function Wo_OpenShareBtns(post_id) { 979 post_wrapper = $('#post-' + post_id); 980 post_wrapper.find('.post-share').slideToggle(200); 981} 982// register post comment 983function Wo_RegisterCommentClick(text, post_id, user_id, page_id, type) { 984 post_wrapper = $('[id=post-' + post_id + ']'); 985 comment_textarea = post_wrapper.find('.post-comments'); 986 comment_btn = comment_textarea.find('.emo-comment'); 987 textarea_wrapper = comment_textarea.find('.textarea'); 988 comment_list = post_wrapper.find('.comments-list'); 989 if(text == '') { 990 return false; 991 } 992 textarea_wrapper.val(''); 993 Wo_progressIconLoader(comment_btn); 994 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment', { 995 post_id: post_id, 996 text: text, 997 user_id: user_id, 998 page_id: page_id 999 }, function (data) { 1000 if(data.status == 200) { 1001 post_wrapper.find('.comment-container:first-child').before(data.html); 1002 post_wrapper.find('[id=comments]').html(data.comments_num); 1003 } 1004 Wo_progressIconLoader(comment_btn); 1005 if (data.can_send == 1) { 1006 Wo_SendMessages(); 1007 } 1008 }); 1009} 1010// register post comment 1011function Wo_LightBoxComment(text, post_id, user_id, event, page_id) { 1012 if(event.keyCode == 13 && event.shiftKey == 0) { 1013 post_wrapper = $('#lightbox-post-' + post_id); 1014 comment_textarea = post_wrapper.find('.post-comments'); 1015 comment_btn = comment_textarea.find('.comment-btn'); 1016 textarea_wrapper = comment_textarea.find('.textarea'); 1017 comment_list = post_wrapper.find('.comments-list'); 1018 if(textarea_wrapper.val() == '') { 1019 return false; 1020 } 1021 textarea_wrapper.val(''); 1022 Wo_progressIconLoader(comment_btn); 1023 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment', { 1024 post_id: post_id, 1025 text: text, 1026 user_id: user_id, 1027 page_id: page_id 1028 }, function (data) { 1029 if(data.status == 200) { 1030 post_wrapper.find('.comment-container:first-child').before(data.html); 1031 post_wrapper.find('#comments').html(data.comments_num); 1032 } 1033 Wo_progressIconLoader(comment_btn); 1034 if (data.can_send == 1) { 1035 Wo_SendMessages(); 1036 } 1037 }); 1038 } 1039} 1040 1041function Wo_loadPostMoreComments(post_id,self) { 1042 main_wrapper = $('#post-' + post_id); 1043 view_more_wrapper = main_wrapper.find('.view-more-wrapper'); 1044 Wo_progressIconLoader(view_more_wrapper); 1045 $('#post-' + post_id).find('.view-more-wrapper .ball-pulse').fadeIn(100); 1046 comment_id = main_wrapper.find('.comment').last().attr('data-comment-id'); 1047 $.get(Wo_Ajax_Requests_File(), { 1048 f: 'posts', 1049 s: 'load_more_post_comments', 1050 post_id: post_id, 1051 comment_id: comment_id 1052 }, function (data) { 1053 if(data.status == 200) { 1054 main_wrapper.find('.comments-list').append(data.html); 1055 //view_more_wrapper.remove(); 1056 if (data.no_more == 1) { 1057 $(self).remove(); 1058 } 1059 1060 $('.ball-pulse-'+post_id).fadeOut('100'); 1061 } 1062 }); 1063} 1064 1065// load all post comments 1066function Wo_loadAllComments(post_id,self) { 1067 main_wrapper = $('#post-' + post_id); 1068 view_more_wrapper = main_wrapper.find('.view-more-wrapper'); 1069 Wo_progressIconLoader(view_more_wrapper); 1070 $('#post-' + post_id).find('.view-more-wrapper .ball-pulse').fadeIn(100); 1071 $.get(Wo_Ajax_Requests_File(), { 1072 f: 'posts', 1073 s: 'load_more_comments', 1074 post_id: post_id 1075 }, function (data) { 1076 if(data.status == 200) { 1077 main_wrapper.find('.comments-list').html(data.html); 1078 //view_more_wrapper.remove(); 1079 $(self).remove(); 1080 $('.ball-pulse-'+post_id).fadeOut('100'); 1081 } 1082 }); 1083} 1084function Wo_loadAllCommentslightbox(post_id) { 1085 main_wrapper_light = $('#post-' + post_id); 1086 view_more_wrapper_light = main_wrapper_light.find('.view-more-wrapper'); 1087 $('.lightpost-' + post_id).find('.view-more-wrapper .ball-pulse').fadeIn(100); 1088 $.get(Wo_Ajax_Requests_File(), { 1089 f: 'posts', 1090 s: 'load_more_comments', 1091 post_id: post_id 1092 }, function (data) { 1093 if(data.status == 200) { 1094 $('.comments-list-lightbox').html(data.html); 1095 $('.view-more-wrapper').remove(); 1096 } 1097 }); 1098} 1099 1100// show post comments 1101function Wo_ShowComments(post_id) { 1102 $('#post-comments-' + post_id).toggleClass('hidden'); 1103} 1104 1105// open post edit modal 1106function Wo_OpenPostEditBox(post_id) { 1107 var edit_box = $('#post-' + post_id).find('#edit-post'); 1108 edit_box.modal({ 1109 show: true 1110 }); 1111} 1112function Wo_OpenOfferEditBox(offer_id) { 1113 $('.edit_offer_modal_form').empty(); 1114 $.post(Wo_Ajax_Requests_File() + '?f=offer&s=get_offer', {offer_id: offer_id}, function(data, textStatus, xhr) { 1115 if (data.status == 200) { 1116 $('.edit_offer_modal_form').html(data.html); 1117 var edit_box = $('#edit-offer-modal'); 1118 edit_box.modal({ 1119 show: true 1120 }); 1121 } 1122 }); 1123 1124} 1125function change_discount(self,offer_id) { 1126 var type = $(self).val(); 1127 $('.discount_percent_input_'+offer_id).slideUp('slow'); 1128 $('.discount_amount_input_'+offer_id).slideUp('slow'); 1129 $('.buy_get_discount_input_'+offer_id).slideUp('slow'); 1130 $('.spend_get_off_input_'+offer_id).slideUp('slow'); 1131 if (type == 'discount_percent') { 1132 $('.discount_percent_input_'+offer_id).slideDown('slow'); 1133 } 1134 else if(type == 'discount_amount'){ 1135 $('.discount_amount_input_'+offer_id).slideDown('slow'); 1136 } 1137 else if(type == 'buy_get_discount'){ 1138 $('.buy_get_discount_input_'+offer_id).slideDown('slow'); 1139 $('.discount_percent_input_'+offer_id).slideDown('slow'); 1140 } 1141 else if(type == 'spend_get_off'){ 1142 $('.spend_get_off_input_'+offer_id).slideDown('slow'); 1143 } 1144} 1145 1146// save edited post 1147function Wo_EditPost(post_id) { 1148 var post = $('#post-' + post_id); 1149 var edit_box = $('#post-' + post_id).find('#edit-post'); 1150 var edit_textarea = post.find('.edit-textarea-' + post_id + ' textarea'); 1151 var text = edit_textarea.val(); 1152 var post_text = post.find('.post-description p'); 1153 var type = post.attr('data-post-type'); 1154 if (type == 'share') { 1155 var post_text = post.find('.post-description .edited_text'); 1156 } 1157 else{ 1158 var post_text = post.find('.post-description p'); 1159 } 1160 Wo_progressIconLoader(post.find('#edit-post-button')); 1161 $('#post-' + post_id).find('#edit-post .ball-pulse').fadeIn(100); 1162 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=edit_post', { 1163 post_id: post_id, 1164 text: text 1165 }, function (data) { 1166 if(data.status == 200) { 1167 post_text.html(data.html); 1168 edit_box.modal('hide'); 1169 } 1170 $('#post-' + post_id).find('#edit-post .ball-pulse').fadeOut(100); 1171 if (data.can_send == 1) { 1172 Wo_SendMessages();
1173 } 1174 }); 1175} 1176function DeleteUploadedImageById(name,id,post_id) { 1177 $('#delete_uploaded_image_by_id_'+id).remove(); 1178 if ($('#edit-post-form-'+post_id).find('.thumb-image-old').length < 1) { 1179 $('#edit-post-form-'+post_id).find('#all_images').val('1'); 1180 } 1181 if ($('#edit-post-form-'+post_id).find('.thumb-image').length < 1) { 1182 $('#edit-post-form-'+post_id).find('#publisher-post-photos-'+post_id).val(''); 1183 } 1184} 1185function DeletePostImage(post_id,image_id = 0) { 1186 if (image_id > 0) { 1187 $('#edit-post-form-'+post_id).find('#delete_image_by_id_'+image_id).remove(); 1188 } 1189 else{ 1190 $('#edit-post-form-'+post_id).find('#delete_image_by_id').remove(); 1191 } 1192 if ($('#edit-post-form-'+post_id).find('.thumb-image-old').length < 1) { 1193 $('#edit-post-form-'+post_id).find('#all_images').val('1'); 1194 } 1195 if ($('#edit-post-form-'+post_id).find('.thumb-image').length < 1) { 1196 $('#edit-post-form-'+post_id).find('#publisher-post-photos-'+post_id).val(''); 1197 } 1198 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=delete_post_image', {post_id: post_id,image_id: image_id}, function(data, textStatus, xhr) {}); 1199} 1200 1201// open delete post modal 1202function Wo_OpenPostDeleteBox(post_id) { 1203 var delete_box = $('#post-' + post_id).find('#delete-post'); 1204 delete_box.modal({ 1205 show: true 1206 }); 1207} 1208 1209// delete post 1210function Wo_DeletePost(post_id) { 1211 Wo_CloseLightbox(); 1212 var delete_box = $('#post-' + post_id).find('#delete-post'); 1213 var delete_button = delete_box.find('#delete-all-post'); 1214 $('#post-' + post_id).find('#delete-post .ball-pulse').fadeIn(100); 1215 $.get(Wo_Ajax_Requests_File(), { 1216 f: 'posts', 1217 s: 'delete_post', 1218 post_id: post_id 1219 }, function (data) { 1220 if(data.status == 200) { 1221 $('#user_post_count').html(data.post_count); 1222 delete_box.modal('hide'); 1223 setTimeout(function () { 1224 $('#post-' + post_id).slideUp(200, function () { 1225 $(this).remove(); 1226 }); 1227 }, 300); 1228 } 1229 $('#post-' + post_id).find('#delete-post .ball-pulse').fadeOut(100); 1230 }); 1231} 1232 1233// open comment textarea 1234function Wo_OpenCommentEditBox(comment_id) { 1235 comment = $('[id=comment_' + comment_id + ']'); 1236 comment_text = comment.find('.comment-edit'); 1237 comment_text.slideToggle(100); 1238} 1239 1240function Wo_ReportComment( comment_id ){ 1241 if (!comment_id || comment_id <= 0) { 1242 return false; 1243 } 1244 $.get(Wo_Ajax_Requests_File(), { 1245 f: 'posts', 1246 s: 'report_comment', 1247 comment_id: comment_id 1248 }, function (data) { 1249 if(data.status == 200) { 1250 $('#comment_report_box .msg').html(data.text); 1251 $('#comment_report_box').modal('show'); 1252 setTimeout(function () { 1253 $('#comment_report_box').modal('hide'); 1254 $('#reportComment'+comment_id).css({"color":"#55acee"}); 1255 }, 1500); 1256 }else if(data.status == 300) { 1257 $('#comment_report_box .msg').html(data.text); 1258 $('#comment_report_box').modal('show'); 1259 setTimeout(function () { 1260 $('#comment_report_box').modal('hide'); 1261 $('#reportComment'+comment_id).css({"color":"inherit"}); 1262 }, 1500); 1263 } 1264 }); 1265 1266} 1267// save edited comment 1268function Wo_EditComment(text, comment_id, event) { 1269 comment_ = $('#edit_comment_'+comment_id); 1270 Wo_Get_Mention(comment_); 1271 comment = $('[id=comment_' + comment_id + ']'); 1272 comment_text = comment.find('.comment-text'); 1273 if(event.keyCode == 13 && event.shiftKey == 0) { 1274 Wo_progressIconLoader(comment.find('#editComment')); 1275 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=edit_comment', { 1276 comment_id: comment_id, 1277 text: text 1278 }, function (data) { 1279 if(data.status == 200) { 1280 comment_text.html(data.html); 1281 Wo_OpenCommentEditBox(comment_id); 1282 } 1283 Wo_progressIconLoader(comment.find('#editComment')); 1284 }); 1285 } 1286} 1287 1288// delete comment 1289function Wo_DeleteComment(comment_id) { 1290 var delete_box = $('[id=comment_' + comment_id + ']').find('#delete-comment'); 1291 var delete_button = delete_box.find('#delete-all-post'); 1292 delete_box.modal({ 1293 show: true 1294 }); 1295 var comment = $('[id=comment_' + comment_id + ']'); 1296 delete_button.on('click', function () { 1297 $('[id=comment_' + comment_id + ']').find('#delete-comment .ball-pulse').fadeIn(100); 1298 $.get(Wo_Ajax_Requests_File(), { 1299 f: 'posts', 1300 s: 'delete_comment', 1301 comment_id: comment_id 1302 }, function (data) { 1303 if(data.status == 200) { 1304 delete_box.modal('hide'); 1305 $('.modal').modal('hide'); 1306 comment.fadeOut(300, function () { 1307 comment.remove(); 1308 }); 1309 } 1310 });
1311 }); 1312} 1313 1314function Wo_DeleteReplyComment(reply_id) { 1315 var delete_box = $('[id=comment_reply_' + reply_id + ']').find('#delete-comment-reply'); 1316 var delete_button = delete_box.find('#delete-all-reply'); 1317 delete_box.modal({ 1318 show: true 1319 }); 1320 var comment = $('[id=comment_reply_' + reply_id + ']'); 1321 delete_button.on('click', function () { 1322 $('[id=comment_reply_' + reply_id + ']').find('#delete-comment-reply .ball-pulse').fadeIn(100); 1323 $.get(Wo_Ajax_Requests_File(), { 1324 f: 'posts', 1325 s: 'delete_comment_reply', 1326 reply_id: reply_id 1327 }, function (data) { 1328 if(data.status == 200) { 1329 delete_box.modal('hide'); 1330 comment.fadeOut(300, function () { 1331 $(this).remove(); 1332 }); 1333 } 1334 }); 1335 }); 1336} 1337 1338 1339 1340// register comment wonder 1341function Wo_RegisterCommentWonder(comment_id) { 1342 var comment = $('[id=comment_' + comment_id + ']'); 1343 comment_text = comment.find('div.comment-text').text(); 1344 Wo_progressIconLoader(comment.find('#WonderComment')); 1345 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment_wonder', { 1346 comment_id: comment_id, 1347 comment_text: comment_text 1348 }, function (data) { 1349 if(data.status == 200) { 1350 if (node_socket_flow == "1") { 1351 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added" }); 1352 } 1353 if (data.dislike == 1) { 1354 comment.find("#comment-likes").text(data.likes_c); 1355 comment.find("#LikeComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>'); 1356 } 1357 comment.find("#WonderComment").html('<span class="active-wonder">' + data.icon + '</span>').fadeIn(150); 1358 comment.find("#comment-wonders").text(data.wonders); 1359 } else if (data.status == 300) { 1360 if (node_socket_flow == "1") { 1361 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "removed" }); 1362 } 1363 comment.find("#WonderComment").html('' + data.icon + '').fadeIn(150); 1364 comment.find("#comment-wonders").text(data.wonders); 1365 } 1366 }); 1367} 1368 1369// register comment wonder 1370function Wo_RegisterCommentReplyWonder(reply_id) { 1371 var comment = $('[id=comment_reply_' + reply_id + ']'); 1372 comment_text = comment.find('div.reply-text').text(); 1373 Wo_progressIconLoader(comment.find('#WonderReplyComment')); 1374 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment_reply_wonder', { 1375 reply_id: reply_id, 1376 comment_text: comment_text 1377 }, function (data) { 1378 if(data.status == 200) { 1379 if (node_socket_flow == "1") { 1380 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "added" }); 1381 } 1382 if (data.dislike == 1) { 1383 comment.find("#comment-reply-likes").text(data.likes_r); 1384 comment.find("#LikeReplyComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>'); 1385 } 1386 comment.find("#WonderReplyComment").html('<span class="active-wonder">' + data.icon + '</span>').fadeIn(150); 1387 comment.find("#comment-reply-wonders").text(data.wonders); 1388 } else if (data.status == 300){ 1389 if (node_socket_flow == "1") { 1390 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "removed" }); 1391 } 1392 comment.find("#WonderReplyComment").html('' + data.icon + '').fadeIn(150); 1393 comment.find("#comment-reply-wonders").text(data.wonders); 1394 } 1395 }); 1396} 1397 1398function Wo_RegisterCommentReplyLike(reply_id) { 1399 var comment = $('[id=comment_reply_' + reply_id + ']'); 1400 comment_text = comment.find('div.reply-text').text(); 1401 Wo_progressIconLoader(comment.find('#LikeReplyComment')); 1402 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment_reply_like', { 1403 reply_id: reply_id, 1404 comment_text: comment_text 1405 }, function (data) { 1406 if(data.status == 200) { 1407 if (node_socket_flow == "1") { 1408 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "added" }); 1409 } 1410 if (data.dislike == 1) { 1411 comment.find("#comment-reply-wonders").text(data.wonders_r); 1412 comment.find("#WonderReplyComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-down"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></path></svg>'); 1413 } 1414 comment.find("#LikeReplyComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up active-like"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>').fadeIn(150); 1415 comment.find("#comment-reply-likes").text(data.likes); 1416 } else if (data.status == 300){ 1417 if (node_socket_flow == "1") { 1418 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "removed" });
1419 } 1420 comment.find("#LikeReplyComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>').fadeIn(150); 1421 comment.find("#comment-reply-likes").text(data.likes); 1422 } 1423 }); 1424} 1425// save post 1426function Wo_SavePost(post_id) { 1427 var post = $('#post-' + post_id); 1428 post.find('.save-post').html('<div class="post_drop_menu_loading"><div class="ball-pulse"><div></div><div></div><div></div></div></div>'); 1429 $.get(Wo_Ajax_Requests_File(), { 1430 f: 'posts', 1431 s: 'save_post', 1432 post_id: post_id 1433 }, function (data) { 1434 if(data.status == 200) { 1435 post.find('.save-post').html(data.text); 1436 } else if(data.status == 300) { 1437 post.find('.save-post').html(data.text); 1438 } 1439 }); 1440} 1441 1442// report post 1443function Wo_ReportPost(post_id) { 1444 var post = $('#post-' + post_id); 1445 post.find('.report-post').html('<div class="post_drop_menu_loading"><div class="ball-pulse"><div></div><div></div><div></div></div></div>'); 1446 $.get(Wo_Ajax_Requests_File(), { 1447 f: 'posts', 1448 s: 'report_post', 1449 post_id: post_id 1450 }, function (data) { 1451 if(data.status == 200) { 1452 post.find('.report-post').html(data.text); 1453 } else if(data.status == 300) { 1454 post.find('.report-post').html(data.text); 1455 } 1456 }); 1457} 1458 1459function Wo_DisableComment(post_id, type) { 1460 var post = $('#post-' + post_id); 1461 var p = post.find('.disable-comments').find('p').text(); 1462 post.find('.disable-comments').html('<div class="post_drop_menu_loading"><div class="ball-pulse"><div></div><div></div><div></div></div></div>'); 1463 if (type == 0 ) { 1464 post.find('.disable-comments').attr('onclick', 'Wo_DisableComment(' + post_id + ', 1);'); 1465 post.find('.post-comments').show() 1466 } else { 1467 post.find('.disable-comments').attr('onclick', 'Wo_DisableComment(' + post_id + ', 0);'); 1468 post.find('.post-comments').hide() 1469 } 1470 $.get(Wo_Ajax_Requests_File(), { 1471 f: 'posts', 1472 s: 'disable_comment', 1473 post_id: post_id, 1474 type: type 1475 }, function (data) { 1476 post.find('.disable-comments').html('<svg viewBox="0 0 24 24"><path fill="currentColor" d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M5,5V7H19V5H5M5,9V11H13V9H5M5,13V15H15V13H5Z" /></svg> <div><b>'+data.text+'</b><p>'+p+'</p></div>'); 1477 }); 1478} 1479 1480function Wo_PinPost(post_id, id, type) { 1481 var post = $('#post-' + post_id); 1482 var p = post.find('.pin-post').find('p').text(); 1483 post.find('.pin-post').html('<div class="post_drop_menu_loading"><div class="ball-pulse"><div></div><div></div><div></div></div></div>'); 1484 $.get(Wo_Ajax_Requests_File(), { 1485 f: 'posts', 1486 s: 'pin_post', 1487 post_id: post_id, 1488 id: id, 1489 type: type 1490 }, function (data) { 1491 post.find('.pin-post').html('<svg viewBox="0 0 24 24"><path fill="currentColor" d="M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z" /></svg> <div><b>'+data.text+'</b><p>'+p+'</p></div>'); 1492 }); 1493} 1494 1495function Wo_BoostPost(post_id) { 1496 var post = $('#post-' + post_id); 1497 var p = post.find('.boost-post').find('p').text(); 1498 post.find('.boost-post').html('<div class="post_drop_menu_loading"><div class="ball-pulse"><div></div><div></div><div></div></div></div>'); 1499 $.get(Wo_Ajax_Requests_File(), { 1500 f: 'posts', 1501 s: 'boost_post', 1502 post_id: post_id 1503 }, function (data) { 1504 post.find('.boost-post').html('<svg viewBox="0 0 24 24"><path fill="currentColor" d="M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z" /></svg> <div><b>'+data.text+'</b><p>'+p+'</p></div>'); 1505 }); 1506} 1507// open post Reacted users 1508// function Wo_OpenPostReactedUsers(post_id, type) { 1509// var post = $('#post-' + post_id); 1510// post.find('.post-reacted').empty();
1511// post_likes_container = post.find('.post-reacted'); 1512// // if(!post_likes_container.is(':empty')) { 1513// // post_likes_container.slideUp(200, function () { 1514// // post.find('.post-reacted').empty(); 1515// // }); 1516// // return false; 1517// // } 1518// Wo_progressIconLoader(post.find('.post-reacted-status')); 1519// $.get(Wo_Ajax_Requests_File(), { 1520// f: 'posts', 1521// s: 'get_post_reacted', 1522// post_id: post_id, 1523// type: type 1524// }, function (data) { 1525// if(data.status == 200) { 1526// if(data.html.length == 0) { 1527// post_likes_container.html('<span class="view-more-wrapper">' + data.message + '</span>'); 1528// } else { 1529// post_likes_container.html('<span>' + data.html + '</span><span class="hide_who_reacted_it" onclick="Wo_ClosePostReactedUsers('+ post_id +');"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg></span>'); 1530// } 1531// post_likes_container.slideDown(200); 1532// } 1533// Wo_progressIconLoader(post.find('.post-reacted-status')); 1534// }); 1535// } 1536 1537// open post Reacted users 1538function Wo_OpenPostReactedUsers(post_id, type,col) { 1539 if (col != 'story') { 1540 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 1541 } 1542 if (col == 'story') { 1543 $('.width_').css('width', $('.width_').css('width')); 1544 value = $('.story_lightbox').attr('data-post-id'); 1545 $('.story_lightbox').addClass('dont_close_story_'+value); 1546 } 1547 $('.reacted_users_load_more').css('display', 'inline'); 1548 $.get(Wo_Ajax_Requests_File(), { 1549 f: 'posts', 1550 s: 'get_post_reacted', 1551 post_id: post_id, 1552 type: type, 1553 col:col 1554 }, function (data) { 1555 if(data.status == 200) { 1556 if (col != 'story') { 1557 setTimeout(function () { 1558 $('.lightbox-container').remove(); 1559 },100); 1560 } 1561 1562 //$('#views_info_title').html(data.title); 1563 if(data.html.length == 0) { 1564 $('.reacted_users_load_more').attr('data-type', ''); 1565 $('#reacted_users_box').html('<span class="view-more-wrapper text-center">' + data.message + '</span>'); 1566 $('#reacted_users_load').css('display', 'none'); 1567 $('#users-reacted-modal').modal('show'); 1568 } else { 1569 $('.reacted_users_load_more').attr('col-type', col); 1570 $('.reacted_users_load_more').attr('data-type', type); 1571 $('.reacted_users_load_more').attr('post-id', post_id); 1572 $('#reacted_users_load').css('display', 'block'); 1573 $('#reacted_users_box').html(data.html); 1574 $('#users-reacted-modal').modal('show'); 1575 } 1576 } 1577 }); 1578} 1579 1580function Wo_ClosePostReactedUsers(post_id) { 1581 var post = $('#post-' + post_id);post_likes_container = post.find('.post-reacted'); 1582 post_likes_container.slideUp(200).empty(); 1583} 1584 1585// open post liked users 1586// function Wo_OpenPostLikedUsers(post_id) { 1587// var post = $('#post-' + post_id);
1588// post_likes_container = post.find('.post-likes'); 1589// post.find('.post-wonders').slideUp(200, function () { 1590// post.find('.post-wonders').empty(); 1591// }); 1592// if(!post_likes_container.is(':empty')) { 1593// post_likes_container.slideToggle(200, function () { 1594// post.find('.post-likes').empty(); 1595// }); 1596// return false; 1597// } 1598// Wo_progressIconLoader(post.find('.post-like-status')); 1599// $.get(Wo_Ajax_Requests_File(), { 1600// f: 'posts', 1601// s: 'get_post_likes', 1602// post_id: post_id 1603// }, function (data) { 1604// if(data.status == 200) { 1605// if(data.html.length == 0) { 1606// post_likes_container.html('<span class="view-more-wrapper">' + data.message + '</span>'); 1607// } else { 1608// post_likes_container.html(data.html); 1609// } 1610// post_likes_container.slideToggle(200); 1611// } 1612// Wo_progressIconLoader(post.find('.post-like-status')); 1613// }); 1614// } 1615 1616// open post liked users 1617function Wo_OpenPostLikedUsers(post_id,table) { 1618 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 1619 $('.views_info_load_more').css('display', 'inline'); 1620 $.get(Wo_Ajax_Requests_File(), { 1621 f: 'posts', 1622 s: 'get_post_likes', 1623 post_id: post_id, 1624 table:table 1625 }, function (data) { 1626 if(data.status == 200) { 1627 setTimeout(function () { 1628 $('.lightbox-container').remove(); 1629 },100); 1630 $('#views_info_title').html(data.title); 1631 if(data.html.length == 0) { 1632 $('.views_info_load_more').attr('data-type', ''); 1633 $('#views_info').html('<span class="view-more-wrapper text-center">' + data.message + '</span>'); 1634 $('#views_info_load').css('display', 'none'); 1635 $('#views-info-modal').modal('show'); 1636 } else { 1637 $('.views_info_load_more').attr('data-type', 'like'); 1638 $('.views_info_load_more').attr('table-type', table); 1639 $('.views_info_load_more').attr('post-id', post_id); 1640 $('#views_info_load').css('display', 'block'); 1641 $('#views_info').html(data.html); 1642 $('#views-info-modal').modal('show'); 1643 } 1644 } 1645 }); 1646} 1647 1648 1649 1650// open post shared users 1651// function Wo_OpenPostSharedUsers(post_id) { 1652// var post = $('#post-' + post_id); 1653// post_shares_container = post.find('.post-shared'); 1654// post.find('.post-wonders').slideUp(200, function () { 1655// post.find('.post-wonders').empty(); 1656// }); 1657// post.find('.post-likes').slideUp(200, function () { 1658// post.find('.post-likes').empty(); 1659// }); 1660// if(!post_shares_container.is(':empty')) { 1661// post_shares_container.slideToggle(200, function () { 1662// post.find('.post-shared').empty(); 1663// }); 1664// return false; 1665// } 1666// Wo_progressIconLoader(post.find('.post-share-status')); 1667// $.get(Wo_Ajax_Requests_File(), { 1668// f: 'posts', 1669// s: 'get_post_shared', 1670// post_id: post_id 1671// }, function (data) { 1672// if(data.status == 200) { 1673// if(data.html.length == 0) { 1674// post_shares_container.html('<span class="view-more-wrapper">' + data.message + '</span>'); 1675// } else { 1676// post_shares_container.html(data.html); 1677// } 1678// post_shares_container.slideToggle(200); 1679// } 1680// Wo_progressIconLoader(post.find('.post-share-status')); 1681// }); 1682// } 1683 1684// open post shared users 1685function Wo_OpenPostSharedUsers(post_id) { 1686 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indef
1686inite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 1687 $('.views_info_load_more').css('display', 'inline'); 1688 $.get(Wo_Ajax_Requests_File(), { 1689 f: 'posts', 1690 s: 'get_post_shared', 1691 post_id: post_id 1692 }, function (data) { 1693 if(data.status == 200) { 1694 setTimeout(function () { 1695 $('.lightbox-container').remove(); 1696 },100); 1697 $('#views_info_title').html(data.title); 1698 if(data.html.length == 0) { 1699 $('.views_info_load_more').attr('data-type', ''); 1700 $('#views_info').html('<span class="view-more-wrapper text-center">' + data.message + '</span>'); 1701 $('#views_info_load').css('display', 'none'); 1702 $('#views-info-modal').modal('show'); 1703 } else { 1704 $('.views_info_load_more').attr('data-type', 'share'); 1705 $('.views_info_load_more').attr('post-id', post_id); 1706 $('#views_info_load').css('display', 'block'); 1707 $('#views_info').html(data.html); 1708 $('#views-info-modal').modal('show'); 1709 } 1710 } 1711 }); 1712} 1713 1714 1715 1716// open post wodered users 1717// function Wo_OpenPostWonderedUsers(post_id) { 1718// var post = $('#post-' + post_id); 1719// post_wonders_container = post.find('.post-wonders'); 1720// post.find('.post-likes').slideUp(200, function () { 1721// post.find('.post-likes').empty(); 1722// }); 1723// if(!post_wonders_container.is(':empty')) { 1724// post_wonders_container.slideToggle(200, function () { 1725// post.find('.post-wonders').empty(); 1726// }); 1727// return false; 1728// } 1729// Wo_progressIconLoader(post.find('.post-wonders-status')); 1730// $.get(Wo_Ajax_Requests_File(), { 1731// f: 'posts', 1732// s: 'get_post_wonders', 1733// post_id: post_id 1734// }, function (data) { 1735// if(data.status == 200) { 1736// if(data.html.length == 0) { 1737// post_wonders_container.html('<span class="view-more-wrapper">' + data.message + '</span>'); 1738// } else { 1739// post_wonders_container.html(data.html); 1740// } 1741// post_wonders_container.slideToggle(200); 1742// } 1743// Wo_progressIconLoader(post.find('.post-wonders-status')); 1744// }); 1745// } 1746 1747 1748// open post wodered users 1749function Wo_OpenPostWonderedUsers(post_id,table) { 1750 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 1751 $('.views_info_load_more').css('display', 'inline'); 1752 $.get(Wo_Ajax_Requests_File(), { 1753 f: 'posts', 1754 s: 'get_post_wonders', 1755 post_id: post_id, 1756 table:table 1757 }, function (data) { 1758 if(data.status == 200) { 1759 setTimeout(function () { 1760 $('.lightbox-container').remove(); 1761 },100); 1762 $('#views_info_title').html(data.title); 1763 if(data.html.length == 0) { 1764 $('.views_info_load_more').attr('data-type', ''); 1765 $('#views_info').html('<span class="view-more-wrapper text-center">' + data.message + '</span>'); 1766 $('#views_info_load').css('display', 'none'); 1767 $('#views-info-modal').modal('show'); 1768 } else { 1769 $('.views_info_load_more').attr('data-type', 'wonder'); 1770 $('.views_info_load_more').attr('table-type', table); 1771 $('.views_info_load_more').attr('post-id', post_id); 1772 $('#views_info_load').css('display', 'block'); 1773 $('#views_info').html(data.html); 1774 $('#views-info-modal').modal('show'); 1775 } 1776 } 1777 }); 1778} 1779 1780 1781// add emo to input 1782function Wo_AddEmo(code, input) { 1783 inputTag = $(input); 1784 inputVal = inputTag.val(); 1785 if(typeof (inputTag.attr('placeholder')) != "undefined") { 1786 inputPlaceholder = inputTag.attr('placeholder'); 1787 if(inputPlaceholder == inputVal) { 1788 inputTag.val(''); 1789 inputVal = inputTag.val(); 1790 } 1791 } 1792 if(inputVal.length == 0) { 1793 inputTag.val(code + ' '); 1794 } else { 1795 inputTag.val(inputVal + ' ' + code); 1796 } 1797 inputTag.keyup(); 1798} 1799 1800// accept follow request 1801function Wo_AcceptFollowRequest(user_id) { 1802 var main_container = $('.user-follow-request-' + user_id); 1803 var follow_main_container = main_container.find('#accept-' + user_id); 1804 Wo_progressIconLoader(follow_main_container); 1805 $.get(Wo_Ajax_Requests_File(), { 1806 f: 'accept_follow_request', 1807 following_id: user_id 1808 }, function (data) { 1809 if(data.status == 200) { 1810 main_container.find('.accept-btns').html(data.html); 1811 } 1812 }); 1813} 1814 1815function Wo_DeleteFollowGroupRequest(group_id) { 1816 var main_container = $('.user-group-request-' + group_id); 1817 var follow_main_container = main_container.find('#delete-' + group_id); 1818 Wo_progressIconLoader(follow_main_container); 1819 $.get(Wo_Ajax_Requests_File(), { 1820 f: 'chat', 1821 s: 'delete_group_request', 1822 group_id: group_id 1823 }, function (data) { 1824 if(data.status == 200) { 1825 main_container.remove(); 1826 } 1827 }); 1828} 1829 1830function Wo_AcceptFollowGroupRequest(group_id) { 1831 var main_container = $('.user-group-request-' + group_id); 1832 var follow_main_container = main_container.find('#delete-' + group_id); 1833 Wo_progressIconLoader(follow_main_container); 1834 $.get(Wo_Ajax_Requests_File(), { 1835 f: 'chat', 1836 s: 'accept_group_request', 1837 group_id: group_id 1838 }, function (data) { 1839 if(data.status == 200) { 1840 main_container.remove(); 1841 } 1842 }); 1843} 1844 1845function Wo_StartRepositioner() { 1846 $('.user-cover-reposition-w').hide(); 1847 $('.user-reposition-container').show(); 1848 $('.cover-resize-buttons').show(); 1849 $('.default-buttons').hide(); 1850 $('.when-notedit').hide(); 1851 $('.when-edit').show(); 1852 $('.user-reposition-dragable-container').show(); 1853 $('.profile-cover-changer').show(); 1854 $('.wo_user_profile .card.hovercard .pic-info-cont, .problackback').fadeOut(); 1855 $('.screen-width').val($('.user-reposition-container').width()); 1856 $('.user-reposition-container img').css('cursor', '-webkit-grab').draggable({ 1857 scroll: false, 1858 axis: "y", 1859 cursor: "-webkit-grab", 1860 drag: function (event, ui) { 1861 y1 = $('.user-cover-reposition-container').height(); 1862 y2 = $('.user-reposition-container').find('img').height(); 1863 if (ui.position.top >= 0) { 1864 ui.position.top = 0; 1865 }else 1866 if (ui.position.top <= (y1-y2)) { 1867 ui.position.top = y1-y2; 1868 } 1869 }, 1870 stop: function(event, ui) { 1871 $('input.cover-position').val(ui.position.top); 1872 } 1873 }); 1874} 1875 1876function Wo_SubmitRepositioner() { 1877 if ($('input.cover-position').length == 1) { 1878 posY = $('input.cover-position').val(); 1879 $('form.cover-position-form').submit(); 1880 } 1881} 1882 1883function Wo_StopRepositioner() { 1884 $('.when-notedit').show(); 1885 $('.when-edit').hide(); 1886 $('.user-cover-reposition-w').show(); 1887 $('.user-reposition-container').hide(); 1888 $('.cover-resize-buttons').hide(); 1889 $('.default-buttons').show(); 1890 $('input.cover-position').val(0); 1891 $('.wo_user_profile .card.hovercard .pic-info-cont, .problackback').fadeIn(); 1892 $('.user-reposition-container img').draggable('destroy').css('cursor','default'); 1893} 1894// delete follow request 1895function Wo_DeleteFollowRequest(user_id) { 1896 var main_container = $('.user-follow-request-' + user_id); 1897 var follow_main_container = main_container.find('#delete-' + user_id); 1898 Wo_progressIconLoader(follow_main_container); 1899 $.get(Wo_Ajax_Requests_File(), { 1900 f: 'delete_follow_request', 1901 following_id: user_id 1902 }, function (data) { 1903 if(data.status == 200) { 1904 main_container.remove(); 1905 //main_container.find('.accept-btns').html(data.html); 1906 } 1907 }); 1908} 1909 1910 1911 1912// open chat tab 1913function Wo_OpenChatTab(recipient_id, group_id,product_id = 0,page_id = 0,page_user_id = 0,story_id = 0) { 1914 CheckIfCanUse(); 1915 1916 if ($(".chat_"+recipient_id).length > 0 && story_id == 0) { 1917 SendSeen(recipient_id); 1918 $('.chat_'+recipient_id).find('.online-toggle-hdr').attr('style', ''); 1919 return false; 1920 } 1921 go_to = ''; 1922 1923 if(group_id != 0){ 1924 $("#group_tab_" + group_id).find('.group-lastseen').empty(); 1925 } 1926 if (group_id == null) { 1927 group_id = 0; 1928 } 1929 if (story_id != 0) { 1930 Wo_CloseLightbox(); 1931 } 1932 1933 if(node_socket_flow === "0"){ 1934 $.get(Wo_Ajax_Requests_File(), { 1935 f: 'chat', 1936 s: 'is_chat_on', 1937 recipient_id: recipient_id, 1938 story_id: story_id 1939 }, function (data) { 1940 length = 0; 1941 if ($('body').attr('chat-off')) { 1942 length = $('body').attr('chat-off').length; 1943 } 1944 if(current_width < 720 || length > 0) { 1945 if (page_id > 0) { 1946 document.location = websiteUrl+"/messages/"+page_user_id+"&page="+page_id; 1947 } 1948 else{ 1949 go_to = data.url; 1950 // document.location = data.url; 1951 } 1952 return false; 1953 } 1954 if(data.chat != 1 && group_id === 0) { 1955 document.location = data.url; 1956 return false; 1957 } 1958 });
1959 } 1960 if(current_width < 720) { 1961 $.get(Wo_Ajax_Requests_File(), { 1962 f: 'chat', 1963 s: 'close_chat', 1964 recipient_id: recipient_id, 1965 story_id: story_id 1966 }, function (data) { 1967 if(node_socket_flow !== "0"){ 1968 go_to = data.url; 1969 } 1970 }); 1971 // return false; 1972 } 1973 placement = 1; 1974 if ($('.chat-wrapper').length == 1) { 1975 placement = 2; 1976 } else if ($('.chat-wrapper').length == 2) { 1977 placement = 3; 1978 } 1979 var loading_icon = '<svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="11" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg>'; 1980 $('#online_' + recipient_id).find('.new-message-alert').html('0').hide(); 1981 if (group_id) { 1982 var loading_div = $('.chat-container').find('#group_tab_' + group_id).find('.chat-loading-icon'); 1983 }else{ 1984 var loading_div = $('.chat-container').find('#online_' + recipient_id).find('.chat-loading-icon'); 1985 } 1986 1987 loading_div.html(loading_icon); 1988 chat_container = $('.chat-container'); 1989 $(document.body).attr('data-chat-recipient-'+recipient_id, recipient_id); 1990 $('.chat-wrapper').show(); 1991 /* var data_html = '<div class="chat-wrapper" id="chat_"><div class="online-toggle pointer" onclick="javascript:$(\'.chat-tab-container\').slideToggle(100);"><a style="color:#fff;" href=""><span class="chat-tab-status">
1991......</span></a></div><div class="chat-tab-container"><div class="chat-messages-wrapper"><div class="chat-messages"></div><div class="clear"></div></div><div class="chat-textarea btn-group"><div class="emo-container"></div><form action="#" method="post" class="chat-sending-form"><textarea name="textSendMessage" disabled id="sendMessage" class="form-control" cols="10" rows="5" placeholder="" onkeydown="Wo_SubmitChatForm(event);" onfocus="Wo_SubmitChatForm(event);" dir="auto"></textarea><input type="hidden" id="user-id" name="user_id" value="" /></form></div></div></div>'; 1992 $('.chat-tab').append('<span class="chat_main chat_main_"></span>'); 1993 $('.chat_main_').append(data_html); */ 1994 $.get(Wo_Ajax_Requests_File(), { 1995 f: 'chat', 1996 s: 'load_chat_tab', 1997 recipient_id: recipient_id, 1998 placement:placement, 1999 group_id:group_id, 2000 page_id:page_id, 2001 page_user_id:page_user_id, 2002 story_id:story_id 2003 }, function (data) { 2004 if(data.status == 200) { 2005 if (go_to != '') { 2006 document.location = go_to; 2007 } 2008 // $("#online_" + recipient_id).find('svg path').attr('fill', '#fff'); 2009 if ($('.chat-wrapper').length == 3) { 2010 if ($('.chat_main_' + recipient_id).length == 0) { 2011 $('.chat_main:first-child').remove(); 2012 $('.chat-tab').append('<span class="chat_main chat_main_' + recipient_id +'"></span>'); 2013 } else { 2014 $('.chat_main_' + recipient_id).remove(); 2015 } 2016 $('.chat_main_' + recipient_id).html(data.html).hide().fadeIn(100); 2017 } else { 2018 if ($('.chat_main_' + recipient_id).length > 0) { 2019 $('.chat_main_' + recipient_id).html(data.html).hide().fadeIn(100); 2020 } else { 2021 $('.chat-tab').append('<span class="chat_main chat_main_' + recipient_id +'"></span>'); 2022 $('.chat_main_' + recipient_id).append(data.html).hide().fadeIn(100); 2023 } 2024 } 2025 if (page_id > 0) { 2026 setTimeout(function () { 2027 2028 $('.page-messages-wrapper-'+page_id).scrollTop($('.page-messages-wrapper-'+page_id)[0].scrollHeight); 2029 2030 }, 1000); 2031 2032 } 2033 $('.chat-wrapper').fadeIn(200); 2034 loading_div.empty(); 2035 $('.chat-textarea textarea').keyup(); 2036 if (group_id == 0 && page_id == 0) { 2037 setTimeout(function () { 2038 $.get(Wo_Ajax_Requests_File(), { 2039 f: 'chat', 2040 s: 'load_chat_messages', 2041 recipient_id: recipient_id, 2042 product_id: product_id 2043 }, function (data) { 2044 Wo_intervalUpdates(); 2045 if (data.messages.length > 0) { 2046 $('.chat-tab').find('.chat_' + recipient_id).find('.chat-messages').html(data.messages); 2047 } else { 2048 $('.chat_' + recipient_id).find('.chat-user-desc').addClass('chat-user-desc-show'); 2049 } 2050 if (node_socket_flow === "1") { 2051 var chat_container = $('.chat-tab').find('.chat_main_' + recipient_id); 2052 var last_id = chat_container.find('.messages-text:last').attr('data-message-id'); 2053 socket.emit("is_chat_on", { 2054 message_id: last_id, 2055 user_id: _getCookie("user_id"), 2056 recipient_id: recipient_id 2057 }) 2058 } 2059 if ($('.chat-messages-wrapper').length > 0) { 2060 2061 setTimeout(function () { 2062 2063 $('.chat-messages-wrapper').scrollTop($('.chat-messages-wrapper')[0].scrollHeight); 2064 2065 }, 1000); 2066 } 2067 if (node_socket_flow == "1") { 2068 socket.emit("count_unseen_messages", { user_id: _getCookie("user_id") }); 2069 } 2070 }); 2071 }, 300); 2072 }else if(group_id!==0){ 2073 if (node_socket_flow === "1") { 2074 var chat_container = $('.chat-tab').find('.chat_main_' + group_id); 2075 var last_id = chat_container.find('.messages-text:last').attr('data-message-id'); 2076 socket.emit("is_chat_on", { 2077 message_id: last_id, 2078 user_id: _getCookie("user_id"), 2079 recipient_id: group_id, 2080 isGroup: true 2081 }) 2082 } 2083 } 2084 } 2085 }); 2086} 2087 2088function Wo_OpenChatUsersTab() { 2089 if (node_socket_flow === "0") { 2090 $('.chat-container').toggleClass('full'); 2091 $('.online-content-toggler').slideToggle(100); 2092 $.get(Wo_Ajax_Requests_File(), { 2093 f: 'chat', 2094 s: 'open_tab' 2095 });
2096 } 2097 else { 2098 // Not very useful as only works 2099 socket.emit("open_tab") 2100 } 2101} 2102 2103function Wo_SearchForPosts(query) { 2104 var type = ''; 2105 if ($('.page-margin').attr('data-page') == "timeline") { 2106 type = 'user'; 2107 } else if ($('.page-margin').attr('data-page') == "page"){ 2108 type = 'page'; 2109 } else if ($('.page-margin').attr('data-page') == "group") { 2110 type = 'group' 2111 } else { 2112 return false; 2113 } 2114 Wo_progressIconLoader($('.search-for-posts-container')); 2115 var id = $('.page-margin').attr('data-id'); 2116 if (id == null || id == "undefined") { 2117 return false; 2118 } 2119 $.get(Wo_Ajax_Requests_File(), {f:'posts', s:'search_for_posts', id: id, search_query: query, type: type}, function (data) { 2120 if (data.status == 200) { 2121 $('#posts').html(data.html); 2122 Wo_InjectPostFeedAds(); 2123 } 2124 Wo_progressIconLoader($('.search-for-posts-container')); 2125 }); 2126} 2127 2128function Wo_Fetch(id, post_id) { 2129 var clickedOnBody = true; 2130 var user_from_post_id = '#post-' + post_id; 2131 var user_from_image = '#post-' + post_id + ' .post-heading'; 2132 var div = '.user-fetch-post-' + post_id + '-user-' + id; 2133 var bla = user_from_post_id + ', ' + div; 2134 clearTimeout(timeout); 2135 $(div).fadeIn(200); 2136 var timeout; 2137 function hidepanel() { 2138 $(div).fadeOut(0); 2139 } 2140 $(div).mouseleave(doTimeout); 2141 $(user_from_image).mouseleave(doTimeout); 2142 function doTimeout(){ 2143 clearTimeout(timeout); 2144 timeout = setTimeout(hidepanel, 0); 2145 } 2146} 2147 2148function Wo_RequestVerification(id, type) { 2149 $.get(Wo_Ajax_Requests_File(), {f:'request_verification', id:id, type:type}, function(data) { 2150 if (data.status == 200) { 2151 $('#verification-request').html(data.html); 2152 } 2153 }); 2154} 2155 2156function Wo_DeleteUserVerification(id, type) { 2157 if (confirm("Are you sure ?") == false) { 2158 return false; 2159 } 2160 var verify_icon = $('form').find('div.verification'); 2161 Wo_progressIconLoader(verify_icon); 2162 $.get(Wo_Ajax_Requests_File(), {f:'delete_verification', id:id, type:type}, function(data) { 2163 if (data.status == 200) { 2164 $('#verification-request').html(data.html); 2165 } 2166 }); 2167} 2168 2169function Wo_RemoveVerification(id, type) { 2170 $.get(Wo_Ajax_Requests_File(), {f:'remove_verification', id:id, type:type}, function(data) { 2171 if (data.status == 200) { 2172 $('#verification-request').html(data.html); 2173 } 2174 }); 2175} 2176 2177$('body').on('mouseenter', '.user-popover', function() { 2178 var popover = $(this); 2179 var type = popover.attr('data-type'); 2180 var id = popover.attr('data-id'); 2181 var placement = popover.attr('data-placement') || 'none'; 2182 var placement_code = 'user-details not-profile'; 2183 if (placement == 'profile') { 2184 placement_code = 'user-details'; 2185 } 2186 var over_time = setTimeout(function() { 2187 var offset = popover.offset(); 2188 var posY = (offset.top - $(window).scrollTop()) + popover.height(); 2189 var posX = offset.left - $(window).scrollLeft(); 2190 var available = $(window).width() - posX; 2191 if ($(window).width() > 800) { 2192 if (available < 400) { 2193 var right = available - popover.width(); 2194 if (posY > 0) { 2195 $('body').append('<div class="' + placement_code + ' right" style="position: fixed; top: ' + posY + 'px; right:' + right + 'px"><div class="loading-user"><div class="fa fa-spinner fa-spin"></div></div></div>'); 2196 } 2197 } else { 2198 if (posY > 0) { 2199 $('body').append('<div class="' + placement_code + '" style="position: fixed; top: ' + posY + 'px; left:' + posX + 'px"><div class="loading-user"><div class="fa fa-spinner fa-spin"></div></div></div>'); 2200 } 2201 } 2202 } 2203 $.get(Wo_Ajax_Requests_File(), {f:'popover', id:id, type:type}, function(data) { 2204 if (data.status == 200) { 2205 $('.user-details').html(data.html); 2206 } 2207 }); 2208 }, 1000); 2209 popover.data('timeout', over_time); 2210}); 2211 2212$('body').on('mouseleave', '.user-popover', function(e) { 2213 var to = e.toElement || e.relatedTarget; 2214 if (!$(to).is(".user-details")) { 2215 clearTimeout($(this).data('timeout')); 2216 $('.user-details').remove(); 2217 } 2218}); 2219$('body').on('mouseleave', '.user-details', function() { 2220 $('.user-details').remove(); 2221}); 2222function Wo_OpenAlbumLightBox(image_id, type) { 2223 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indef
2223inite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 2224 $.get(Wo_Ajax_Requests_File(), {f:'open_album_lightbox', image_id:image_id, type:type}, function(data) { 2225 if (data.status == 200) { 2226 document.body.style.overflow = 'hidden'; 2227 $('.lightbox-container').html(data.html); 2228 } 2229 if (data.html.length == 0) { 2230 document.body.style.overflow = 'auto'; 2231 } 2232 }); 2233} 2234function Wo_CloseLightbox() { 2235 $('.lightbox-container').remove(); 2236 document.body.style.overflow = 'auto'; 2237} 2238function Wo_OpenLightBox(post_id) { 2239 $('#contnet').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 2240 $.get(Wo_Ajax_Requests_File(), {f:'open_lightbox', post_id:post_id}, function(data) { 2241 if (data.status == 200) { 2242 document.body.style.overflow = 'hidden'; 2243 $('.lightbox-container').html(data.html); 2244 } 2245 if (data.html.length == 0) { 2246 document.body.style.overflow = 'auto'; 2247 } 2248 }); 2249} 2250function Wo_OpenMultiLightBox(url) { 2251 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 2252 $.post(Wo_Ajax_Requests_File() + '?f=open_multilightbox', {url:url}, function(data) { 2253 if (data.status == 200) { 2254 document.body.style.overflow = 'hidden'; 2255 $('.lightbox-container').html(data.html); 2256 } 2257 if (data.html.length == 0) { 2258 document.body.style.overflow = 'auto'; 2259 } 2260 }); 2261} 2262function Wo_NextAlbumPicture(post_id, id) { 2263 Wo_CloseLightbox(); 2264 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 2265 $.get(Wo_Ajax_Requests_File(), {f:'get_next_album_image', post_id:post_id, after_image_id:id}, function(data) { 2266 if (data.status == 200) { 2267 document.body.style.overflow = 'hidden'; 2268 $('.lightbox-container').html(data.html); 2269 $( ".changer").fadeIn(200); 2270 } 2271 if (data.html.length == 0) { 2272 document.body.style.overflow = 'auto'; 2273 } 2274 }); 2275} 2276function Wo_PreviousAlbumPicture(post_id, id) { 2277 Wo_CloseLightbox(); 2278 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indef
2278inite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 2279 $.get(Wo_Ajax_Requests_File(), {f:'get_previous_album_image', post_id:post_id, before_image_id:id}, function(data) { 2280 if (data.status == 200) { 2281 document.body.style.overflow = 'hidden'; 2282 $('.lightbox-container').html(data.html); 2283 $( ".changer").fadeIn(200); 2284 } 2285 if (data.html.length == 0) { 2286 document.body.style.overflow = 'auto'; 2287 } 2288 }); 2289} 2290 2291function Wo_NextPicture(post_id) { 2292 var id = 0; 2293 var type = 'none'; 2294 if(typeof ($('[data-page=timeline]').attr('data-id')) == "string") { 2295 id = $('[data-page=timeline]').attr('data-id'); 2296 type = 'profile'; 2297 } else if(typeof ($('[data-page=page]').attr('data-id')) == "string") { 2298 id = $('[data-page=page]').attr('data-id'); 2299 type = 'page'; 2300 } else if (typeof ($('[data-page=group]').attr('data-id')) == "string") { 2301 id = $('[data-page=group]').attr('data-id'); 2302 type = 'group'; 2303 } 2304 Wo_CloseLightbox(); 2305 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 2306 2307 $.get(Wo_Ajax_Requests_File(), {f:'get_next_image', post_id:post_id, type:type, id:id}, function(data) { 2308 if (data.status == 200) { 2309 document.body.style.overflow = 'hidden'; 2310 $('.lightbox-container').html(data.html); 2311 $( ".changer" ).fadeIn(200); 2312 } 2313 if (data.html.length == 0) { 2314 document.body.style.overflow = 'auto'; 2315 } 2316 }); 2317} 2318 2319function Wo_PreviousPicture(post_id) { 2320 var id = 0; 2321 var type = 'none'; 2322 if(typeof ($('[data-page=timeline]').attr('data-id')) == "string") { 2323 id = $('[data-page=timeline]').attr('data-id'); 2324 type = 'profile'; 2325 } else if(typeof ($('[data-page=page]').attr('data-id')) == "string") { 2326 id = $('[data-page=page]').attr('data-id'); 2327 type = 'page'; 2328 } else if (typeof ($('[data-page=group]').attr('data-id')) == "string") { 2329 id = $('[data-page=group]').attr('data-id'); 2330 type = 'group'; 2331 } 2332 Wo_CloseLightbox(); 2333 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 2334 $.get(Wo_Ajax_Requests_File(), {f:'get_previous_image', post_id:post_id, type:type, id:id}, function(data) { 2335 if (data.status == 200) { 2336 document.body.style.overflow = 'hidden'; 2337 $('.lightbox-container').html(data.html); 2338 $( ".changer" ).fadeIn(200); 2339 } 2340 if (data.html.length == 0) { 2341 document.body.style.overflow = 'auto'; 2342 } 2343 }); 2344} 2345 2346function Wo_AcceptJoinGroup(user_id, group_id) { 2347 $.get(Wo_Ajax_Requests_File(), {f:'groups', s:'accept_request', user_id:user_id, group_id:group_id}, function(data) { 2348 if (data.status == 200) { 2349 if (node_socket_flow == "1") { 2350 socket.emit("user_notification", { to_id: user_id, user_id: _getCookie("user_id"), type: "added" }); 2351 } 2352 $('#request-' + user_id).fadeOut(300, function () { 2353 $(this).remove(); 2354 }); 2355 } 2356 }); 2357} 2358 2359function Wo_DeleteJoinGroup(user_id, group_id) { 2360 $.get(Wo_Ajax_Requests_File(), {f:'groups', s:'delete_request', user_id:user_id, group_id:group_id}, function(data) { 2361 if (data.status == 200) { 2362 if (node_socket_flow == "1") { 2363 socket.emit("user_notification", { to_id: user_id, user_id: _getCookie("user_id"), type: "added" }); 2364 } 2365 $('#request-' + user_id).fadeOut(300, function () { 2366 $(this).remove(); 2367 }); 2368 } 2369 }); 2370} 2371 2372function Wo_DeleteJoinedUser(user_id, group_id) { 2373 $.get(Wo_Ajax_Requests_File(), {f:'groups', s:'delete_joined_user', user_id:user_id, group_id:group_id}, function(data) { 2374 if (data.status == 200) { 2375 $('#member-' + user_id).fadeOut(300, function () { 2376 $(this).remove(); 2377 }); 2378 } 2379 }); 2380} 2381 2382function Wo_OpenReplyBox(id) { 2383 Wo_ViewMoreReplies(id); 2384 $('#comment_' + id).find('.comment-replies').slideDown(50, function () { 2385 $('#comment_' + id).find('.comment-reply').slideDown(50); 2386 }); 2387} 2388// register post comment 2389function Wo_RegisterReply(text, comment_id, user_id, event, page_id, type) { 2390 if(event.keyCode == 13 && event.shiftKey == 0) { 2391 comment_wrapper = $('[id=comment_' + comment_id + ']'); 2392 reply_textarea = comment_wrapper.find('.comment-replies'); 2393 textarea_wrapper = reply_textarea.find('.textarea'); 2394 reply_list = comment_wrapper.find('.comment-replies-text'); 2395 var comment_src_image = $('#comment_src_image_'+comment_id); 2396 var comment_image = ''; 2397 if (comment_src_image.length > 0) { 2398 comment_image = comment_src_image.val(); 2399 } 2400 2401 if(text == '' && comment_image == '') { 2402 return false; 2403 } 2404 2405 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_reply', { 2406 comment_id: comment_id, 2407 text: text, 2408 user_id: user_id, 2409 page_id: page_id, 2410 comment_image: comment_image 2411 }, function (data) { 2412 textarea_wrapper.val(''); 2413 if(data.status == 200) { 2414 if (node_socket_flow == "1") { 2415 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added", for: "replies" }); 2416 } 2417 if (data.mention.length > 0 && node_socket_flow == "1") { 2418 $.each(data.mention, function( index, value ) { 2419 socket.emit("user_notification", { to_id: value, user_id: _getCookie("user_id")}); 2420 }); 2421 } 2422 $('.comment-image-con').empty(); 2423 $('#comment_src_image_'+comment_id).val(''); 2424 $('#comment_src_image_'+comment_id).val(''); 2425 $('#comment_reply_image_' + comment_id).val(''); 2426 Wo_OpenReplyBox(comment_id); 2427 comment_wrapper.find('.reply-container:last-child').after(data.html); 2428 comment_wrapper.find('[id=comment-replies]').html(data.replies_num); 2429 } 2430 });
2431 } 2432} 2433// register post comment 2434function Wo_RegisterReply2(comment_id, user_id, page_id, type,gif_url = '') { 2435 $('.chat-box-stickers-cont').html(''); 2436 $('#gif-form-'+comment_id).slideUp(200); 2437 comment_wrapper = $('[id=comment_' + comment_id + ']'); 2438 text = $('#comment_'+comment_id).find('.comment-reply-textarea').val(); 2439 2440 reply_textarea = comment_wrapper.find('.comment-replies'); 2441 textarea_wrapper = reply_textarea.find('.textarea'); 2442 reply_list = comment_wrapper.find('.comment-replies-text'); 2443 var comment_src_image = $('#comment_src_image_'+comment_id); 2444 var comment_image = ''; 2445 if (comment_src_image.length > 0) { 2446 comment_image = comment_src_image.val(); 2447 } 2448 2449 if(text == '' && comment_image == '' && gif_url == '') { 2450 return false; 2451 } 2452 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_reply', { 2453 comment_id: comment_id, 2454 text: text, 2455 user_id: user_id, 2456 page_id: page_id, 2457 comment_image: comment_image, 2458 gif_url: gif_url 2459 }, function (data) { 2460 if (node_socket_flow == "1") { 2461 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added", for: "replies" }); 2462 } 2463 if (data.mention.length > 0 && node_socket_flow == "1") { 2464 $.each(data.mention, function( index, value ) { 2465 socket.emit("user_notification", { to_id: value, user_id: _getCookie("user_id")}); 2466 }); 2467 } 2468 textarea_wrapper.val(''); 2469 if(data.status == 200) { 2470 $('.comment-image-con').empty(); 2471 $('#comment_src_image_'+comment_id).val(''); 2472 $('#comment_src_image_'+comment_id).val(''); 2473 $('#comment_reply_image_' + comment_id).val(''); 2474 Wo_OpenReplyBox(comment_id); 2475 comment_wrapper.find('.reply-container:last-child').after(data.html); 2476 comment_wrapper.find('[id=comment-replies]').html(data.replies_num); 2477 } 2478 }); 2479} 2480 2481function Wo_ViewMoreReplies(comment_id) { 2482 main_wrapper = $('[id=comment_' + comment_id + ']'); 2483 view_more_wrapper = main_wrapper.find('.view-more-replies'); 2484 Wo_progressIconLoader(view_more_wrapper); 2485 $.get(Wo_Ajax_Requests_File(), { 2486 f: 'posts', 2487 s: 'load_more_replies', 2488 comment_id: comment_id 2489 }, function (data) { 2490 if(data.status == 200) { 2491 main_wrapper.find('.comment-replies-text').html(data.html); 2492 main_wrapper.find('.comment-reply').fadeIn(100); 2493 view_more_wrapper.remove(); 2494 } 2495 }); 2496} 2497 2498function Wo_RegsiterRecent(id, type) { 2499 $.get(Wo_Ajax_Requests_File(), { 2500 f: 'register_recent_search', 2501 id: id, 2502 type:type 2503 }, function (data) { 2504 if(data.status == 200) { 2505 window.location.href = data.href; 2506 } 2507 }); 2508} 2509 2510function Wo_RemoveAlbumImage(post_id, id) { 2511 $.get(Wo_Ajax_Requests_File(), { 2512 f: 'delete_album_image', 2513 id: id, 2514 post_id: post_id 2515 }, function (data) { 2516 if(data.status == 200) { 2517 $('#post-' + post_id).find('#image-' + id).fadeOut(200, function () { 2518 $(this).remove(); 2519 }); 2520 $('div[data_image_parent="image-' + post_id + '"]').remove(); 2521 } 2522 }); 2523} 2524function Wo_ShowDeleteButton(post_id, id) { 2525 $('#post-' + post_id).find('#image-' + id).find('span').fadeIn(200); 2526} 2527function Wo_HideDeleteButton(post_id, id) { 2528 $('#post-' + post_id).find('#image-' + id).find('span').fadeOut(200); 2529} 2530function Wo_RegisterInvite(user_id, page_id) { 2531 Wo_progressIconLoader($('#invite-' + user_id).find('button')); 2532 $.get(Wo_Ajax_Requests_File(), { 2533 f: 'register_page_invite', 2534 user_id: user_id, 2535 page_id: page_id 2536 }, function (data) { 2537 if(data.status == 200) { 2538 if (node_socket_flow == "1") { 2539 socket.emit("user_notification", { to_id: user_id, user_id: _getCookie("user_id"), type: "added" }); 2540 } 2541 $('#invite-' + user_id).fadeOut(200, function () { 2542 $(this).remove(); 2543 }); 2544 } 2545 }); 2546} 2547 2548function Wo_RegisterAddGroup(user_id, group_id) { 2549 Wo_progressIconLoader($('#add-' + user_id).find('button')); 2550 $.get(Wo_Ajax_Requests_File(), { 2551 f: 'register_group_add', 2552 user_id: user_id, 2553 group_id: group_id 2554 }, function (data) { 2555 if(data.status == 200) { 2556 if (node_socket_flow == "1") { 2557 socket.emit("user_notification", { to_id: user_id, user_id: _getCookie("user_id"), type: "added" }); 2558 } 2559 $('#add-' + user_id).fadeOut(200, function () { 2560 $(this).remove(); 2561 }); 2562 } 2563 }); 2564} 2565 2566function Wo_SkipStep(type) { 2567 $.get(Wo_Ajax_Requests_File(), { 2568 f: 'skip_step', 2569 type: type 2570 }, function (data) { 2571 if(data.status == 200) { 2572 window.location.reload(); 2573 } 2574 }); 2575}
2576function Wo_AddEmoToCommentInput(post_id, code, type) { 2577 inputTag = $('[id=post-' + post_id + ']').find('.comment-textarea'); 2578 if (type == 'lightbox-post-footer') { 2579 inputTag = $('.lightbox-post-footer').find('.comment-textarea'); 2580 } 2581 inputVal = inputTag.val(); 2582 if (typeof(inputTag.attr('placeholder')) != "undefined") { 2583 inputPlaceholder = inputTag.attr('placeholder'); 2584 if (inputPlaceholder == inputVal) { 2585 inputTag.val(''); 2586 inputVal = inputTag.val(); 2587 } 2588 } 2589 if (inputVal.length == 0) { 2590 inputTag.val(code + ' '); 2591 } else { 2592 inputTag.val(inputVal + ' ' + code); 2593 } 2594 inputTag.keyup().focus(); 2595} 2596function Wo_SendMessages() { 2597 $.get(Wo_Ajax_Requests_File(), {f: 'send_mails'}); 2598} 2599// request permission on page load 2600document.addEventListener('DOMContentLoaded', function () { 2601 if (Notification.permission !== "granted") 2602 Notification.requestPermission(); 2603}); 2604 2605function Wo_NotifyMe(icon, title, notification_text, url) { 2606 if (!Notification) { 2607 return; 2608 } 2609 if (Notification.permission !== "granted") 2610 Notification.requestPermission(); 2611 else { 2612 var notification = new Notification(title, { 2613 icon: icon, 2614 body: notification_text, 2615 }); 2616 2617 notification.onclick = function () { 2618 window.open(url); 2619 notification.close(); 2620 Wo_OpenNotificationsMenu(); 2621 }; 2622 } 2623} 2624function Wo_CheckForCallAnswer(id) { 2625 $.get(Wo_Ajax_Requests_File(), {f:'check_for_answer', id:id}, function (data1) { 2626 if (data1.status == 200) { 2627 clearTimeout(checkcalls); 2628 $('#calling-modal').find('.modal-title').html('<i class="fa fa fa-video-camera"></i> ' + data1.text_answered); 2629 $('#calling-modal').find('.modal-body p').text(data1.text_please_wait); 2630 setTimeout(function () { 2631 window.location.href = data1.url; 2632 }, 1000); 2633 return false; 2634 } else if (data1.status == 400) { 2635 clearTimeout(checkcalls); 2636 Wo_PlayAudioCall('stop'); 2637 $('#calling-modal').find('.modal-title').html('<i class="fa fa fa-times"></i> ' + data1.text_call_declined); 2638 $('#calling-modal').find('.modal-body p').text(data1.text_call_declined_desc); 2639 } 2640 checkcalls = setTimeout(function () { 2641 Wo_CheckForCallAnswer(id); 2642 }, 2000); 2643 }); 2644} 2645 2646function Wo_CheckForAudioCallAnswer(id) { 2647 $.get(Wo_Ajax_Requests_File(), {f:'check_for_audio_answer', id:id}, function (data1) { 2648 if (data1.status == 200) { 2649 clearTimeout(checkcalls); 2650 $('#calling-modal').find('.modal-title').html('<i class="fa fa fa-phone"></i> ' + data1.text_answered); 2651 $('#calling-modal').find('.modal-body p').text(data1.text_please_wait); 2652 Wo_PlayAudioCall('stop'); 2653 setTimeout(function () { 2654 $( '#calling-modal' ).remove(); 2655 $( '.modal-backdrop' ).remove(); 2656 $( 'body' ).removeClass( "modal-open" ); 2657 $('body').append(data1.calls_html); 2658 $('#re-talking-modal').modal({ 2659 show: true 2660 }); 2661 }, 3000); 2662 } else if (data1.status == 400) { 2663 clearTimeout(checkcalls); 2664 Wo_PlayAudioCall('stop'); 2665 $('#calling-modal').find('.modal-title').html('<i class="fa fa fa-times"></i> ' + data1.text_call_declined); 2666 $('#calling-modal').find('.modal-body p').text(data1.text_call_declined_desc); 2667 } else { 2668 checkcalls = setTimeout(function () { 2669 Wo_CheckForAudioCallAnswer(id); 2670 }, 2000); 2671 } 2672 }); 2673} 2674 2675function Wo_AnswerCall(id, url, type) { 2676 type1 = 'video'; 2677 if (type == 'video') { 2678 type1 = 'video'; 2679 } else if (type == 'audio') { 2680 type1 = 'audio'; 2681 } 2682 Wo_progressIconLoader($('#re-calling-modal').find('.answer-call')); 2683 $.get(Wo_Ajax_Requests_File(), {f:'answer_call', id:id, type:type1}, function (data) { 2684 Wo_PlayVideoCall('stop'); 2685 if (type1 == 'video') { 2686 if (data.status == 200) { 2687 window.location.href = url; 2688 } 2689 } else { 2690 $( '#re-calling-modal' ).remove(); 2691 $( '.modal-backdrop' ).remove(); 2692 $( 'body' ).removeClass( "modal-open" ); 2693 $('body').append(data.calls_html); 2694 $('#re-talking-modal').modal({ 2695 show: true 2696 }); 2697 } 2698 Wo_progressIconLoader($('#re-calling-modal').find('.answer-call')); 2699 }); 2700} 2701function Wo_DeclineCall(id, url, type) { 2702 type1 = 'video'; 2703 if (type == 'video') { 2704 type1 = 'video'; 2705 } else if (type == 'audio') { 2706 type1 = 'audio'; 2707 } 2708 Wo_progressIconLoader($('#re-calling-modal').find('.decline-call')); 2709 $.get(Wo_Ajax_Requests_File(), {f:'decline_call', id:id, type:type1}, function (data) { 2710 if (data.status == 200) { 2711 if (node_socket_flow == "1") { 2712 socket.emit("decline_call", {user_id: _getCookie("user_id") }); 2713 } 2714 Wo_PlayVideoCall('stop'); 2715 Wo_PlayAudioCall('stop'); 2716 $( '#re-calling-modal' ).remove(); 2717 $( '.modal-backdrop' ).remove(); 2718 $( 'body' ).removeClass( "modal-open" ); 2719 } 2720 }); 2721} 2722 2723function Wo_CloseCall(id) { 2724 Wo_progressIconLoader($('#re-talking-modal').find('.decline-call')); 2725 $.get(Wo_Ajax_Requests_File(), {f:'close_call', id:id}, function (data) { 2726 if (data.status == 200) { 2727 $( '#re-talking-modal' ).remove(); 2728 $( '.modal-backdrop' ).remove(); 2729 $( 'body' ).removeClass( "modal-open"); 2730 } 2731 }); 2732} 2733 2734function Wo_CancelCall() { 2735 Wo_progressIconLoader($('#calling-modal').find('.cancel-call')); 2736 $.get(Wo_Ajax_Requests_File(), {f:'cancel_call'}, function (data) { 2737 if (data.status == 200) { 2738 Wo_PlayAudioCall('stop'); 2739 $( '#calling-modal' ).remove(); 2740 $( '.modal-backdrop' ).remove(); 2741 $( 'body' ).removeClass( "modal-open" ); 2742 } 2743 }); 2744} 2745function Wo_GenerateVideoCall(user_id1, user_id2) { 2746 $.get(Wo_Ajax_Requests_File(), {f:'create_new_video_call', 'new': 'true', user_id1: user_id1, user_id2:user_id2}, function(data) { 2747 if (data.status == 200) { 2748 if (node_socket_flow == "1") { 2749 socket.emit("user_notification", { to_id: user_id2, user_id: _getCookie("user_id"), type: "create_video" }); 2750 } 2751 $('body').append(data.html); 2752 $('#calling-modal').modal({ 2753 show: true 2754 }); 2755 checkcalls = setTimeout(function () { 2756 Wo_CheckForCallAnswer(data.id); 2757 }, 2000); 2758 setTimeout(function() {
2759 $('#calling-modal').find('.modal-title').html('<i class="fa fa fa-video-camera"></i> ' + data.text_no_answer); 2760 $('#calling-modal').find('.modal-body p').text(data.text_please_try_again_later); 2761 clearTimeout(checkcalls); 2762 Wo_PlayAudioCall('stop'); 2763 }, 43000); 2764 Wo_PlayAudioCall('play'); 2765 } 2766 }); 2767} 2768 2769function Wo_GenerateVoiceCall(user_id1, user_id2) { 2770 $.get(Wo_Ajax_Requests_File(), {f:'create_new_audio_call', 'new': 'true', user_id1: user_id1, user_id2:user_id2}, function(data) { 2771 if (data.status == 200) { 2772 if (node_socket_flow == "1") { 2773 socket.emit("user_notification", { to_id: user_id2, user_id: _getCookie("user_id"), type: "create_video" }); 2774 } 2775 $('body').append(data.html); 2776 $('#calling-modal').modal({ 2777 show: true 2778 }); 2779 checkcalls = setTimeout(function () { 2780 Wo_CheckForAudioCallAnswer(data.id); 2781 }, 2000); 2782 setTimeout(function() { 2783 $('#calling-modal').find('.modal-title').html('<i class="fa fa fa-phone"></i> ' + data.text_no_answer); 2784 $('#calling-modal').find('.modal-body p').text(data.text_please_try_again_later); 2785 clearTimeout(checkcalls); 2786 Wo_PlayAudioCall('stop'); 2787 }, 43000); 2788 Wo_PlayAudioCall('play'); 2789 } 2790 }); 2791} 2792 2793function Wo_PlayAudioCall(type) { 2794 if (type == 'play') { 2795 document.getElementById('calling-sound').play(); 2796 window.playmusic_ = setTimeout(function() { 2797 Wo_PlayAudioCall('play'); 2798 }, 100); 2799 } else { 2800 clearTimeout(window.playmusic_); 2801 document.getElementById('calling-sound').pause(); 2802 } 2803} 2804function Wo_PlayVideoCall(type) { 2805 if (type == 'play') { 2806 document.getElementById('video-calling-sound').play(); 2807 window.playmusic = setTimeout(function() { 2808 Wo_PlayVideoCall('play'); 2809 }, 100); 2810 } else { 2811 clearTimeout(window.playmusic); 2812 document.getElementById('video-calling-sound').pause(); 2813 } 2814} 2815function textAreaAdjust(o, h, n) { 2816 if (n == 'lightbox') { 2817 recording_node = "comm"; 2818 } else { 2819 o.style.height = h + 'px'; 2820 o.style.height = (5+o.scrollHeight)+"px"; 2821 } 2822 if (n == 'comm') { 2823 recording_node = "comm"; 2824 } 2825} 2826 2827function Wo_MarkAsSold(post_id, product_id) { 2828 var post = $('#post-' + post_id); 2829 var p = post.find('.mark-as-sold-post').find('p').text(); 2830 post.find('.mark-as-sold-post').html('<div class="post_drop_menu_loading"><div class="ball-pulse"><div></div><div></div><div></div></div></div>'); 2831 $.get(Wo_Ajax_Requests_File(), { 2832 f: 'posts', 2833 s: 'mark_as_sold_post', 2834 post_id: post_id, 2835 product_id: product_id 2836 }, function (data) { 2837 if(data.status == 200) { 2838 post.find('.product-status').text(data.text); 2839 post.find('.mark-as-sold-post').html('<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19 13C19.34 13 19.67 13.04 20 13.09V8H4V21H13.35C13.13 20.37 13 19.7 13 19C13 15.69 15.69 13 19 13M9 13V11.5C9 11.22 9.22 11 9.5 11H14.5C14.78 11 15 11.22 15 11.5V13H9M21 7H3V3H21V7M22.5 17.25L17.75 22L15 19L16.16 17.84L17.75 19.43L21.34 15.84L22.5 17.25Z" /></svg> <div><b>'+data.text+'</b><p>'+p+'</p></div>'); 2840 post.find('.mark-as-sold-post').removeAttr('onclick'); 2841 } 2842 }); 2843} 2844 2845function Wo_VoteUp(id) { 2846 var $vote_con = $('#option-' + id); 2847 var $post_id = $vote_con.attr('data-post-id'); 2848 if ($post_id.length == 0) { 2849 return false; 2850 } 2851 $is_voted = $('#post-' + $post_id).find('.options').attr('data-vote'); 2852 if ($is_voted.length == 0) { 2853 return false; 2854 } 2855 if ($is_voted == 'false') { 2856 $vote_con.find('.poll-option span').html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="opacity: 1;"><path fill="#2196f3" d="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z" /></svg>'); 2857 } 2858 $('#post-' + $post_id).find('.options').attr('data-vote', true); 2859 $.get(Wo_Ajax_Requests_File(), {f:'vote_up', id:id}, function (data) { 2860 if (data.status == 200) { 2861 $('#post-' + $post_id).find('.total-votes').removeClass('hidden'); 2862 $('#post-' + $post_id).find('.result-bar-parent').removeClass('hidden'); 2863 $('#post-' + $post_id).find('.answer-vote').removeClass('hidden');
2864 data.votes.forEach(function(option) { 2865 $('#post-' + $post_id).find('#total-votes').text(option.all); 2866 $('#option-' + option.id).find('.answer-vote').html(option.percentage); 2867 if (option.percentage_num > 0) { 2868 $('#option-' + option.id).find('.result-bar').text(' ').css('width', option.percentage); 2869 } 2870 }); 2871 } else if (data.status == 400) { 2872 alert(data.text); 2873 } 2874 }); 2875} 2876 2877function Wo_UploadReplyCommentImage(id) { 2878 var image_container = $('#post-' + id); 2879 var fetched_image = $('.comment-reply-image-'+id); 2880 var data = new FormData(); 2881 data.append('image', $('#comment_reply_image_' + id).prop('files')[0]); 2882 image_container.find('#wo_comment_combo .ball-pulse').fadeIn(100); 2883 $.ajax({ 2884 type: "POST", 2885 url: Wo_Ajax_Requests_File() + '?f=upload_image&id=' + id, 2886 data: data, 2887 processData: false, 2888 contentType: false, 2889 success: function (data) { 2890 if (data.status == 200) { 2891 fetched_image.html('<img src="' + data.image + '"><div class="remove-icon" onclick="Wo_EmptyReplyCommentImage(' + id + ')"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg></div>'); 2892 $('#comment_src_image_' + id).val(data.image_src); 2893 fetched_image.removeClass('hidden'); 2894 image_container.find('.comment-reply-textarea').focus(); 2895 } 2896 image_container.find('#wo_comment_combo .ball-pulse').fadeOut(100); 2897 } 2898 }); 2899} 2900function Wo_EmptyReplyCommentImage(id) { 2901 var image_container = $('#post-' + id); 2902 var fetched_image = $('.comment-reply-image-'+id); 2903 $('.comment-image-con').empty(); 2904 $('#comment_src_image_'+id).val(''); 2905 $('#comment_src_image_'+id).val(''); 2906 $('#comment_reply_image_' + id).val(''); 2907} 2908 2909 2910function Wo_UploadCommentImage(id) { 2911 var image_container = $('#post-' + id); 2912 var fetched_image = image_container.find('#comment-image'); 2913 var data = new FormData(); 2914 data.append('image', $('#comment_image_' + id).prop('files')[0]); 2915 image_container.find('#wo_comment_combo .ball-pulse').fadeIn(100); 2916 $.ajax({ 2917 type: "POST", 2918 url: Wo_Ajax_Requests_File() + '?f=upload_image&id=' + id, 2919 data: data, 2920 processData: false, 2921 contentType: false, 2922 success: function (data) { 2923 if (data.status == 200) { 2924 fetched_image.html('<img src="' + data.image + '"><div class="remove-icon" onclick="Wo_EmptyCommentImage(' + id + ')"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg></div>'); 2925 image_container.find('#comment_src_image').val(data.image_src); 2926 fetched_image.removeClass('hidden'); 2927 image_container.find('.comment-textarea').focus(); 2928 } 2929 image_container.find('#wo_comment_combo .ball-pulse').fadeOut(100); 2930 } 2931 }); 2932} 2933 2934function Wo_EmptyCommentImage(id) { 2935 var image_container = $('#post-' + id); 2936 var fetched_image = image_container.find('#comment-image'); 2937 image_container.find('.comment-image-con').empty().addClass('hidden'); 2938 image_container.find('#comment_src_image').val(''); 2939 image_container.find('#comment_src_image').val(''); 2940 image_container.find('#comment_image_' + id).val(''); 2941} 2942 2943function Wo_TurnOffSound() { 2944 var sound = $('.turn-off-sound'); 2945 Wo_progressIconLoader(sound); 2946 $.get(Wo_Ajax_Requests_File(), { 2947 f: 'turn-off-sound' 2948 }, function (data) { 2949 if(data.status == 200) { 2950 sound.find('span').html(data.message); 2951 } 2952 }); 2953} 2954 2955function Wo_Del_Article(id) { 2956 $("#delete-blog").find('.ball-pulse').fadeIn(100); 2957 $.ajax({
2958 type: "GET", 2959 url: Wo_Ajax_Requests_File(), 2960 data: { 2961 id: id, 2962 f: 'delete-my-blog' 2963 }, 2964 dataType: 'json', 2965 success: function(data) { 2966 if (data['status'] == 200) { 2967 $("#delete-blog").modal("hide"); 2968 $("div[data-rm-blog='" + data['id'] + "']").fadeOut(function() { 2969 $(this).remove() 2970 }); 2971 } 2972 $("#delete-blog").find('.ball-pulse').fadeOut(100); 2973 } 2974 }); 2975} 2976 2977function Wo_DelReply(id) { 2978 if (!id) { 2979 return false; 2980 }else{ 2981 2982 Wo_progressIconLoader($('#delete-reply').find('button')); 2983 $.ajax({ 2984 type: "GET", 2985 url: Wo_Ajax_Requests_File(), 2986 data: { 2987 id: id, 2988 f: 'delete-reply' 2989 }, 2990 dataType: 'json', 2991 success: function(data) { 2992 if (data['status'] == 200) { 2993 $("#delete-reply").modal("hide"); 2994 $("[data-thread-reply='" + id + "']").slideUp(function() { 2995 $(this).remove() 2996 }); 2997 } 2998 Wo_progressIconLoader($('#delete-reply').find('button')); 2999 } 3000 }); 3001 } 3002} 3003 3004function Wo_DelThread(id) { 3005 if (!id) { 3006 return false; 3007 }else{ 3008 3009 Wo_progressIconLoader($('#delete-thread').find('button')); 3010 $.ajax({
3011 type: "GET", 3012 url: Wo_Ajax_Requests_File(), 3013 data: { 3014 id: id, 3015 f: 'delete-thread' 3016 }, 3017 dataType: 'json', 3018 success: function(data) { 3019 if (data['status'] == 200) { 3020 $("#delete-thread").modal("hide"); 3021 $("[data-thread-ident='" + id + "']").slideUp(function() { 3022 $(this).remove() 3023 }); 3024 } 3025 Wo_progressIconLoader($('#delete-thread').find('button')); 3026 } 3027 }); 3028 } 3029} 3030var Wo_Delay = (function(){ 3031 var timer = 0; 3032 return function(callback, ms){ 3033 clearTimeout (timer); 3034 timer = setTimeout(callback, ms); 3035 }; 3036})(); 3037function Wo_AddVideoViews(post_id){ 3038 $('.video-js').each(function(index, el) { 3039 if ($(this).attr('data-post-video') != post_id) { 3040 $(this).get(0).pause(); 3041 } 3042 }); 3043 if (post_id && typeof(Number(post_id)) == 'number' && post_id > 0) { 3044 Wo_Delay(function(){ 3045 $.ajax({
3046 url: Wo_Ajax_Requests_File(), 3047 type: 'GET', 3048 dataType: 'json', 3049 data: {f:'posts', s:'add-video-view',post_id:post_id}, 3050 }) 3051 .done(function(data) { 3052 if (data.status == 200) { 3053 $("span[data-post-video-views="+post_id+"]").text(data.views); 3054 $("video[data-post-video="+post_id+"]").removeAttr('onplay'); 3055 } 3056 }) 3057 },5000) 3058 } 3059 } 3060function Wo_DeleteStatus(id){ 3061 if (!id || !confirm('Are you sure you want to delete your status?')) { 3062 return false; 3063 } 3064 3065 $.ajax({ 3066 url: Wo_Ajax_Requests_File(), 3067 type: 'GET', 3068 dataType: 'json', 3069 data: {f: 'status',s:'remove',id:id}, 3070 }) 3071 .done(function(data) { 3072 if (data.status == 200) { 3073 location.reload(); 3074 $("[data-status-id='"+id+"']").slideUp(function(){ 3075 $(this).remove(); 3076 }) 3077 } 3078 }) 3079 .fail(function() { 3080 console.log("error"); 3081 }) 3082} 3083 3084function Wo_StoryProgress(){ 3085 $('.mfp-progress-line').html('<span width="0"></span>').find('span').delay(1).queue(function () { 3086 $(this).css('width', '100%') 3087 }); 3088} 3089 3090 3091function Wo_EditReplyComment(id){ 3092 if (!id) { return false;} 3093 var self = $("div[data-post-comm-reply-edit='"+id+"']").toggleClass('hidden'); 3094 //self.find('textarea').val($("div[data-post-comm-reply-text='"+id+"']").text().trim()); 3095} 3096 3097function Wo_UpdatCommReply(id,event,self){ 3098 if (!id || !event || !self) { 3099 return false; 3100 } 3101 3102 else if (event.keyCode == 13 && event.shiftKey == 0) { 3103 var text = $(self).val(); 3104 var id = id; 3105 $.ajax({
3106 url: Wo_Ajax_Requests_File() + "?f=posts&s=update-reply", 3107 type: 'POST', 3108 dataType: 'json', 3109 data: {id:id,text:text}, 3110 }) 3111 .done(function(data) { 3112 if (data.status == 200) { 3113 $("div[data-post-comm-reply-text='"+id+"']").html(data.text); 3114 var edit_box = $("div[data-post-comm-reply-edit='"+id+"']").addClass('hidden'); 3115 edit_box.find('textarea').val(data.orginal); 3116 } 3117 }) 3118 .fail(function() { 3119 console.log("error"); 3120 }) 3121 3122 } 3123 else{ 3124 Wo_Get_Mention(self); 3125 } 3126 3127} 3128 3129function Wo_HidePost(post_id){ 3130 if (!post_id) { 3131 return false; 3132 } 3133 3134 $.ajax({ 3135 url: Wo_Ajax_Requests_File(), 3136 type: 'GET', 3137 dataType: 'json', 3138 data: {f: 'posts',s:'hide_post',post:post_id}, 3139 }) 3140 .done(function(data) { 3141 if (data.status == 200) { 3142 $("#post-"+post_id).slideUp(function(){ 3143 $(this).remove(); 3144 }) 3145 } 3146 }) 3147 .fail(function() { 3148 console.log("error"); 3149 }) 3150} 3151 3152function Wo_SharePost(post_id, owner_id, self){ 3153 3154 if (!post_id || !owner_id || !self) { 3155 return false; 3156 } 3157 $.ajax({ 3158 url: Wo_Ajax_Requests_File(), 3159 type: 'GET', 3160 dataType: 'json', 3161 data: {f: 'posts',s:'share-post',id:post_id,usr:owner_id}, 3162 }) 3163 .done(function(data) { 3164 if (data.status == 200) { 3165 $("#post-shared").modal('show'); 3166 setTimeout(function(){ 3167 $("#post-shared").modal('hide'); 3168 $('#post-' + post_id).find('.post-share').slideUp('fast') 3169 },3000); 3170 } 3171 }) 3172 .fail(function() { 3173 console.log("error"); 3174 }) 3175 3176} 3177 3178function Wo_SharePostOn(post_id, owner_id,type){ 3179 3180 if (!post_id) { 3181 return false; 3182 } 3183 3184 $('#share_post_modal').modal('hide'); 3185 $('#share_post_modal').remove(); 3186 $.ajax({
3187 url: Wo_Ajax_Requests_File(), 3188 type: 'GET', 3189 dataType: 'json', 3190 data: {f: 'get_share_post',post_id:post_id}, 3191 }) 3192 .done(function(data) { 3193 if (data.status == 200) { 3194 $('body').append(data.html); 3195 $('#SearchForInputPostId').val(post_id); 3196 $('#SearchForInputTypeId').val(owner_id); 3197 $('#share_post_modal').modal('show'); 3198 } 3199 }) 3200 .fail(function() { 3201 }) 3202 .always(function() { 3203 }); 3204 3205} 3206function SearchFor(self,type){ 3207 name = $(self).val(); 3208 $.ajax({ 3209 url: Wo_Ajax_Requests_File(), 3210 type: 'GET', 3211 dataType: 'json', 3212 data: {f: 'search_for',s:type,name:name}, 3213 }) 3214 .done(function(data) { 3215 if (data.status == 200) { 3216 $(self).autocomplete({ 3217 source: data.info, 3218 select: function (event, ui) { 3219 //if (type == 'group') { 3220 $('#SearchForInputTypeId').val(ui.item.id); 3221 // } 3222 // else if (type == 'page') { 3223 // $('#SearchForInputPage').val(ui.item.id); 3224 // } 3225 // else if (type == 'user') { 3226 // $('#SearchForInputUser').val(ui.item.id); 3227 // } 3228 } 3229 }); 3230 } 3231 else{ 3232 3233 } 3234 }) 3235 .fail(function() { 3236 }) 3237} 3238 3239function Wo_AddGroupUserAdmin(member_id, group_id, self){ 3240 if (!member_id || !group_id || !self) { 3241 return false; 3242 } 3243 $.ajax({ 3244 url: Wo_Ajax_Requests_File(), 3245 type: 'GET', 3246 dataType: 'json', 3247 data: {f: 'groups',s:'add_admin',user_id:member_id,group_id:group_id}, 3248 }) 3249 .done(function(data) { 3250 if (data.status == 200 && data.code == 1) { 3251 $(self).find('span').html('<i class="fa fa-times-circle-o"></i>'); 3252 $('#privileges_admin_'+member_id).slideDown(); 3253 } 3254 else if(data.status == 200 && data.code == 0){ 3255 $(self).find('span').html('<i class="fa fa-plus-square-o"></i>'); 3256 $('#privileges_admin_'+member_id).slideUp(); 3257 } 3258 }) 3259 .fail(function() { 3260 console.log("error"); 3261 }) 3262 3263} 3264 3265function Wo_OpenLighteBox(self ,event){ 3266 if (!self || !event) { 3267 return false; 3268 } 3269 event.stopPropagation(); 3270 var url = $(self).attr('data-href'); 3271 $('#modal_light_box').modal('show').find('.image').attr('src', url); 3272} 3273 3274function Wo_UpdateLocation(position) { 3275 if (!position) { 3276 return false; 3277 } 3278 $.post(Wo_Ajax_Requests_File() + '?f=save_user_location', {lat: position.coords.latitude, lng:position.coords.longitude}, function(data, textStatus, xhr) { 3279 if (data.status == 200) { 3280 return true; 3281 } 3282 }); 3283 return false; 3284} 3285 3286 3287var Wo_ElementLoad = function(selector, callback){ 3288 $(selector).each(function(){ 3289 if (this.complete || $(this).height() > 0) { 3290 callback.apply(this); 3291 } 3292 else { 3293 $(this).on('load', function(){ 3294 callback.apply(this); 3295 }); 3296 } 3297 }); 3298}; 3299 3300 3301function Wo_NextProductPicture(product_id, id) { 3302 Wo_CloseLightbox(); 3303 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 3304 $.get(Wo_Ajax_Requests_File(), {f:'get_next_product_image', product_id:product_id, after_image_id:id}, function(data) { 3305 if (data.status == 200) { 3306 document.body.style.overflow = 'hidden'; 3307 $('.lightbox-container').html(data.html); 3308 $( ".changer").fadeIn(200); 3309 } 3310 }); 3311} 3312 3313function Wo_PreviousProductPicture(product_id, id) { 3314 Wo_CloseLightbox(); 3315 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indef
3315inite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 3316 $.get(Wo_Ajax_Requests_File(), {f:'get_previous_product_image', product_id:product_id, before_image_id:id}, function(data) { 3317 if (data.status == 200) { 3318 document.body.style.overflow = 'hidden'; 3319 $('.lightbox-container').html(data.html); 3320 $( ".changer").fadeIn(200); 3321 } 3322 }); 3323} 3324function decodeHtml(html) { 3325 var txt = document.createElement("textarea"); 3326 txt.innerHTML = html; 3327 return txt.value; 3328} 3329 3330 3331function Wo_IsFileAllowedToUpload(filename, allowed) { 3332 var extension = filename.replace(/^.*\./, '').toLowerCase(); 3333 var allowed_array = allowed.split(','); 3334 if (isInArray(extension, allowed_array)) { 3335 return true; 3336 } 3337 return false; 3338} 3339 3340function isInArray(value, array) { 3341 return array.indexOf(value) > -1; 3342} 3343 3344/*Stickey Sidebar*/ 3345!function(i){i.fn.theiaStickySidebar=function(t){function e(t,e){var a=o(t,e);
3345a||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)),i(window).on("resize."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)))}function o(t,e){return t.initialized===!0||!(i("body").width()<t.minWidth)&&(a(t,e),!0)}function a(t,e){t.initialized=!0;var o=i("#theia-sticky-sidebar-stylesheet-"+t.namespace);0===o.length&&i("head").append(i('<style id="theia-sticky-sidebar-stylesheet-'+t.namespace+'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("<div>").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()<a.options.minWidth)return void e();if(a.options.disableOnResponsiveLayouts){var s=a.sidebar.outerWidth("none"==a.sidebar.css("float"));if(s+50>a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b<i(window).height();c=g?h+a.stickySidebar.outerHeight():i(window).height()-a.marginBottom-a.paddingBottom-t.additionalMarginBottom;var u=l-r+a.paddingTop,S=f-r-a.paddingBottom-a.marginBottom,y=a.stickySidebar.offset().top-r,m=a.previousScrollTop-r;"fixed"==a.stickySidebar.css("position")&&"modern"==a.options.sidebarBehavior&&(y+=m),"stick-to-top"==a.options.sidebarBehavior&&(y=t.additionalMarginTop),"stick-to-bottom"==a.options.sidebarBehavior&&(y=c-a.stickySidebar.outerHeight()),y=m>0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var s={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"};return t=i.extend(s,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||
vendor: 8,668 bytes, lines 3345-3350
33450,e(t,this),this}}(jQuery); 3346 3347 3348 3349/*Pro users Slider*/ 3350!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><polyline points="15 18 9 12 15 6"></polyline></svg></button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg></button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 3350
3350ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
3350slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
3350parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
3350,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 3350
3350,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
3350!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
3350):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
3350o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
3350,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 3351 3352 3353/*! 3354 Non-Sucking Autogrow 1.1.6 3355 license: MIT 3356 author: Roman Pushkin 3357 https://github.com/ro31337/jquery.ns-autogrow 3358*/ 3359(function(){var e;!function(t,l){return t.fn.autogrow=function(i){if(null==i&&(i={}),null==i.horizontal&&(i.horizontal=!0),null==i.vertical&&(i.vertical=!0),null==i.debugx&&(i.debugx=-1e4),null==i.debugy&&(i.debugy=-1e4),null==i.debugcolor&&(i.debugcolor="yellow"),null==i.flickering&&(i.flickering=!0),null==i.postGrowCallback&&(i.postGrowCallback=function(){}),null==i.verticalScrollbarWidth&&(i.verticalScrollbarWidth=e()),i.horizontal!==!1||i.vertical!==!1)return this.filter("textarea").each(function(){var e,n,r,o,a,c,d;if(e=t(this),!e.data("autogrow-enabled"))return e.data("autogrow-enabled"),a=e.height(),c=e.width(),o=1*e.css("lineHeight")||0,e.hasVerticalScrollBar=function(){return e[0].clientHeight<e[0].scrollHeight},n=t('<div class="autogrow-shadow"></div>').css({position:"absolute",display:"inline-block","background-color":i.debugcolor,top:i.debugy,left:i.debugx,"max-width":e.css("max-width"),padding:e.css("padding"),fontSize:e.css("fontSize"),fontFamily:e.css("fontFamily"),fontWeight:e.css("fontWeight"),lineHeight:e.css("lineHeight"),resize:"none","word-wrap":"break-word"}).appendTo(document.body),i.horizontal===!1?n.css({width:e.width()}):(r=e.css("font-size"),n.css("padding-right","+="+r),n.normalPaddingRight=n.css("padding-right")),d=function(t){return function(l){var r,d,s;return d=t.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\n /g,"<br/> ").replace(/"/g,""").replace(/'/g,"'").replace(/\n$/,"<br/> ").replace(/\n/g,"<br/>").replace(/ {2,}/g,function(e){return Array(e.length-1).join(" ")+" "}),/(\n|\r)/.test(t.value)&&(d+="<br />",i.flickering===!1&&(d+="<br />")),n.html(d),i.vertical===!0&&(r=Math.max(n.height()+o,a),e.height(r)),i.horizontal===!0&&(n.css("padding-right",n.normalPaddingRight),i.vertical===!1&&e.hasVerticalScrollBar()&&n.css("padding-right","+="+i.verticalScrollbarWidth+"px"),s=Math.max(n.outerWidth(),c),e.width(s)),i.postGrowCallback(e)}}(this),e.change(d).keyup(d).keydown(d),t(l).resize(d),d()})}}(window.jQuery,window),e=function(){var e,t,l,i;return e=document.createElement("p"),e.style.width="100%",e.style.height="200px",t=document.createElement("div"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t),l=e.offsetWidth,t.style.overflow="scroll",i=e.offsetWidth,l===i&&(i=t.clientWidth),document.body.removeChild(t),l-i}}).call(this); 3360 3361 3362function escapeHtml(html) 3363{ 3364 var text = document.createTextNode(html); 3365 var div = document.createElement('div'); 3366 div.appendChild(text); 3367 return div.innerHTML; 3368} 3369 3370function decodeHTMLEntities(text) { 3371 var entities = [ 3372 ['amp', '&'], 3373 ['apos', '\''], 3374 ['#x27', '\''], 3375 ['#x2F', '/'], 3376 ['#39', '\''], 3377 ['#47', '/'], 3378 ['lt', '<'], 3379 ['gt', '>'], 3380 ['nbsp', ' '], 3381 ['quot', '"'] 3382 ]; 3383 3384 for (var i = 0, max = entities.length; i < max; ++i) 3385 text = text.replace(new RegExp('&'+entities[i][0]+';', 'g'), entities[i][1]); 3386 3387 return text; 3388} 3389 3390function Wo_RegisterCommentReaction(comment_id,reaction){ 3391 if (!comment_id && !reaction) 3392 return false; 3393 3394 3395 $('.reactions-comment-container-' + comment_id).css('display', 'none'); 3396 $.get(Wo_Ajax_Requests_File(), {f: 'posts', s: 'register_comment_reaction', comment_id: comment_id, reaction: reaction}, function (data) { 3397 if(data.status == 200) { 3398 if (node_socket_flow == "1") { 3399 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added" }); 3400 } 3401 $('.comment-reactions-icons-'+comment_id).html(data.reactions); 3402 $('.comment-status-reaction-'+comment_id).addClass("active-like"); 3403 //$('.c_likes-'+comment_id).html(data.like_lang); 3404 //post.find("[id^=likes]").text(data.likes); 3405 } else { 3406 //post.find("[id^=likes]").text(data.likes); 3407 } 3408 if (data.can_send == 1) { 3409 Wo_SendMessages();
3410 } 3411 }); 3412 3413} 3414 3415function Wo_RegisterBlogCommentReaction(comment_id,reaction){ 3416 if (!comment_id && !reaction) 3417 return false; 3418 3419 $('.reactions-comment-container-' + comment_id).css('display', 'none'); 3420 $.get(Wo_Ajax_Requests_File(), {f: 'blog', s: 'register_blog_comment_reaction', comment_id: comment_id, reaction: reaction}, function (data) { 3421 if(data.status == 200) { 3422 if (node_socket_flow == "1") { 3423 socket.emit("user_notification", { to_id: data.user_id, user_id: _getCookie("user_id"), type: "added" }); 3424 } 3425 $('.comment-reactions-icons-'+comment_id).html(data.reactions); 3426 $('.comment-status-reaction-'+comment_id).addClass("active-like"); 3427 //$('.c_likes-'+comment_id).html(data.like_lang); 3428 //post.find("[id^=likes]").text(data.likes); 3429 } else { 3430 //post.find("[id^=likes]").text(data.likes); 3431 } 3432 if (data.can_send == 1) { 3433 Wo_SendMessages(); 3434 } 3435 }); 3436 3437} 3438 3439 3440function Wo_RegisterBlogReplyReaction(user_id,reply_id,reaction){ 3441 if (!reply_id && !reaction) 3442 return false; 3443 3444 $('.reactions-box-comment-replay-container-' + reply_id).css('display', 'none'); 3445 $.get(Wo_Ajax_Requests_File(), {f: 'blog', s: 'register_reply_reaction', user_id: user_id, reply_id: reply_id, reaction: reaction}, function (data) { 3446 if(data.status == 200) { 3447 if (node_socket_flow == "1") { 3448 socket.emit("user_notification", { to_id: data.user_id, user_id: _getCookie("user_id"), type: "added" }); 3449 } 3450 $('.replay-reactions-icons-'+reply_id).html(data.reactions); 3451 $('.replay-status-reaction-'+reply_id).addClass("active-like"); 3452 //$('.r_likes-'+reply_id).html(data.like_lang); 3453 //post.find("[id^=likes]").text(data.likes); 3454 } else { 3455 //post.find("[id^=likes]").text(data.likes); 3456 } 3457 if (data.can_send == 1) { 3458 Wo_SendMessages(); 3459 } 3460 }); 3461 3462} 3463 3464function Wo_RegisterlightboxCommentReaction(comment_id,reaction){ 3465 if (!comment_id && !reaction) 3466 return false; 3467 3468 3469 $.get(Wo_Ajax_Requests_File(), {f: 'posts', s: 'register_comment_reaction', comment_id: comment_id, reaction: reaction}, function (data) { 3470 if(data.status == 200) { 3471 if (node_socket_flow == "1") { 3472 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added" }); 3473 } 3474 $('.lightbox-comment-reactions-icons-'+comment_id).html(data.reactions); 3475 $('.lightbox-comment-status-reaction-'+comment_id).addClass("active-like"); 3476 //$('.c_likes-'+comment_id).html(data.like_lang); 3477 //post.find("[id^=likes]").text(data.likes); 3478 } else { 3479 //post.find("[id^=likes]").text(data.likes); 3480 } 3481 if (data.can_send == 1) { 3482 Wo_SendMessages(); 3483 } 3484 }); 3485 3486} 3487 3488 3489function Wo_RegisterReplyReaction(user_id,reply_id,reaction){ 3490 if (!reply_id && !reaction) 3491 return false; 3492 3493 $('.reactions-box-comment-replay-container-' + reply_id).css('display', 'none'); 3494 3495 $.get(Wo_Ajax_Requests_File(), {f: 'posts', s: 'register_replay_reaction', user_id: user_id, reply_id: reply_id, reaction: reaction}, function (data) { 3496 if(data.status == 200) { 3497 if (node_socket_flow == "1") { 3498 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "added" }); 3499 } 3500 $('.replay-reactions-icons-'+reply_id).html(data.reactions); 3501 $('.replay-status-reaction-'+reply_id).addClass("active-like"); 3502 //$('.r_likes-'+reply_id).html(data.like_lang); 3503 //post.find("[id^=likes]").text(data.likes); 3504 } else { 3505 //post.find("[id^=likes]").text(data.likes); 3506 } 3507 if (data.can_send == 1) { 3508 Wo_SendMessages(); 3509 } 3510 }); 3511 3512} 3513 3514 3515function load_ajax_emojii(id, path){ 3516 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3517 3518 $('.emo-comment-container-' + id ).html(""); 3519 $.each(emojjii.split('*'), function(key, value) { 3520 $('.emo-comment-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToCommentInput("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3521 }); 3522} 3523function load_ajax_chat_emojii(id, path){ 3524 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3525 3526 $('.emo-container-' + id ).html(""); 3527 $.each(emojjii.split('*'), function(key, value) { 3528 $('.emo-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToChat("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3529 }); 3530} 3531function load_ajax_chat_group_emojii(id, path){ 3532 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3533 3534 $('.emo-group-container-' + id ).html(""); 3535 $.each(emojjii.split('*'), function(key, value) { 3536 $('.emo-group-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToGroup("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3537 }); 3538} 3539function load_ajax_chat_page_emojii(id, path){ 3540 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3541 3542 $('.emo-container-' + id ).html(""); 3543 $.each(emojjii.split('*'), function(key, value) { 3544 $('.emo-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToPage("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3545 }); 3546} 3547function load_ajax_message_emojii(path){ 3548 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3549 3550 $('.emo-message-container').html(""); 3551 $.each(emojjii.split('*'), function(key, value) { 3552 $('.emo-message-container').append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToMessageInput('"+ value +"');\"><span>"+ value + "</span>"); 3553 }); 3554} 3555function load_ajax_publisher_emojii(path){ 3556 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3557 3558 $('.publisher-box-emooji').html(""); 3559 $.each(emojjii.split('*'), function(key, value) { 3560 $('.publisher-box-emooji').append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmo('"+ value +"', '#post-textarea textarea'), Wo_ShowPosInfo();\"><span>"+ value + "</span>"); 3561 }); 3562} 3563function load_ajax_reply_emojii(id, path){ 3564 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3565 3566 $('.emo-comment-container-' + id ).html(""); 3567 $.each(emojjii.split('*'), function(key, value) { 3568 $('.emo-comment-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoTo_replyCommentInput("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3569 }); 3570}
3571function Wo_AddEmoTo_replyCommentInput(post_id, code, type) { 3572 inputTag = $('[id=post-' + post_id + ']').find('.comment-reply-textarea'); 3573 if (type == 'lightbox-post-footer') { 3574 inputTag = $('.lightbox-post-footer').find('.comment-reply-textarea'); 3575 } 3576 inputVal = inputTag.val(); 3577 if (typeof(inputTag.attr('placeholder')) != "undefined") { 3578 inputPlaceholder = inputTag.attr('placeholder'); 3579 if (inputPlaceholder == inputVal) { 3580 inputTag.val(''); 3581 inputVal = inputTag.val(); 3582 } 3583 } 3584 if (inputVal.length == 0) { 3585 inputTag.val(code + ' '); 3586 } else { 3587 inputTag.val(inputVal + ' ' + code); 3588 } 3589 inputTag.keyup().focus(); 3590} 3591 3592function _getCookie(cname) { 3593 var name = cname + "="; 3594 var decodedCookie = decodeURIComponent(document.cookie); 3595 var ca = decodedCookie.split(';'); 3596 for(var i = 0; i <ca.length; i++) { 3597 var c = ca[i]; 3598 while (c.charAt(0) == ' ') { 3599 c = c.substring(1); 3600 } 3601 if (c.indexOf(name) == 0) { 3602 return c.substring(name.length, c.length); 3603 } 3604 } 3605 if (cname == 'user_id') { 3606 return _getSession('user_id'); 3607 } 3608 return ""; 3609} 3610 3611var _shortcut_helper = _getCookie("shortcut_helper"); 3612if ( _shortcut_helper == "false" ) { 3613 $('#shortcut_helper').hide(); 3614} 3615 3616$(window).on('load', function() { 3617 window.post = 0; 3618 $('body').on('keypress', function(key) { 3619 var tag = key.target.tagName.toLowerCase(); 3620 3621 key.stopPropagation(); 3622 var k = parseInt(key.which, 10); 3623 if( window.post >= 0 ){ 3624 if( k == 106 && tag != 'input' && tag != 'textarea'){ 3625 3626 var date = new Date(); 3627 var expires = ""; 3628 date.setTime(date.getTime() + (7*24*60*60*1000)); 3629 expires = "; expires=" + date.toUTCString(); 3630 document.cookie = "shortcut_helper=false" + expires + "; path=/"; 3631 3632 $('#shortcut_helper').show(); 3633 3634 console.log(post); 3635 if( $( '.post-container' ).eq( window.post ).hasClass( 'user-ad-container' ) ){ 3636 console.log('ad'); 3637 $("html, body").animate({ scrollTop: $(document).height() }, "slow"); 3638 } 3639 3640 var listItems = $( '.post-container .post' ).eq( window.post ).find('.panel'); 3641 if (listItems.length) { 3642 listItems.addClass('active_shadow'); 3643 $('html, body').animate({ 3644 scrollTop: parseInt(listItems.offset().top - 60) 3645 }, 600); 3646 setTimeout(function(){ 3647 listItems.removeClass('active_shadow'); 3648 }, 500); 3649 //}else{ 3650 // post++; 3651 } 3652 window.post++; 3653 }else if( k == 107 && tag != 'input' && tag != 'textarea'){ 3654 $('#shortcut_helper').show(); 3655 window.post--; 3656 var listItems = $( '.post-container .post' ).eq( post ).find('.panel'); 3657 if (listItems.length) { 3658 listItems.addClass('active_shadow'); 3659 $('html, body').animate({ 3660 scrollTop: parseInt(listItems.offset().top - 60) 3661 }, 500); 3662 setTimeout(function(){ 3663 listItems.removeClass('active_shadow'); 3664 }, 500); 3665 } 3666 } 3667 3668 }else{ 3669 //post = post -1; 3670 } 3671 }); 3672 3673}); 3674 3675 3676 3677 3678 3679 3680function Wo_ShowCommentCombo(post_id){ 3681 comment_combo_wrapper = $('.wo_comment_combo_' + post_id); 3682 comment_combo_wrapper.addClass('comment-toggle'); 3683 //comment_combo_wrapper.find('textarea').focus(); 3684} 3685 3686function Wo_Get_Mention(self) { 3687 $(self).triggeredAutocomplete({ 3688 source: Wo_Ajax_Requests_File() + "?f=mention", 3689 trigger: "@" 3690 }); 3691} 3692 3693function Wo_RemoveBlur(self,id) { 3694 $('.remover_blur_btn_'+id).remove(); 3695 $('.remover_blur_'+id).removeClass('image_blur'); 3696} 3697function Wo_RemoveBlurAlbum(self,id) { 3698 $('.show_album_'+id).remove(); 3699} 3700 3701function Wo_OpenJobEditBox(job_id) { 3702 var edit_box = $('#edit-job-modal-' + job_id); 3703 edit_box.modal({ 3704 show: true 3705 }); 3706} 3707 3708function Wo_ShowCommonUserProfile(user_id) { 3709 $('#contnet').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indef
3709inite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 3710 $.get(Wo_Ajax_Requests_File(), {f:'show_common_user',s:'show', user_id:user_id}, function(data) { 3711 if (data.status == 200) { 3712 document.body.style.overflow = 'hidden'; 3713 $('.lightbox-container').html(data.html); 3714 } 3715 if (data.html.length == 0) { 3716 document.body.style.overflow = 'auto'; 3717 } 3718 }); 3719} 3720 3721function Wo_DeleteFund(id) { 3722 $("#delete-fund").find('.ball-pulse').fadeIn(100); 3723 $.ajax({ 3724 type: "GET", 3725 url: Wo_Ajax_Requests_File(), 3726 data: { 3727 id: id, 3728 f: 'funding', 3729 s: 'delete_fund' 3730 }, 3731 dataType: 'json', 3732 success: function(data) { 3733 if (data['status'] == 200) { 3734 $("#delete-fund").modal("hide"); 3735 $("div[data-rm-blog='" + id + "']").fadeOut(function() { 3736 $(this).remove() 3737 }); 3738 } 3739 $("#delete-fund").find('.ball-pulse').fadeOut(100); 3740 } 3741 }); 3742} 3743 3744function go_to_duration(id,duration) { 3745 if ($('#video--'+id+'_html5_api').length > 0) { 3746 id = 'video--'+id+'_html5_api'; 3747 } 3748 else{ 3749 id = 'video--'+id; 3750 } 3751 var vid = document.getElementById(id); 3752 vid.currentTime = duration; 3753 vid.play(); 3754} 3755 3756!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}(function(e){"use strict";var t={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t}},n=27,o=9,s=13,i=38,a=39,u=40,r=e.noop;function l(t,n){var o=this;o.element=t,o.el=e(t),o.suggestions=[],o.badQueries=[],o.selectedIndex=-1,o.currentValue=o.element.value,o.timeoutId=null,o.cachedResponse={},o.onChangeTimeout=null,o.onChange=null,o.isLocal=!1,o.suggestionsContainer=null,o.noSuggestionsContainer=null,o.options=e.extend({},l.defaults,n),o.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},o.hint=null,o.hintValue="",o.selection=null,o.initialize(),o.setOptions(n)}l.utils=t,e.Autocomplete=l,l.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:function(e,n){if(!n)return e.value;var o="("+t.escapeRegExChars(n)+")";return e.value.replace(new RegExp(o,"gi"),"<strong>$1</strong>").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/<(\/?strong)>/g,"<$1>")},formatGroup:function(e,t){return'<div class="autocomplete-group">'+t+"</div>"},delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:r,onSearchComplete:r,onSearchError:r,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(e,t,n){return-1!==e.value.toLowerCase().indexOf(n)},paramName:"query",transformResult:function(t){return"string"==typeof t?e.parseJSON(t):t},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1},l.prototype={initialize:function(){var t,n=this,o="."+n.classes.suggestion,s=n.classes.selected,i=n.options;n.element.setAttribute("autocomplete","off"),n.noSuggestionsContainer=e('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),n.suggestionsContainer=l.utils.createNode(i.containerClass),(t=e(n.suggestionsContainer)).appendTo(i.appendTo||"body"),"auto"!==i.width&&t.css("width",i.width),t.on("mouseover.autocomplete",o,function(){n.activate(e(this).data("index"))}),t.on("mouseout.autocomplete",function(){n.selectedIndex=-1,t.children("."+s).removeClass(s)}),t.on("click.autocomplete",o,function(){n.select(e(this).data("index"))}),t.on("click.autocomplete",function(){clearTimeout(n.blurTimeoutId)}),n.fixPositionCapture=function(){n.visible&&n.fixPosition()},e(window).on("resize.autocomplete",n.fixPositionCapture),n.el.on("key
3756down.autocomplete",function(e){n.onKeyPress(e)}),n.el.on("keyup.autocomplete",function(e){n.onKeyUp(e)}),n.el.on("blur.autocomplete",function(){n.onBlur()}),n.el.on("focus.autocomplete",function(){n.onFocus()}),n.el.on("change.autocomplete",function(e){n.onKeyUp(e)}),n.el.on("input.autocomplete",function(e){n.onKeyUp(e)})},onFocus:function(){var e=this;e.fixPosition(),e.el.val().length>=e.options.minChars&&e.onValueChange()},onBlur:function(){var e=this;e.blurTimeoutId=setTimeout(function(){e.hide()},200)},abortAjax:function(){var e=this;e.currentRequest&&(e.currentRequest.abort(),e.currentRequest=null)},setOptions:function(t){var n=this,o=n.options;this.options=e.extend({},o,t),n.isLocal=e.isArray(o.lookup),n.isLocal&&(o.lookup=n.verifySuggestionsFormat(o.lookup)),o.orientation=n.validateOrientation(o.orientation,"bottom"),e(n.suggestionsContainer).css({"max-height":o.maxHeight+"px",width:o.width+"px","z-index":o.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var e=this;e.disabled=!0,clearTimeout(e.onChangeTimeout),e.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this,n=e(t.suggestionsContainer),o=n.parent().get(0);if(o===document.body||t.options.forceFixPosition){var s=t.options.orientation,i=n.outerHeight(),a=t.el.outerHeight(),u=t.el.offset(),r={top:u.top,left:u.left};if("auto"===s){var l=e(window).height(),c=e(window).scrollTop(),g=-c+u.top-i,d=c+l-(u.top+a+i);s=Math.max(g,d)===g?"top":"bottom"}if(r.top+="top"===s?-i:a,o!==document.body){var h,p=n.css("opacity");t.visible||n.css("opacity",0).show(),h=n.offsetParent().offset(),r.top-=h.top,r.left-=h.left,t.visible||n.css("opacity",p).hide()}"auto"===t.options.width&&(r.width=t.el.outerWidth()+"px"),n.css(r)}},isCursorAtEnd:function(){var e,t=this.el.val().length,n=this.element.selectionStart;return"number"==typeof n?n===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){var t=this;if(t.disabled||t.visible||e.which!==u||!t.currentValue){if(!t.disabled&&t.visible){switch(e.which){case n:t.el.val(t.currentValue),t.hide();break;case a:if(t.hint&&t.options.onHint&&t.isCursorAtEnd()){t.selectHint();break}return;case o:if(t.hint&&t.options.onHint)return void t.selectHint();if(-1===t.selectedIndex)return void t.hide();if(t.select(t.selectedIndex),!1===t.options.tabDisabled)return;break;case s:if(-1===t.selectedIndex)return void t.hide();t.select(t.selectedIndex);break;case i:t.moveUp();break;case u:t.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else t.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.which){case i:case u:return}clearTimeout(t.onChangeTimeout),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeTimeout=setTimeout(function(){t.onValueChange()},t.options.deferRequestBy):t.onValueChange())}},onValueChange:function(){var t=this,n=t.options,o=t.el.val(),s=t.getQuery(o);t.selection&&t.currentValue!==s&&(t.selection=null,(n.onInvalidateSelection||e.noop).call(t.element)),clearTimeout(t.onChangeTimeout),t.currentValue=o,t.selectedIndex=-1,n.triggerSelectOnValidInput&&t.isExactMatch(s)?t.select(0):s.length<n.minChars?t.hide():t.getSuggestions(s)},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},getQuery:function(t){var n,o=this.options.delimiter;return o?(n=t.split(o),e.trim(n[n.length-1])):t},getSuggestionsLocal:function(t){var n,o=this.options,s=t.toLowerCase(),i=o.lookupFilter,a=parseInt(o.lookupLimit,10);return n={suggestions:e.grep(o.lookup,function(e){return i(e,t,s)})},a&&n.suggestions.length>a&&(n.suggestions=n.suggestions.slice(0,a)),n},getSuggestions:function(t){var n,o,s,i,a=this,u=a.options,r=u.serviceUrl;u.params[u.paramName]=t,!1!==u.onSearchStart.call(a.element,u.params)&&(o=u.ignoreParams?null:u.params,e.isFunction(u.lookup)?u.lookup(t,function(e){a.suggestions=e.suggestions,a.suggest(),u.onSearchComplete.call(a.element,t,e.suggestions)}):(a.isLocal?n=a.getSuggestionsLocal(t):(e.isFunction(r)&&(r=r.call(a.element,t)),s=r+"?"+e.param(o||{}),n=a.cachedResponse[s]),n&&e.isArray(n.suggestions)?(a.suggestions=n.suggestions,a.suggest(),u.onSearchComplete.call(a.element,t,n.suggestions)):a.isBadQuery(t)?u.onSearchComplete.call(a.element,t,[]):(a.abortAjax(),i={url:r,data:o,type:u.type,dataType:u.dataType},e.extend(i,u.ajaxSettings),a.currentRequest=e.ajax(i).done(function(e){var n;a.currentRequest=null,n=u.transformResult(e,t),a.processResponse(n,t,s),u.onSearchComplete.call(a.element,t,n.suggestions)}).fail(function(e,n,o){u.onSearchError.call(a.element,t,e,n,o)}))))},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,n=t.length;n--;)if(0===e.indexOf(t[n]))return!0;return!1},hide:function(){var t=this,n=e(t.suggestionsContainer);e.isFunction(t.options.onHide)&&t.visible&&t.options.onHide.call(t.element,n),t.visible=!1,t.selectedIndex=-1,
3756clearTimeout(t.onChangeTimeout),e(t.suggestionsContainer).hide(),t.signalHint(null)},suggest:function(){if(this.suggestions.length){var t,n=this,o=n.options,s=o.groupBy,i=o.formatResult,a=n.getQuery(n.currentValue),u=n.classes.suggestion,r=n.classes.selected,l=e(n.suggestionsContainer),c=e(n.noSuggestionsContainer),g=o.beforeRender,d="";o.triggerSelectOnValidInput&&n.isExactMatch(a)?n.select(0):(e.each(n.suggestions,function(e,n){var r,l;s&&(d+=(l=(r=n).data[s],t===l?"":(t=l,o.formatGroup(r,t)))),d+='<div class="'+u+'" data-index="'+e+'">'+i(n,a,e)+"</div>"}),this.adjustContainerWidth(),c.detach(),l.html(d),e.isFunction(g)&&g.call(n.element,l,n.suggestions),n.fixPosition(),l.show(),o.autoSelectFirst&&(n.selectedIndex=0,l.scrollTop(0),l.children("."+u).first().addClass(r)),n.visible=!0,n.findBestHint())}else this.options.showNoSuggestionNotice?this.noSuggestions():this.hide()},noSuggestions:function(){var t=this,n=t.options.beforeRender,o=e(t.suggestionsContainer),s=e(t.noSuggestionsContainer);this.adjustContainerWidth(),s.detach(),o.empty(),o.append(s),e.isFunction(n)&&n.call(t.element,o,t.suggestions),t.fixPosition(),o.show(),t.visible=!0},adjustContainerWidth:function(){var t,n=this.options,o=e(this.suggestionsContainer);"auto"===n.width?(t=this.el.outerWidth(),o.css("width",t>0?t:300)):"flex"===n.width&&o.css("width","")},findBestHint:function(){var t=this.el.val().toLowerCase(),n=null;t&&(e.each(this.suggestions,function(e,o){var s=0===o.value.toLowerCase().indexOf(t);return s&&(n=o),!s}),this.signalHint(n))},signalHint:function(t){var n="",o=this;t&&(n=o.currentValue+t.value.substr(o.currentValue.length)),o.hintValue!==n&&(o.hintValue=n,o.hint=t,(this.options.onHint||e.noop)(n))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,function(e){return{value:e,data:null}}):t},validateOrientation:function(t,n){return t=e.trim(t||"").toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=n),t},processResponse:function(e,t,n){var o=this,s=o.options;e.suggestions=o.verifySuggestionsFormat(e.suggestions),s.noCache||(o.cachedResponse[n]=e,s.preventBadQueries&&!e.suggestions.length&&o.badQueries.push(t)),t===o.getQuery(o.currentValue)&&(o.suggestions=e.suggestions,o.suggest())},activate:function(t){var n,o=this,s=o.classes.selected,i=e(o.suggestionsContainer),a=i.find("."+o.classes.suggestion);return i.find("."+s).removeClass(s),o.selectedIndex=t,-1!==o.selectedIndex&&a.length>o.selectedIndex?(n=a.get(o.selectedIndex),e(n).addClass(s),n):null},selectHint:function(){var t=e.inArray(this.hint,this.suggestions);this.select(t)},select:function(e){this.hide(),this.onSelect(e)},moveUp:function(){var t=this;if(-1!==t.selectedIndex)return 0===t.selectedIndex?(e(t.suggestionsContainer).children().first().removeClass(t.classes.selected),t.selectedIndex=-1,t.el.val(t.currentValue),void t.findBestHint()):void t.adjustScroll(t.selectedIndex-1)},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(t){var n=this,o=n.activate(t);if(o){var s,i,a,u=e(o).outerHeight();s=o.offsetTop,a=(i=e(n.suggestionsContainer).scrollTop())+n.options.maxHeight-u,s<i?e(n.suggestionsContainer).scrollTop(s):s>a&&e(n.suggestionsContainer).scrollTop(s-n.options.maxHeight+u),n.options.preserveInput||n.el.val(n.getValue(n.suggestions[t].value)),n.signalHint(null)}},onSelect:function(t){var n=this,o=n.options.onSelect,s=n.suggestions[t];n.currentValue=n.getValue(s.value),n.currentValue===n.el.val()||n.options.preserveInput||n.el.val(n.currentValue),n.signalHint(null),n.suggestions=[],n.selection=s,e.isFunction(o)&&o.call(n.element,s)},getValue:function(e){var t,n,o=this.options.delimiter;return o?1===(n=(t=this.currentValue).split(o)).length?e:t.substr(0,t.length-n[n.length-1].length)+e:e},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete"),e(window).off("resize.autocomplete",this.fixPositionCapture),e(this.suggestionsContainer).remove()}},e.fn.devbridgeAutocomplete=function(t,n){var o="autocomplete";return arguments.length?this.each(function(){var s=e(this),i=s.data(o);"string"==typeof t?i&&"function"==typeof i[t]&&i[t](n):(i&&i.dispose&&i.dispose(),i=new l(this,t),s.data(o,i))}):this.first().data(o)},e.fn.autocomplete||(e.fn.autocomplete=e.fn.devbridgeAutocomplete)}); 3757!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(e){var t,n,i,o,r,a,s="Close",l="BeforeClose",c="MarkupParse",d="Open",p="Change",u="mfp",f="."+u,m="mfp-ready",g="mfp-removing",h="mfp-prevent-close",v=function(){},y=!!window.jQuery,C=e(window),w=function(e,n){t.ev.on(u+e+f,n)},b=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},I=function(n,i){t.ev.triggerHandler(u+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},x=function(n){return n===a&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),a=n),t.currTemplate.closeBtn},k=function(){e.magnificPopup.instance||((t=new v).init(),e.magnificPopup.instance=t)};v.prototype={constructor:v,init:function(){var n=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document),t.popupsCache={}},open:function(n){var o;
3757if(!1===n.isObj){t.items=n.items.toArray(),t.index=0;var a,s=n.items;for(o=0;o<s.length;o++)if((a=s[o]).parsed&&(a=a.el[0]),a===n.el[0]){t.index=o;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(!t.isOpen){t.types=[],r="",n.mainEl&&n.mainEl.length?t.ev=n.mainEl.eq(0):t.ev=i,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=b("bg").on("click"+f,function(){t.close()}),t.wrap=b("wrap").attr("tabindex",-1).on("click"+f,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=b("container",t.wrap)),t.contentContainer=b("content"),t.st.preloader&&(t.preloader=b("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;o<l.length;o++){var p=l[o];p=p.charAt(0).toUpperCase()+p.slice(1),t["init"+p].call(t)}I("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(w(c,function(e,t,n,i){n.close_replaceWith=x(i.type)}),r+=" mfp-close-btn-in"):t.wrap.append(x())),t.st.alignTop&&(r+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:C.scrollTop(),position:"absolute"}),(!1===t.st.fixedBgPos||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:i.height(),position:"absolute"}),t.st.enableEscapeKey&&i.on("keyup"+f,function(e){27===e.keyCode&&t.close()}),C.on("resize"+f,function(){t.updateSize()}),t.st.closeOnContentClick||(r+=" mfp-auto-cursor"),r&&t.wrap.addClass(r);var u=t.wH=C.height(),g={};if(t.fixedContentPos&&t._hasScrollBar(u)){var h=t._getScrollbarSize();h&&(g.marginRight=h)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):g.overflow="hidden");var v=t.st.mainClass;return t.isIE7&&(v+=" mfp-ie7"),v&&t._addClassToMFP(v),t.updateItemHTML(),I("BuildControls"),e("html").css(g),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(m),t._setFocus()):t.bgOverlay.addClass(m),i.on("focusin"+f,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),I(d),n}t.updateItemHTML()},close:function(){t.isOpen&&(I(l),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(g),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){I(s);var n=g+" "+m+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var o={marginRight:""};t.isIE7?e("body, html").css("overflow",""):o.overflow="",e("html").css(o)}i.off("keyup.mfp focusin"+f),t.ev.off(f),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&!0!==t.currTemplate[t.currItem.type]||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,I("AfterClose")},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||C.height();t.fixedContentPos||t.wrap.css("height",t.wH),I("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(I("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var r=!!t.st[i]&&t.st[i].markup;I("FirstMarkupParse",r),t.currTemplate[i]=!r||e(r)}o&&o!==n.type&&t.container.removeClass("mfp-"+o+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,I(p,n),o=n.type,t.container.prepend(t.contentContainer),I("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&!0===t.currTemplate[n]?t.content.find(".mfp-close").length||t.content.append(x()):t.content=e:t.content="",I("BeforeAppend"),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;a<r.length;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,I("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){if((void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick)||!(2===n.which||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)){var r=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(r)if(e.isFunction(r)){if(!r.call(t))return!0}else if(C.width()<r)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};I("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(h)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;
3757if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?i.height():document.body.scrollHeight)>(e||C.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){if(n.target!==t.wrap[0]&&!e.contains(t.wrap[0],n.target))return t._setFocus(),!1},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),I(c,[t,n,i]),e.each(n,function(n,i){if(void 0===i||!1===i)return!0;if((o=n.split("_")).length>1){var r=t.find(f+"-"+o[0]);if(r.length>0){var a=o[1];"replaceWith"===a?r[0]!==i[0]&&r.replaceWith(i):"img"===a?r.is("img")?r.attr("src",i):r.replaceWith(e("<img>").attr("src",i).attr("class",r.attr("class"))):r.attr(o[1],i)}}else t.find(f+"-"+n).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:v.prototype,modules:[],open:function(t,n){return k(),(t=t?e.extend(!0,{},t):{}).isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(n){k();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=y?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),y?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var T,_,P,S="inline",E=function(){P&&(_.after(P.addClass(T)).detach(),P=null)};e.magnificPopup.registerModule(S,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(S),w(s+"."+S,function(){E()})},getInline:function(n,i){if(E(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(_||(T=o.hiddenClass,_=b(T),T="mfp-"+T),P=r.after(_).detach().removeClass(T)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var z,O="ajax",M=function(){z&&e(document.body).removeClass(z)},B=function(){M(),t.req&&t.req.abort()};e.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(O),z=t.st.ajax.cursor,w(s+"."+O,B),w("BeforeChange."+O,B)},getAjax:function(n){z&&e(document.body).addClass(z),t.updateStatus("loading");var i=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};I("ParseAjax",a),t.appendContent(e(a.data),O),n.finished=!0,M(),t._setFocus(),setTimeout(function(){t.wrap.addClass(m)},16),t.updateStatus("ready"),I("AjaxContentAdded")},error:function(){M(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(i),""}}});var L;e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure onclick="return false;"><span class="mfp-progress-line"><span></span></span><div class="mfp-img hren"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var n=t.st.image,i=".image";t.types.push("image"),w(d+i,function(){"image"===t.currItem.type&&n.cursor&&e(document.body).addClass(n.cursor)}),w(s+i,function(){n.cursor&&e(document.body).removeClass(n.cursor),C.off("resize"+f)}),w("Resize"+i,t.resizeImage),t.isLowIE&&w("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,L&&clearInterval(L),e.isCheckingImgSize=!1,I("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){L&&clearInterval(L),L=setInterval(function(){i.naturalWi
3757dth>0?t._onImageHasSize(e):(n>200&&clearInterval(L),3===++n?o(10):40===n?o(50):100===n&&o(500))},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,I("ImageLoadComplete")):++o<200?setTimeout(r,100):a())},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),(c=n.img[0]).naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""}(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(L&&clearInterval(L),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var H;e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,c=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};w("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),!(e=t._getItemToZoom()))return void d();(r=c(e)).css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,I("ZoomAnimationEnded")},16)},a)},16)}}),w(l+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(!(e=t._getItemToZoom()))return;r=c(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),w(s+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(n){var i,o=(i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem)).offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(y?i.innerHeight():i[0].offsetHeight)-a-r};return void 0===H&&(H=void 0!==document.createElement("p").style.MozTransform),H?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var A="iframe",F=function(e){if(t.currTemplate[A]){var n=t.currTemplate[A].find("iframe");n.length&&(e||(n[0].src="//about:blank"),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(A,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(A),w("BeforeChange",function(e,t,n){t!==n&&(t===A?F():n===A&&F(!0))}),w(s+"."+A,function(){F()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){if(o.indexOf(this.index)>-1)return this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id
3757)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var j=function(e){var n=t.items.length;return e>n-1?e-n:e<0?n+e:e},W=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,o=".mfp-gallery";if(t.direction=!0,!n||!n.enabled)return!1;r+=" mfp-gallery",w(d+o,function(){n.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",function(){if(t.items.length>1)return t.next(),!1}),i.on("keydown"+o,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),w("UpdateStatus"+o,function(e,n){n.text&&(n.text=W(n.text,t.currItem.index,t.items.length))}),w(c+o,function(e,i,o,r){var a=t.items.length;o.counter=a>1?W(n.tCounter,r.index,a):""}),w("BuildControls"+o,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(h),r=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(h);o.click(function(){t.prev()}),r.click(function(){t.next()}),t.container.append(o.add(r))}}),w(p+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),w(s+o,function(){i.off(o),t.wrap.off("click"+o),t.arrowRight=t.arrowLeft=null})},next:function(e){t.direction=!0,t.index=j(t.index+1),t.updateItemHTML(),1==e&&Wo_StoryProgress()},prev:function(){t.index=j(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=j(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),I("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img"/>').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,I("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var N="retina";e.magnificPopup.registerModule(N,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;(n=isNaN(n)?n():n)>1&&(w("ImageHasSize."+N,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),w("ElementParse."+N,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),k()}); 3758!function(t){t.rcrop={settings:{full:!1,minSize:[20,20],maxSize:[null,null],preserveAspectRatio:!1,inputs:!0,inputsPrefix:"",grid:!1,preview:{display:!1,size:[50,50],wrapper:""}}},ResponsiveCrop=function(e,i){var r=this,a="rcrop-",o={x:0,y:0,width:0,height:0};this.el=e instanceof t?e:t(e),this.image={instance:null,width:0,height:0},this.wrapper=t("<div>",{class:"rcrop-wrapper"}),this.cropArea=t("<div>",{class:"rcrop-croparea"}),this.cropData={width:0,height:0,x:0,y:0},this.outer={wrapper:t("<div>",{class:"rcrop-outer-wrapper"}),left:t("<div>",{class:"rcrop-outer rcrop-outer-left"}),right:t("<div>",{class:"rcrop-outer rcrop-outer-right"}),top:t("<div>",{class:"rcrop-outer rcrop-outer-top"}),bottom:t("<div>",{class:"rcrop-outer rcrop-outer-bottom"})},this.cropAspectRatio,this.preview=null,this.clayfy,this.settings=t.extend(!0,{},t.rcrop.settings,i);var n=function(){if(r.wrapper.insertAfter(r.el),r.wrapper.append(r.el),r.wrapper.append(r.outer.wrapper),r.outer.wrapper.append(r.outer.left,r.outer.right,r.outer.top,r.outer.bottom),r.wrapper.append(r.cropArea),r.cropArea.append('<div class="rcrop-croparea-inner">'),r.settings.grid){var e='<div class="rcrop-grid-line"></div>';r.cropArea.append('<div class="rcrop-grid">'+e+e+"</div>")}if(p(),r.settings.inputs){var i=0!=r.settings.inputsPrefix?r.settings.inputsPrefix+"-":"",a=["x","y","width","height"];t.each(a,function(t,e){r.wrapper.append('<input type="hidden" name="'+i+e+'[]">')})}},p=function(){var e=t('<div class="rcrop-handler-wrapper"></div>');isTouchDevice()?e.append('<div class="rcrop-handler-bottom-right rcrop-handler-corner""></div>'):(t.each(["top-left","top-right","bottom-left","bottom-right"],function(t,i){e.append('<div class="rcrop-handler-'+i+" "+a+'handler-corner""></div>')}),t.each(["top","right","bottom","left"],function(t,i){e.append('<div class="rcrop-handler-'+i+" "+a+'handler-border"></div>')})),r.cropArea.append(e)},c=function(){var t=r.cropArea.position();o={width:Math.round(r.cropArea.width()),height:Math.round(r.cropArea.height()),x:Math.round(t.left),y:Math.round(t.top)}},h=function(){var t=r.cropArea.position(),e=o.width!==Math.round(r.cropArea.width()),i=o.height!==Math.round(r.cropArea.height()),a=o.x!==Math.round(t.left),n=o.y!==Math.round(t.top);s(e,i,a,n)},s=function(e,i,a,o){if(!1!==e&&(r.cropData.width="number"==typeof e?e:z(r.clayfy.newSize.width),r.cropData.width=Math.max(r.cropData.width,r.settings.minSize[0]),r.settings.maxSize[0]&&(r.cropData.width=Math.min(r.cropData.width,r.settings.maxSize[0]))),!1!==i&&(r.cropData.height="number"==typeof i?i:z(r.clayfy.newSize.height),r.cropData.height=Math.max(r.cropData.height,r.settings.minSize[1]),r.settings.maxSize[1]&&(r.cropData.height=Math.min(r.cropData.height,r.settings.maxSize[1]))),(!1!==i||!1!==e)&&r.settings.preserveAspectRatio){var n={max:r.settings.maxSize[0]||r.image.width,min:r.settings.minSize[0]};r.cropData.height*r.cropAspectRatio>n.max||r.cropData.height*r.cropAspectRatio<n.min?r.cropData.height=Math.round(r.cropData.width/r.cropAspectRatio):r.cropData.width=Math.round(r.cropData.height*r.cropAspectRatio)}!1!==a&&(r.cropData.x="number"==typeof a?a:z(r.clayfy.newSize.left),r.cropData.x+r.cropData.width>r.image.width&&(r.cropData.x=r.image.width-r.cropData.width)),!1!==o&&(r.cropData.y="number"==typeof o?o:z(r.clayfy.newSize.top),r.cropData.y+r.cropData.height>r.image.height&&(r.cropData.y=r.image.height-r.cropData.height)),r.settings.inputs&&t.each(["width","height","x","y"],function(t,e){r.wrapper.find('[name$="'+e+'[]"]').val(r.cropData[e])}),r.settings.preview.display&&w()},g=function(){var t=r.el[0].getBoundingClientRect(),e=t.width,i=t.height,a=r.clayfy.newSize,o={width:a.width,height:a.height,top:a.top,left
3758:a.left};r.cropArea.css({width:o.width/e*100+"%",height:o.height/i*100+"%",top:o.top/i*100+"%",left:o.left/e*100+"%"}),r.outer.left.width(o.left/e*100+"%"),r.outer.top.height(o.top/i*100+"%"),r.outer.bottom.css({top:(o.top+o.height)/i*100+"%"}),r.outer.right.css({left:(o.left+o.width)/e*100+"%"})},d=function(){var t=r.clayfy.newSize;r.outer.left.width(t.left),r.outer.top.height(t.top),r.outer.bottom.css({top:t.top+t.outerHeight}),r.outer.right.css({left:t.left+t.outerWidth})},l=function(){var t=r.settings,e=r.clayfy.settings;e.minSize=v(t.minSize),e.maxSize=v(t.maxSize),r.clayfy.draggable.setBounderies()},f=function(){var t=r.settings;r.cropArea.clayfy({type:"resizable",container:r.wrapper,preserveAspectRatio:t.preserveAspectRatio,minSize:v(t.minSize),maxSize:v(t.maxSize)}),r.clayfy=r.cropArea.clayfy("instance"),r.clayfy.originalSize.width=r.settings.minSize[0],r.clayfy.originalSize.height=r.settings.minSize[1];var e=t.full?r.image.height:Math.max(.8*r.image.height,t.minSize[1]),i=t.full?r.image.width:Math.max(.8*r.image.width,t.minSize[0]);r.resize(i,e,"center","center"),r.cropArea.on("mousedown touchstart",l),r.cropArea.on("clayfy-resizestart clayfy-dragstart",c),r.cropArea.on("clayfy-resizeend clayfy-drop",h),r.cropArea.on("clayfy-resize clayfy-drag",d),r.settings.preview.display&&(r.cropArea.on("clayfy-resize clayfy-drag",w),r.cropArea.on("clayfy-cancel",w)),r.cropArea.on("clayfy-resizeend clayfy-drop",g),r.cropArea.on("clayfy-cancel",g),r.cropArea.on("clayfy-resizeend clayfy-drop",function(){r.el.trigger("rcrop-changed",[r])}),r.cropArea.on("clayfy-drag clayfy-resize",function(){r.el.trigger("rcrop-change",[r])})},u=function(){var t=r.settings.preview.size,e=[],i=r.clayfy?r.clayfy.newSize:{width:r.cropArea.width(),height:r.cropArea.height()};return"string"==typeof t[0]&&t[0].indexOf("%")>-1?e[0]=Number(t[0].replace("%",""))/100*i.width:e[0]=t[0],"string"==typeof t[1]&&t[1].indexOf("%")>-1?e[1]=Number(t[1].replace("%",""))/100*i.height:e[1]=t[1],e},y=function(){var e=r.settings.preview.wrapper;e&&(e=e instanceof t?e:t(e)),e&&e.length||(e=t("<div>",{class:"rcrop-preview-wrapper"}),r.wrapper.after(e));var i=u();r.preview=t('<canvas width="'+i[0]+'" height="'+i[1]+'"></canvas>'),r.preview.appendTo(e)},w=function(t){var e=r.cropData;t&&(e=z({width:r.clayfy.newSize.width,height:r.clayfy.newSize.height,x:r.clayfy.newSize.left,y:r.clayfy.newSize.top}));var i=u();r.preview.attr({width:i[0],height:i[1]}),r.preview[0].getContext("2d").drawImage(r.image.instance,e.x,e.y,e.width,e.height,0,0,i[0],i[1])},m=function(t,e){if("object"==typeof t){var i=t instanceof Array?[]:{};for(var r in t)i[r]="number"!=typeof t[r]?null:Math.round(t[r]*e);return i}return Math.round(t*e)},v=function(t){return m(t,r.el.width()/r.image.width)},z=function(t){return m(t,r.image.width/r.el.width())};this.getValues=function(){return{width:r.cropData.width,height:r.cropData.height,y:r.cropData.y,x:r.cropData.x}},this.getRealSize=function(t){var e=new Image;e.onload=function(){return r.image.width=this.width,r.image.height=this.height,"function"==typeof t&&t(),{width:r.image.width,height:r.image.height}},e.onerror=function(){return{width:null,height:null}},e.src=r.el.attr("src"),r.image.instance=e},this.getDataURL=function(e,i){e=e||r.cropData.width,i=i||r.cropData.height;var a=t('<canvas width="'+e+'" height="'+i+'"></canvas>');return a[0].getContext("2d").drawImage(r.image.instance,r.cropData.x,r.cropData.y,r.cropData.width,r.cropData.height,0,0,e,i),a[0].toDataURL()},this.resize=function(t,e,i,a){var o,n,p,c,h=r.settings;t=h.maxSize[0]?Math.min(t,r.image.width,h.maxSize[0]):Math.min(t,r.image.width),e=h.maxSize[1]?Math.min(e,r.image.height,h.maxSize[1]):Math.min(e,r.image.height),t=h.minSize[0]?Math.max(t,h.minSize[0]):t,e=h.minSize[1]?Math.max(e,h.minSize[1]):e,h.preserveAspectRatio&&(t/e>r.cropAspectRatio?t=e*r.cropAspectRatio:e=t/r.cropAspectRatio),t=Math.round(t),e=Math.round(e),o=v(t),n=v(e),(a=void 0===a?r.cropArea.position().top:"center"===a?Math.round((r.image.height-e)/2):Math.round(a))+e>r.image.height&&(a=r.image.height-e),c=v(a),(i=void 0===i?r.cropData.x?z(r.cropArea.position().left):r.cropData.x:"center"===i?Math.round((r.image.width-t)/2):Math.round(i))+t>r.image.width&&(i=r.image.width-t),p=v(i),r.cropArea.css({width:o,height:n,top:c,left:p}),r.clayfy.newSize=r.clayfy.getNewSize(),s(t,e,i,a),d(),g(),r.settings.preview.display&&w()},this.destroy=function(){var t=r.el;r.wrapper.replaceWith(t),t.attr("style","")},function(){r.cropAspectRatio=r.settings.minSize[0]/r.settings.minSize[1],n(),r.settings.preview.display&&y(),r.getRealSize(function(){f(),r.el.trigger("rcrop-ready")})}()};var e=ResponsiveCrop;t.fn.rcrop=function(i){var r=arguments;if(void 0===i||"object"==typeof i)return this.each(function(){t.data(this,"rcrop")||t.data(this,"rcrop",new e(this,i))});if("string"==typeof i&&"_"!==i[0]&&"init"!==i){if("instance"===i)return this.length?t.data(this[0],"rcrop"):null;if(-1!=t.inArray(i,t.fn.rcrop.getters)){var a=t.data(this[0],"rcrop");return a[i].apply(a,Array.prototype.slice.call(r,1))}return this.each(function(){var a=t.data(this,"rcrop");a instanceof e&&"function"==typeof a[i]&&a[i].apply(a,Array.prototype.slice.call(r,1))})}},t.fn.rcrop.getters=["getDataURL","getValues","getRealSize"]}(jQuery); 3759!function(){function e(e,i){function o(e){return e.el[0].scrollHeight-e.el.scrollTop()===e.innerHe
3759ight}function r(e){return e.el[0].scrollWidth-e.el.scrollLeft()===e.innerWidth}this.el=e instanceof $?e:$(e),this.draggableBox,this.x,this.y,this.dX,this.dY,this.diffDX,this.diffDY,this.history={dX:[0,0,0],dY:[0,0,0],diffDX:0,diffDY:0},this.actualPos,this.originalPos,this.initPos={y:0,x:0,scrollTop:null,scrollLeft:null},this.bounderies={},this.droppedTarget,this.scrollable=[],this.container={},this.tempContainer=$("<div>",{style:"position: absolute; top:0; left:0"}),this.droppable={dragElement:[],dropArea:[]},this.status="ready",this.settings=$.extend(!0,{},$.clayfy.settings,i);var a,n,s=this,l=!1,d=!0,g=$("<div>",{style:"height:100%;width:100%;position:fixed;top:0;left:0"});this.contentGhost;var p=function(){s.settings.ghost?(!0===s.settings.ghost?(s.draggableBox=s.el.clone(),s.draggableBox.addClass("clayfy-ghost-opacity")):(s.draggableBox=$("<div>",{margin:s.el.css("margin")}),s.contentGhost=$('<div class="clayfy-ghost-content" style="position:absolute"></div>'),s.draggableBox.append(s.contentGhost)),s.draggableBox.css({position:"absolute",width:"100%",height:"100%"}).addClass("clayfy-ghost")):s.draggableBox=s.el},f=function(e){var t=s.getPosition(s.el),i=s.settings.overflow?s.tempContainer:s.el.parent(),o=s.el.offset(),r=s.initPos.parent?s.initPos.parent.scrollTop():0,a=s.initPos.parent?s.initPos.parent.scrollLeft():0,n={width:s.el.width(),height:s.el.height(),top:t.y,left:t.x};if(!0!==s.settings.ghost&&(n={top:e.pageY-o.top+t.y+5-r,left:e.pageX-o.left+t.x+5-a,width:"auto",height:"auto"}),s.settings.overflow&&(n.top=o.top-r,n.left=o.left-a,!0!==s.settings.ghost&&(n.top=e.pageY-r+5,n.left=e.pageX-a+5)),s.draggableBox.css(n),s.draggableBox.appendTo(i),s.contentGhost){s.contentGhost.html("");var l;switch(typeof s.settings.ghost){case"string":l=s.settings.ghost;break;case"function":l=s.settings.ghost()}if(s.contentGhost.append(l),s.container.offset){var d=s.container.offset.innerBottom,g=s.container.offset.innerRight,p=s.draggableBox.offset(),f=p.top+s.contentGhost.outerHeight()-d,c=p.left+s.contentGhost.outerWidth()-g;f>0&&s.draggableBox.css({top:e.pageY-o.top+t.y+5-f}),c>0&&s.draggableBox.css({left:e.pageX-o.left+t.x+5-c})}}},c=function(e){if("canceling"!==s.status&&s.settings.move){var t=s.getPosition(),i=s.draggableBox.offset();s.contentGhost?s.contentGhost:s.draggableBox;if(s.container.offset){var o=s.container.offset.innerBottom,r=s.container.offset.innerRight;i.top>=o-s.el.outerHeight()&&(t.y+=o-s.el.outerHeight()-i.top),i.left>=r-s.el.outerWidth()&&(t.x+=r-s.el.outerWidth()-i.left)}if(s.el.css({top:t.y,left:t.x}),"clayfy-dropinside"===e.type){var o=e.area.offset.innerBottom,r=e.area.offset.innerRight;i.top>=o-s.el.outerHeight()&&(t.y+=o-s.el.outerHeight()-i.top),i.left>=r-s.el.outerWidth()&&(t.x+=r-s.el.outerWidth()-i.left),s.el.css({top:t.y,left:t.x})}}s.draggableBox.detach()},h=function(){var e=s.settings.container;e instanceof t?s.container=e:s.settings.container&&(s.container=new t(s.el,e))},y=function(e){27===e.keyCode&&s.cancel(e)};this.cancel=function(e){s.status="canceling",s.draggableBox.animate({top:s.initPos.y,left:s.initPos.x},100,function(){s.draggableBox.trigger("mouseup"),s.status="ready"}),null!==s.initPos.scrollTop&&s.initPos.parent.animate({scrollTop:s.initPos.scrollTop},100),null!==s.initPos.scrollLeft&&s.initPos.parent.animate({scrollLeft:s.initPos.scrollLeft},100)},s.scrollables=[];var u,b,v,m,x=function(){$(s.settings.scrollable).each(function(){var e=$
3759(this);if(!e.length)return!0;var t=w(e);if(!t.x&&!t.y)return!0;var i=e[0].getBoundingClientRect(),o=z(e),r=parseInt(e.css("border-top-width")),a=parseInt(e.css("border-left-width")),n={el:e,top:i.top+r,bottom:i.top+o.innerHeight+r,left:i.left+a,right:i.left+o.innerWidth+a,innerHeight:o.innerHeight,innerWidth:o.innerWidth,interval:{top:!1,bottom:!1,left:!1,right:!1},isParent:!s.settings.overflow&&s.el.offsetParent().is(e),isBody:e.is("body")};if(n.isBody){var l=$(window);n.top=0,n.left=0,n.bottom=l.height(),n.right=l.width(),n.innerHeight=l.height(),n.innerWidth=l.width()}s.scrollables.push(n)})},w=function(e){var t=!1,i=!1,o=$(window),r=$("body");return e.is("body")?(r.height()>o.height()&&(i=!0),r.width()>o.width()&&(t=!0)):(e[0].scrollHeight>e.height()&&(i=!0),e[0].scrollWidth>e.width()&&(t=!0)),{x:t,y:i}},z=function(e){var t,i,o,r,a,n,s,l=e instanceof $?e:$(e);return l.length?(t=l[0].style.position,"static"===l.css("position")&&l.css({position:"relative"}),o=$("<div>",{style:"position:absolute;top:0;left:0;bottom:0;right:0"}),i=$("<div>",{style:"position:absolute;top:0;left:0;width:100%;height:100%"}),o.append(i),l.append(o),r=i.width(),a=i.height(),n=parseInt(i.css("border-top-width")),s=parseInt(i.css("border-left-width")),o.remove(),l[0].style.position=t,{innerWidth:r,innerHeight:a,innerOffset:{top:n,left:s,bottom:a+n,right:r+s}}):{width:0,height:0}},B=function(e){var t=s.contentGhost?s.contentGhost:s.draggableBox,i=s.draggableBox[0].getBoundingClientRect(),a=t.offset(),n={top:i.top,bottom:i.top+t.outerHeight(),left:i.left,right:i.left+t.outerWidth(),x:0,y:0};n.x=(n.right-n.left)/2+n.left,n.y=(n.bottom-n.top)/2+n.top,s.history.diffDY>0&&u&&(u=!1,s.y=Math.min(a.top+t.outerHeight(),e.pageY)),s.history.diffDY<0&&b&&(b=!1,s.y=Math.max(a.top,e.pageY)),s.history.diffDX>0&&m&&(m=!1,s.x=Math.min(a.left+t.outerWidth(),e.pageX)),s.history.diffDX<0&&v&&(v=!1,s.x=Math.max(a.left,e.pageX));for(var l=0,d=s.scrollables.length;l<d;l++){var g=s.scrollables[l],p=0,f={top:n.top-g.top,bottom:g.bottom-n.bottom,left:n.left-g.left,right:g.right-n.right,x:n.x<g.right&&n.x>g.left,y:n.y<g.bottom&&n.y>g.top};if(!o(g)&&f.bottom<6&&(f.bottom>-6||g.isBody)&&f.x?(P(e,g,"bottom"),D(g,"top"),p++):(D(g,"bottom"),g.el.scrollTop()&&f.top<6&&(f.top>-6||g.isBody)&&f.x?(P(e,g,"top"),p++):D(g,"top")),g.el.scrollLeft()&&f.left<6&&(f.left>-6||g.isBody)&&f.y?(P(e,g,"left"),D(g,"right"),p++):(D(g,"left"),!r(g)&&f.right<6&&(f.right>-6||g.isBody)&&f.y?(P(e,g,"right"),p++):D(g,"right")),p)break}},P=function(e,t,i){t.interval[i]&&clearInterval(t.interval[i]);var o=function(e){};switch(i){case"bottom":o=function(i){i=i||10,t.el.scrollTop(t.el.scrollTop()+i),t.isParent&&(s.x=e.pageX,s.setBounderies(),s.updateDropArea(),u=!0)};break;case"top":o=function(i){i=i||10,t.el.scrollTop(t.el.scrollTop()-i),t.isParent&&(s.x=e.pageX,s.setBounderies(),s.updateDropArea(),b=!0)};break;case"left":o=function(i){i=i||10,t.el.scrollLeft(t.el.scrollLeft()-i),t.isParent&&(s.y=e.pageY,s.setBounderies(),s.updateDropArea(),v=!0)};break;case"right":o=function(i){i=i||10,t.el.scrollLeft(t.el.scrollLeft()+i),t.isParent&&(s.y=e.pageY,s.setBounderies(),s.updateDropArea(),m=!0)}}o(3),t.isParent||(t.interval[i]=setInterval(o,50))},D=function(e,t){if(t)e.interval[t]&&(clearInterval(e.interval[t]),e.interval[t]=!1);else for(var i in s.scrollables){var o=s.scrollables[i].interval;for(var r in o)o[r]&&(clearInterval(o[r]),o[r]=!1)}};this.appendTo=function(e,t){if(t=t||s.el,(e=e instanceof $?e:$(e)).length){var i=t.offset(),o=e.offset(),r={top:i.top-o.top-parseInt(e.css("border-top-width"))+e.scrollTop(),left:i.left-o.left-parseInt(e.css("border-left-width"))+e.scrollLeft()};"static"===e.css("position")&&e.css("position","relative"),t.appendTo(e).css(r)}};var S=function(){s.el.on("clayfy-dragstart",s.updateDragElement),s.el.on("clayfy-dragstart",s.updateDropArea),s.el.on("clayfy-drag",H),s.el.on("clayfy-drop",W),s.settings.ghost&&(s.el.on("clayfy-dropinside",c),s.el.on("clayfy-dropoutside",c)),s.el.on("clayfy-dragstart",function(){X()||(s.el.removeClass("clayfy-dropinside"),s.draggableBox.removeClass("clayfy-dropinside"))}),s.el.on("clayfy-dragenter",function(e){s.el.addClass("clayfy-dragenter"),s.draggableBox.addClass("clayfy-dragenter"),e.droparea.addClass("clayfy-dragenter"),s.el[0].id&&e.droparea.addClass("clayfy-dragenter-"+s.el[0].id)}),s.el.on("clayfy-dragleave",function(e){s.el.removeClass("clayfy-dropinside"),s.draggableBox.removeClass("clayfy-dropinside"),e.droparea.removeClass("clayfy-dropinside"),s.el[0].id&&e.droparea.removeClass("clayfy-dropinside-"+s.el[0].id)}),s.el.on("clayfy-dragleave clayfy-drop",function(e){s.el.removeClass("clayfy-dragenter"),s.draggableBox.removeClass("clayfy-dragenter"),$(".clayfy-dragenter").removeClass("clayfy-dragenter"),s.el[0].id&&$(".clayfy-dragenter-"+s.el[0].id).removeClass("clayfy-dragenter-"+s.el[0].id)}),s.el.on("clayfy-dropinside",function(e){s.el.addClass("clayfy-dropinside"),s.draggableBox.addClass("clayfy-dropinside"),e.droparea.addClass("clayfy-dropinside"),s.el[0].id&&e.droparea.addClass("clayfy-dropinside-"+s.el[0].id),s.settings.migrate&&s.appendTo(e.drop
3759area)})};this.updateDropArea=function(e){s.droppable.dropArea=[];var t=s.settings.droppable instanceof $?s.settings.droppable:$(s.settings.droppable);s.addDroppable(t)},this.updateDragElement=function(){s.droppable.dragElement=[],s.droppable.dragElement={originalPos:s.getPosition(),id:s.el[0].id,originalDropArea:null,width:s.draggableBox.width(),height:s.draggableBox.height(),x:0,y:0};var e=s.droppable.dragElement;e.setCenter=function(){var t=s.draggableBox.offset();e.x=t.left+e.width/2,e.y=t.top+e.height/2},e.setCenter(),e.originalDropArea=X()},this.resetDroppable=function(e){e&&(s.settings.droppable=e),s.updateDragElement(),s.updateDropArea()},this.addDroppable=function(e){(e instanceof $?e:$(e)).each(function(){var e=$(this),t=e.offset(),i=e.outerHeight(),o=e.outerWidth(),r=parseInt(e.css("border-top-width")),a=parseInt(e.css("border-left-width")),n=$.clayfy.getInner(e);s.droppable.dropArea.push({el:e,id:this.id,left:t.left,top:t.top,width:o,height:i,innerWidth:n.innerWidth,innerHeight:n.innerHeight,offset:{innerTop:t.top+r,innerLeft:t.left+a,innerBottom:n.innerHeight+t.top+r,innerRight:n.innerWidth+t.left+a},right:t.left+o,bottom:t.top+i,active:!1,triggered:!1})})};var H=function(e){var t=s.droppable.dragElement;t.setCenter();for(var i=0,o=s.droppable.dropArea.length;i<o;i++){var r=s.droppable.dropArea[i];r&&(t.x>r.left&&t.x<r.right&&t.y>r.top&&t.y<r.bottom?r.active=!0:r.active=!1,!r.triggered&&r.active?(r.triggered=!0,s.el.trigger($.Event("clayfy-dragenter",{target:r.el[0],droparea:r.el}))):r.triggered&&!r.active&&(r.triggered=!1,s.el.trigger($.Event("clayfy-dragleave",{target:r.el[0],droparea:r.el,area:r}))))}},X=function(){var e=s.droppable.dragElement;e.setCenter();for(var t=!1,i=0,o=s.droppable.dropArea.length;i<o;i++){var r=s.droppable.dropArea[i];r&&(e.x>r.left&&e.x<r.right&&e.y>r.top&&e.y<r.bottom&&(r.active=!0,r.triggered=!0,t=r))}return t},Y=function(e){var t=s.contentGhost?s.contentGhost:s.draggableBox,i={},o=s.el.offset(),r={top:o.top,left:o.left,right:s.droppable.dragElement.width+o.left,bottom:s.droppable.dragElement.height+o.top};t.outerWidth()<e.innerWidth&&(r.right>e.offset.innerRight&&(i.left=parseInt(t.css("left"))+e.offset.innerRight-r.right),r.left<e.offset.innerLeft&&(i.left=parseInt(t.css("left"))+e.offset.innerLeft-r.left)),t.outerHeight()<e.innerHeight&&(r.bottom>e.offset.innerBottom&&(i.top=parseInt(t.css("top"))+e.offset.innerBottom-r.bottom),r.top<e.offset.innerTop&&(i.top=parseInt(s.el.css("top"))+e.offset.innerTop-r.top)),s.el.css(i)},A=function(){var e=s.droppable.dragElement.originalDropArea;e&&s.el.trigger($.Event("clayfy-dropinside",{target:e.el[0],droparea:e.el})),s.settings.overflow&&!s.settings.ghost?s.el.css({left:s.initPos.x-s.initPos.parent.offset().left-parseInt(s.initPos.parent.css("border-left-width"))+s.initPos.scrollLeft,top:s.initPos.y-s.initPos.parent.offset().top-parseInt(s.initPos.parent.css("border-top-width"))+s.initPos.scrollTop}):s.el.css({left:s.initPos.x,top:s.initPos.y})},W=function(){for(var e,t=0,i=s.droppable.dropArea.length;t<i;t++)s.droppable.dropArea[t].active&&(e=s.droppable.dropArea[t]);if("canceling"===s.status){if(e&&(e.active=!1,e.triggered=!1,s.el.trigger($.Event("clayfy-dragleave",{target:e.el[0],droparea:e.el}))),!(e=s.droppable.dragElement.originalDropArea))return;e.active=!0,e.triggered=!0}e?(s.el.trigger($.Event("clayfy-dropinside",{target:e.el[0],droparea:e.el,area:e})),s.settings.fit&&Y(e)):(s.el.trigger("clayfy-dropoutside"),s.settings.dropoutside||A(),s.settings.dropoutside&&s.settings.migrate&&s.settings.overflow&&s.appendTo(s.tempContainer)),e&&(s.droppedTarget=e.el[0])},T=function(e){var t=e.pageX-s.el.offset().left,i=e.pageY-s.el.offset().top,o=$("<div>",{style:"position:absolute;left:0;top:0;width:100%;height:100%"});s.el.append(o);var r=o.width(),a=o.height();return o.remove(),!(t>r)&&!(i>a)},C=function(e){n.is(e.target)||s.el.has(e.target).length&&!s.settings.propagate||(isTouchDevice()||void 0===e.which||1===e.which)&&(e.preventDefault(),T(e)&&(s.settings.coverScreen&&E(),l=!0,document.body.style.cursor=a,s.settings.dragstart.call(s,e),s.el.trigger("clayfy-dragstart"),$(document).on("mousemove touchmove",I).on("mouseup touchend",R)))},R=function(e){if(l){e.preventDefault(),l=!1,d=!0,document.body.style.cursor="",s.settings.overflow&&(s.appendTo(s.initPos.parent,s.draggableBox),s.appendTo(s.initPos.parent)),s.settings.coverScreen&&k(),s.settings.drop.call(s);var t=$.Event("clayfy-drop",{pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY});s.el.trigger(t),$(document).off("mousemove touchmove",I).off("mouseup touchend",R)}},I=function(e){if(l){if(e.preventDefault(),e.originalEvent.touches&&1==e.originalEvent.touches.length)var e=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];if(d){d=!1;var t=s.el.parent();s.initPos.parent=t,s.settings.overflow&&s.appendTo(s.tempContainer,s.draggableBox),s.settings.ghost&&f(e),s.x=e.pageX,s.y=e.pageY,s.setBounderies();var i=s.getPosition(s.el);s.initPos={x:i.x,y:i.y,scrollLeft:t.scrollLeft(),scrollTop:t.scrollTop(),parent:t},s.history={dX:[0,0,0],dY:[0,0,0],diffDX:0,diffDY:0}}s.dX=e.pageX-s.x,s.dY=e.pageY-s.y,$.clayfy.dX=s.dX,$.clayfy.dY=s.dY,s.history.diffDX=(s.history.dX[0]+s.history.dX[1]-(s.history.dX[2]+s.dX))/2,s.history.diffDY=(s.history.dY[0]+s.history.dY[1]-(s.history.dY[2]+s.dY))/2,s.history.dX=[s.history.dX[1],s.history.dX[2],s.dX],s.history.dY=[s.history.dY[1],s.history.dY[2],s.dY],s.fixDeltasWithBounderies(),(s.settings.move||s.settings.ghost)&&s.move(),s.settings.drag.call(s,e);var o=$.Event("clayfy-drag",{shiftKey:e.shiftKey,pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY,altKey:e.altKey});s.el.trigger(o)}},E=function(){$("body").append(g)},k=function(){g.detach()};this.getContainerBounderies=function(){if(!s.container.type)return!1;var e,t,i=s.draggableBox.offset(),o={};
3759return s.container.update(),e=s.contentGhost?s.contentGhost.outerWidth():s.draggableBox.outerWidth(),t=s.contentGhost?s.contentGhost.outerHeight():s.draggableBox.outerHeight(),o={top:i.top-s.container.offset.innerTop,right:s.container.offset.innerRight-i.left-e,bottom:s.container.offset.innerBottom-i.top-t,left:i.left-s.container.offset.innerLeft},isNaN(o.top)&&(o={top:1e13,right:1e13,bottom:1e13,left:1e13}),o},this.setBounderies=function(){var e=s.settings.bounderies;s.actualPos=s.getPosition(),s.bounderies={top:-e[0],right:e[1],bottom:e[2],left:-e[3]};var t=s.getContainerBounderies();t&&(s.bounderies={top:Math.max(-t.top,s.bounderies.top),right:Math.min(t.right,s.bounderies.right),bottom:Math.min(t.bottom,s.bounderies.bottom),left:Math.max(-t.left,s.bounderies.left)})},this.move=function(){s.draggableBox.css({top:s.actualPos.y+$.clayfy.dY,left:s.actualPos.x+$.clayfy.dX})},this.getPosition=function(e){var t,i=s.el.offsetParent(),o=(t=void 0===e?s.draggableBox||s.el:e).position();return{y:o.top+i.scrollTop(),x:o.left+i.scrollLeft()}},this.fixDeltasWithBounderies=function(){$.clayfy.dX>s.bounderies.right&&($.clayfy.dX=s.bounderies.right),$.clayfy.dX<s.bounderies.left&&($.clayfy.dX=s.bounderies.left),$.clayfy.dY<s.bounderies.top&&($.clayfy.dY=s.bounderies.top),$.clayfy.dY>s.bounderies.bottom&&($.clayfy.dY=s.bounderies.bottom),s.settings.moveX||($.clayfy.dX=0),s.settings.moveY||($.clayfy.dY=0)},this.destroy=function(){},function(){s.originalPos=s.getPosition(),s.actualPos=s.originalPos,h(),p(),s.el.addClass("clayfy-box"),s.settings.move||s.el.addClass("clayfy-not-move"),a=s.el.css("cursor"),n=$(s.settings.not),s.settings.overflow&&$("body").append(s.tempContainer),s.el.on("mousedown touchstart",C),$("body").on("mouseup touchend",R),s.settings.escape&&(s.el.on("clayfy-dragstart",function(e){e.stopPropagation(),$(window).on("keydown",y)}),s.el.on("clayfy-drop",function(){$(window).off("keydown",y)})),!1!==s.settings.scrollable&&"node"===s.container.type&&(s.settings.container instanceof t||("string"==typeof s.settings.scrollable?s.settings.scrollable=s.settings.scrollable?s.settings.scrollable+" , "+s.settings.container:s.settings.container:s.settings.scrollable instanceof $&&(s.settings.scrollable=s.settings.scrollable.add(s.settings.container)))),s.el.on("clayfy-dragstart",x),s.el.on("clayfy-drag",B),s.el.on("clayfy-drop",D),0!=s.settings.droppable?(s.updateDragElement(),s.updateDropArea(),S()):s.settings.ghost&&s.el.on("clayfy-drop",c)}()}function t(e,t){this.draggableEl=e instanceof $?e:$(e),this.values,this.el,this.type,this.originalDraggable,this.width=0,this.height=0,this.innerHeight=0,this.innerWidth=0,this.offset={top:0,left:0,innerBottom:0,innerRight:0,innerLeft:0,innerTop:0};var i=this,o=function(){var e=a(i.el);i.width=i.el.width(),i.height=i.el.height(),i.innerWidth=e.innerWidth,i.innerHeight=e.innerHeight,i.offset=i.el.offset(),i.offset.innerTop=i.offset.top+parseInt(i.el.css("border-top-width")),i.offset.innerLeft=i.offset.left+parseInt(i.el.css("border-left-width")),i.offset.innerBottom=i.offset.innerTop+i.innerHeight,i.offset.innerRight=i.offset.innerLeft+i.innerWidth},r=function(){var e=i.getDraggableValues();i.offset={top:e.offset.top-(e.position.top-i.originalDraggable.position.top)-i.values[0],left:e.offset.left-(e.position.left-i.originalDraggable.position.left)-i.values[3]},i.width=i.originalDraggable.outerWidth+i.values[3]+i.values[1],i.height=i.originalDraggable.outerHeight+i.values[0]+i.values[2],i.innerWidth=i.width,i.innerHeight=i.height,i.offset.innerTop=i.offset.top,i.offset.innerLeft=i.offset.left,i.offset.innerBottom=i.offset.top+i.height,i.offset.innerRight=i.offset.left+i.width},a=function(e){var t,i,o,r,a,n=e instanceof $?e:$(e);return n.length?(t=n[0].style.position,"static"===n.css("position")&&n.css({position:"relative"}),o=$("<div>",{style:"position:absolute;top:0;left:0;bottom:0;right:0"}),i=$("<div>",{style:"position:absolute;top:0;left:0;width:100%;height:100%"}),o.append(i),n.append(o),r=i.width(),a=i.height(),o.remove(),n[0].style.position=t,{innerWidth:r,innerHeight:a}):{width:0,height:0}};this.getDraggableValues=function(){var e=i.draggableEl.offset(),t=i.draggableEl.offsetParent();return{position:{top:i.draggableEl.position().top+t.scrollTop(),left:i.draggableEl.position().left+t.scrollLeft()},offset:e,outerWidth:i.draggableEl.outerWidth(),outerHeight:i.draggableEl.outerHeight()}},function(){"string"==typeof t||t instanceof $?(i.el=t instanceof $?t:$(t),i.type="node","static"===i.el.css("position")&&i.el.css("position","relative"),i.update=o):(i.values=t,i.type="object",i.update=r,i.originalDraggable=i.getDraggableValues()),i.update()}()}function i(t,i){this.el=t instanceof $?t:$(t),this.originalSize={},this.initSize={},this.handlers=[],this.actualSize,this.newSize,this.draggable,this.preserveAspectRatio=!1,this.shift=!1,this.status="ready",this.touchableDevice;var r=$.extend(!0,{},$.clayfy.settings,{callbacks:{resizestart:function(){},resize:function(){},resizeend:function(){}}});this.settings=$.extend(!0,{},r,i);
3759var a,n=this,s=!1,l=function(e){27===e.keyCode&&n.cancel()},d=function(){var t=["top left","top right","bottom left","bottom right","left","right","top","bottom"];n.touchableDevice&&(t=["bottom right"]),"static"===n.el.css("position")&&n.el.css("position","relative"),n.cssPosition=n.el.css("position");var i={container:n.settings.container,not:".clayfy-handler",escape:!1,droppable:n.settings.droppable};i=$.extend(!0,{},n.settings,i),n.settings.move&&"relative"!==n.cssPosition||(i.move=!1),n.draggable=new e(n.el,i);for(var r=0;r<t.length;r++){var a=t[r].split(" "),s=!0;for(var l in a)n.settings.hasOwnProperty(a[l])&&n.settings[a[l]]||(s=!1);s&&n.handlers.push(new o(t[r],n))}n.touchableDevice&&n.el.addClass("clayfy-touch-device")};this.getSize=function(){n.parent=n.el.offsetParent();var e=n.parent,t=n.el.position();return{width:n.el.width(),height:n.el.height(),left:t.left+e.scrollLeft(),top:t.top+e.scrollTop(),outerWidth:n.el.outerWidth(),outerHeight:n.el.outerHeight()}},this.getNewSize=function(){var e=n.el.outerHeight(),t=n.el.outerWidth(),i=n.el.position(),o=i.left+n.parent.scrollLeft(),r=i.top+n.parent.scrollTop();return{outerWidth:t,outerHeight:e,top:r,left:o,right:o+t,bottom:r+e,width:n.el.width(),height:n.el.height()}},this.resize={left:function(){n.el.width(n.actualSize.width-$.clayfy.dX),"relative"!==n.cssPosition&&n.el.css({left:n.actualSize.left+$.clayfy.dX})},top:function(){n.el.height(n.actualSize.height-$.clayfy.dY),"relative"!==n.cssPosition&&n.el.css({top:n.actualSize.top+$.clayfy.dY})},bottom:function(){n.el.height(n.actualSize.height+$.clayfy.dY)},right:function(){n.el.width(n.actualSize.width+$.clayfy.dX)}},this.hideHandlers=function(){"ready"===n.status&&($.each(n.handlers,function(e,t){t.el.css("display","none")}),s=!1)},this.showHandlers=function(){s||"ready"!==n.status&&!n.touchableDevice||($.each(n.handlers,function(e,t){t.el.css("display","block")}),s=!0,n.updateHandlersPosition())},this.updateHandlersPosition=function(){n.newSize=n.getNewSize(),$.each(n.handlers,function(e,t){t.updatePosition()})},this.cancel=function(){console.log("cancelled"),n.status="ready",n.hideHandlers(),n.status="canceling",$("body").trigger("mouseup");var e="relative"!==n.cssPosition?n.initSize:{width:n.initSize.width,height:n.initSize.height};n.el.animate(e,100,function(){n.status="ready",n.el.is(":hover")&&n.showHandlers(),n.el.trigger("clayfy-cancel")})},function(){n.touchableDevice=isTouchDevice(),n.originalSize=n.getSize(),n.actualSize=n.originalSize,n.newSize=n.getNewSize(),d(),n.preserveAspectRatio=n.settings.preserveAspectRatio,n.el.on("clayfy-resizestart",function(e){n.initSize=n.getNewSize(),$(window).on("keydown",l),n.status="resizing"}),n.el.on("clayfy-resizeend",function(){$(window).off("keydown",l),n.status="ready"}),n.el.on("clayfy-dragstart",function(e){e.stopPropagation(),n.initSize=n.getSize(),n.status="dragging"}),n.el.on("clayfy-drop",function(e){e.stopPropagation(),n.status="ready"}),n.el.on("clayfy-resize clayfy-drag",n.updateHandlersPosition),$(window).on("resize",n.updateHandlersPosition),n.el.on("clayfy-dragstart",function(e){e.stopPropagation(),$(window).on("keydown",l)}),n.el.on("clayfy-drop",function(e){e.stopPropagation(),$(window).off("keydown",l)});var e=n.el;$.each(n.handlers,function(t,i){n.hideHandlers(),e=e.add(i.el)}),e.on("mouseover",function(){a&&clearTimeout(a),n.showHandlers()}),e.on("mouseout",function(){a=setTimeout(n.hideHandlers,20)}),n.el.on("clayfy-resizeend clayfy-drop",function(e){e.stopPropagation(),n.el.parent().find(":hover").length||n.touchableDevice||(s=!1,n.el.trigger("mouseout"))}),n.touchableDevice&&(e.on("touchstart",function(){a&&clearTimeout(a),n.showHandlers(),a=setTimeout(n.hideHandlers,4e3)}),n.el.on("clayfy-resizeend clayfy-drop",function(){n.el.trigger("click")}))}()}function o(t,i){this.el=$("<div>",{class:"clayfy-handler clayfy-"+t,style:"position: absolute"}),this.resizable=i,this.position=t,this.draggable;var o=this,r=!1;this.updatePosition=function(){var e=i.newSize;switch(o.position){case"left":o.el.css({width:5,left:e.left,top:e.top,height:e.outerHeight});break;case"right":o.el.css({width:5,left:e.right-5,top:e.top,height:e.outerHeight});break;case"top":o.el.css({height:5,left:e.left,top:e.top,width:e.outerWidth});break;case"bottom":o.el.css({height:5,left:e.left,top:e.bottom-5,width:e.outerWidth});break;
3759case"top left":o.el.css({width:8,height:8,left:e.left,top:e.top});break;case"top right":o.el.css({width:8,height:8,left:e.right-8,top:e.top});break;case"bottom left":o.el.css({width:8,height:8,left:e.left,top:e.bottom-8});break;case"bottom right":o.resizable.touchableDevice?o.el.css({width:18,height:18,left:e.right-20,top:e.bottom-20}):o.el.css({width:8,height:8,left:e.right-8,top:e.bottom-8})}},this.setBounderies=function(e){var t,i,r,a,n=e||[1e5,1e5,1e5,1e5],s=[];o.resizable.actualSize=o.resizable.getSize(),t=o.resizable.actualSize,i=o.resizable.settings,r=o.resizable.originalSize.width/o.resizable.originalSize.height,(a=o.draggable.getContainerBounderies())||(a={top:1e13,right:1e13,bottom:1e13,left:1e13});for(var l=0,d=i.maxSize.length;l<d;l++)null===i.maxSize[l]&&(i.maxSize[l]=1e13);$.clayfy.getInner(o.draggable.el);"left"!==o.position&&"top"!==o.position&&"top left"!==o.position||(n[1]=t.outerWidth-i.minSize[0],n[3]=i.maxSize[0]-t.outerWidth,n[2]=t.outerHeight-i.minSize[1],n[0]=i.maxSize[1]-t.outerHeight,o.draggable.settings.bounderies=n,s[3]=Math.min(a.left,n[3],a.top*r,n[0]*r),s[0]=Math.min(a.top,n[0],a.left/r,n[3]/r),s[1]=Math.min(a.right,n[1],a.bottom*r+n[2],n[2]*r),s[2]=Math.min(a.bottom,n[2],a.right/r+n[1],n[1]/r)),"right"!==o.position&&"bottom"!==o.position&&"bottom right"!==o.position||(n[3]=t.outerWidth-i.minSize[0],n[1]=i.maxSize[0]-t.outerWidth,n[0]=t.outerHeight-i.minSize[1],n[2]=i.maxSize[1]-t.outerHeight,o.draggable.settings.bounderies=n,s[1]=Math.min(a.right,n[1],a.bottom*r,n[2]*r),s[2]=Math.min(a.bottom,n[2],a.right/r,n[1]/r),s[3]=Math.min(a.left,n[3],a.top*r+n[0],n[0]*r),s[0]=Math.min(a.top,n[0],a.left/r+n[3],n[3]/r)),"bottom left"===o.position&&(n[0]=t.outerHeight-i.minSize[1],n[1]=t.outerWidth-i.minSize[0],n[2]=i.maxSize[1]-t.outerHeight,n[3]=i.maxSize[0]-t.outerWidth,o.draggable.settings.bounderies=n,s[3]=parseInt(Math.min(a.left,n[3],a.bottom*r,n[2]*r)),s[2]=parseInt(Math.min(a.bottom,n[2],a.left/r,n[3]/r)),s[0]=parseInt(Math.min(a.top,n[0],a.right/r+n[1],n[1]/r)),s[1]=parseInt(Math.min(a.right,n[1],a.top*r+n[0],n[0]*r))),"top right"===o.position&&(n[0]=i.maxSize[1]-t.outerHeight,n[1]=i.maxSize[0]-t.outerWidth,n[2]=t.outerHeight-i.minSize[1],n[3]=t.outerWidth-i.minSize[0],o.draggable.settings.bounderies=n,s[0]=parseInt(Math.min(a.top,n[0],a.right/r,n[1]/r)),s[1]=parseInt(Math.min(a.right,n[1],a.top*r,n[0]*r)),s[3]=parseInt(Math.min(a.left,n[3],a.bottom*r+n[2],n[2]*r)),s[2]=parseInt(Math.min(a.bottom,n[2],a.left/r+n[3],n[3]/r))),o.originalBounderies={top:-n[0],right:n[1],bottom:n[2],left:-n[3]},o.aspectRatioBounderies={top:-s[0],right:s[1],bottom:s[2],left:-s[3]},o.draggable.bounderies=o.resizable.preserveAspectRatio?o.aspectRatioBounderies:o.originalBounderies},this.fixDeltas=function(){var e=$.clayfy;if(o.resizable.preserveAspectRatio)t=o.resizable.originalSize.width/o.resizable.originalSize.height;if(!o.resizable.preserveAspectRatio&&o.resizable.shiftKey)var t=o.resizable.actualSize.width/o.resizable.actualSize.height;(o.resizable.preserveAspectRatio||o.resizable.shiftKey)&&("right"===o.position&&(e.dY=e.dX/t),"bottom"===o.position&&(e.dX=e.dY*t),"left"===o.position&&(e.dY=e.dX/t),"top"===o.position&&(e.dX=e.dY*t),"top left"===o.position&&(e.dY=e.dX/t),"top right"===o.position&&(e.dY=-e.dX/t),"bottom left"===o.position&&(e.dY=-e.dX/t),"bottom right"===o.position&&(e.dY=e.dX/t))},function(){i.settings.className&&o.el.addClass(i.settings.className),o.updatePosition(),o.resizable.el.after(o.el),o.draggable=new e(o.el,{move:!1,container:i.draggable.container,scroll:!1,escape:!1}),o.draggable.el.on("clayfy-drop",function(e){i.el.trigger("clayfy-resizeend"),i.settings.callbacks.resizeend()}),o.draggable.el.on("clayfy-dragstart",function(e){e.stopPropagation(),o.resizable.preserveAspectRatio||(o.resizable.originalSize=o.resizable.getSize()),i.el.trigger("clayfy-beforeresize"),o.setBounderies(),i.el.trigger("clayfy-resizestart"),i.settings.callbacks.resizestart(),r=!1}),o.draggable.el.on("clayfy-drag",function(e){e.shiftKey&&!i.preserveAspectRatio&&(i.shiftKey=!0),e.shiftKey||(i.shiftKey=!1),!r||e.shiftKey||i.preserveAspectRatio||(console.log("Desactivate: preserve aspect ratio"),o.draggable.bounderies=o.originalBounderies,r=!1),r||!e.shiftKey||i.preserveAspectRatio||(console.log("Activate: preserve aspect ratio"),o.draggable.bounderies=o.aspectRatioBounderies,r=!0),i.preserveAspectRatio&&!i.shiftKey&&(o.draggable.bounderies=o.aspectRatioBounderies)}),t.indexOf("left")>-1&&o.draggable.el.on("clayfy-drag",function(e){(i.preserveAspectRatio||i.shiftKey)&&(o.fixDeltas(),"left"===t&&i.resize.top()),i.resize.left()}),t.indexOf("top")>-1&&o.draggable.el.on("clayfy-drag",function(e){(i.preserveAspectRatio||i.shiftKey)&&(o.fixDeltas(),"top"===t&&i.resize.left()),i.resize.top()}),t.indexOf("right")>-1&&o.draggable.el.on("clayfy-drag",function(e){(i.preserveAspectRatio||i.shiftKey)&&(o.fixDeltas(),"right"===t&&i.resize.bottom()),i.resize.right()}),t.indexOf("bottom")>-1&&o.draggable.el.on("clayfy-drag",function(e){(i.preserveAspectRatio||i.shiftKey)&&(o.fixDeltas(),"bottom"===t&&i.resize.right()),i.resize.bottom()}),o.draggable.el.on("clayfy-drag",function(e){i.el.trigger("clayfy-resize"),i.settings.callbacks.resize()}),o.resizable.touchableDevice&&o.el.addClass("clayfy-touch-device")}()}function r(t,i){this.el=t instanceof $?t:$(t),this.draggableBox,this.dropArea=$("<div>",{class:"clayfy-sort-droparea"}),this.draggable,this.droppable,this.droppableParent,this.index,this.indexRelative,this.parent,this.settings=$.extend(!0,{},$.clayfy.settings,i);
3759var o,r=this,a=function(e){27===e.keyCode&&r.cancel()},n=function(){r.draggableBox=r.el.clone(),r.draggableBox.css({position:"absolute",width:"100%",height:"100%"}).addClass("clayfy-sort-dragging");var e=r.el.parent();"static"===e.css("position")&&e.css("position","relative")},s=function(){f(),c(),r.index=r.droppable.index(r.el),r.parent=r.el.parent(),r.indexRelative=r.parent.find(r.droppable).index(r.el),r.draggableBox.css({width:r.el.outerWidth(),height:r.el.outerHeight(),top:r.el.position().top,left:r.el.position().left}),l(),r.draggableBox.appendTo(r.parent),r.el.css({visibility:"hidden"})},l=function(){r.dropArea.appendTo(r.el.parent()),r.dropArea.css({position:"absolute",width:r.el.outerWidth(),height:r.el.outerHeight(),top:r.el.position().top+parseInt(r.el.css("margin-top"))-parseInt(r.dropArea.css("border-top-width")),left:r.el.position().left+parseInt(r.el.css("margin-left"))-parseInt(r.dropArea.css("border-left-width"))})},d=function(e){var t=r.parent.find(r.droppable);if(r.parent.is($(r.droppedTarget).parent())){var i=t.index(r.el);r.indexRelative<i?t.eq(r.indexRelative).before(r.el):t.eq(r.indexRelative).after(r.el)}else t.length?t.eq(r.indexRelative).before(r.el):r.parent.append(r.el);l()},g=function(e){f(),(!1===r.el.triggerHandler("validateChange")||!r.parent.is($(r.droppedTarget).parent())&&!r.settings.export||o)&&d();var t=r.dropArea.parent().offset(),i=r.draggableBox.parent().offset(),a=r.el.position().left+(t.left-i.left),n=r.el.position().top+(t.top-i.top);return r.draggableBox.animate({top:n,left:a},200,function(){r.dropArea.detach(),r.el[0].style.visibility="",r.draggableBox.detach(),f();var e=r.droppable.index(r.el);e!=r.index&&(r.index=e,r.el.trigger($.Event("clayfy-changeorder",{index:r.index,order:r.droppable}))),r.el.parent().find(".clayfy-sort-helper").remove()}),o=!1,!1},p=function(e){if(!r.el.is(e.target)){f();var t=r.droppable.index(e.target),i=r.droppable.index(r.el);r.droppedTarget=e.target,t>i?$(e.target).after(r.el):$(e.target).before(r.el),l(),r.draggable.updateDropArea(),r.parent.find(r.droppable).length<2?r.parent.find(".clayfy-sort-helper").length||r.parent.append('<div class="clayfy-sort-helper" style="position: absolute; width: 100%; height: 100%; top: 0; left:0"></div>'):r.parent.find(".clayfy-sort-helper").remove(),$(".clayfy-sort-helper").each(function(){var e=$
3759(this);e.parent().is(r.droppableParent)&&r.draggable.addDroppable(e)})}},f=function(){r.settings.siblings?r.droppable=r.settings.siblings instanceof $?r.settings.siblings:$(r.settings.siblings):r.droppable=r.el.siblings().andSelf()},c=function(){r.droppableParent||(r.droppableParent=r.el.parent()),r.droppable.each(function(){r.droppableParent=r.droppableParent.add($(this).parent())})};this.cancel=function(){o=!0,$("body").trigger("mouseup")},function(){f(),c(),n(),r.el.on("mousedown touchstart",function(e){"mousedown"===e.type&&1!==e.which||(s(),r.draggableBox.trigger($.Event(e.type,e)))});var t=$.extend(!0,{},r.settings,{droppable:r.droppable,escape:!1,dropoutside:!0});r.draggable=new e(r.draggableBox,t),r.draggableBox.on("clayfy-drop",g),r.draggableBox.on("clayfy-dropoutside",function(e){return!1}),r.draggableBox.on("clayfy-dragenter",p),r.draggableBox.on("clayfy-dragstart",function(){r.draggable.resetDroppable(r.droppable),$(".clayfy-sort-helper").each(function(){var e=$(this);e.parent().is(r.droppableParent)&&r.draggable.addDroppable(e)})}),r.draggableBox.on("clayfy-dragstart",function(e){e.stopPropagation(),$(window).on("keydown",a)}),r.draggableBox.on("clayfy-drop",function(){$(window).off("keydown",a)})}()}$.clayfy={dX:0,dY:0,container:function(e,i){return new t(e,i)},settings:{type:"draggable",bounderies:[1e7,1e7,1e7,1e7],container:"",moveX:!0,moveY:!0,move:!0,not:"",ghost:!1,coverScreen:!0,scrollable:"",droppable:"",fit:!0,dropoutside:!1,migrate:!1,overflow:!1,escape:!0,propagate:!0,preserveAspectRatio:!1,maxSize:[500,200],minSize:[100,50],left:!0,top:!0,right:!0,bottom:!0,className:"",siblings:"",export:!0,dragstart:function(e){},drag:function(e){},drop:function(e){}},getInner:function(e){var t,i,o,r,a,n=e instanceof $?e:$(e);return n.length?(t=n[0].style.position,"static"===n.css("position")&&n.css({position:"relative"}),o=$("<div>",{style:"position:absolute;top:0;left:0;bottom:0;right:0"}),i=$("<div>",{style:"position:absolute;top:0;left:0;width:100%;height:100%"}),o.append(i),n.append(o),r=i.width(),a=i.height(),o.remove(),n[0].style.position=t,{innerWidth:r,innerHeight:a}):{width:0,height:0}}};var a;$.fn.clayfy=function(t){var o=arguments;if(void 0===t||"object"==typeof t){var n=$.clayfy.settings.type;switch(void 0!==t&&void 0!==t.type&&(n=t.type),n){case"draggable":a=e;break;case"resizable":a=i;break;case"sortable":a=r}return this.each(function(){$.data(this,"clayfy")||$.data(this,"clayfy",new a(this,t))})}if("string"==typeof t&&"_"!==t[0]&&"init"!==t){if("instance"===t)return this.length?$.data(this[0],"clayfy"):null;if(0==Array.prototype.slice.call(o,1).length&&-1!=$.inArray(t,$.fn.clayfy.getters)){var s=$.data(this[0],"clayfy");return s[t].apply(s,Array.prototype.slice.call(o,1))}return this.each(function(){var e=$.data(this,"clayfy");"function"==typeof e[t]&&e[t].apply(e,Array.prototype.slice.call(o,1))})}},$.fn.clayfy.getters=["getPosition"]}(jQuery); 3760isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints}; 3761 3762!function(a,u){a.guessLanguage=(a.module||{}).exports=new function(){var e=a._languageData||{};"object"==typeof module&&module.exports===a&&(e=require("./_languageData")||{});var n=20,i=300,t={ab:"Abkhazian",af:"Afrikaans",ar:"Arabic",az:"Azeri",be:"Belarusian",bg:"Bulgarian",bn:"Bengali",bo:"Tibetan",br:"Breton",ca:"Catalan",ceb:"Cebuano",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",fa:"Farsi",fi:"Finnish",fo:"Faroese",fr:"French",fy:"Frisian",gd:"Scots Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Pahawh Hmong",hr:"Croatian",hu:"Hungarian",hy:"Armenian",id:"Indonesian",is:"Icelandic",it:"Italian",ja:"Japanese",ka:"Georgian",kk:"Kazakh",km:"Cambodian",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",nd:"Ndebele",ne:"Nepali",nl:"Dutch",nn:"Nynorsk",no:"Norwegian",nso:"Sepedi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-PT":"Portuguese (Portugal)","pt-B
3762R":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sa:"Sanskrit",bs:"Serbo-Croatian",sk:"Slovak",sl:"Slovene",so:"Somali",sq:"Albanian",sr:"Serbian",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",th:"Thai",tl:"Tagalog",tlh:"Klingon",tn:"Setswana",tr:"Turkish",ts:"Tsonga",tw:"Twi",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",ve:"Venda",vi:"Vietnamese",xh:"Xhosa",zh:"Chinese","zh-TW":"Traditional Chinese (Taiwan)",zu:"Zulu"},r={ab:12026,af:40,ar:26020,az:26030,be:11890,bg:26050,bn:26040,bo:26601,br:1361,ca:3,ceb:26060,cs:26080,cy:26560,da:26090,de:26160,el:26165,en:26110,eo:11933,es:26460,et:26120,eu:1232,fa:26130,fi:26140,fo:11817,fr:26150,fy:1353,gd:65555,gl:1252,gu:26599,ha:26170,haw:26180,he:26592,hi:26190,hr:26070,hu:26200,hy:26597,id:26220,is:26210,it:26230,ja:26235,ka:26600,kk:26240,km:1222,ko:26255,ku:11815,ky:26260,la:26280,lt:26300,lv:26290,mg:1362,mk:26310,ml:26598,mn:26320,mr:1201,ms:1147,ne:26330,nl:26100,nn:172,no:26340,pa:65550,pl:26380,ps:26350,pt:26390,ro:26400,ru:26410,sa:1500,bs:1399,sk:26430,sl:26440,so:26450,sq:26010,sr:26420,sv:26480,sw:26470,ta:26595,te:26596,th:26594,tl:26490,tlh:26250,tn:65578,tr:26500,tw:1499,uk:26520,ur:26530,uz:26540,vi:26550,zh:26065,"zh-TW":22},F=[["Armenian","hy"],["Hebrew","he"],["Bengali","bn"],["Gurmukhi","pa"],["Greek","el"],["Gujarati","gu"],["Oriya","or"],["Tamil","ta"],["Telugu","te"],["Kannada","kn"],["Malayalam","ml"],["Sinhala","si"],["Thai","th"],["Lao","lo"],["Tibetan","bo"],["Burmese","my"],["Georgian","ka"],["Mongolian","mn"],["Khmer","km"],["Pahawh Hmong","hmn"]],o="unknown",g=["cs","af","pl","hr","ro","sk","sl","tr","hu","az","et","sq","ca","es","fr","de","nl","it","da","is","no","sv","fi","lv","pt","ve","lt","tl","cy","vi"],l=["en","ceb","ha","so","tlh","id","haw","la","sw","eu","nr","nso","zu","xh","ss","st","tn","ts"].concat(g),s=["ru","uk","kk","uz","mn","sr","mk","bg","ky"],h=["ar","fa","ps","ur"],c=["hi","ne"],p=["pt-BR","pt-PT"],m={"Basic Latin":/[\u0000-\u007F]/g,"Latin-1 Supplement":/[\u0080-\u00FF]/g,"Latin Extended-A":/[\u0100-\u017F]/g,"Latin Extended-B":/[\u0180-\u024F]/g,"IPA Extensions":/[\u0250-\u02AF]/g,"Spacing Modifier Letters":/[\u02B0-\u02FF]/g,"Combining Diacritical Marks":/[\u0300-\u036F]/g,"Greek and Coptic":/[\u0370-\u03FF]/g,Cyrillic:/[\u0400-\u04FF]/g,"Cyrillic Supplement":/[\u0500-\u052F]/g,Armenian:/[\u0530-\u058F]/g,Hebrew:/[\u0590-\u05FF]/g,Arabic:/[\u0600-\u06FF]/g,Syriac:/[\u0700-\u074F]/g,"Arabic Supplement":/[\u0750-\u077F]/g,Thaana:/[\u0780-\u07BF]/g,NKo:/[\u07C0-\u07FF]/g,Devanagari:/[\u0900-\u097F]/g,Bengali:/[\u0980-\u09FF]/g,Gurmukhi:/[\u0A00-\u0A7F]/g,Gujarati:/[\u0A80-\u0AFF]/g,Oriya:/[\u0B00-\u0B7F]/g,Tamil:/[\u0B80-\u0BFF]/g,Telugu:/[\u0C00-\u0C7F]/g,Kannada:/[\u0C80-\u0CFF]/g,Malayalam:/[\u0D00-\u0D7F]/g,Sinhala:/[\u0D80-\u0DFF]/g,Thai:/[\u0E00-\u0E7F]/g,Lao:/[\u0E80-\u0EFF]/g,Tibetan:/[\u0F00-\u0FFF]/g,Burmese:/[\u1000-\u109F]/g,Georgian:/[\u10A0-\u10FF]/g,"Hangul Jamo":/[\u1100-\u11FF]/g,Ethiopic:/[\u1200-\u137F]/g,"Ethiopic Supplement":/[\u1380-\u139F]/g,Cherokee:/[\u13A0-\u13FF]/g,"Unified Canadian Aboriginal Syllabics":/[\u1400-\u167F]/g,Ogham:/[\u1680-\u169F]/g,Runic:/[\u16A0-\u16FF]/g,"Pahawh Hmong":/[\u16B0-\u16B8]/g,Tagalog:/[\u1700-\u171F]/g,Hanunoo:/[\u1720-\u173F]/g,Buhid:/[\u1740-\u175F]/g,Tagbanwa:/[\u1760-\u177F]/g,Khmer:/[\u1780-\u17FF]/g,Mongolian:/[\u1800-\u18AF]/g,Limbu:/[\u1900-\u194F]/g,"Tai Le":/[\u1950-\u197F]/g,"New Tai Lue":/[\u1980-\u19DF]/g,"Khmer Symbols":/[\u19E0-\u19FF]/g,Buginese:/[\u1A00-\u1A1F]/g,Balinese:/[\u1B00-\u1B7F]/g,"Phonetic Extensions":/[\u1D00-\u1D7F]/g,"Phonetic Extensions Supplement":/[\u1D80-\u1DBF]/g,"Combining Diacritical Marks Supplement":/[\u1DC0-\u1DFF]/g,"Latin Extended Additional":/[\u1E00-\u1EFF]/g,"Greek Extended":/[\u1F00-\u1FFF]/g,"General Punctuation":/[\u2000-\u206F]/g,"Superscripts and Subscripts":/[\u2070-\u209F]/g,"Currency Symbols":/[\u20A0-\u20CF]/g,"Combining Diacritical Marks for Symbols":/[\u20D0-\u20FF]/g,"Letterlike Symbols":/[\u2100-\u214F]/g,"Number Forms":/[\u2150-\u218F]/g,Arrows:/[\u2190-\u21FF]/g,"Mathematical Operators":/[\u2200-\u22FF]/g,"Miscellaneous Technical":/[\u2300-\u23FF]/g,"Control Pictures":/[\u2400-\u243F]/g,"Optical Character Recognition":/[\u2440-\u245F]/g,"Enclosed Alphanumerics":/[\u2460-\u24FF]/g,"Box Drawing":/[\u2500-\u257F]/g,"Block Elements":/[\u2580-\u259F]/g,"Geometric Shapes":/[\u25A0-\u25FF]/g,"Miscellaneous Symbols":/[\u2600-\u26FF]/g,Dingbats:/[\u2700-\u27BF]/g,"Miscellaneous Mathematical Symbols-A":/[\u27C0-\u27EF]/g,"Supplemental Arrows-A":/[\u27F0-\u27FF]/g,"Braille Patterns":/[\u2800-\u28FF]/g,"Supplemental Arrows-B":/[\u2900-\u297F]/g,"Miscellaneous Mathematical Symbols-B":/[\u2980-\u29FF]/g,"Supplemental Mathematical Operators":/[\u2A00-\u2AFF]/g,"Miscellaneous Symbols and Arrows":/[\u2B00-\u2BFF]/g,Glagolitic:/[\u2C00-\u2C5F]/g,"Latin Extended-C":/[\u2C60-\u2C7F]/g,Coptic:/[\u2C80-\u2CFF]/g,"Georgian Supplement":/[\u2D00-\u2D2F]/g,Tifinagh:/[\u2D30-\u2D7F]/g,"Ethiopic Extended":/[\u2D80-\u2DDF]/g,"Supplemental Punctuation":/[\u2E00-\u2E7F]/g,"CJK Radicals Supplement":/[\u2E80-\u2EFF]/g,"KangXi Radicals":/[\u2F00-\u2FDF]/g,"Ideographic Description Characters":/[\u2FF0-\u2FFF]/g,"CJK Symbols and Punctuation":/[\u3000-\u303F]/g,Hiragana:/[\u3040-\u309F]/g,Katakana:/[\u30A0-\u30FF]/g,Bopomofo:/[\u3100-\u312F]/g,"Hangul Compatibility Jamo":/[\u3130-\u318F]/g,Kanbun:/[\u3190-\u319F]/g,"Bopomofo Extended":/[\u31A0-\u31BF]/g,"CJK Strokes":/[\u31C0-\u31EF]/g,"Katakana Phonet
3762ic Extensions":/[\u31F0-\u31FF]/g,"Enclosed CJK Letters and Months":/[\u3200-\u32FF]/g,"CJK Compatibility":/[\u3300-\u33FF]/g,"CJK Unified Ideographs Extension A":/[\u3400-\u4DBF]/g,"Yijing Hexagram Symbols":/[\u4DC0-\u4DFF]/g,"CJK Unified Ideographs":/[\u4E00-\u9FFF]/g,"Yi Syllables":/[\uA000-\uA48F]/g,"Yi Radicals":/[\uA490-\uA4CF]/g,"Modifier Tone Letters":/[\uA700-\uA71F]/g,"Latin Extended-D":/[\uA720-\uA7FF]/g,"Syloti Nagri":/[\uA800-\uA82F]/g,"Phags-pa":/[\uA840-\uA87F]/g,"Hangul Syllables":/[\uAC00-\uD7AF]/g,"High Surrogates":/[\uD800-\uDB7F]/g,"High Private Use Surrogates":/[\uDB80-\uDBFF]/g,"Low Surrogates":/[\uDC00-\uDFFF]/g,"Private Use Area":/[\uE000-\uF8FF]/g,"CJK Compatibility Ideographs":/[\uF900-\uFAFF]/g,"Alphabetic Presentation Forms":/[\uFB00-\uFB4F]/g,"Arabic Presentation Forms-A":/[\uFB50-\uFDFF]/g,"Variation Selectors":/[\uFE00-\uFE0F]/g,"Vertical Forms":/[\uFE10-\uFE1F]/g,"Combining Half Marks":/[\uFE20-\uFE2F]/g,"CJK Compatibility Forms":/[\uFE30-\uFE4F]/g,"Small Form Variants":/[\uFE50-\uFE6F]/g,"Arabic Presentation Forms-B":/[\uFE70-\uFEFF]/g,"Halfwidth and Fullwidth Forms":/[\uFF00-\uFFEF]/g,Specials:/[\uFFF0-\uFFFF]/g};function d(a,e){var n=function(a){var u={};for(var e in m){var n=a.match(m[e]),i=(n?n.length:0)/a.length;u[e]=i}return u}(a);if(n["Hangul Syllables"]+n["Hangul Jamo"]+n["Hangul Compatibility Jamo"]>=.4)e.apply(u,["ko"]);else if(n["Greek and Coptic"]>=.4)e.apply(u,["el"]);else if(n.Hiragana+n.Katakana+n["Katakana Phonetic Extensions"]>=.2)e.apply(u,["ja"]);else if(n["CJK Unified Ideographs"]+n.Bopomofo+n["Bopomofo Extended"]+n["KangXi Radicals"]>=.4)e.apply(u,["zh"]);else if(n.Cyrillic>=.4)b(a,s,e);else if(n.Arabic+n["Arabic Presentation Forms-A"]+n["Arabic Presentation Forms-B"]>=.4)b(a,h,e);else if(n.Devanagari>=.4)b(a,c,e);else{for(var i=0,t=F.length;i<t;i++)if(n[F[i][0]]>=.4)return void e.apply(u,[F[i][1]]);n["Latin-1 Supplement"]+n["Latin Extended-A"]+n["IPA Extensions"]>=.4?b(a,g,function(n){"pt"==n?b(a,p,e):e.apply(u,[n])}):n["Basic Latin"]>=.15?b(a,l,e):e.apply(u,[o])}}function b(a,e,i){if(a.length<n)i.apply(u,[o]);else{for(var t={},r=function(a){for(var u={},e=[],n=(a=a.toLowerCase()).split(""),i=0,t=n.length-2;i<t;i++){var r=n[i]+n[i+1]+n[i+2]+"";u[r]?u[r]+=1:u[r]=1}for(var i in u)e[e.length]=[i,u[i]];return e.sort(function(a,u){return u[1]-a[1]})}(a),F=0,g=e.length;F<g;F++){var l=e[F].toLowerCase(),s=y(l)||null;s&&(t[l]=A(r,s))}var h=[];for(var c in t)h.push([c,t[c]]);if(0!=h.length){var p=h.sort(function(a,u){return a[1]-u[1]});i.apply(u,[p[0][0]])}else i.apply(u,[o])}}var f={};function y(a){if(f[a])return f[a];var u=e[a];if(!u)return{};for(var n=u.match(/([\s\S]{1,3})/g),i={},t=0,r=n.length;t<r;t++)i[n[t]]=t;return f[a]=i,i}function A(a,u){for(var e=0,n=0,t=a.length;n<t;n++)u[a[n][0]]?e+=Math.abs(a[n][1]-u[a[n][0]]):e+=i;return e}return{detect:function(a,e){a?d(a=a.substr(0,4096).replace(/[\u0021-\u0040]/g,""),e):e.apply(u,[o])},info:function(a,e){this.detect(a,function(a){a!==o?e.apply(u,[[a,r[a],t[a]]]):e.apply(u,[[o,o,o]])})},code:function(a,e){this.detect(a,function(a){a!==o?e.apply(u,[r[a]]):e.apply(u,[-1])})},name:function(a,e){this.detect(a,function(a){a!==o?e.apply(u,[t[a]]):e.apply(u,[o])})}}}}(this); 3763!function(t,e,i,s){t.widget("ui.triggeredAutocomplete",t.extend(!0,{},t.ui.autocomplete.prototype,{options:{trigger:"@",allowDuplicates:!1},_create:function(){var e=this;this.id_map=new Object,this.stopIndex=-1,this.stopLength=-1,this.contents="",this.cursorPos=0,this.element.bind("keydown.autocomplete.fix",function(i){switch(i.keyCode){case t.ui.keyCode.ESCAPE:e.close(i),i.stopImmediatePropagation();break;case t.ui.keyCode.UP:case t.ui.keyCode.DOWN:e.menu.element.is(":visible")||i.stopImmediatePropagation()}});var i=this.element.attr("id_map");i&&(this.id_map=jQuery.parseJSON(i)),this.ac=t.ui.autocomplete.prototype,this.ac._create.apply(this,arguments),this.updateHidden(),this.options.select=function(t,i){var s=e.contents,n=e.cursorPos,o=s.substring(n,s.length),r=s.substring(0,n);r=r.substring(0,r.lastIndexOf(e.options.trigger));var a=e.element.scrollTop();this.value=r+e.options.trigger+i.item.username+" "+o,e.element.scrollTop(a),e.id_map[i.item.label]=i.item.value,e.updateHidden();var l=r.length+e.options.trigger.length+i.item.username.length+2;if(this.createTextRange){var u=this.createTextRange();u.move("character",l),u.select()}else this.setSelectionRange&&this.setSelectionRange(l,l);return!1},this.options.focus=function(t,e){return!1},this.menu.options.blur=function(t,e){return!1},this.element.focus(function(){e.updateHidden()}),this.element.change(function(){e.updateHidden()})},_renderItem:function(e,i){return void 0!=i.img?t("<li></li>").data("item.autocomplete",i).append("<a><img src='"+i.img+"' /><span>"+i.label+" <span class='small-mention'>@"+i.username+"</span></span></a>").appendTo(e):t("<li></li>").data("item.autocomplete",i).append(t("<a></a>").text(i.label)).appendTo(e)},_move:function(t,e){this.menu.element.is(":visible")?this.menu.first()&&/^previous/.test(t)||this.menu.last()&&/^next/.test(t)?this.menu.deactivate():this.menu[t](e):this.search(null,e)},search:function(t,e){var i=this.element.val(),s=this.getCursor();this.contents=i,this.cursorPos=s;i.substring(i.lastIndexOf(this.options.trigger)-1,s),new RegExp("\\B\\"+this.options.trigger+"([\\w\\-]+)");if(i.indexOf(this.options.trigger)>=0){var n=(i=i.substring(0,s)).substring(i.lastIndexOf(this.options.trigger)+1,i.length);if(this.stopIndex==i.lastIndexOf(this.options.trigger)&&n.length>this.stopLength&&(n=""),n.length>0)return this.updateHidden(),this._search(n);this.close()}},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(i){null!=i?(n(t.map(i,function(t){if(label="string"==typeof t?t:t.label,!s.id_map[label]||s.options.allowDuplicates)return t})),s.stopLength=-1,s.stopIndex=-1):(s.stopLength=e.term.length,s.stopIndex=s.contents.lastIndexOf(s.options.trigger),s.close())}})}):this.source=this.options.source},destroy:function(){t.Widget.prototype.destroy.call(this)},getCursor:function(){var t=this.element[0];if(t.selectionStart)return t.selectionStart;if(t.ownerDocument.selection){var e=t.ownerDocument.selection.createRange();if(!e)return 0;var i=t.createTextRange(),s=i.duplicate();return i.moveToBookmark(e.getBookmark()),s.setEndPoint("EndToStart",i),s.text.length}},updateHidden:function(){var e=this.options.trigger,i=this.element.scrollTop(),s=this.element.val();for(var n in this.id_map){var o=e+n;o=o.replace(/[^a-zA-Z 0-9@]+/g,"\\$&");var r=new RegExp(o,"g");s==(s=s.replace(r,e+"["+this.id_map[n]+"]"))&&delete this.id_map[n]}t(this.options.hidden).val(s),this.element.scrollTop(i)}}))}(jQuery,window,document); 3764 3765!function($){$.fn.extend({limit:function(limit,element){var interval,f,self=$(this);$(this).focus(function(){interval=window.setInterval(substring,100)}),$(this).blur(function(){clearInterval(interval),substring()}),substringFunction="function substring(){ var val = $(self).val();var length = val.length;if(length > limit){$(self).val($(self).val().substring(0,limit));}",void 0!==element&&(substringFunction+="if($(element).html() != limit-length){$(element).html((limit-length<=0)?'0':limit-length);}"),substringFunction+="}",eval(substringFunction),substring()}})}(jQuery); 3766 3767/*! 3768 * jQuery Form Plugin 3769 * version: 3.51.0-2014.06.20 3770 * Requires jQuery v1.5 or later 3771 * Copyright (c) 2014 M. Alsup 3772 * Examples and documentation at: http://malsup.com/jquery/form/ 3773 * Project repository: https://github.com/malsup/form 3774 * Dual licensed under the MIT and GPL licenses.
3775 * https://github.com/malsup/form#copyright-and-license 3776 */ 3777!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("<input type='file'/>").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;i<a.length;i++)n.append(a[i].name,a[i].value);if(t.extraData){var o=r(t.extraData);for(i=0;i<o.length;i++)o[i]&&n.append(o[i][0],o[i][1])}t.data=null;var s=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:u||"POST"});t.uploadProgress&&(s.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(a/n*100)),t.uploadProgress(e,a,n,r)},!1),r}),s.data=null;var c=s.beforeSend;return s.beforeSend=function(e,r){r.data=t.formData?t.formData:n,c&&c.call(this,e,r)},e.ajax(s)}function s(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(r){a("cannot get iframe.contentWindow document: "+r)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function o(){function t(){try{var e=n(g).readyState;a("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(r){a("Server abort: ",r," (",r.name,")"),s(k),j&&clearTimeout(j),j=void 0}}var r=f.attr2("target"),i=f.attr2("action"),o="multipart/form-data",c=f.attr("enctype")||f.attr("encoding")||o;w.setAttribute("target",p),(!u||/post/i.test(u))&&w.setAttribute("method","POST"),i!=m.url&&w.setAttribute("action",m.url),m.skipEncodingOverride||u&&!/post/i.test(u)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(j=setTimeout(function(){T=!0,s(D)},m.timeout));var l=[];try{if(m.extraData)for(var d in m.extraData)m.extraData.hasOwnProperty(d)&&l.push(e.isPlainObject(m.extraData[d])&&m.extraData[d].hasOwnProperty("name")&&m.extraData[d].hasOwnProperty("value")?e('<input type="hidden" name="'+m.extraData[d].name+'">').val(m.extraData[d].value).appendTo(w)[0]:e('<input type="hidden" name="'+d+'">').val(m.extraData[d]).appendTo(w)[0]);m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(h){var x=document.createElement("form").submit;x.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",c),r?w.setAttribute("target",r):f.removeAttr("target"),e(l).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(y){i="parsererror",x.error=r=y||i}}catch(y){a("error caught: ",y),i="error",x.error=r=y||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,y,b,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;l<h.length;l++)c=e(h[l]),i?c.prop("disabled",!1):c.removeAttr("disabled");if(m=e.extend(!0,{},e.ajaxSettings,t),m.context=m.context||m,p="jqFormIO"+(new Date).getTime(),m.iframeTarget?(v=e(m.iframeTarget),b=v.attr2("name"),b?p=b:v.attr2("name",p)):(v=e('<iframe name="'+p+'" src="'+m.iframeSrc+'" />'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.c
3777all(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;y=w.clk,y&&(b=y.name,b&&!y.disabled&&(m.extraData=m.extraData||{},m.extraData[b]=y.value,"image"==y.type&&(m.extraData[b+".x"]=w.clk_x,m.extraData[b+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(y,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var b=t.error;t.error=function(e,r,a){var n=t.context||this;b.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;E<h.length;E++)h[E]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n){if(n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!e.isReady&&i.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(i.s,i.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",n,t).bind("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r){var a=[];if(0===this.length)return a;var i,o=this[0],s=this.attr("id"),u=t?o.getElementsByTagName("*"):o.elements;if(u&&!/MSIE [678]/.test(navigator.userAgent)&&(u=e(u).get()),s&&(i=e(':input[form="'+s+'"]').get(),i.length&&(u=(u||[]).concat(i))),!u||!u.length)return a;var c,l,f,m,d,p,h;for(c=0,p=u.length;p>c;c++)if(d=u[c],f=d.name,f&&!d.disabled)if(t&&o.clk&&"image"==d.type)o.clk==d&&(a.push({name:f,value:e(d).val(),type:d.type}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));else if(m=e.fieldValue(d,!0),m&&m.constructor==Array)for(r&&r.push(d),l=0,h=m.length;h>l;l++)a.push({name:f,value:m[l]});else if(n.fileapi&&"file"==d.type){r&&r.push(d);var v=d.files;if(v.length)for(l=0;l<v.length;l++)a.push({name:f,value:v[l],type:d.type});else a.push({name:f,value:"",type:d.type})}else null!==m&&"undefined"!=typeof m&&(r&&r.push(d),a.push({name:f,value:m,type:d.type,required:d.required}));if(!t&&o.clk){var g=e(o.clk),x=g[0];f=x.name,f&&!x.disabled&&"image"==x.type&&(a.push({name:f,value:g.val()}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}))}return a}
3777,e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor==Array)for(var i=0,o=n.length;o>i;i++)r.push({name:a,value:n[i]});else null!==n&&"undefined"!=typeof n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}); 3778 3779/*! 3780 * Bootstrap v3.3.4 (http://getbootstrap.com) 3781 * Copyright 2011-2015 Twitter, Inc. 3782 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3783 */�
vendor: 32,026 bytes, lines 3783-3784
3783 3784if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){
vendor: 1,503 bytes, lines 3784-3785
3784 3785var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;
3785e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); 3786 3787function Wo_progressIconLoader(e){e.each(function(){return progress_icon_elem=$(this).find("i.progress-icon"),default_icon=progress_icon_elem.attr("data-icon"),hide_back=!1,1==progress_icon_elem.hasClass("hidde")&&(hide_back=!0),1==$(this).find("i.fa-spinner").length?(progress_icon_elem.removeClass("fa-spinner").removeClass("fa-spin").addClass("fa-"+default_icon),1==hide_back&&progress_icon_elem.hide()):progress_icon_elem.removeClass("fa-"+default_icon).addClass("fa-spinner fa-spin").show(),!0})}function Wo_StartBar(){$(".barloading").css("display","block")}function Wo_FinishBar(){$(".barloading").css("display","none")}$(document).ready(function(){$(".nav-footer-toggle").on("click",function(e){e.preventDefault(),$(this).parent().toggleClass("Wide-Footer"),$(".nav-footer-toggle i").toggleClass("fa-arrow-circle-up fa-arrow-circle-down")})}); 3788 3789!function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){var i=/{{([a-z][a-z0-9\-_]*)}}/gi;return e.replace(i,function(e){return t(arguments[1])||""})},getCookie:function(e){var t="; "+document.cookie,i=t.split("; "+e+"=");return 2!=i.length?void 0:i.pop().split(";").shift()}
3789,setCookie:function(e,t,i,n,o){var s=new Date;s.setDate(s.getDate()+(i||365));var r=[e+"="+t,"expires="+s.toUTCString(),"path="+(o||"/")];n&&r.push("domain="+n),document.cookie=r.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,n,o=0;if(0===e.length)return o;for(t=0,n=e.length;t<n;++t)i=e.charCodeAt(t),o=(o<<5)-o+i,o|=0;return o},normaliseHex:function(e){return"#"==e[0]&&(e=e.substr(1)),3==e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e},getContrast:function(e){e=this.normaliseHex(e);var t=parseInt(e.substr(0,2),16),i=parseInt(e.substr(2,2),16),n=parseInt(e.substr(4,2),16),o=(299*t+587*i+114*n)/1e3;return o>=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38,n=(t>>16)+i,o=(t>>8&255)+i,s=(255&t)+i,r=(16777216+65536*(n<255?n<1?0:n:255)+256*(o<255?o<1?0:o:255)+(s<255?s<1?0:s:255)).toString(16).slice(1);return"#"+r},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object}};
3789e.status={deny:"deny",allow:"allow",dismiss:"dismiss"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&"undefined"!=typeof e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){function n(){this.initialise.apply(this,arguments)}function o(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function s(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function r(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(e.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(e.status.allow),!0;var i=Object.keys(e.status),n=this.getStatus(),o=i.indexOf(n)>=0;return o&&t(n),o}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function c(){var e=this.options,i="top"==e.position||"bottom"==e.position?"banner":"floating";t.isMobile()&&(i="floating");var n=["cc-"+i,"cc-type-"+e.type,"cc-theme-"+e.theme];e["static"]&&n.push("cc-static"),n.push.apply(n,a.call(this));p.call(this,this.options.palette);return this.customStyleSelector&&n.push(this.customStyleSelector),n}function l(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message),Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var n=i.compliance[i.type];n||(n=i.compliance.info),e.compliance=t.interpolateString(n,function(t){return e[t]});var o=i.layouts[i.layout];return o||(o=i.layouts.basic),t.interpolateString(o,function(t){return e[t]})}function u(i){var n=this.options,o=document.createElement("div"),s=n.container&&1===n.container.nodeType?n.container:document.body;o.innerHTML=i;var r=o.children[0];return r.style.display="none",t.hasClass(r,"cc-window")&&e.hasTransition&&t.addClass(r,"cc-invisible"),this.onButtonClick=h.bind(this),r.addEventListener("click",this.onButtonClick),n.autoAttach&&(s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r)),r}function h(n){var o=n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),r=s&&s[1]||!1;r&&(this.setStatus(r),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0)),t.hasClass(o,"cc-revoke")&&this.revokeChoice()}function p(e){var i=t.hash(JSON.stringify(e)),n="cc-color-override-"+i,o=t.isPlainObject(e);return this.customStyleSelector=o?n:null,o&&d(i,e,"."+n),o}function d(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},r=n.popup,a=n.button,c=n.highlight;r&&(r.text=r.text?r.text:t.getContrast(r.background),r.link=r.link?r.link:r.text,s[o+".cc-window"]=["color: "+r.text,"background-color: "+r.background],s[o+".cc-revoke"]=["color: "+r.text,"background-color: "+r.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+r.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+v(a.background)]),c?(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text]));var l=document.createElement("style");document.head.appendChild(l),e.customStyles[i]={references:1,element:l.sheet};var u=-1;for(var h in s)s.hasOwnProperty(h)&&l.sheet.insertRule(h+"{"+s[h].join(";")+"}",++u)}function v(e){return e=t.normaliseHex(e),"000000"==e?"#222":t.getLuminance(e)}function f(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}function m(e,t){for(var i=0,n=e.length;i<n;++i){var o=e[i];if(o instanceof RegExp&&o.test(t)||"string"==typeof o&&o.length&&o===t)return!0}return!1}function b(){var t=this.setStatus.bind(this),i=this.options.dismissOnTimeout;"number"==typeof i&&i>
3789=0&&(this.dismissTimeout=window.setTimeout(function(){t(e.status.dismiss)},Math.floor(i)));var n=this.options.dismissOnScroll;if("number"==typeof n&&n>=0){var o=function(i){window.pageYOffset>Math.floor(n)&&(t(e.status.dismiss),window.removeEventListener("scroll",o),this.onWindowScroll=null)};this.onWindowScroll=o,window.addEventListener("scroll",o)}}function y(){if("info"!=this.options.type&&(this.options.revokable=!0),t.isMobile()&&(this.options.animateRevokable=!1),this.options.revokable){var e=a.call(this);this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector);var i=this.options.revokeBtn.replace("{{classes}}",e.join(" "));this.revokeBtn=u.call(this,i);var n=this.revokeBtn;if(this.options.animateRevokable){var o=t.throttle(function(e){var i=!1,o=20,s=window.innerHeight-20;t.hasClass(n,"cc-top")&&e.clientY<o&&(i=!0),t.hasClass(n,"cc-bottom")&&e.clientY>s&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}var g={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"http://cookie
3789sandyou.com",close:"❌"},elements:{header:'<span class="cc-header">{{header}}</span> ',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0" class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}"><!--googleoff: all-->{{children}}<!--googleon: all--></div>',revokeBtn:'<div class="cc-revoke {{classes}}">Cookie Policy</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{dismiss}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{dismiss}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block","static":!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};return n.prototype.initialise=function(e){this.options&&this.destroy(),t.deepExtend(this.options={},g),t.isPlainObject(e)&&t.deepExtend(this.options,e),r.call(this)&&(this.options.enabled=!1),m(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),m(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var i=this.options.window.replace("{{classes}}",c.call(this).join(" ")).replace("{{children}}",l.call(this)),n=this.options.overrideHTML;if("string"==typeof n&&n.length&&(i=n),this.options["static"]){var o=u.call(this,'<div class="cc-grower">'+i+"</div>");o.style.display="",this.element=o.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=u.call(this,i);b.call(this),y.call(this),this.options.autoOpen&&this.autoOpen()},n.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,f(this.options.palette),this.options=null},n.prototype.open=function(t){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},n.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},n.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&s.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options["static"]){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}var r=20;this.openingTimeout=setTimeout(o.bind(this,i),r)}},n.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),o.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options["static"]&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=s.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},n.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},n.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},n.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},n.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0}
vendor: 4,979 bytes, line 3789
3789,n.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss},n.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled&&this.open()},n.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},n.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},n.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},n}(),e.Location=function(){function e(e){t.deepExtend(this.options={},s),t.isPlainObject(e)&&t.deepExtend(this.options,e),this.currentServiceIndex=-1}function i(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function n(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var r=0,a=o.length;r<a;++r){var c=o[r].split(":",2);s.setRequestHeader(c[0].replace(/^\s+|\s+$/g,""),c[1].replace(/^\s+|\s+$/g,""))}"function"==typeof t&&(s.onreadystatechange=function(){s.readyState>3&&t(s)}),s.send(n)}function o(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}var s={timeout:5e3,services:["freegeoip","ipinfo","maxmind"],serviceDefinitions:{freegeoip:function(){return{url:"//freegeoip.net/json/?callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return i.error?o(i):{code:i.country_code}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?o(i):{code:i.country}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?o({error:i.statusMessage}):{code:i.countryCode}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){return window.geoip2?void geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(i){e(o(i))}},function(t){e(o(t))}):void e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};return e.prototype.getNextService=function(){var e;do e=this.getServiceByIdx(++this.currentServiceIndex);while(this.currentServiceIndex<this.options.services.length&&!e);return e},e.prototype.getServiceByIdx=function(e){var i=this.options.services[e];if("function"==typeof i){var n=i();return n.name&&t.deepExtend(n,this.options.serviceDefinitions[n.name](n)),n}return"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},e.prototype.locate=function(e,t){var i=this.getNextService();return i?(this.callbackComplete=e,this.callbackError=t,void this.runService(i,this.runNextServiceOnError.bind(this))):void t(new Error("No services to run"))},e.prototype.setupUrl=function(e){var t=this.getCurrentServiceOpts();return e.url.replace(/\{(.*?)\}/g,function(i,n){if("callback"===n){var o="callback"+Date.now();return window[o]=function(t){e.__JSONP_DATA=JSON.stringify(t)},o}if(n in t.interpolateUrl)return t.interpolateUrl[n]})},e.prototype.runService=function(e,t){var o=this;if(e&&e.url&&e.callback){var s=e.isScript?i:n,r=this.setupUrl(e);s(r,function(i){var n=i?i.responseText:"";e.__JSONP_DATA&&(n=e.__JSONP_DATA,delete e.__JSONP_DATA),o.runServiceCallback.call(o,t,e,n)},this.options.timeout,e.data,e.headers)}},e.prototype.runServiceCallback=function(e,t,i){var n=this,o=function(t){s||n.onServiceResult.call(n,e,t)},s=t.callback(o,i);s&&this.onServiceResult.call(this,e,s)},e.prototype.onServiceResult=function(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)},e.prototype.runNextServiceOnError=function(e,t){if(e){this.logError(e);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},e.prototype.getCurrentServiceOpts=function(){var e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}
3789:"function"==typeof e?e():t.isPlainObject(e)?e:{}},e.prototype.completeService=function(e,t){this.currentServiceIndex=-1,e&&e(t)},e.prototype.logError=function(e){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.error("The service["+t+"] ("+i.url+") responded with the following error",e)},e}(),e.Law=function(){function e(e){this.initialise.apply(this,arguments)}var i={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","SI","ES","SE","GB","UK"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};return e.prototype.initialise=function(e){t.deepExtend(this.options={},i),t.isPlainObject(e)&&t.deepExtend(this.options,e)},e.prototype.get=function(e){var t=this.options;return{hasLaw:t.hasLaw.indexOf(e)>=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},e.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},e}(),e.initialise=function(t,i,n){var o=new e.Law(t.law);i||(i=function(){}),n||(n=function(){}),e.getCountryCode(t,function(n){delete t.law,delete t.location,n.code&&(t=o.applyLaw(t,n.code)),i(new e.Popup(t))},function(i){delete t.law,delete t.location,n(i,new e.Popup(t))})},e.getCountryCode=function(t,i,n){if(t.law&&t.law.countryCode)return void i({code:t.law.countryCode});if(t.location){var o=new e.Location(t.location);return void o.locate(function(e){i(e||{})},n)}i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{}); 3790/*! 3791 * @preserve 3792 * 3793 * Readmore.js jQuery plugin 3794 * Author: @jed_foster 3795 * Project home: http://jedfoster.github.io/Readmore.js 3796 * Licensed under the MIT license 3797 * 3798 * Debounce function from http://davidwalsh.name/javascript-debounce-function 3799 */!(function (t) { 3800 "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports ? (module.exports = t(require("jquery"))) : t(jQuery); 3801})(function (t) { 3802 "use strict"; 3803 function e(t, e, i) { 3804 var o; 3805 return function () { 3806 var n = this, 3807 a = arguments, 3808 s = function () { 3809 (o = null), i || t.apply(n, a); 3810 }, 3811 r = i && !o; 3812 clearTimeout(o), (o = setTimeout(s, e)), r && t.apply(n, a); 3813 }; 3814 } 3815 function i(t) { 3816 var e = ++h; 3817 return String(null == t ? "rmjs-" : t) + e; 3818 } 3819 function o(t) { 3820 var e = t.clone().css({ height: "auto", width: t.width(), maxHeight: "none", overflow: "hidden" }).insertAfter(t), 3821 i = e.outerHeight(), 3822 o = parseInt( 3823 e 3824 .css({ maxHeight: "" }) 3825 .css("max-height") 3826 .replace(/[^-\d\.]/g, ""), 3827 10 3828 ), 3829 n = t.data("defaultHeight"); 3830 e.remove(); 3831 var a = o || t.data("collapsedHeight") || n; 3832 t.data({ expandedHeight: i, maxHeight: o, collapsedHeight: a }).css({ maxHeight: "none" }); 3833 } 3834 function n(t) { 3835 if (!d[t.selector]) { 3836 var e = " "; 3837 t.embedCSS && "" !== t.blockCSS && (e += t.selector + " + [data-readmore-toggle], " + t.selector + "[data-readmore]{" + t.blockCSS + "}"), 3838 (e += t.selector + "[data-readmore]{transition: height " + t.speed + "ms;overflow: hidden;}"), 3839 (function (t, e) { 3840 var i = t.createElement("style"); 3841 (i.type = "text/css"), i.styleSheet ? (i.styleSheet.cssText = e) : i.appendChild(t.createTextNode(e)), t.getElementsByTagName("head")[0].appendChild(i); 3842 })(document, e), 3843 (d[t.selector] = !0); 3844 } 3845 } 3846 function a(e, i) { 3847 (this.element = e), 3848 (this.options = t.extend({}, r, i)), 3849 n(this.options), 3850 (this._defaults = r), 3851 (this._name = s), 3852 this.init(), 3853 window.addEventListener ? (window.addEventListener("load", c), window.addEventListener("resize", c)) : (window.attachEvent("load", c), window.attachEvent("resize", c)); 3854 } 3855 var s = "readmore", 3856 r = { 3857 speed: 100, 3858 collapsedHeight: 200, 3859 heightMargin: 16, 3860 moreLink: '<a href="#">Read More</a>', 3861 lessLink: '<a href="#">Close</a>', 3862 embedCSS: !0, 3863 blockCSS: "display: block; width: 100%;", 3864 startOpen: !1, 3865 blockProcessed: function () {}, 3866 beforeToggle: function () {}, 3867 afterToggle: function () {}, 3868 }, 3869 d = {}, 3870 h = 0, 3871 c = e(function () { 3872 }, 100); 3873 (a.prototype = { 3874 init: function () { 3875 var e = t(this.element); 3876 e.data({ defaultHeight: this.options.collapsedHeight, heightMargin: this.options.heightMargin }), o(e); 3877 var n = e.data("collapsedHeight"), 3878 a = e.data("heightMargin"); 3879 if (e.outerHeight(!0) <= n + a) return this.options.blockProcessed && "function" == typeof this.options.blockProcessed && this.options.blockProcessed(e, !1), !0; 3880 var s = e.attr("id") || i(), 3881 r = this.options.startOpen ? this.options.lessLink : this.options.moreLink; 3882 e.attr({ "data-readmore": "", "aria-expanded": this.options.startOpen, id: s }), 3883 e.after( 3884 t(r) 3885 .on( 3886 "click", 3887 (function (t) { 3888 return function (i) { 3889 t.toggle(this, e[0], i); 3890 }; 3891 })(this) 3892 ) 3893 .attr({ "data-readmore-toggle": s, "aria-controls": s }) 3894 ), 3895 this.options.startOpen || e.css({ height: n }), 3896 this.options.blockProcessed && "function" == typeof this.options.blockProcessed && this.options.blockProcessed(e, !0); 3897 }, 3898 toggle: function (e, i, o) { 3899 o && o.preventDefault(), e || (e = t('[aria-controls="' + this.element.i
3899d + '"]')[0]), i || (i = this.element); 3900 var n = t(i), 3901 a = "", 3902 s = "", 3903 r = !1, 3904 d = n.data("collapsedHeight"); 3905 n.height() <= d ? ((a = n.data("expandedHeight") + "px"), (s = "lessLink"), (r = !0)) : ((a = d), (s = "moreLink")), 3906 this.options.beforeToggle && "function" == typeof this.options.beforeToggle && this.options.beforeToggle(e, n, !r), 3907 n.css({ height: a }), 3908 n.on( 3909 "transitionend", 3910 (function (i) { 3911 return function () { 3912 i.options.afterToggle && "function" == typeof i.options.afterToggle && i.options.afterToggle(e, n, r), t(this).attr({ "aria-expanded": r }).off("transitionend"); 3913 }; 3914 })(this) 3915 ), 3916 t(e).replaceWith( 3917 t(this.options[s]) 3918 .on( 3919 "click", 3920 (function (t) { 3921 return function (e) { 3922 t.toggle(this, i, e); 3923 }; 3924 })(this) 3925 ) 3926 .attr({ "data-readmore-toggle": n.attr("id"), "aria-controls": n.attr("id") }) 3927 ); 3928 }, 3929 destroy: function () { 3930 t(this.element).each(function () { 3931 var e = t(this); 3932 e.attr({ "data-readmore": null, "aria-expanded": null }).css({ maxHeight: "", height: "" }).next("[data-readmore-toggle]").remove(), e.removeData(); 3933 }); 3934 }, 3935 }), 3936 (t.fn.readmore = function (e) { 3937 return false; 3938 var i = arguments, 3939 o = this.selector; 3940 return ( 3941 (e = e || {}), 3942 "object" == typeof e 3943 ? this.each(function () { 3944 if (t.data(this, "plugin_" + s)) { 3945 var i = t.data(this, "plugin_" + s); 3946 i.destroy.apply(i); 3947 } 3948 (e.selector = o), t.data(this, "plugin_" + s, new a(this, e)); 3949 }) 3950 : "string" == typeof e && "_" !== e[0] && "init" !== e 3951 ? this.each(function () { 3952 var o = t.data(this, "plugin_" + s); 3953 o instanceof a && "function" == typeof o[e] && o[e].apply(o, Array.prototype.slice.call(i, 1)); 3954 }) 3955 : void 0 3956 ); 3957 }); 3958});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.