SNIPPET_CHOOSER_MODAL_ONLOAD_HANDLERS={choose:function(n,t){function o(t){$("a.snippet-choice",n.body).on("click",(function(){return n.loadUrl(this.href),!1})),$(".pagination a",t).on("click",(function(){return s(this.href),!1}))}var e,i=$("form.snippet-search",n.body),r=i.attr("action");function c(){return s(r,i.serialize()),!1}function s(n,t){var i={url:n,success:function(n,t){e=null,$("#search-results").html(n),o($("#search-results"))},error:function(){e=null}};t&&(i.data=t),e=$.ajax(i)}$("form.snippet-search",n.body).on("submit",c),$("#snippet-chooser-locale",n.body).on("change",c),$("#id_q").on("input",(function(){e&&e.abort(),clearTimeout($.data(this,"timer"));var n=setTimeout(c,200);$(this).data("timer",n)})),o(n.body)},chosen:function(n,t){n.respond("snippetChosen",t.result),n.close()}};