I have observation data $x_1, \dots, x_n$ with associated positive weights $w_1, \dots, w_n$ such that $\sum_i w_i = 1$, representing a "weighted" empirical distribution with CDF $$ \hat{F}(x) = \sum_{i=1}^n w_i I(x_i \le x)$$ where $I$ is the indicator function. This generalizes the usual empirical distribution, which is the special case $w_i = 1/n$. Is there a closed-form expression for a confidence interval for the median in this case?
I'm aware that this question has been answered before for the case $w_i = 1/n$, for which the confidence interval can be obtain from the binomial distribution, but it's not obvious to me how to treat general case. I realize that bootstrap estimators are possible, but I'm interested in deriving an analytical expression, if possible.