(r=>{function g(a){r(".gforms_note_error").remove(),r("#gform-page-loader-mask").hide(),r("#gform-settings").before('
'+a+"
"),r(".alert").get(0).scrollIntoView()}function l(){r(".gforms_note_error").remove()}jQuery(document).ready(function(){let d=r("#gform-settings"),e=r(".gfga-disconnect"),s=(0
'),r.post(ajaxurl,{action:"get_ga4_data_streams",account:e.data("account-id"),property:e.val(),nonce:t,token:n},function(a){a.success?r("#ga-data-streams").html(a.data):(r("#ga-data-streams").html(""),g(a.data[0].message))})}),r("#gtmproperty").on("change",function(a){l();var e=r(this).find(":selected"),t=e.data("accountId"),n=e.data("path"),e=e.data("token"),o=r("body").find('input[name="gfganonce"]').val();r("#gtm-containers").html('
'),r("#gtm-workspaces").html(""),r.post(ajaxurl,{action:"get_gtm_containers",accountId:t,path:n,nonce:o,token:e},function(a){a.success?r("#gtm-containers").html(a.body):(g(a.data[0].message),r("#gtm-containers").html(""))})}),r(document).on("change","#gacontainer",function(a){l();var e=r(this).find(":selected"),t=e.data("path"),e=e.data("token"),n=r("body").find('input[name="gfganonce"]').val();r("#gtm-workspaces").html('
'),r.post(ajaxurl,{action:"get_gtm_workspaces",path:t,nonce:n,token:e},function(a){a.success?r("#gtm-workspaces").html(a.body):(g(a.data[0].message),r("#gform_setting_workspace").show(),r("#gtm-workspaces").html(""))})})})})((window.GF_Google_Analytics_Admin=window.GF_Google_Analytics_Admin||{},jQuery));